logo elektroda
logo elektroda
X
logo elektroda

[BK7231N/CB2S] Tuya smart dual socket 20A - teardown, CB2S, BL0937

plplaaa2 294 1
ADVERTISEMENT
  • Helpful post
    #1 21780968
    plplaaa2
    Level 1  
    White electrical adapter with two outlets on a light-colored floor

    This product is one of the unbranded Tuya dual plug devices. It doesn’t seem to have any special external differences, but unlike other products, it has no screws. The case can be opened by prying apart the top gap, and adhesive is required to reattach it.

    Printed circuit board with audio output terminals and electronic components

    Unlike other products, the plug PCB can be removed from the case, allowing the firmware to be changed directly via UART. Cloudcutter is not supported.

    OBK UART flash tool: https://github.com/openshwprojects/BK7231GUIFlashTool

    Close-up of an electronic board with CB2S module and thermal sensors

    It uses the CB2S module, but the version included has the rear silkscreen misprinted, so it must be read in reverse. You can refer to Tuya’s official CB2S documentation. since the RX and TX are being used on different pins, when connecting via UART you need to remove the solder on the RX and TX pins so that the CB2S and the main PCB are isolated, in order to read and write the firmware.

    Close-up of a PCB with electronic components like chip U3 and surface-mount resistors.

    The power measurement chip used is the BL0937, and since the CB2S has very few available GPIO pins, the sel pin is unusually connected to the ADC.  

    Pins:
    # button (inverted)
    p11, p26 
    #P11 linked p24
    #p26 linbked P8
    # relay 
    p8, p24 
    
    # wifi led 
    p10 
     
    # bl0937 
    sel p23 (ADC)  cf1 p7 cf p6


    OBK template:
    Code: JSON
    Log in, to see the code






    ESPhome YAML

    ADVERTISEMENT


    Code: YAML
    Log in, to see the code
  • ADVERTISEMENT
  • #2 21783554
    p.kaczmarek2
    Moderator Smart Home
    Thank you for sharing! I've added some more information, including OBK JSON, so we can feature this device on our supported devices list:
    https://openbekeniot.github.io/webapp/devicesList.html
    We're already at 807 devices so far there, maybe we can reach 900 in the next year, who knows...

    Feel free to add teardowns of any other devices you have, thanks.
    Helpful post? Buy me a coffee.
ADVERTISEMENT