Chipset BK7231N module model CBU
EDIT: Power metering uses BL0942 chip.
Pin Assignments:
P9 - RELAY Status LED
P15 - Wifi LED
P17 - Button
P24 - Bridge FORWARD
P26 - Bridge REVERSE
Switch uses Magnetic Polarized Relay:
This relay must be driven with bridge driver.
Forward direction closes contact, Reserve direction opens contact.
Relay need to be powered only for changing contact position.
Pulse from length 100-200 ms is requirred to change position.
Then relay holds last position without power.
Relay Driver IC MD7620 (Shanghai-Mingda-Microelectronics)
Operation modes:
Hey, I'm new to the forums and I have one of these I'm trying to configure.
I've flashed the firmware over and it's working fine, but I'm now trying to work out the pin configuration... Is there a procedure for this? I've used the above information to get the LED correct and operating on the button press. I've not reconstructed the unit to see if the relay is closing (needs 12v I assume that's provided by the mains power!) but I assume that will be working by setting 24 and 26 to BridgeFWD and BridgeREV respectively.
Do I just work out pin configurations, or is there more code to add somewhere? Sorry for the questions!
For the basic functionality it is enough just to setup pins. Bridge driver will start automatically after reboot.
BridgeFWD and BridgeREV must be paired with channel ID. If device with multiple relays would apear, then multiple pair of FWD/REV could be defined.
So button/LED/FWD/REV must have same Channel ID.
It will behave as normal RELAY. Same functionality in MQTT or HomeAssistant.
I also activated startup command for using BL0942 energy monitor, if installed. There is also version without energy monitor.
Every other setup option should follow common rules.
You have attached images incorrectly. External links will expire over time. Please use our image hosting. I have already fixed your post, but keep it in mind.
Why do you have a Rel_n configured?
Are you sure that your device is also using P24 and P26 for bridge?
We will be publishing a hot air tutorial for IoT hacking soon. Please subscribe to our channel so you can see how to easily desolder the module.
https://www.youtube.com/@elektrodacom
I don't know this board, it may be low quality or something, or more sensitive to noise.
Using just hot gun for desoldering makes the job very hard. I think you should first apply flux, then apply Pb solder to each joints (with a simple soldering iron) to lower their melting temperature, the again add a bit more flux, and then, finally, you can use hot air gun to heat up the joints.
Thanks to this method, the joints will be weaker and it will be easier to desolder the module.
If you have access, you can also use a trick method without hot air, like that:
To check in on this thread, we had an issue where the module kept turning itself off - not sure what was causing that. We were using it to run a solar inverter output through to measure it, so that may be the problem overall - I think in some cases it was being asked to measure negative current... Issue with that was that every time it dropped it was turning the output of the panels off, so not helpful! I think we'll try it on a more conventional circuit.
As for the above - I didn't desolder the whole module, I put dupont wires on with minimal solder to get connection. Was a bit hard but it worked ok!
I tried every one but only the middle work 921600
backup work well in 1or two attempts
but write - horror
today I recorded about 10 cb2s to switch 16Amp
but I spent 5 hours on it... well, I don't know, maybe it will be my flasher
I flash the CBU Wi-Fi TONGOU TO-Q-SY1-JWT without soldering and it worked. i only added 4 wires , CEN't use, in debian hid_download_py-master/uartprogram enter and turn on 3V3 and flies....
As I downloaded the template in obk (http......./?app), the pins were set to rel and rel_n making the relay coil energized all the time and heated up a lot which gave me a thought, I changed to H bridge as below:
"24": "BridgeFWD;1", "26": "BridgeREV;1"
and now it is ok
only this template name was missing some letter and maybe it was a template for another type my code: TO-Q-SY1-JWT 63 and this template https://www.elektroda.com/rtvforum/download.php?id=1189399 has pins 24 and 26 for my case wrongly set are Rel and they are supposed to be bridge , because the relay controlled by H bridge with me the relay coil has 5V DC and here in the pictures above I see 12 VDC
maybe they are the same but different device ? or maybe the description needs to be made up ?
I analyzed the photos and I have a slightly different model, the board with the button I have soldered in a different way, above in the photo there are 3 solder fields on one side and 2 solder fields on the opposite side, and in my case 3 solder fields are in one place on the board and another 2 places in another place on the board buttered butter
edits because the device is similar, pins are the same, only the design of the board is different
This model has a 12V coil , tuya was running fine, I uploaded openbk and now when switching the relay CBU restarts, the LED flashes and connects to the wifi.
As I disconnect the relay the device continues to work without rebooting.
Maybe I did something wrong
Seems I found a great problem with this firmware settings and how it works with bridge relay.
In the first message in this thread was attached a diagram, how bridge Driver should be controlled:
And there clearly showed that it controlled by impulses about 100ms.
But in yours implementation bridge relay controlled by continuous power.
This is a reason of ac-dc adapter and bridge driver itself is hardly overload and it's become VERY hot. This is extremely dangerous as for relay components so for environment!!! I show not the maximum temperature, it's continue to grow up.
Can you please update configuration for firmware to fix this issue? Thank you!
Thank you reporting the issue. The bridge driver was created by Valek and I am not sure if he's active these days, @valeklubomir , are you online?
If he's not, then we will have to fix the issue ourselves.
So, are you saying that one of the relay coils is left on forever? This is strange, because judging from the code, it seems that both pins are set to 0 when time is out:
Or maybe I have misunderstood you, I haven't analyzed the working principle of this bridge controller yet.
✨ The discussion centers on the TONGOU TO-Q-SY1-JWT DIN Rail WiFi switch featuring the BK7231N chipset (CBU module) and integrated power metering via the BL0942 chip. The device uses a magnetic polarized relay driven by an MD7620 bridge driver IC, requiring 100-200 ms pulses to toggle relay contacts, which then hold position without continuous power. Initial firmware lacked support for the MD7620 bridge driver, but a pull request was submitted and merged to add this functionality. Proper pin configuration is critical: pins 24 and 26 must be assigned as BridgeFWD and BridgeREV respectively, not as simple relay outputs (Rel/Rel_n), to avoid continuous coil energizing and overheating. The bridge driver should start automatically on reboot, but manual startDriver Bridge command may be necessary if autostart is disabled. Adjusting the bridge pulse length is possible but not fully documented; some users reported issues with pulse timing affecting relay operation. Flashing the device can be done without desoldering the module by connecting to UART pins, though some users experienced difficulties with programming stability and recommended using hid_download_py or the BK7231GUIFlashTool. Power metering calibration remains imperfect, with non-zero power readings at no load and issues distinguishing real, apparent, and reactive power. Firmware flags and startup commands can influence metering behavior and device startup states after power outages. Community members shared updated JSON templates for device configuration, emphasizing correct pin roles and startup commands to enable bridge driver and energy monitoring. The discussion also touched on hardware modifications for broken pads and soldering techniques for module removal.
Set P24 to BridgeFWD;1 and P26 to BridgeREV;1. 2. Reboot so the Bridge driver autostarts. 3. If 0 drivers show, issue startDriver Bridge once [Elektroda, Osrx, post #20863693]
My relay stays energised and overheats—why?
Using Rel/Rel_n roles powers the coil continuously. Switch to BridgeFWD/BridgeREV roles so the driver sends a 100–200 ms pulse only [Elektroda, przemsi_ele, post #20862770]
Yes. Solder 4–5 dupont wires (3V3, GND, RX, TX, CEN) on-board, hold CEN low, and flash with BK7231GUIFlashTool or hid_download_py [Elektroda, p.kaczmarek2, post #20797962]
Supply a known resistive load, then issue EnergyCal Voltage , Current , Power . Repeat until readings match within ±1 % [Elektroda, robert21965, post #20935273]
Module reboots when measuring solar inverter output—why?
Negative current can exceed firmware assumptions and trip a watchdog, causing resets [Elektroda, thealphahelix, post #20475897] Bridge to a conventional load during testing.