September 9, 2017

i2c controlled RGBW LED strip controller

This is part of a internet connected playhouse that I have been planning and building ever so slowly during the summer. The system will eventually consist of a internet connected device (ESP32), battery, solar panel and charger and some lighting installations in the childrens playhouse.

On the porch, I'm planning to install LED strips along the sides to fill the porch with light of selectable color (or even with special effects). It will be controllable both over the internet as well as using a wall switch. Part of the challenge here is to connect the device to the internet, or via something to the internet.

I chose to build a separate device for this purpose instead of integrating it in the main controller. This device will only drive the LED while controlled over the i2c bus from the main controller. There are many many guides on building your own LED controller but I have yet to see one about i2c.

Anyway. I started out with adafruit article on the matter. They make great simple articles and being not so skilled in electronics I was mainly looking for some ideas on which transistor to use for the task. I managed to get the transistor recommended by adafruit from ebay. Ebay is like the only simple source for buying electronic components in small quantities. I read the specs in the FET in question (IRLB8721) and I must say it is massively over dimensioned for my requirements. But I guess it will do.

i2c rgb controller, first setup
Early stage of the RGB LED controller.



As always I started with a first build on the breadboard just to see it working. I also did most of the programming at this point. On the picture is a second arduino sending a sequence of RGB commands to the controller for testing purposes. Worked well and turned out quite simple.


i2c RGB controller
LED controller, disconnected because the light messed to much with my camera.


Next step was to make the controller more compact by building it on a experimental board. This is probably about as good as it gets with my skills and tools. I've moved from a Arduino Nano to an Arduino Pro Mini. It's a bit smaller, mainly because it does not have a USB connector. Instead you need a USB UART/ISP (often incorrectly called an FTDI). Might seem scary, but once you've tried it it is not that bad.

I also had to add a buck converter as the strip I'm using is powered by 12 volt. I added a screw connector for the 12V power and JST-XH connectors for both the LED itself and the i2c connection. I've made a simple i2c bus connection hub previously to connect the devices in the playhouse together.

It all turned out quite good. The only main problem I had is that I cut off the LED strip to solder the wire to the newly cut end. This did not work out well since the light cutting and soldering seems to have damaged the printed copper surface of the strip. This turned into an intermittent lightmare (pun intended, I'm a dad, it's ok!).

No comments :

Post a Comment