5

I'm brand new to this community, and in electronics as well.

I'm a software developer and I want to start a new journey with a project in mind: I want to control a 5 meters addressable LED strip for my living-room.

I need all the components for this project... I already know eclipse and Java world, but I need help in choosing the components for the project:

  • which Arduino (starter package maybe?)
  • LED strip (smd 5050 on sw2812b, sk6812, APA104...) more than 60 LEDs/m
  • Power Supply for the project

Can you point me to the right direction, posts that can be useful to me, so I can start on good basis?

  • I doubt that you'd need the starter kit, you only need to pick an Arduino board based on your code storage requirements and power. – Avamander Mar 13 '16 at 15:02
5

NeoPixels

The strips based on the WS2812 / SK6812 and similar chips, known by some as NeoPixels, are clever ways of implementing fully-addressable 24-bit colour LEDs.

One of the clever things is that they only require one data wire, plus power and Gnd, i.e.

  • +5V
  • Data
  • Gnd

The pixel information is sent by precisely timed sequences of 24 bits per pixel. The first pixel "peels off" these 24 bits (ie. 3 x red / green / blue) and then passes the rest on to the next pixel, and so on.

Libraries

Various people have written libraries to do this for you including:

Power

Each pixel draws around 60 mA at maximum brightness (showing white) so you need to allow for a heavy-duty power supply. Particularly if you have 5m of 144 pixels/m then that is 720 pixels, which would require 43.2 amps!

According to Adafruit:

To estimate power supply needs, multiply the number of pixels by 20, then divide the result by 1,000 for the “rule of thumb” power supply rating in Amps.

Even that means you need 14.4 amps for your 720 pixels!

So bear that in mind when sizing your power supply.

Addressing methods

The Adafruit library (as far as I can tell) holds the pixel information in RAM, and then "dumps" it to the NeoPixels in one operation. This lets you do fancy things in memory, and copy the results to the pixels. However that means you need enough RAM for all this. At 3 bytes per pixel (24 bits), if you have 720 pixels, that will be 2160 bytes, which is more RAM than the smaller processors (like the Uno) have.

Larger processors (like the Mega) have more RAM.

An alternative method, as explained here does not keep the data in RAM, but generates the colours "procedurally" on-the-fly. This is much less RAM-intensive, but perhaps less flexible. On that page he links to a YouTube video which shows a humble Arduino Duemilanove (similar to a Uno) driving over 1000 pixels!

Procedural generation however can do quite a lot, for example you can set the entire string to a single colour, change that rapidly, or make a rainbow effect by increasing (say) the red value for each successive pixel. You can also make "chaser" effects quite simply.

The library I wrote is also designed to allow you to use minimal RAM. You could conceivably add in your own storage scheme, perhaps only storing one byte per pixel, with less bits per colour (eg. 2 bits each for red, green, blue) and that would reduce RAM requirements by a third.

Cabling run

You could try sending the data over 2m. I warn you that the timing for a zero-bit is that it has to go HIGH and then LOW within about 400 ns, so you can't afford to have the data signal degrade too much.

When I had a similar string of coloured LEDs set up at Xmas time (not NeoPixels however) I had a long run of a 5V power supply (just using a pair of figure-8 wire), and situated the processor quite close to the pixels. This is probably the safest way of doing it.

| improve this answer | |
  • Wow that is a well detailed answer, now I'm scared ! joking :) Thanks a lot, i'll keep all of this in mind ! so the strip I found is ok (72/m x 5m = 360 pixel), I'm glad to hear that ^^ – Darkendorf Mar 14 '16 at 6:02
  • BTW I got my 300 NeoPixel string in the mail today. Powering it up with all white at full brightness it consumed 3.9 amps, and even then the end of the strip looked yellow. There is provision on mine for powering both ends, and I guess I would need to do that if I wanted full brightness through the string. – Nick Gammon Mar 16 '16 at 9:11
3

I like the ws2812 RGB LEDs with integrated controller. They can be found on adafruit.com, e.g. here: Adafruit NeoPixel NeoMatrix 8x8.

There are some good tutorials on adafruit.com:

Choosing your Arduino you have to keep in Mind that the Arduino Due runs at 3.3 V, while the Arduino Mega runs at 5 V. The ws2812. But you can use a level shifter to connect an Arduino Due to the ws2812.

Your Arduino is powered via USB, the LED matrices / stripes need their own power supply, but a DC 5V wall plug (something like a cell phone charger) will do the work (check the max. ampere ratings to be high enough for your LEDs).

A starter package depends on what you already have. Some jumper cables are always good to have, basic tools for electronics as well, e.g. a soldering iron or some prototyping board.

| improve this answer | |
  • thanks a lot for your hints. FYI I'm in France as I heard there was some licence stories about Arduino' name... can I have the Arduino next to me at around 2 meters of the led strip ? or is it better to have a 2 meters long usb cable... ? – Darkendorf Mar 13 '16 at 18:08
  • Adafruit says to minimize the distance between the LED matrices and the Arduino. but I have seen systems working with ~ 2 m of cable between the Arduino and the LEDs. But a 2 m long USB cable is working as well. – bastelflp Mar 13 '16 at 18:11
  • Thanks !! could this strip be ok (model IP30 72Pixel RGB WW) aliexpress ? – Darkendorf Mar 13 '16 at 18:27
  • 1
    You don't need 2m of USB cable. A lot (all?) of Arduinos also have a power input jack. Just extend a 5V power supply to reach it. It will be easier with a 5V Arduino like the Uno. It looks like the strip you mentioned has the same/similar chip (SK6812) to the NeoPixels. – Nick Gammon Mar 13 '16 at 21:18
  • ho now I understand your message ^^ the 2m usb cable was for dialoging with the pc ^^ – Darkendorf Mar 14 '16 at 20:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.