TL; DR
This is how I control 12V or 5V addressable LEDs with the H801 controller.
What is the H801?
The H801 is older hardware (2017 might be when I bought mine). They still seem to be for sale at the time of writing for about $8 on aliexpress or ebay.
The “standard” hardware is detailed here:
- Tasmota: H801 - Tasmota
- ESPHome: H801 RGBW LED controller — ESPHome
Basically, it is a 5-24V PWM RGBWW controller. Inside is an ESP8266 (only 1M flash though). Each channel has its own sink mosfet (low side drive). The spec I have read for the MOSFETs is 4A, but do more verification before you power anything with near that amperage.
So What?
With a little bit of easy soldering, I can install WLED and control an addressable strip of WS2812b or WS2815 12V LEDs.
This controller has these benefits:
- The W1 output can act as a relay and be used to turn off the power of the LEDs. This eliminates the LED idle power consumption.
- The controller is cheap. And I already had two of them.
- The RGB channels are unchanged, so controlling analog/PWM lights with the same input voltage should work just fine.
The problems:
- It only has 1M flash. So no OTA updates.
- The GPIO2 is not available on the premade outputs. This is what this guide is here to fix.
How to flash WLED
Solder on some headers
The H801 has tx, rx, 3.3V, and Gnd on breakout pins. It also has GPIO0 and ground on breakout pins.
Solder on a 4x1 to the flash pins and a 2x1 to the GPIO pins. Take a look at the Tasmota or the ESPHome documents to see the pinouts.
Connect a UART to USB adapter. Make sure it is powering the H801 with 3.3V, not 5V.
Short the GPIO to ground. I just wired up a short dupont wire, but a jumper is fine too. Then power it up.
Note on Tx, Rx
Usually, I wire tx on the uart to rx on the device. For some reason, these labels seem to wire tx to tx and rx to rx. Maybe it is my UART or maybe it is an unconventional choice on the board labels.
Flash WLED with your favorite method. I used esptool:
esptool.py write_flash 0x0 ./WLED_0.14.0-b1_ESP01.bin
The H801 only has 1M flash, make sure you use the ESP01.bin file
When it has flashed successfully, remove the jumper on GPIO0 and toggle the power off and back on. You should be able to follow the regular WLED instructions for connecting to WLED-AP, etc.
Break out GPIO2
On an ESP8266, we want GPIO2 to be the pin used to control the LEDs. It isn’t available on one of these nice screw terminals outside of the case. But it is the Rx pin on the header. This is the simple step I took to get that GPIO2 out to the screw terminals.
Before
Take a look at this picture from ESPHome. The red wire is for the “WW” or “W2” output. The pin it goes right over is GPIO2.
After
I cut that cable with a small amount of slack, stripped a few mms off, and soldered it to the bottom of GPIO2. I desoldered the extra wire, just to keep it a bit clean.
The W1 output is still wired to a MOSFET. Don’t accidentally connect your data lines to W1.
Wire up some LEDs
LED connections
H801 Connection | LED Connection | Power Supply Connection | Comment |
---|---|---|---|
Vcc | Vcc | Vcc | 12V or 5V, depending on your LEDs |
Gnd | Gnd | Ground for the H801 | |
W1 | Gnd | “Relay” output, GPIO14 on the ESP8266, inverted. Make sure it can handle the current | |
W2 | DI/BI | Data line for the addressable LEDs |
Pay attention to the power of the LEDs. Your intuition may be to wire the Vcc on the LEDs to the relay output. But this is a low side drive. So the relay is wired into the ground circuit. More on that below.
Pay attention to W1 vs W2. If you get these reversed, you might send 12V to your digital input on your LEDs.
12V WS2815
The H801 will power itself from 5V-24V Vcc input. I have one with some WS2812B 5V LEDs and one with WS2815 12V LEDs. WS2815 LEDs use a 5V digital input, and are powered by 12V. I won’t go into the logic for using one or the other in this topic.
Vcc needs to be the voltage your LEDs need. You can’t mix analog LEDs with digital LEDs of different voltages.
3.3V Digital Output
The GPIO2 pin is only 3.3V. There are lots of setups connecting WLED with 3.3V and 5V LEDs, but the “right” way to do this is to connect a logic level converter to convert from 3.3V to 5V. In both of my setups, the H801 is close enough to the first LED that I haven’t had any problems.
Low Side Drive on R,G,B, W1
The PWM outputs on this controller are designed to either be tied to ground, or floating. This is Low Side Drive.
- What that means is, you wire the positive of your load to Vcc, and the ground of your load to the W1.
- When the esp8266 turns “off” the output, the W1 is floating (disconnected) and no current can go through that pin.
- When the esp8266 turns “on” the output, W1 is tied to ground and current can flow.
If you are trying to measure output with your multimeter. Set it to DC voltage and measure between Vcc an W1. You won’t see anything if you measure between ground and W1.
Configure WLED
The default for esp8266 should be to use GPIO2 for the data output. But double check it:
If you wired the ground for your LEDs to W1, then configure the “relay” output to pin 14, with the invert button checked. This should connect W1 to ground when the “power” is on in WLED. And disconnect it when “power” is off:
This pin needs to be able to handle the current of the LEDs. The ali-specs say 4A. But I would be diligent and skeptical. I am running less than 1A. If you were doing a lot, I would at least look at the specs of the MOSFET parts, and test it before permanent installation. Or, if you are trying to run your entire outdoor permanent lights off of WLED, maybe spend more than $8 .
Conclusion
Enjoy! I posted this information because I didn’t see it anywhere. Tag me in any topics with questions about it (or ask here, if it is generally useful).