ESP8266 Temporary RGB Solution


Not exactly ideal (especially if one has already bought a load of WS2812b strip) but some time ago we had some little boards made to house 10 of the WS2812B chips – and while we were on we put a surface mount 328 chip on the back along with crystal and serial connector for an FTDI.  With the current issues getting accurate high speed timing out of the ESP8266 I bodged some code in the display board to look for {rgbdevice;red=x;blue=y;green=z} type messages.

I’ve modified the MQTT code already to stick {} around any message shown on the serial so it’s quite easy to pick out. The “rgbdevice” starter just gives it that much less chance of flicking lights for the wrong reason.

I implemented red, green, blue, bright, cycle, power, LEDs

The last one redefines the number of LEDs in we wanted to put several of these boards in series (obviously the others would not have the 328 mounted).  It’ll do until someone comes up with an assembly block for the displays in which case it should be possible to connect GPIO0 directly to the first display input.

The software for Arduino incidentally is simply the FASTLED library  – I stuck an infra-red sensor on for remote control but again the timing of the LED displays is such that if you’re doing a soft sequence as you see in the photo, the IR sensor interrupts get in the way. So maybe I’ll just stick to controlling the lot from my phone. Next challenge – get that OpenHab colour wheel working!!


5 thoughts on “ESP8266 Temporary RGB Solution

  1. Do you have your customer firmware in a repository somewhere that I could take a look at it? I think that while our use cases are different, the features you’re developing are the same features I need.

  2. No, the repositories are something I’ve not quite gotten into yet and I certainly am not ready to start maintaining things in a public depository – which is why I usually put my code on the web for people to do with it what they will. Which side are you talking about – the Arduino end of the ESP end?

    • Both actually. The esp obviously has the horsepower to do what I need, but I need to monitor a few external devices (RFID reader, buttons, control an LED strip like you’ve been struggling with, plus drive an LED display) and I’m not convinced trying to use the limited I/O of even the ESP12 is worth it when there is already code out there for the $2 arduino mini clones to do what I need. Kind of a “let each do what it does best” situation maybe? im still trying to figure out how I want it to work. Esp8266 as a mqtt trinket does have appeal.

  3. Oh don’t get me wrong Daniel – I think there is room for BOTH the stand-alone solution and that with a cheap Arduino (in my case I prefer to go a LITTLE upmarket and use board we’ve had made for our own uses with a 1284 chip as that has LOADS of outputs). But in the case of a simple plug-in-the-wall LED strip drive, let’s say to light up behind a cabinet or whatever it would be nice to be able to do it all with just the ESP8266 and to be fair we’re just about there – just needs a few lines of assembly to finish the job off. When I first started with home control my thinking as to build as much into one board as possible – then I realised that in reality – wives not wanting wires all over the place, that just does not apply in many case. So – MQTT to temperature sensor and WS2812B OR a RELAY on one little board does the job for me..

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