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.

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. :smiley:

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

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!

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! :slight_smile:

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! :) 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! :sunglasses:

Yes, each WS2812 has an integrated controller. More information here:

The APA 102 LED is easier to program but more expensive:

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! :slight_smile:

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.

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.

Just need to warm up this thread again. I decided to order a 5m SND 5050 strip and a WS2812b strip, both with controllers, so that I would be able to try them with some pre-programmed patterns before getting an Arduino.

I received the 5050 last week, and after briefly working it started to flash irregularly. After disconnecting and reconnecting, the lights just briefly flash once, and nothing else happens. I contacted the seller, and got a refund - they didn’t even want me to send the strip back.

Today I got the WS2812b strip in the post, and I connected it to an RF controller that I had ordered separately. As it came without a power supply, I used the one that came with my 5050 strip.

The only thing that happened was that one single LED lit up, somewhere in the centre of the strip, and it was unresponsive to any input from the remote control. After several minutes of googling for a solution, I noticed that now several LEDs at the beginning of the strip were lit up unevenly. When I checked the power supply, I realised that it had become far too hot for comfort in just a few minutes, so I unplugged it. The power supply is rated at 12V / 2A, and now I’m wondering whether I need one that can supply a higher current? As far as I can remember, the strips consume 12W per metre (i.e. 60W in total), so I guess that it drew more amps from the power supply than it is capable of?

When I got a refund for the 5050 strip, I assumed that it was simply the controller that wasn’t working, so I ordered a new one that has yet to arrive. But now I’m thinking that I probably need a power supply that can provide a higher current - can someone with more experience please enlighten me?

Been a couple years since I bought strips, but I was able to find calculations for the currents needed for the basic one color SMD sizes.
Some of the higher end retailer sites had the info for their product. May give you an idea.
Another thing is to feed the strip power at both ends, I think this was mentioned earlier. I have seen full strips fed from one end dim down by the other end.
And do not trust a 12V 2A wall wart to run at stated specs, let alone do it continuously. Consider doubling the power supply to what the strip needs.

Cut a section off the strip and test it on its own.
Apply the voltage at certain points on the strip to see if there are dead sections.

I highly suggest that you read through the AdaFruit guide here. A higher capacity power supply is probably a good idea, but it depends on how many lights you are trying to light, at what intensity and what color.
Also on the list, a filtering capacitor betwixt power and ground, and a resistor between the Arduino and the Din line.

Check very carefully what the LED light power requirements are. Some strips use 12Vdc, others 5Vdc. N’er the twain shall mix. The lights I used had “12V” right on the strip. So I knew what voltage to feed them. Mixing controllers and lights from different suppliers means extra attention needs to be paid. If I’m reading your post right, the power supply and the lights came together, but the controller was separate.

A brief search turns up results that indicate that 5050 are probably 12 volt, but WS2812B look like 5 volt.

Damn, they are indeed a different voltage, and I connected 12V to a 5V strip! Not got an Arduino yet - just wanted to see how the lights work out of the box first, but AdaFruit do recommend adding a capacitor so I’ll be popping into an electrical supplies store tomorrow.

Guess I’ll be getting a better power supply too, and hoping that I haven’t damaged the strip. Hopefully I should also have a new 5050 controller in the post tomorrow, so I can test where the problem is. Both strips are the waterproof versions, so I won’t be able to check the voltage at different places unless I cut the strip or damage the covering. But I should have a better idea where the problem lies with either once I’ve got the additional components.

One thing that I noticed is that the WS2812b strip has got five wires - three that go to a JST connector, and another two loose ones. I guess that the two additional wires are for supplying extra power if needed? The strip has got 30 LEDs per meter, so 150 in total, and the single colour strip (which has no additional wires besides the ones ending in the connector) has got 60 per meter, so a total of 300 LEDs.

One more question - would this power supply work? The voltage is switchable and it is rated at 30W, so I guess that means it can supply 6A at 5V?

https://www.ebay.co.uk/itm/3V-4-5V-5V-6V-7-5V-9V-12V-30W-Universal-AC-DC-Adaptor-UK-Power-Supply-6-Tips/172626184418

Really starting to wonder what the chances are of me grasping electronics, without burning down the whole building … :frowning:

Naw, mate, you’ll get there. Just take it slow, double check things and read the data sheets.

The 3 + 2 wiring is so you can feed your led strips a couple of different ways. The 3 pin JST connector should go to the controller. The extra power and ground go to the power supply. As long as the controller can handle the same voltage as the led strips can take. I got a picture of a couple different types of strip, I’ll post them when I’m not on my phone tomorrow.

That makes sense, and it’s something that I’ve also come across when I’ve read about hooking up an Arduino - keeping the power supply to the controller separate from the one that goes to the LEDs. So the separate red and white cables are just duplicates of the voltage and ground that go straight to the lights, and the green cable must be for data.

I’ve always found anything to do with hardware rather daunting (and I’ve always hated upgrading my PC hardware while worrying that something might go wrong), so I’ve mainly stuck with the software side of things most of my life. But nowadays I’m fascinated when I see what is possible if you’ve got some experience with electronics (and soldering) - I guess what I need is to successfully complete a project, to take away some of the fear and provide the motivational factor.

As you already noticed you used a wrong power supply. WS2812b is rated for a maximum of 5.3V supply voltage, so I’d pretty suprised if the strip is still working.
You’ll notice a weak (too little current) power supply when the LEDs at the other end (where the supply is not connected) are dimmer and flickering - but the LEDs at the end with the power supply usually still work. The library I linked earlier allows to limit power consumption (by dimming the LEDs) what I usually do even with strong supplies. So I avoid powering the strip from both ends which is not as easy as it appears since it needs long wires from the supply (if you don’t use 2 of them) and there is a noticable voltage drop over the long wires. Even with a limitation to 2 Amps a 150 LED strip with WS2812b is still pretty bright.
I won’t recommend connecting both power supply AND arduino (connected to USB) to the strip at the same time without protecting diodes, later you can supply the arduino with the power supply too. For testing with arduino during programming I didn’t connect the supply, just limited the current consumption to a reasonable value in code.

I wouldn’t recommend the power supply you linked, it appears to be unregulated. I had good success with MEANWELL GST60A05-P1J, it’s regulated and protected against shorts and overload.

A WS2812b strip with 150 LEDs driven solely by a arduino nano during prototyping (the second device on the prototype board is a HC-06 bluetooth module):

Wow, those Mouser power supplies are pretty expensive (at least here in the UK!). If they’re the best that money can buy, I’d be happy to get one though for future Arduino projects. For now, I’ve ordered a generic regulated one for about a third of the price (and since then I’ve realised that I could have just taken one out of one of my old computers…).

I really just want something that works with one of the standard controllers that are available, to see how it works and to give to my sister as a Christmas present. If I can get that to work, I’m happy to get all the tasty bits for myself, and to start with some coding.

EDIT: Sorry if I’m sounding like a noob who needs every little detail explained … but these things make me feel like I’m in a foreign place where I don’t understand the language, as much as I’d like to!