Programmable RGB light strips

11 posts / 0 new
Last post
Flying Luminosity
Flying Luminosity's picture
Online
Last seen: 1 min 21 sec ago
Joined: 09/12/2017 - 13:33
Posts: 94
Location: UK
Programmable RGB light strips

I had no idea in which subforum this belongs, so hopefully I’ve posted it in the right place.

My idea is to have several light strips (the kind that are several metres long, with 100s of LEDs), with a controller to change colour, for fades, to set a timer, and so on. The controllers that I have looked at seemed to have a limited amount of functions, and I would like to have more versatility. So I’ve been thinking that this would be a nice project to get started with electronics. It is something that I have zero experience with, but I am very keen to learn soldering, and I have had some programming experience since the 1980s, but nowhere near hardware level (mainly RDBMS development and UI design).

What do I need, how do I get started? Is this something I can do with an Arduino? Or would that be overkill, and are there maybe existing controllers / circuit boards with a customisable interface? It would also be nice at some point to have several separate channels – which makes me wonder whether I could address the light strips via DMX and the corresponding hardware?

Also, it would be helpful to know about resources that explain some of the basics that I would need to know to get started.

Edited by: Flying Luminosity on 10/05/2017 - 20:55
goshdogit
goshdogit's picture
Offline
Last seen: 3 hours 42 min ago
Joined: 12/03/2015 - 21:28
Posts: 373

Are you familiar with adafruit.com ?

You might start here with a tutorial / info page about their addressable RGB LED strips.

There is lots more information, including writeups about others’ projects, under the ‘Learn’ tab of the site.

I have aspirations to use the NeoPixels I purchased but haven’t yet started my project. Big Smile

mrheosuper
Offline
Last seen: 8 hours 35 min ago
Joined: 09/30/2016 - 12:44
Posts: 756
Location: Ho Chi Minh City

do want to individualy control each led, or you want to make the whole strip same color?
if you want to do more fancy stuff, go with the first, use WS2812 led, but it’s quite more expensive

Forgot my pen

Flying Luminosity
Flying Luminosity's picture
Online
Last seen: 1 min 21 sec ago
Joined: 09/12/2017 - 13:33
Posts: 94
Location: UK

goshdogit wrote:
Are you familiar with adafruit.com ?

You might start here with a tutorial / info page about their addressable RGB LED strips.

There is lots more information, including writeups about others’ projects, under the ‘Learn’ tab of the site.

I have aspirations to use the NeoPixels I purchased but haven’t yet started my project. Big Smile

That looks great, thanks. I had heard of Neopixel, but didn’t realise that it is a platform for this kind of project. There seem to be plenty of tutorials, and I can’t see it being difficult to write some code for something like a matrix that displays a clock or other infos (as soon as I understand how the hardware is addressed). I’m starting to realise that there are more possibilities than I was aware of, so it should be a lot of fun!

mrheosuper wrote:
do want to individualy control each led, or you want to make the whole strip same color? if you want to do more fancy stuff, go with the first, use WS2812 led, but it’s quite more expensive

Ideally I’d like as much control as possible – initially I thought I’d have to make some compromises, but it seems that technology has developed further than I thought. The WS2812 LED looks promising – I’ll probably need to check out some YouTube videos to see what people have done with it, and read some of the tutorials on the Adafruit website before making some informed decisions. But I’ve got very little doubt that thus is something I can fully immerse myself in! Smile

Flashy Mike
Flashy Mike's picture
Offline
Last seen: 19 min 33 sec ago
Joined: 01/14/2016 - 16:38
Posts: 700
Location: Germany

I’ve built this for my children. Used cheap Aduino Nano, did the whole programming by myself, added a bluetooth receiver and wrote an Android app to control the whole thing. Mainly used WS2812 strips because they are cheap but they are tricky to program since they are missing a dedicated clock line for command synchronisation. Beware of too many LEDs per meter, they are consuming a lot of power.

This project was fun!

Flying Luminosity
Flying Luminosity's picture
Online
Last seen: 1 min 21 sec ago
Joined: 09/12/2017 - 13:33
Posts: 94
Location: UK

Flashy Mike wrote:
I’ve built this for my children. Used cheap Aduino Nano, did the whole programming by myself, added a bluetooth receiver and wrote an Android app to control the whole thing. Mainly used WS2812 strips because they are cheap but they are tricky to program since they are missing a dedicated clock line for command synchronisation. Beware of too many LEDs per meter, they are consuming a lot of power.

This project was fun!

It does sound like fun! A controller and effects should be easy to program, but with this kind of project it is obviously important to understand the whole chain from user input to the electric signals that get triggered. I am fascinated by the idea of understanding how one event gets translated into another. But at the moment I haven’t even got a clue how a microcontroller works! Smile I will have to do some research on the WS2812 – from you mentioning the missing clock line I’m assuming that each LED itself has a built-in chip? How does synchronisation occur?

I noticed about the power consumption when the topic recently came up in conversation, and a friend asked me to find out about LED strips for the inside of his van, with a controller that has as many preset programs as possible. I had a look at 5050 strips, and noticed that a 5m strip draws about 5A from a 12V connection, so it uses about 60W. At the moment I’m not sure about the kind of setup that he has got, but maybe I’ll be looking at how to build a rechargeable battery pack with protection circuit next! Cool

Flashy Mike
Flashy Mike's picture
Offline
Last seen: 19 min 33 sec ago
Joined: 01/14/2016 - 16:38
Posts: 700
Location: Germany

Yes, each WS2812 has an integrated controller. More information here:
https://cpldcpu.com/2014/01/14/light_ws2812-library-v2-0-part-i-understa...

The APA 102 LED is easier to program but more expensive:
https://cpldcpu.com/2014/11/30/understanding-the-apa102-superled/

You will get into trouble with WS2812 when you try to do anything else with the Arduino (apart from sending commands to the LEDs), e. g. listen to the bluetooth receiver.

I used this library for the basics:
http://fastled.io/

Flying Luminosity
Flying Luminosity's picture
Online
Last seen: 1 min 21 sec ago
Joined: 09/12/2017 - 13:33
Posts: 94
Location: UK

Flashy Mike wrote:
Yes, each WS2812 has an integrated controller. More information here:
https://cpldcpu.com/2014/01/14/light_ws2812-library-v2-0-part-i-understa...

The APA 102 LED is easier to program but more expensive:
https://cpldcpu.com/2014/11/30/understanding-the-apa102-superled/

You will get into trouble with WS2812 when you try to do anything else with the Arduino (apart from sending commands to the LEDs), e. g. listen to the bluetooth receiver.

I used this library for the basics:
http://fastled.io/

Those articles by Tim are very informative, thanks. I’ll probably be getting an Arduino Uno as a kit, so I can learn how it works. Then I should have more of an understanding of the interface, protocol and the electronics behind it. The APA 102 does seem easier to use – I’m not sure if I’d have the nerves for working around any timing issues and having to calculate process cycles. It sounds like a lot of trial and error to get the desired results. But maybe it’s not as difficult as I imagine it to be, and the available libraries address those issues. The videos that I have watched do suggest a high amount of control, so I will need to read a few more articles to fully understand both its capabilities and limitations.

One thing is for sure – there are far more variety and resources available than I would have ever imagined possible. If I do a bit more research, hopefully everything will start falling into place soon.

P.S. Greetings to Germany – I grew in North Bavaria, then Frankfurt! Smile

Flashy Mike
Flashy Mike's picture
Offline
Last seen: 19 min 33 sec ago
Joined: 01/14/2016 - 16:38
Posts: 700
Location: Germany

Greatings back! I like Great Britain much, have been there pretty often.

The library I mentioned takes care of sending the commands to the strip. You are able to control the strip with a few lines of code. But the required clock for the WS281x is so high that you can’t do anything else with the Arduino when sending the commands. E. g. I use bluetooth to select effects for the strip with my smartphone app. The bluetooth receiver is connected with a 2-wire serial interface to the Arduino. While sending commands to the LED-Strip (you have to do this continously when not displaying only static color) the Arduino can’t listen to the bluetooth receiver and misses commands. I solved this by repeating the bluetooth commands a couple of times which works pretty well.

Just get your Arduino and the library, install the Arduino IDE and connect a LED-Strip to the board. Get some samples for the library and start the program. For testing you don’t even need a power supply, it works already with the Arduino connected to USB. Of course with reduced brightness and some flickering when all LEDs are on. I recommend to decrease the number of LEDs used – e. g. to 30 – in the code.

Lazy-R-us
Offline
Last seen: 2 hours 7 sec ago
Joined: 09/13/2015 - 00:30
Posts: 593
Location: Carolinas, USA

I just found this thread today and most of what I would have posted already has been: AdaFruit, Arduino, NeoPixel, power supply, timing considerations.

I am working on a small project for a makerspace right now using five meters of some old 2811 12VDC strip I got a while back. This particular flavor allows me to use 12 volts, but as a trade off I can only control the LED’s in groups of three. If it is of interest, I can post the code so you can see different ways of controlling the strips.

Since you have programming knowledge, I’m sure you will pick this up pretty quickly.

Lazy-R-us

Flying Luminosity
Flying Luminosity's picture
Online
Last seen: 1 min 21 sec ago
Joined: 09/12/2017 - 13:33
Posts: 94
Location: UK

Flashy Mike wrote:
Greatings back! I like Great Britain much, have been there pretty often.

The library I mentioned takes care of sending the commands to the strip. You are able to control the strip with a few lines of code. But the required clock for the WS281x is so high that you can’t do anything else with the Arduino when sending the commands. E. g. I use bluetooth to select effects for the strip with my smartphone app. The bluetooth receiver is connected with a 2-wire serial interface to the Arduino. While sending commands to the LED-Strip (you have to do this continously when not displaying only static color) the Arduino can’t listen to the bluetooth receiver and misses commands. I solved this by repeating the bluetooth commands a couple of times which works pretty well.

Just get your Arduino and the library, install the Arduino IDE and connect a LED-Strip to the board. Get some samples for the library and start the program. For testing you don’t even need a power supply, it works already with the Arduino connected to USB. Of course with reduced brightness and some flickering when all LEDs are on. I recommend to decrease the number of LEDs used – e. g. to 30 – in the code.

Lazy-R-us wrote:
I just found this thread today and most of what I would have posted already has been: AdaFruit, Arduino, NeoPixel, power supply, timing considerations.

I am working on a small project for a makerspace right now using five meters of some old 2811 12VDC strip I got a while back. This particular flavor allows me to use 12 volts, but as a trade off I can only control the LED’s in groups of three. If it is of interest, I can post the code so you can see different ways of controlling the strips.

Since you have programming knowledge, I’m sure you will pick this up pretty quickly.

Thanks for the replies. It is good to know in advance that the timing problems are something I’ll be having to deal with. I’ll be looking at specifics once I’ve ordered an Arduino and I’ve learned the basics about its interfaces and programming. At the moment I’m not sure whether to just get the box, or a kit that would help me understand more about electronics from different perspectives.

I wouldn’t say I’ve got a lot of experience with programming – mostly database related OOP, PL/SQL & T-SQL, VBA, PHP, Java, and some bits of C, various scripting languages, and ABAP for SAP R/3 (and of course my area was database development, not RDBMS development as originally stated, which would have required me to understand the hardware layer!). But having some knowledge of the structures that repeat themselves across other languages will probably help with learning to program on a lower level.