logo elektroda
logo elektroda
X
logo elektroda

[FL_M99_V3/BK7231N] Typical LXU402 relay module for PLN 30, controlled via WiFi

p.kaczmarek2 2892 1
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • Relay module with FL-S63-V1.0 casing on a wooden surface
    I invite you to a short presentation of the interior and the process of changing the firmware of a typical relay module, which is, in a sense, a Sonoff clone based on the WiFi+Bluetooth BK7231N microcontroller.

    Purchase LXU402
    A reader sent me several pieces of this relay so that I could upload it OpenBeken ,
    As far as I know, he bought them in a Polish store, but this offer is no longer available. This is not a problem, as there are many other offers with LXU402:
    White relay module LXU402 with ON/OFF label and technical specifications.
    So let`s see what this product looks like in practice:
    Package of LXU402 relay module with power and certification information. LXU402 relay box with description and barcode Smart Breaker relay module packaging
    The dot next to WiFi+BT (and not next to WiFi itself) indicates that there is probably no ESP8266 inside, but there may be BK7231:
    White box with Wi-Fi and Bluetooth LE marking on a wooden background.
    Set contents:
    Wi-Fi ON/OFF relay module and mounting components on a table
    Instruction:
    Smart Breaker user manual on a table. User manual for the LXU402 relay module.
    I will skip the test with the Tuya application, it has been tested many times.

    LXU402 interior
    We look inside:
    Open LXU402 relay module with visible electronic components on the PCB.
    PCB name: FL-S63-V1.0
    You can see here the place for the radio system, the SOIC8 element and the resonator. Y3F-105DM relay:
    Close-up of the interior of the LXU402 relay module showing the PCB. PCB board of the LXU402 relay with electronic components.
    At least there is a fuse and a varistor at the input.
    Interior of the relay module marked FL-S63-V1.0
    The entire BP2525 power supply (as usual! Non-isolated power supply, step down from the mains) and AMS1117-3.3V:
    Close-up view of electronic components on a printed circuit board. Close-up of the relay module interior with electronic components.
    The current paths are bold (the relay cuts off only one wire):
    View of the bottom side of the LXU402 relay PCB.



    LXU402 firmware change
    The easiest way is to desolder the module. All you need is flux and braid. This saves us from problems like "we have a button with a capacitor on TXD1 and it interferes with programming":
    FL-S63-V1.0 PCB with soldered wires on a wooden background.
    Desoldered:
    PCB with pin labels, including 3.3V, GND, RX1, TX1. Photo of a WiFi module with a BK7231N microcontroller. Close-up of the FL_M99_V3 PCB with the BK7231 chip.
    GPIOs are signed - we need 3.3V, GND, RX and TX.
    We upload the batch according to:
    https://github.com/openshwprojects/BK7231GUIFlashTool
    First I whitened the pads:
    Electronic module with labeled pins on a blue PCB board.
    Then I soldered the cables:
    Relay module with four soldered wires on a table.
    Here is my USB to UART and LDO 3.3V converter to power the WiFi module:
    Prototype breadboard with wires and a USB module.
    LXU402 relay module PCB with desoldered and soldered chip.
    FL-S63-V1.0 relay board with soldered WiFi module wires.
    After performing the power off/on cycle, the flasher correctly programs this module and loads OpenBeken, having previously read the Tuya configuration:
    Code: JSON
    Log in, to see the code

    Interestingly, the FL_M99_V3 module is seen by Tuya as CB2S .
    Verbal description:
    
    Device configuration, as extracted from Tuya: 
    - Button (channel 1) on P23
    - Pair/Toggle All Button on P7
    - WiFi LED on P8
    - Relay (channel 1) on P6
    Device seems to be using CB2S module, which is using BK7231N.
    And the Tuya section starts, as usual, at 2023424
    

    OBK template generated by https://openbekeniot.github.io/webapp/templateImporter.html:
    Code: JSON
    Log in, to see the code

    After uploading OBK, you can, for example, pair with HA (Home Assistant Discovery) according to the guide on the Elektroda YT channel: https://www.youtube.com/@elektrodacom

    Summary
    Simple and fast flashing. Probably even simpler than in the case of ESP, because I soldered only 4 cables and not 5, and my BK7231 Easy Flasher detected the GPIO template itself, and in the case of Tasmota you would probably have to guess it manually, i.e. either test the pins one by one or trace the paths. This way, another device was freed from the cloud:
    PS: Due to the poor quality and performance of power supplies in this type of products, I recommend turning them on in OBK PowerSave 1 to slightly save the capacitor at the converter output. This capacitor has happened several times I had to replace it ...

    Cool? Ranking DIY
    Helpful post? Buy me a coffee.
    About Author
    p.kaczmarek2
    Moderator Smart Home
    Offline 
    p.kaczmarek2 wrote 12466 posts with rating 10315, helped 585 times. Been with us since 2014 year.
  • ADVERTISEMENT
  • #2 20883027
    marik_te
    Level 22  
    As a curiosity, Sonoff`s photos. The housing is identical from the outside, but a completely different structure inside. And the price is almost the same.
    Image of a Sonoff electronic board on black pants, showing various components. Close-up of a Sonoff circuit board held in hands.
📢 Listen (AI):
ADVERTISEMENT