6

I am using the below LED strip for accent lighting

enter image description here

  • 5M WS2801 Blcak PCB 32LED 5050 RGB Digital LED Strip Individually Addressable 5V
  • item: nonwaterproof black pcb ws2801 led strips
  • Model: 5050RGB WS2801
  • Working voltage: DC5V
  • LED Type:SMD5050 RGB
  • Led Qty: 32 led per meter
  • Wave length(NM):R-650mcd, G-520mcd,B-460mcd
  • Power(W/M):9W/M
  • IC: each led controlled by one WS2801 ic chip
  • Scale:256
  • View angle:120 degree
  • Life span:no less than 50000hrs
  • Packaging:5M/reel in antistatic bag
  • NONWaterproof

I need to control the light such that all 100+ft are working together (ie. the same color or color transitions continuous). Ideally, I would connect them to one power source, but that will lead to voltage drop. I could try to connect them in parallel, but eventually there will be too many amps. I could connect a power supply for each 5m, and then network all the raspis to give the appearance of all strips working together, but that requires power supplies for the raspis, and I don't want to go around the house and hide them all.

Could someone give a very beginners explanation of how I can both power that many LEDs and control them from a single raspi.

EDIT: I wanted to know how I would have to connect them, for example if a 5v 2A adapter to a 10m strip is failing can I just use a second 5V 2A adapter and split the strip into 2x5m strips, then connect the first adapter to the first 5m strip and the second adapter to the second 5m adapter (see below)?

  • Adapter/Raspi --> [10m strip] FAILS
  • Adapter/Raspi --> [5m strip] --> Adapter --> [5m strip] SUCCEEDS?

What about the DI and CI connections? Can I just connect the DI/CI out of the first strip to the DI/CI in of the second strip and then hope that the signals sent from the raspi to the first strip will magically be transferred to the second strip? I can't help but shake the feeling that it's not that simple since power supply is so finicky (ie. voltage drop, wire thickness, series v parallel...) I get the feeling I am jerry rigging power supplies in here all willy nilly.

  • You say Power(W/M):9W/M so 30m would be 27W. You should have no trouble finding a suitable power supply. You also mention WS2801 which uses a 2-wire serial interface. Provided you don't need to address more than 100 you should have no problem interfacing from the I2C interface on the Pi. There shoud be no issues with voltage drop, as the chip has a constant current driver for the LEDs. – Milliways Feb 24 '14 at 5:48
  • @Milliways ... Could you put this as an answer with more info, I don't follow you with respect to the following: Power(W/M):9W/M, "2 wire serial interface", "more than 100", "I2C", "Constant current driver" – puk Feb 24 '14 at 7:39
  • @ puk I didn't put as answer, because it really isn't. Frankly you don't give enough detail about the LED strips, or what you want to do with them. Most of this came from the specification you quoted (you don't provide a link to the actual product). The spec says the strip uses Power(W/M):9W/M so 30m would need 270W. (I was wrong above) I looked up the spec for the WS2801 to see what it did. This should give you a start. I suggest you start with 1 strip, and check the I2C interface and try to write some code. – Milliways Feb 24 '14 at 7:48
  • You will find part of your answer here You are doing it all wrong and espeiclaly it is RGB it is even more complicated. – Piotr Kula Feb 24 '14 at 9:57
  • @puk You originally asked question about RGB raspberrypi.stackexchange.com/q/13925/8697 then copied a specification for an I2C interface, now you are asking about SPI. These are totally different. – Milliways Feb 24 '14 at 10:55
3

The WS2801 is a 3 channel constant current LED driver. You need 1 of these for every LED. THere are other RGB drivers but the WS2801 are the easiest and most flexible to work with.

The power source MUST be separate to the Pi. But that is easy as connecting a power pack to the Vcc and GND on the LED strip.

enter image description here

Controlling

The problem with these WS2801 LED is that the Input Output signal level is dependant on the Input voltage. (0.8 * Vcc) So to get it to work directly on the Raspberry Pi GPIO you can only supply 4.1volts maximum, which gives you a 3.2Volt Data level that is safe for the Pi. But some people say even if the LEDs run at 5Volt it still works- it might be a different version of the chip.

The spec sheet you can supply from 3.3 to 5.5volts. The WS2801 actually uses a 2 Wire protocol

  1. CKI - Data clock input at 25Mhz
  2. SDI - Serial gray scale data.

Luckily you don't have to write any code as there is something called PixelPi that already knows how to talk to these guys.

Powering

Long pieces of LED strips need allot more power than you might think.

  • After 2~4 metres you can cut the Vcc Line on the LED strip and connect a new power adapter. Leave the GND, DO, DI as is. This way you can power a long LED strip in sections.
  • Another way is to use a powerful regulated power supply. Like a computer power supply. Then connect the start of the LED power, and run copper cable next to the LED strip and connect it every 3metres. You dont need to section up LED because power always uses the least resistive route, in this case your extra copper wire from the same power supply.
  • Wrt using a computer PSU and running copper wires, wouldnt there be voltage drop in the wires themselves over long distances (ie 100 feet) – puk Feb 24 '14 at 16:29
  • Also what is the phusical limit of the number of leds that the raspi can control (NOT power) ? 1, 000, 000? – puk Feb 24 '14 at 16:30
  • The limit is only on the device controlling it. So you can have 1 million but controlling them all at the same time is not possible! Because you cannot write different data to a million objects at the same time(unless its quantum computing) Also Each IC is Globally Uniquely Addressed. The limit is distance between IC's It should not be more than 1metre but can be up to 6 metres if you terminate it with a 50 Ohm resistor to balance the impedance. – Piotr Kula Feb 24 '14 at 16:50
  • Thanks but I was asking a more basic question. Can 1 raspi control 64 LEDs? 100? 200? 1000? I am assuming the power drain is directly proportional to the number of LEDs being controlled. Or is it sequential such that it sends a signal to LED 1, then to LED2, then LED3... – puk Feb 24 '14 at 18:06
  • Also, what is an IC. It goes without saying everything that started with "Also Each IC..." I did not understand – puk Feb 24 '14 at 18:06
3

You shouldn't power the led strip from the Pi's 5V line. Only connect the GND, CI and DI lines to the Pi. Connect the 5V and GND of the led strip to the separate power adapter. Note that the ground is "interconnected" here.

If the adapter isn't strong enough for the entire length, you can indeed split the led strip into sections. Just like above, connect DO to DI, CO to CI and GND to GND. Next connect the new adapter to the 5V and GND of the new section.

  • Yea this makes more sense. This strip can individually address each LED and data needs to be well connected – Piotr Kula Feb 24 '14 at 15:57
  • There are a lot of labels there, can you be more specific (ie. Ground of adapter to ground of led or ground of led to ground of raspi...) thanks – puk Feb 24 '14 at 16:00
  • All three grounds are connected to each other, so ground of the Pi, ground of the adapter, and ground of the led-strip. Just like the picture in ppumkin's answer – Gerben Feb 24 '14 at 19:14
2

As a builder who constructed a device with 480 WS2801 in series, allow me to point out the problems you will encounter.

First is propagation delay. The clock signal that comes out of the chip is .6ns longer than the one that went in. This means as you go past 250 pixels, your clock disappears entirely unless you drop down to a lower clock frequency. Or build a monopulse to regenerate a good clock to continue down the string. To get my full 480 pixel setup to work I had to drop from a clock frequency of 2Mhz to 1Mhz. If you find a patch of pixels freaking out and nothing on the pixels afterwards, your frequency is so high that the clock is vanishing due to propagation delay.

Second is power injection. There is no way you will have every light on and power it from one end and one power supply. We are talking 60A of 5V supply! You'll need to connect power from a nice 18 or 16ga wire starred from a single 5V supply and connected at every 16ft or so. Basically each reel has to have juice coming in from both ends if every light is going to be full on.

1

You have got some good comments above, but none has explicitly answered your power question. This is a simple electrical engineering problem. The specification you copied says "Power(W/M):9W/M" so a 5m length would need 45W - that is 9A at 5V.

Presumably this is the consumption with all 160 LEDs at full brightness. This works out at ~50mA per LED which seems about right. You have obviously got some success with a 2A PSU, but this would not be adequate in all cases. The plug pack power is not really suitable for this kind of application. As well as computer power supplies, I assume there are power packs specifically designed for this kind of application.

There was some question of the voltage on the control leads. This is using I2C, which is an open collector driver. It needs pull-up resistors - the Pi has 1.8k resistors on the board. Provided there are no other pull-up resistors to 5V this should be quite safe. You could easily verify by measuring the voltage, with the Pi connected.

@ppumkin's answer showed connection to the SPI bus, which could have voltage problems, but if only the MOSI is used - drived by the Pi as bus master, this should not.

  • I managed to get my head around the whole power issue by getting an adapter with more amps, but then there is the issue of voltage drop. I will try a 10A adapter, and if it provides enough power, I will connect that in 1 or 2.5m intervals, and then test the number of leds that a raspi can control – puk Feb 25 '14 at 1:48
-1

don't you analysis how many voltage you need to make all LED power up?

  1. try to combine with raspberry pi + driver relay. raspberry pi use to sign and send to the driver through gpio pin.
  2. from gpio pin in raspberry pi, you can make driver relay on and send to the LED power as you need..
  • Thank you for the response, but I do not understand. – puk Feb 24 '14 at 7:25
  • Relay WONT work! It is RGB. – Piotr Kula Feb 24 '14 at 10:19
  • @ppumpkin it is an rgb strip but to stress it is the 5v led version not the basic 12v ones – puk Feb 24 '14 at 16:01
-1

To clarify chuda's answer:

You can get a 5V relay board to control bigger currents using the Pi. The Pi does not have enough to power that many LEDs, but you can use a mains adapter. If you splice the wires and connect them to a relay board, you can control mains using the Pi without damaging it.

See this YouTube video, he gives a good explanation

https://www.youtube.com/watch?v=3Pikhq99q5E&feature=youtube_gdata_player

  • These are RGB. That wont work – Piotr Kula Feb 24 '14 at 10:19
  • Yes they are 5v led strips, but for clarity can you elaborate exactly what "splicing" involves, also what is a relay board and what does "mains" mean here. Cheers – puk Feb 24 '14 at 16:02
  • Very informative video, however, I dont think it would ever be applicable to led strips. Can someone confirm this for me please. – puk Feb 24 '14 at 16:24

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.