FAQ
TL;DR: A single 74HC595 adds 8 outputs to any MCU, so three pins on a Tuya Belon2028N can steer up to 64 relays [Elektroda, p.kaczmarek2, post #20530215] “Let’s do one feature at a time” [Elektroda, p.kaczmarek2, post #20530051]
Why it matters: reuse cheap Wi-Fi switches instead of buying new multi-relay controllers.
Quick Facts
• 74HC595: 8-bit serial-in/parallel-out, up to 20 mA sink per pin at 5 V [NXP Datasheet]
• Current OpenBeken driver chains 4 registers = 32 channels [Elektroda, p.kaczmarek2, post #20530215]
• 16-channel active-low relay board costs ≈ US $5–7 [AliExpress listing]
• Tuya Aubess Belon2028N exposes 9 GPIO after flashing OBK [Elektroda, smkassist, post #20528489]
• OBK firmware size ≈ 500 kB; BL2028N has 1 MB flash [Elektroda, p.kaczmarek2, post #20530381]
1. What hardware is required to drive a 16-channel relay board with a Tuya Aubess mini switch?
You need one Belon2028N module flashed with OpenBeken, two 74HC595 shift registers, the 16-channel active-low relay board, and a 5 V ≥ 2 A power supply for the relay coils [Elektroda, smkassist, post #20529380]
2. How do I wire the 74HC595 to the Belon2028N?
Connect MCU pins to the register: Data→SER, Clock→SRCLK, Latch→RCLK. Chain the second 74HC595 Q7’ to the next SER. Tie OE low, MR high. Feed 5 V and GND to both chips and the relay board. Keep grounds common [NXP Datasheet].
3. Which OpenBeken command enables the shift-register driver?
Put in autoexec.bat:
startDriver ShiftRegister [Elektroda, p.kaczmarek2, post #20533505]
4. Can I chain more than two 74HC595 chips?
Yes. The OBK driver shifts a 32-bit buffer, so up to four registers—32 outputs—work today. More may follow with future updates [Elektroda, p.kaczmarek2, post #20530215]
5. How do I invert outputs for active-low relays?
Set the final parameter Invert to 1 in startDriver. All mapped channels will flip logic, keeping HTML and MQTT states normal [Elektroda, p.kaczmarek2, post #20533505]
6. What happens if I map a non-multiple-of-8 number of channels?
The driver still shifts full bytes; unused bits remain high (or low if inverted). Relays on those bits may chatter, so keep channel counts in multiples of eight [Elektroda, p.kaczmarek2, post #20530381]
7. How much current does the power supply need?
A common Songle SRD-05VDC-SL-C relay draws 70 mA. Sixteen relays therefore need up to 1.1 A. Add 25 % margin: use a 5 V 1.5 A–2 A adapter [Songle Datasheet].
8. Can I test configurations without real hardware?
Yes. OpenBeken’s Windows simulator builds under Visual Studio, emulates MQTT, HTTP UI, and the shift-register code for breakpoint debugging [Elektroda, p.kaczmarek2, post #20532101]
9. I get self-test errors when launching the simulator—what’s wrong?
Build Win32 target and ensure libs_for_simulator is beside the .vcxproj. Missing nfd_d.lib or wrong SDL resolution are typical causes [Elektroda, smkassist, post #20532018]
10. How do I expose relay toggles on the web panel and MQTT?
After driver start, run setChannelType Toggle for each relay. The UI instantly shows on/off buttons and publishes to tele/STATE [Elektroda, p.kaczmarek2, post #20533505]
11. What’s an easy 3-step flashing and setup workflow?
- Flash OpenBeken via UART or tuya-cloud-cutter.
- Wi-Fi connect, open 192.168.4.1, paste the startDriver and setChannelType lines.
- Reboot; test toggles and MQTT discovery. Total time: under 5 minutes [Elektroda, smkassist, post #20528489]
12. Can I mix RF 433 MHz or IR with this build?
IR is already supported; RF uses distinct pulse encoding. Adding an RC-Switch-compatible driver is on the roadmap once cheap receivers arrive [Elektroda, p.kaczmarek2, post #20533323] "I will buy one and help you get that remote running" [Elektroda, p.kaczmarek2, post #20533323]
13. What’s a known edge-case failure?
If relay coil current exceeds USB power during bench tests, the Belon2028N browns out and reboots—use a separate 5 V rail for relays to avoid this [Elektroda, p.kaczmarek2, post #20530051]
14. Does the HTML dashboard break with many channels?
Earlier builds misaligned buttons after 16 channels; fix committed on 2023-04-10 cleans layout up to 32 channels [Elektroda, p.kaczmarek2, post #20532809]