Hooking up basic WS2801 string

Hey everyone,

For starters, I'll admit I'm a complete noob, this is my first project past blinkers so bare with me :smiley:

I have this plan to build a 60 RGB LED map that I can remotely control via ethernet. I have been planning to do this with multiplexed over TLC5940 but I recently realized that it may be much easier to do this with an addressable LED strip. I will have to add distance between each LED in order to properly fill my map, but thats a problem to worry about after the basics.

Here is the strip I bought
http://www.ebay.com/itm/160946023566?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649

Here is the documentation
http://www.insomnia.org/led/documentation/rgbpxws2801.html

It states "Red is +5v, Green is clock, Yellow is data, and blue or grey is ground. The input side is the side with the IC."

Here is my string

However, when I look at my string, it doesnt look like that matches up. I'm a bit afraid to cut into my cords until I'm a little more certain, so i was hoping someone could advise. I plan on driving these with FastSPI once I actually get it hooked up

  • Which side should I cut? I'll need to extend the lines on the left side (too short to easily reach breadboard) or cut off the SM connector on the right
  • Is the mapping correct? If so, why does one side have 2 extra lines out on the right side? I assume these are an extra ground and power
  • Why are there 4 lines when the spec says 3?

Thanks in advance, I'll do my best to give descriptive replies to help you help me.
AceoStar

Look on the plastic, molded housing itself for arrows that indicate which side is in and which side is out. See the attached image where I highlighted the arrow in red. Each "pixel" will have one side that's in and one side that's out. You want the wires on the IN side.

The red/black wire pair is always VCC and Ground. The three on the connector are DATA, CLOCK, and Ground. This design allows you to connect the red/black pair to an external power source (recommended) while the DATA, CLOCK, and additional Ground is connected to your controller (Arduino I presume.)

So figure out which of the three wires on the connector is connected to Ground. Just look closely at the molded plastic where the wires go in. It should be very easy to tell. If not, use a continuity tester to find it. The other two are your DATA and CLOCK. You can either follow the documentation and see if it's correct, or you can simply connect one wire to MOSI and the other to CLK and run a test program such as the FastSPI testleds sketch, see if the string works. If it doesn't, swap wires.

KirAsh4:
Look on the plastic, molded housing itself for arrows that indicate which side is in and which side is out. See the attached image where I highlighted the arrow in red. Each "pixel" will have one side that's in and one side that's out. You want the wires on the IN side.

tyvm! After reading your reply and looking a bit more closely, I realized what the product desc meant by "side with IC is input". So I will have to cut off the connector and make my connections to the arduino there. No big deal though, I'll end up having to line up 60 varying segment lengths through this project so this will be the first of many cuts.

KirAsh4:
The red/black wire pair is always VCC and Ground. The three on the connector are DATA, CLOCK, and Ground. This design allows you to connect the red/black pair to an external power source (recommended) while the DATA, CLOCK, and additional Ground is connected to your controller (Arduino I presume.)

Assuming this, I think the other specs line up quite nicely. I traced the wiring in the housing and the blue wire is soldered on top of the extra ground, so I think the rest should line up.

I'll take a stab and this tonight and report back. Thanks a ton for the help so far :slight_smile:

The connection to the Arduino needs "ground", "clock" and "data". That would be the three wires going to the three-pin connector in your photo.

The connection to the power supply needs +5V and ground. They would be the two wires with no connector at the top (red/black?)

To be sure, check with a multimeter that the blue wire in the three-pin connector is connected to the loose black wire.

Note that strings like this can require a surprising amount of current. If you switch all LEDs on simultaneously that's 6030.02 = 3.6 Amps. You need at least a 4 Amp power supply, preferably 6 Amps or more if you plan to switch it on for hours at a time (although you probably won't have it all white very often in practice so 5-6 Amps is probably OK).

fungus:
Note that strings like this can require a surprising amount of current. If you switch all LEDs on simultaneously that's 6030.02 = 3.6 Amps. You need at least a 4 Amp power supply, preferably 6 Amps or more if you plan to switch it on for hours at a time (although you probably won't have it all white very often in practice so 5-6 Amps is probably OK).

Hmm. This map will have about 50 LED to be exact and I plan to keep them at a solid color to indicate account status. Ideally I could leave this plugged in forever, but if I need to switch out off I can. You said I need 5-6 Amps, does that mean the v5 won't do it?

AceoStar:
Hmm. This map will have about 50 LED to be exact and I plan to keep them at a solid color to indicate account status. Ideally I could leave this plugged in forever, but if I need to switch out off I can. You said I need 5-6 Amps, does that mean the v5 won't do it?

Power supply volts is usually independent of amps. The 5 volts aren't negotiable, the amps are.

I'd get at least 6A if you're going to leave it on 24/7. 8A would be even better.

Make sure it's a 'regulated' supply, something like this: http://www.ebay.com/itm/110741575602

(nb. randomly chosen eBay item...)

fungus:

AceoStar:
Hmm. This map will have about 50 LED to be exact and I plan to keep them at a solid color to indicate account status. Ideally I could leave this plugged in forever, but if I need to switch out off I can. You said I need 5-6 Amps, does that mean the v5 won't do it?

Power supply volts is usually independent of amps. The 5 volts aren't negotiable, the amps are.

I'd get at least 6A if you're going to leave it on 24/7. 8A would be even better.

Make sure it's a 'regulated' supply, something like this: http://www.ebay.com/itm/110741575602

(nb. randomly chosen eBay item...)

hm, I'll probably come back to you on this one. I should be able to drive this from my PC until I know enough to try and attach an external supply. Thanks for the recommendation!

Tonight, i'll cut of the SM connector, hook it to Arduino and let FastSPI fly.
thanks again

Any PC power supply can do this for you. I have a ten year old power supply that provides me 5V @15A and it cost me nothing (it was salvaged from a dead PC). Most modern power supplies will provide a lot more than that nowadays. Some as much as 40A on the 5V rail.

AceoStar:
hm, I'll probably come back to you on this one. I should be able to drive this from my PC until I know enough to try and attach an external supply. Thanks for the recommendation!

A USB port is good for about 7 fully-on RGB LEDs running at 20mA.

Some newer ports can do double that but if you connect more than 7 and and have weird problems, that's the reason.

KirAsh4:
Any PC power supply can do this for you.

Yep. Any old PC supply will do it. You have to short out two pins on the motherboard connector to get it to switch on but apart from that there's no problem.

fungus:

KirAsh4:
Any PC power supply can do this for you.

Yep. Any old PC supply will do it. You have to short out two pins on the motherboard connector to get it to switch on but apart from that there's no problem.

Except on very old ones, you also need to provide a constant load, otherwise it either won't come up, or it will constantly cycle off and back on. A small fan is plenty.

Newer ones don't require that anymore.

Sorry for the delay.

Documentation says
http://www.insomnia.org/led/documentation/rgbpxws2801.html
Red is +5v, Green is clock, Yellow is data, and blue or grey is ground. The input side is the side with the IC.

I've connected it up based on this spec, but all I really get is the first LED lit up blue. This is green to 13 and yellow to 4, to match the code.

If I switch Yellow and green, I get various lights lit up but it does not follow the pattern designated in the code. I get eratic flashing. If i remove the data from out 4, I still have various lights lit up. I've included a few shots to help debug whether maybe the lines are done wrong.

As for the code, I'm using Pin 4 as specified in FastSPI example. I commented out the other modes and just ran FastSPI_LED.setChipset(CFastSPI_LED::SPI_WS2801);. I'm hooking clock into pin 13 and digital into 4.

Input

Output

My connection

Do these solders look okay?

AceoStar:
As for the code, I'm using Pin 4 as specified in FastSPI example. I commented out the other modes and just ran FastSPI_LED.setChipset(CFastSPI_LED::SPI_WS2801);. I'm hooking clock into pin 13 and digital into 4.

You can't use pin 4 if it's using SPI to send the data, you have to use pin 11.

I updated the sketch to reflect pin 11 and moved the green wire over to it. I'm still getting rather eratic output from the lights. See below
Sorry for the low quality, was trying to rush this in during lunch. There are 25 lights in the strand, only the first few are lighting up in this example, but in various testing I have seen the whole string power on.

https://dl.dropbox.com/u/4099132/New%20Folder/VID_20130304_133219.mp4

I suspect the code is wrong.

I've never used FastSPI: Google Code Archive - Long-term storage for Google Code Project Hosting.

OTOH I noticed that near the bottom of the front page it says:

Note for people using sparkfun's ws2801 led strips - you need to call FastSPI_LED.setDataRate(1) before calling init/start. The library defaults to a data rate of 0 for ws2801 strips, which is valid for the chips on the 12v strips, but not on the 5v strips (or, at least, the 12v strips that I have here) - it's too fast and you get weird random flashing occuring.

fungus:
I suspect the code is wrong.

I've never used FastSPI: Google Code Archive - Long-term storage for Google Code Project Hosting.

OTOH I noticed that near the bottom of the front page it says:

Note for people using sparkfun's ws2801 led strips - you need to call FastSPI_LED.setDataRate(1) before calling init/start. The library defaults to a data rate of 0 for ws2801 strips, which is valid for the chips on the 12v strips, but not on the 5v strips (or, at least, the 12v strips that I have here) - it's too fast and you get weird random flashing occuring.

They are dancing mad now! I should have known to include FastSPI_LED.setDataRate(1), I saw that in one of KirAsh4's other posts but didn't think to add it.

Thanks a ton for the help, my next steps are going to be to learn to control each one individually then hook up the ethernet to start addressing them from there :slight_smile: I'm sure I'll have lots of questions along the way so I'll keep you informed of the progress.

For anyone interested, I ended up going with FastSPI_LED.setDataRate(2); and it worked a lot better for this particular setup.

Yes, the dataRate is to throttle the data stream. I haven't had any reason to go any higher than 2. Most of my projects are running with a dataRate of 1.