This blog features two gadgets who’s common thread is the ESP8266 processor and the (optional) use of Tasmota firmware. The March 2022 update here concerns the H801 – the original article was written back in February 2021.
Firstly the H801 LED WiFi Controller
If you are still new to these inexpensive H801 devices, a short explanation could be useful: Typically sold by a range of AliExpress stores (check for best pricing and delivery) I’ve been using these on and off to control 12v RGB LED strip for some time. I should warn you that in March 2021 the price has gone up – along with worldwide opportunistic pricing – so nothing out of the ordinary – think about it – this is an ESP8266, regulator and 5 MOSFETS – the price should have gone way down by now, not up. But I digress.
These can of course be run as-is, with an APP but I didn’t even go there, instead immediately opting to install the open source Tasmota firmware onto them because they run on an internal ESP8266. They come apart very easily (4 screws) and internally you can see holes marked (among other things) gnd, 3v3, rx, tx and GPIO0. Don’t forget console non-volatile commands SO65 1 and SO34 0
So, flashing the boards is easy using the software Tasmotizer or the newer and better web flasher – and there is a link on the board (2 pads – if you wish you could solder pins onto them). The link needs shorting only when flashing before power is applied and keep it there until Flashing is done. The only variation from other ESP8266-based boards is that RX and TX are possibly the opposite way to the way you might normally connect an FTDI.
This has been covered to death on the web so I’ll not discuss the flashing process any further. Suffice it to say that the board needs no power other than your FTDI board 3v3 to do the flashing. Once done you will want to set up the H801 board as you would any other Tasmota-flashed ESP8266 – by entering WiFi (and MQTT) credentials.
And here’s the POINT of this article: Ages ago I flashed three of these units – calling them (un-originally) dimmer1, dimmer2 and dimmer3. So, what IS it about these that makes them worth spending £7 from China (nearer to €11 Euros in rip-off 2022). Well, let’s say you want to control some LED strip – lots of it (up to 4A per channel – 5 channels – depending of course on the capacity of your 12v power supply). Either RGB (12v) or just separate LEDS strips – you could even power 24v strip. Normally for such a job in the past, I might pick a mains-powered Sonoff Basic as a starting point – but then you also need 12v for all that strip…. the Sonoff can turn on and off the 12v supply with it’s relay – sure, that’s one way of doing it.
So what started me on this journey? I originally had a cupboard in the living room to which, some years ago I fitted an ESP-GO project including Aidan Ruff’s prototype PCB (an ESP-12 + 220v AC supply + 10A relay). I fitted a DHT22 temperature/humidity sensor to the board (on a 5cm lead to keep heat interference down to a minimum). As I was going to drive LEDs, I also fitted a separate plug-in-the-wall 12v 3A supply to power the 12v LEDs. I fitted one warm white LED STRIP on each of 2 shelves and a red LED strip on the back for ambiance..That all worked for years, controlled by MQTT to run the shelf lights and red strip during the evening and to auto-read temperature and humidity on GPIO2.
That setup developed an issue some time ago (no idea why – the relay appeared ON but the 12v to the LEDs was running at half mast despite the 12v PSU being just fine) and I was about to start hunting down another old board and got myself frustrated in the process.. then I remembered I had an H801, ready-Tasmotized (by me) with the H801 template it. Could I make use of this?
Well, to cut a long story short the answer is YES. I pretty much started from scratch with nothing more than a decent 12v 3A supply and the H801 boxed unit. So PART of the magic here is that the H801 has MOSFET internal drivers to handle up to 5 LED STRIPS – it really does NOT care which one is which… and you do NOT have to use the H801 template. So, what about my temperature sensor?
Because I chose to go without the H801 template, GPIO2 magically became available to me for temperature sensing or anything else. I grabbed the old DHT22 from the original board and soldered it onto the H801 PCB pins, cutting a tiny groove in the case for the leads to fit through. All of this took far less time to implement than write about – I may add.
Next – I attached the white shelf lights to output W1 on the H801 and some 12v RGB strip I had handy to the RGB outputs. I could have been more ambitious but this did the job for me (W2 is currently sitting doing nothing – I could have put some COLD white LED on that and given myself complete warm to cold light (colour temperature) control – but I like warm white. in 2022 I plan to implement the lot – RGB, cold, warm and a temperature sensor.
All I had to do was set up a basic “Generic 18” Tasmota module under Tasmota web “configuration” and fill in 6 GPIO settings… so.. I set up GPIO2 to connect to the AM2301 (i.e. DHT22). I also set up 5 PWM outputs as you would see on the Tasmota site and that’s why I’ve not provided more hardware info here – it’s all on that page.
I could probably have also setup GPIO5 and 16 to the internal LEDs in the H801 but it’s a living room cupboard and the unit is mounted on the back – who wants a bunch of flashing lights in that situation? Tasmota being Tasmota I could also have made use of GPIO17 or the analog input for some extra function – but could not think of a use for it in this instance.
So, next – well, this could get really complex – but I don’t need it to be. Tasmota will regularly and automatically report (via MQTT) the status of the DHT22 – commands “POWER 1” and “POWER 0” (TOGGLE in the webUI) will turn the LEDS on and off – and the simple COLOR command will let me control (by MQTT) the RGB backlight and my white shelf lights (as a whole if I want – or separately – the sky is the limit.
For reference in case you’re not really into Tasmota, in MQTT a command might for example be topic: cmnd/cupboard/power and payload 1 or 0
For colour control there are LOTS of ways to do this – for my needs I just needed colour [red, green, blue, white1, white2] – values being 0-255 in each case.
2022 update – I’m using the RGB in my Pergola here in our newly adopted Spain – and I plan to retrofit my above-desk shelf with the full RGB + warm white + cold white to provide much better lighting for my videos – and I expect the H801 will handle that just nicely. Compare to my Sonoff LED strip with IR controller which produces the most AWFUL excuse for white and a yellow that looks like someone has been ill.
Go to page 2 (below) for the original 2021 section on Banggood’s 4-way relay board if you’re interested.
Does anyone have the schematics oft the H801?
Better price on aliexpress: https://www.aliexpress.com/item/1005001651180110.html
Not when you take into account shipping cost. In addition Aliexpress now insist on adding VAT on all orders (at least to the UK) which brings up considerably more than Banggood. Have to say I’m impressed with this unit, good separation with surge and current inrush protection on the mains side. Does pretty much everything a 4Chan Pro does at a fraction of the price once I print up a case for it.
AliExpress often look like they have better pricing and sometimes they do – but first looks can be deceiving – indeed I think they often go out of their way to confuse the unwary and good look getting any support other than the automated “can you send a video of the problem”.
Also bear in mind that Banggood have lots of tech info on their website and no doubt more available on request.
I didn’t really mention the mains side of this unit. At least at first glance it is well designed, proper air gaps etc. – I like it.
ALSO since starting this reply I’ve updated the blog with some successes, suggest you re-read that last couple of paragraphs. This board has turned out to be a winner.