ESP8266 and RB Serial LEDS

rgb ledsWell, it looks like everyone and their auntie have figured out how to get Arduinos to listen to ESP8266s sending out messages and control RGB serial LED strips – not surprising as there are several Arduino (and for other boards) serial libraries out there. I’m not talking about old fashioned 12v RGB strip but the more modern 5v variety with serial control, which, when (if) they get the price down, HAS to be the future of lighting.

I was at a hotel in Blackpool a few weeks ago and they’d just modernised and had the serial LED strip EVERYWHERE. If you’re not familiar with this stuff, each LED has a serial controller and can accept RGB settings – and once set can simply pass the info to the next LED. All of this is done with blindingly fast serial, so fast they build huge TV displays at airports using the stuff. Why is this stuff so much better than the old PWM red then green then blue LEDS? Because all 3 chips are in one housing you can create REALLY subtle lighting – you want daylight? No problem Tungsten? No problem? Nice warm candle-light? No problem.

Grab a strip, fasten it to an Arduino, provide plenty of 5v and a library and you’re up and running. You tell the library how many LEDS you have and it builds an array of 3 bytes for each LED. You populate the RGB info for the LEDS, call a function and BANG – they all get updated in an instant. with that array at hand it is trivial to write code to drive a colour wheel through it and by updating at regular intervals, create a moving colour change along the strip that is nothing short of stunning.

Right – that’s the easy way and also the larger and more expensive way. Now when is some clever person going to provide us with the same library (in C, not Lua please) for the ESP8266. Should not be a problem as the chip is way faster than an Arduino. I am not familiar enough with the chip to do this yet but I’m hoping someone else is – or has already done this – any takers?

Add this to the current MQTT code and you have an instant WIFI lighting controller. If antone has this or can make this I’m quite happy to put an article together – once I have my hands on a library (preferably working with GPIO0 or GPIO2 on the ESP-01 as that’s the cheapest and smallest solution out there but is pin-challenged).. it’ll take me no time to get that under message control.

5 thoughts on “ESP8266 and RB Serial LEDS

  1. Markus – great work – it would be very cool to now have a firmware that you can send some command from a remote wifi connection to have the ESP8266 (without microcontroller) control a WS2912B strip. If this could be done, what would be the max number of LEDs that could be controlled (barring power which is separate)?

    • The link I provided already contains a precompiled NodeMCU (i.e. Lua) firmware binary. NodeMCU also contains a nice WiFi API, so controlling it over the network is trivial. A firmware which does nothing else (without the Lua interpreter) which reacts to UDP packages is provided by cnlohr’s original implementation here:

      • Thanks for the tip Markus – I’ve not seen much written on that firmware, just a Wifi cup, Any leads on folks using that code?

  2. Hi
    I’m not using the Lua code as having spent a considerable amount of time with it I would not trust my heating system to it… The MQTT code up to now has proven utterly reliable and so I want develop around that. I already have simple on-off control and so the next steps are temperature monitoring and serial LED.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s