logo elektroda
logo elektroda
X
logo elektroda

[BK7231N] Teardown of Smart Home Smart Switch WiFi Relay from Aliexpress

nikmess 1494 9
ADVERTISEMENT
  • Helpful post
    #1 21192511
    nikmess
    Level 1  
    Teardown of "Smart Home Smart Switch" WiFi Relay from Aliexpress.
    Product page: https://www.aliexpress.com/item/1005006322147252.html
    Product page on AliExpress for WiFi Smart Home Smart Switch.

    Contains a Y3F-105DM relay rated for 10A @ 250VAC, controlled by a Beken BK7231N.

    Photos of device:
    WiFi Smart Home switch with visible electrical connectors Image of a WiFi relay circuit board from Aliexpress with electronic components. Printed circuit board with electronic components on a wooden surface.

    Labelled PCB:
    View of WiFi relay PCB with connection labels.
    PCB has solder points for Ground, 3.3V, UART1_TX, UART1_RX, CEN and P21=JTAG_TMS (not labelled)

    I used an ESP32 Devkit board as a UART bridge:
    Solder up some jumper cables to the PCB:
    WiFi relay PCB with soldered wires on connection points.
    Connect GND, 3V3, TX, RX to their counterparts GND, 3V3, TX0, RX0 on the ESP32 and connect the EN pin on the ESP32 board to ground to keep the ESP32-Module asleep. Then use the flash tool ( https://github.com/openshwprojects/BK7231GUIFlashTool ) according to its instructions.

    Code: JSON
    Log in, to see the code
  • ADVERTISEMENT
  • ADVERTISEMENT
  • #3 21194637
    p.kaczmarek2
    Moderator Smart Home
    I've seen similiar device (chip and flashing pad placement) but with ESP8266 or similiar (maybe rather ESP8285?) some time ago on our forum
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • ADVERTISEMENT
  • #5 21202483
    cdtdsilva
    Level 10  
    >>21194639 >>21194639

    Those remind me of the first sonoff devices... bet you could fit one on that box :-)
  • #6 21202578
    p.kaczmarek2
    Moderator Smart Home
    Yes! That was you, @divadiow . Nice, it's a small world. You've learned a lot since that time!

    It's interesting to see more and more ESP designs with BK chips now.

    Wait, are BK QFN pins matching ESP pins, more or less? I've never checked...
    Helpful post? Buy me a coffee.
  • #7 21203224
    divadiow
    Level 35  
    p.kaczmarek2 wrote:
    You've learned a lot since that time!

    Omg yes I have. Those were the dark days. Still a lot more to learn!
    p.kaczmarek2 wrote:
    are BK QFN pins matching ESP


    Good question! I've never thought to check. I want to know for something similar, this XR819 (I want to try XR809 OBK on it somehow), so I'll do some comparisons.
    Image of XR819 integrated circuit on a blue background.
  • #8 21203265
    insmod
    Level 25  
    BK7231N is smaller than ESP8285H16, so impossible to simply swap them.
    >>21203224
    XR819 is not a general purpose microcontroller, but a SDIO WiFi module (like esp8089). In the datasheet, most of the would be GPIO pins are NC.
  • #9 21203267
    divadiow
    Level 35  
    insmod wrote:
    XR819 is not a general purpose microcontroller, but a sdio wifi module (like esp8089). In datasheet, most of the would be gpio pins are NC.

    dang. oh well. it was an impulse purchase without prior research.

Topic summary

The discussion centers on the teardown and analysis of a "Smart Home Smart Switch" WiFi relay purchased from Aliexpress, featuring a Y3F-105DM relay rated at 10A/250VAC and controlled by a Beken BK7231N microcontroller. The PCB includes solder points for Ground, 3.3V, UART1_TX, UART1_RX, CEN, and a JTAG pin (P21=JTAG_TMS). An ESP32 Devkit board was used as a UART bridge for interfacing via these pins. Comparisons were made to similar devices using ESP8266 or ESP8285 chips, noting that the BK7231N is smaller and not pin-compatible with ESP8285H16, making direct swaps impossible. The XR819 WiFi module was also mentioned as a non-general-purpose microcontroller with limited GPIO availability. A boot log and factory firmware backup from an identical device were shared, revealing firmware version BK7231N_1.0.1 with Tuya-related initialization messages. The discussion highlights growing use of BK chips in ESP-like designs and the challenges in firmware extraction and hardware compatibility.
Summary generated by the language model.
ADVERTISEMENT