logo elektroda
logo elektroda
X
logo elektroda

[CB2S - BK7231N] US Plug with Power Monitoring and a Bit Of a Challenge to Flash It

Zain00 795 2
ADVERTISEMENT
  • #1 21109889
    Zain00
    Level 10  
    I received this tuya US plug from AliExpress.
    https://www.aliexpress.com/item/1005006849357715.html?

    Box of Smatrul Tuya plug with a dented corner.

    Photo of a box for the Tuya US plug from AliExpress.

    Back of the Tuya US plug packaging with technical specifications.

    The plug is sonically welded so it's a bit hard to open. I used a utility knife around the seam and I was able to lift one side and open it.

    Tuya US electrical plug with a utility knife placed along the seam of the casing.

    It has CB2S inside, the flashing should be easy but the live/neutral prongs are soldered to the back of the plug.
    De-soldering the prongs will be very difficult and the case may melt from the heat.

    Close-up of the inner components of a Tuya US plug with CB2S chip and other elements on a PCB.

    Instead, I removed the metal shield of the CB2S and tried to find another access to the Rx/Tx pins.
    I scraped some of the PCB masking to gain access to the via holes for the Rx/Tx and used one side of a capacitor for the 3.3V and ground is easily accessible.

    Close-up of a CB2S board with labels 3.3V, Tx, and Rx.

    Using BDM Frame made the job much easier. https://www.aliexpress.com/w/wholesale-BDM-Frame.html?spm=a2g0o.detail.search.0

    CB2S module with test probes connected to Rx, Tx, 3.3V, and GND points.

    For the configuration

    - BL0937 SEL on P26
    - Button (channel 1) on P24
    - BL0937 VI on P7
    - WiFi LED on P23
    - BL0937 ELE on P6
    - Relay (channel 1) on P8


    Code: JSON
    Log in, to see the code
  • ADVERTISEMENT
  • #2 21111591
    p.kaczmarek2
    Moderator Smart Home
    Thank you, added:
    https://github.com/OpenBekenIOT/webapp/commit/9430386435cc84f714b6f7e3995f875b45dbc31f
    By the way, it seems this device has also USB port? Did you check it's current capabilities?
    Helpful post? Buy me a coffee.
  • #3 21111870
    Zain00
    Level 10  

    My plug didn't have one, maybe same packaging different plug.
ADVERTISEMENT