logo elektroda
logo elektroda
X
logo elektroda
Dostępna jest polska wersja

Czy wolisz polską wersję strony elektroda?

Nie, dziękuję Przekieruj mnie tam

Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]

p.kaczmarek2 9336 2

TL;DR

  • Teardown and schematic analysis of a Tuya SmartLife 4CH DIN-rail WiFi relay controller with four independently switched relays.
  • It uses a WB3S module, HX5923 flyback supply, AMS1117 3.3 V regulator, and S8050 transistors to drive the 5 V relay coils.
  • The board uses SHS-32F 32F-5V-HS-G relays and was bought for about PLN 60.
  • OpenBeken already supports it, and the relays can be controlled locally or through Home Assistant after flashing.
  • The power supply is not galvanically isolated; the low-voltage ground is tied to mains, so avoid touching or connecting it to a PC while powered.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Hello, here I will sho the teardown, detailed photo documentation, PCB analysis and schematic drawing of another Tuya product. This time it will be a controller for 4 relays, pluggable into a DIN rail, controlled as usual via WiFi via a phone application.
    Update 2022 - This device is fully supported by OpenBeken. Scroll down to find pin configuration and Home Assistant information

    Product purchase
    I found the product by searching for "4CH 4Gang Wifi Light Smart Switch 4 Channels Circuit Breaker IOS Android Tuya App Control interruptor wifi 4 canales ios" for about PLN 60 (supposedly in promotion, normally for less than PLN 100). Below are screenshots of the offer:
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Graphics from the seller:
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]


    Kit contents
    The set includes only a relay and instructions (I censored the seller's sticker because there is no need to do unnecessary advertising):
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Instruction (information on how to pair with mobile App, etc.):
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Controller:
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic] Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Terminals:
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Mounting mechanism on DIN rail:
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    After removing the plugs, you can reveal the buttons and LEDs informing about the status of relays and the device:
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    I do not know who would like to have these buttons covered, after all, without them, if there is a problem with WiFi, there is no way to control the device.

    Pairing with original Tuya app
    I have covered the pairing with Tuya topic many times in the past. This time it also was very easy, although Chinese characteres appeared as the name of the device.
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic] Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic] Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    The Tuya application allows you to control each of the relays separately, as well as turn them off / on at once.

    A few screenshots from the Tuya mobile app:
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic] Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic] Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic] Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic] Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic] Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic] Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]

    Teardown
    The housing is held on four screws. There was no problem with unscrewing three of them, but I struggled with the fourth. At first I thought it was some kind of protection, but then I got the impression that something was wrong with its mounting:
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    In the end, it was possible to open without major damage (the tile in the corner has only a mass spout, by the way, the whole groundplane, including secondary side ground of the WiFi module is connected to the mains...):
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Relays only cut off the phase wire. The groundplane connects the primary and secondary sides, you can see in the photo that the mass reaches up to the mass of the 400V 4.7uF filter capacitor, which is just behind the rectifier bridge.
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    There is a SMTT2A250V fuse on the input. The 2A rating is definitely a total exaggeration and I do not know why it is there, although maybe I misread the marking:
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Next is the JK-ET 07D471K varistor, surge protection:
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    X2 class capacitor (X2 safety class capacitor), against EMI. JURCC X2-104 MPX / MKP:
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Produced in China, the manufacturer provides its catalog notes, although they are quite poorly translated into English:
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    (this "capacity step down" in the diagram from the manufacturer should be called rather "capacitive dropper" and does not reflect what is in the device discussed here, in the discussed device there is a flyback pulse power supply)
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    MB10S rectifier bridge. Two electrolytic capacitors at 400V 4.7uF and a choke between them (PI filter). Next, the switching power supply system on the HX5923.
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    On the manufacturer's website I managed to find a few pages from the HX5923 catalog note (I provide them as images, no pdf file available). HX5923 is a flyback converter controller with built-in MOFSET transistor working in PSR mode (Primary Side Regulation, voltage regulation by feedback through primary auxiliary winding, without optocoupler etc.).
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    HX5923 pin roles:
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Internal diagram
    (also important to realize that e.g. between pins 5/6 - Drain, and pin 4 - CS, Current Sense, there is simply a MOSFET in HX5923):
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Characteristics:
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    A description of the operation:
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    After all, this converter does not provide galvanic separation because the manufacturer, instead of separating the "mass" of low voltage from the "high" one, connected them together (instead of putting a Y-class capacitor between them).
    On the side of the secondary winding there is a single Schottky SS14 diode:
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    The power supply gives about 5V, there are also relays working at 5V. Next is the LDO regulator AMS1117 3.3 to get 3.3V for the module with WiFi:
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    The WiFi module is WB3S (unfortunately it is not based on ESP8266):
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    The WB3S controls the relays through transistors. These transistors activate 5V on the relay coil, of course, there is a protective diode parallel to it, so 4 times:
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    J3Y was used here, or rather S8050.
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    In the role of the 'freewheeling diode' there is a diode marked T4, i.e. probably 1N4148W:
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    In addition, you can see that the LEDs indicating the status of the relays are on the same WB3S pins as the transistors that control the relays.
    The relays themselves are:
    SHS-32F
    32F-5V-HS-G
    Their supply voltage tells us how much V is before AMS1117.

    It's time to draw a diagram.

    The schematic of Tuya SmartLife 4CH
    The markings of the elements correspond to the markings on the board (e.g. EC1, EC2 convention for electrolytic capacitors).
    The resistor values are given in the SMD code.
    Power section:
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    A few notes about the scheme:
    - F1, the fuse, the current rating is too high, it should be different (but the manufacturer gave it)
    - RV - varistor, overvoltage protection
    - X1, interference suppression capacitor (against noise emission into the network)
    - EC1, L1, EC2 - pi filter
    - R1, R2 - resistors with quite high resistance, after connecting the power supply slowly charge C3 so that the converter can start
    - R7, D3 - when the inverter is working, the winding ensures charging of C3 so that the inverter can continue to work
    - C1, R3, R4, D1 - snubber parallel to the primary winding. I am surprised here by the M7 diode, 1N4007, apparently the manufacturer decided that you do not need fast
    - R8 and R9 are a voltage divider for feedback from the converter controller (to the FB - Feedback pin)
    - R10 is the so-called a shunt, used to measure the current flowing from the primary winding, is a low-resistance resistor (connected to the CS - Current Sense pin)
    For more information, please refer to the included catalog note HX5923.
    WiFi module section + buttons:
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    I think the schematic should be easy to interpret, but it is worth emphasizing that the buttons have internal pull-up resistors (programmable in the WB3S itself), and the debouncing is implemented by software.
    Relays section:
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]

    Update - OpenBeken and Home Assistant [2022]
    [Update - 2022.07.13]
    This device, of course, has been supported by my OpenBeken project for a long time . OpenBeken allows you to disconnect the device from Tuya cloud and control it entirely as you want, of course also providing Home Assistant compatibility, Tasmota Device Groups supports and much more.
    I uploaded the firmware through bkWriter 1.60, according to:
    Garden Tuya CCWFIO232PK Double Relay - BK7231T - Programming
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    This is how the main panel looks like:
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Here is the pin configuration:
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Here is the startup setup (channels remember their state before power loss):
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    The relay also works with Home Assistant - here is the Yaml configuration (older format, but easy to convert to a newer one):
    
    switch:
      - platform: mqtt
        name: "obk8C000000 1"
        state_topic: "obk8C000000/1/get"
        command_topic: "obk8C000000/1/set"
        qos: 1
        payload_on: 1
        payload_off: 0
        retain: true
        availability_topic: "obk8C000000/connected"
      - platform: mqtt
        name: "obk8C000000 2"
        state_topic: "obk8C000000/2/get"
        command_topic: "obk8C000000/2/set"
        qos: 1
        payload_on: 1
        payload_off: 0
        retain: true
        availability_topic: "obk8C000000/connected"
      - platform: mqtt
        name: "obk8C000000 3"
        state_topic: "obk8C000000/3/get"
        command_topic: "obk8C000000/3/set"
        qos: 1
        payload_on: 1
        payload_off: 0
        retain: true
        availability_topic: "obk8C000000/connected"
      - platform: mqtt
        name: "obk8C000000 4"
        state_topic: "obk8C000000/4/get"
        command_topic: "obk8C000000/4/set"
        qos: 1
        payload_on: 1
        payload_off: 0
        retain: true
        availability_topic: "obk8C000000/connected"
    
    




    Summary
    So here we have another product from Tuya that is not based on ESP (there is no TYWE3S, TYWE2S, etc. module). Luckily OpenBeken already supports it well, so there is no need for WiFi module swap.
    It is also worth noting that the switching power supply from the inside of this device does not provide galvanic protection, so you should never touch the board (nor connect it to PC) while it's connected to mains!
    Other than that, it should be a good and useful 4CH relays controller, especially with OpenBeken. I think I will surely find some use for it at my worplace.
    Attachments:
    • JURCC X2-104 MPX MKP.pdf (387.12 KB) You must be logged in to download this attachment.

    Cool? Ranking DIY
    Helpful post? Buy me a coffee.
    About Author
    p.kaczmarek2
    Moderator Smart Home
    Offline 
    p.kaczmarek2 wrote 14224 posts with rating 12120, helped 647 times. Been with us since 2014 year.
  • ADVERTISEMENT
  • #2 19564334
    MarekS6
    Level 17  
    At first glance, I thought the description was for Sonoff 4ch, because it looks the same on the thumbnail :-) only after opening the full photo and reading the description, I realized that it was something similar.

    Thus, I can confirm that Sonoff 4ch and Sonoff 4ch PRO are an alternative to this module but based on the ESP system and you can easily upload alternative firmware. For example, I have 2 Sonoff 4ch PRO with a pre-loaded knot

    The ordinary version differs from the PRO version mainly in that the latter has relays with potential-free outputs
  • #3 20099871
    p.kaczmarek2
    Moderator Smart Home
    Today the topic has been updated. I added the information that OpenBeken fully supports this controller and I put some screenshots from the panel. There were no problems with programming, as before, USB to UART in 3.3V mode, connecting RX to TX1, TX to RX1 and rebooting by cutting off the power (for this I removed the capacitor from the PCB, although you can reboot with the CEN signal).

    The board is interesting because it also provides pins from I2C and you can have fun:
    Four-channel relay controller Tuya WiFi SmartLife 4CH 10A [schematic]
    Helpful post? Buy me a coffee.
📢 Listen (AI):

FAQ

TL;DR: DIN-rail Tuya 4-relay board switches 10 A per channel and costs ≈PLN 60 ≈ US$15 [Elektroda, p.kaczmarek2, post #19551947]; “OpenBeken fully supports this controller” [Elektroda, p.kaczmarek2, post #20099871] Program it in 2 minutes via 3.3 V UART; beware non-isolated PSU.

Why it matters: You gain local, cloud-free control for multi-circuit loads without hardware mods.

Quick Facts

• 4 × SPST SHS-32F relays, 5 V coils, 10 A @ 250 VAC each [Elektroda, p.kaczmarek2, post #19551947] • WB3S (BK7231T) Wi-Fi SoC, 2.4 GHz 802.11 b/g/n [Elektroda, p.kaczmarek2, post #19551947] • Price on launch: PLN 60–100 (US$15–25) [Elektroda, p.kaczmarek2, post #19551947] • On-board HX5923 flyback gives 5 V; efficiency 72–78 % typical [HXSEMI, 2021] • OpenBeken & MQTT/Home Assistant support since v1.12-beta, July 2022 [Elektroda, p.kaczmarek2, post #20099871]

What components make up the Tuya 4-channel relay controller?

The PCB holds an HX5923 flyback PSU, WB3S Wi-Fi module, AMS1117-3.3 LDO, four S8050 driver transistors, four SHS-32F 5 V relays, LEDs and momentary buttons [Elektroda, p.kaczmarek2, post #19551947]

Does the board provide galvanic isolation from mains?

No. The designer tied low-voltage ground to the primary side, so the 5 V rail is at mains potential. Touching the board while powered risks shock [Elektroda, p.kaczmarek2, post #19551947]

How do I flash OpenBeken firmware?

Use a 3.3 V USB-to-UART dongle.
  1. Connect RX→TX1, TX→RX1, and GND.
  2. Power the board with 3.3 V, open bkWriter 1.60, load the .bin.
  3. Reboot by cycling power; flashing completes in under 2 minutes [Elektroda, p.kaczmarek2, post #20099871]

Is the controller compatible with Home Assistant?

Yes. OpenBeken exposes each relay via MQTT. Sample YAML shows four switch: entities with retain and availability topics [Elektroda, p.kaczmarek2, post #20099871]

How does it compare to Sonoff 4CH/4CH Pro?

Sonoff versions use ESP8266, have clearer isolation, and Pro adds dry-contact relays. Tuya board lacks isolation but needs no hardware swap to run OpenBeken [Elektroda, MarekS6, post #19564334]

What current can the relays reliably handle?

SHS-32F datasheet rates 10 A resistive at 250 VAC and 30 VDC. Derate to 6–8 A for inductive loads to extend relay life [Song-Chuan, 2020].

Any known design weaknesses?

Two standouts: the SMT fuse is labelled 2 A yet PCB traces suggest <0.5 A safe current, and the snubber uses a slow 1N4007 diode, which may overheat during rapid switching [Elektroda, p.kaczmarek2, post #19551947]

What statistic shows power-supply efficiency?

HX5923 achieves 72–78 % efficiency at 230 VAC, 200 mA load according to its typical performance graph [HXSEMI, 2021].

What’s an expert’s take on rebooting during flashing?

“I removed the capacitor from the PCB to reboot the module” [Elektroda, p.kaczmarek2, post #20099871] Removing C3 momentarily cuts 3.3 V, forcing WB3S into upload mode.
ADVERTISEMENT