H801 Unlikely addressable RGB controller

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:

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. :frowning:
  • 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.

:warning: 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

:warning: 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.

:warning: Pay attention to W1 vs W2. If you get these reversed, you might send 12V to your digital input on your LEDs. :smoking:

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:

screenshot-2023-03-13-1678731056

:warning: 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 :slight_smile:.

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).

1 Like

This was an interesting article; I bought an H801 recently to see for myself. On inspection, the circuit board has been redesigned. There are no bodge wires on the underside of my unit. The four-pin programming header is still present in a different orientation. That makes it a lot harder to route GPIO2 onto the W2 connector.

Nothing to stop you soldering the six pins and flashing WLED, as far as I can see so far.

Processor is ESP8266EX

Flash chip is 25Q800VSIG 16MBit Quad-SPI Flash. Does that mean the new board has 2Mbytes Flash (it’s a bit new to me)

2 Likes

2 Likes

If nothing else, if it has 2Gbytes flash then OTA updating becomes possible.

2 Likes

Interesting. It makes sense that they would design another revision. Adding those hacked wires probably wasn’t the intention.

Can you post a picture of the bottom?

I bet you can do the same thing, but you have to cut the trace that goes to W2. Or maybe one of the other screw terminals is easier to consume.

The 2MB of flash is nice. I don’t know the difference with the ex, but I assume it is just a newer, cheaper version. Or a different footprint.

Flipside of the version posted earlier. Sorry about the flash glare. No bodge wires. The level shifter’s on the underside now. Could just be an incremental improvement or, knowing the Middle Kingdom’s view of IP law, a copy of the original design. I imagine that wouldn’t be too hard.

The 2Mbyte flash might just be something that’s cheaper than it was a few years ago, who knows?

I guess the point is that GPIO2 can still be used and the ESP8266 re-programmed, but if you want to bring it out via the screw connectors it’s a bit harder with this board revision. Maybe you’d desolder all four pins, disconnect the W1 line from the PCB entirely, and then add a front to back bodge wire. Honestly, given that I am clumsy at the best of times, I’ll most likely keep the MOSFET lines as they are and bring out the GPIO line separately . That way I get 5 PWMs and the addressable control line on GPIO2.

1 Like

Bringing out gpio2 on another site is a fine solution.

I was thinking of cutting the traces on the PCB. The picture makes it look like there isn’t much room to cut W2 (red line). But R (purple line) looks simple enough. Once you cut that trace, you could solder pin 2 to the bottom of the connector.

Thanks for the insight. Given my somewhat below-levels for fine motor skill and eyesight I wouldn’t trust myself to bodge any track breaking. I’ll probably leave the MOSFET outputs intact and bring out the other GPIO lines on a separate connector, which is good enough for me.

If I find anything else that’s useful I’ll note it here.

That’s totally fine. I am just leaving the info here for any future adventurers.

1 Like

Thanks for this writeup!

I’m looking to use the H801 to control some 5-channel RGB+CCT analog LED strips (product link)

I bought a H801 from Aliexpress, soldered on some header pins, and was able to flash the latest WLED (WLED_0.15.0-b2_ESP01.bin) onto the device.

I’ve booted it up, connected it to my local wifi network, and I have the WLED UI interface up - yay!

I saw above you were talking about needed to pull out GPIO2 onto one of the screw terminals.

Can you explain a bit more about why that is required?

The existing screw terminals have 5 PWM outputs, right?

I saw from the ESPHome page for the H801 that it lists the pins for the PWM output:

  - platform: esp8266_pwm
    pin: 12
    frequency: 1000 Hz
    id: pwm_b
  - platform: esp8266_pwm
    pin: 13
    frequency: 1000 Hz
    id: pwm_g
  - platform: esp8266_pwm
    pin: 15
    frequency: 1000 Hz
    id: pwm_r
  - platform: esp8266_pwm
    pin: 14
    frequency: 1000 Hz
    id: pwm_w1
  - platform: esp8266_pwm
    pin: 4
    frequency: 1000 Hz
    id: pwm_w2
light:
  - platform: rgbww
    name: "H801 Light"
    red: pwm_r
    green: pwm_g
    blue: pwm_b
    cold_white: pwm_w1
    warm_white: pwm_w2

Am I good just to put those 5 PIN numbers into the WLED interface for a RGB+CCT LED strip? Or is something bad going to happen if I try that?

1 Like

This was to get a digital io line for addressable leds.

Seems exactly right to me.

I don’t think that /every/ use case requires you to bring out GPIO2, but the aim was to show how to do it it you want to. If you connect it via the FETs it will will be output with high current capacity at the voltages provided to the H801. If you connect GPIO2 directly, it’s going to be 3.3V.