ws2801 led strip problems

Hi

I tried recently to get one of these http://www.bliptronics.com/item.aspx?ItemID=128 led strips working with an arduino.

Had no joy, having followed the instructions using sample code on that page, and http://www.sparkfun.com/datasheets/Components/LED/LED_Strip_Example.pde. All that happens is the first led in the strip flashes, and only when the ground from the 5v supply is not linked to arduino ground.

At the same time I got some of these http://www.bliptronics.com/item.aspx?ItemID=110 which use the LPD6803 and they worked fine with the sample code provided.

Since then I got a strip similar to this 12mm Diffused Thin Digital RGB LED Pixels (Strand of 25) [WS2801] : ID 322 : $39.95 : Adafruit Industries, Unique & fun DIY electronics and kits along with a controller someone had made using an mbed NXP LPC1768. This came pre wired and worked straight out of the box (artnet dmx control built in - really nice) and I though I'd have a go at controlling that strip using an arduino. No joy, same problem as above. I wired the string back up the the mbed controller and now it doesn't work either!

First thoughts are probably that I've connected the power up incorrectly and blown something but I've been really careful and am pretty sure I haven't done this. I noted the wires used for power on the (working) setup with the mbed and made sure to use the same (apparently it's fairly common for the cable colours to change between batches of these led strips) with the arduino.

I'm a little confused as most people seem to have a really easy time getting these to work and I'm not really sure how to troubleshoot further. It's a little worrying that I seem to have broken the new strip, as I have no idea how that might have happened. Does anyone have an idea of how to troubleshoot from here?

Here is the last setup I tried -

Strip <-----> Arduino
SDI <-----> Pin 2
CKI <-----> Pin 3
GND <-----> GND

Strip <-----> 5v power supply
GND <-----> GND
5v <-----> 5v

Using the sketch here - http://www.sparkfun.com/datasheets/Components/LED/LED_Strip_Example.pde

Cheers

Check out this library.
http://code.google.com/p/fastspi/

This uses SPI, so your clock goes to pin 13 and data to 11. The way you are connecting power is correct.

Still no joy.

Is there any way I could have damaged the ws2801 chips by sending wrong data down the wrong wire? Eg sending CLK into SDI?

Wouldn't have thought so but I'm pretty sure I didn't connect power up to the wrong place

Is there any way I could have damaged the ws2801 chips by sending wrong data down the wrong wire? Eg sending CLK into SDI?

No that would not damage it.

Make sure that you connected the controller to the beginning of the strip rather than the end.

Ya I don't see how connecting data/clock to the wrong wire would break it.

Maybe if you swapped power and ground it would mess it up.

Maybe you could post some pictures of your wiring?

I've been using a lot of these strips lately for a project including the LPD8806 and WS2801s. Some things special with the WS2801s include:

  • The color wiring seems to vary by supplier but is ALWAYS completely non-standard. Do not assume Red and Black are +5 and GND. They aren't on any of them I've seen. Make sure you look at the silkscreen label on the FPC to know which connector belongs where. I even recommend soldering on a new connector that DOES have standard wire colors while you're at it to idiot-proof it if you don't mind messing up the IP-xx waterproofing they usually come with. If you accidentally hooked up the wrong things here you could have damaged them.

  • While you're looking at the silkscreen on the FPC make sure you're on the input and not output side. It sounds to me like this is actually your current problem as I've done this before too. I've had them shipped to me on the spool input side and output side out and with the male and female connector on any random side as well. You can never tell and every manufacturer seems to do all of this differently. Trying to shove data in the output side doesn't damage anything.

  • If you reverse CLK/MOSI (digital 11/13) you won't damage anything at all. It's just sending incorrect logic and will cause seemingly random flickering. You're free to try them both ways if you aren't sure if they're backwards or not.

  • The FastSPI library needs .setDataRate(3) or higher with most strips with more than a few ICs on them. The default data rate for the library only works with very short strips as they are spec'd to work at 2Mhz when chained. Most code samples don't mention this and will just cause your longer strips to flicker.

We have found that if a digital point strip doesn't work there is a good chance the first chip was damaged (by miss wiring, static or an elf) but either way if you have it connected correctly and it doesn't work just cut off the first section and your troubles should be over as the 2nd section should be fine

Hi.

Thanks for your suggestions guys.

I ran out of time on this a while ago and am just coming back to it now, using individual ws2801 chips.

Guess what the problem was - I needed a bypass cap on the power supply, even when powering directly from the arduino. These things are sensitive!

I just saw this mentioned on the adafruit site, and I think it's the only place I've seen it recommended.

I'm surprised more people haven't had problems with this

mrboni:
Guess what the problem was - I needed a bypass cap on the power supply, even when powering directly from the arduino. These things are sensitive!

I just saw this mentioned on the adafruit site, and I think it's the only place I've seen it recommended.

I'm surprised more people haven't had problems with this

If you read the datasheet, page 5, on the VCC description, it suggests putting a cap in. Furthermore, if you end up powering them with higher than 6V (in which case you need a diode), that too specifically says to use a capacitor ( page 8 ).

Usually when one sees a suggestion like that, you take it to heart and just add one.

And this is why you need them:-
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

Thanks Grumpy.

I learned this principle the 'hand on' way on a recent project. You don't know how many problems it fixed!

I found this post quite useful-Thanks
With the strips I thought I had damaged a couple I was playing with and the library suggested by Sparkfun did not explain itself very well . I had difficulty understanding it. In the first post here is a link to a page on the strip and its suggested library is http://www.bliptronics.com/\arduinocode\blip_leds_spi_2801.zip

I got this library and it required three changes -Change WProgram.h to Arduino.h and delete the reference to wiring.h. With these changes it now runs on Arduino Version 1 and I noticed the reference text included with the library had some good explanation notes for novices like myself.

Hi, I'm having the exact same problems as the topic creator. Would someone please be able to give me a quick guide as to how to install a bypass cap on my 5V 2A wall wart?

Thanks.

leslu:
Hi, I'm having the exact same problems as the topic creator. Would someone please be able to give me a quick guide as to how to install a bypass cap on my 5V 2A wall wart?

Thanks.

Read the description for the VCC pin on page 5 of the datasheet.

KirAsh4:

leslu:
Hi, I'm having the exact same problems as the topic creator. Would someone please be able to give me a quick guide as to how to install a bypass cap on my 5V 2A wall wart?

Thanks.

Read the description for the VCC pin on page 5 of the datasheet.

Hey KirAsh4,

I'm super new to Arduinos, and electronics in general. Would you be able to tell me how to connect a capacitor between the VCC port and GND?

Solder?

leslu:
Hey KirAsh4,

I'm super new to Arduinos, and electronics in general. Would you be able to tell me how to connect a capacitor between the VCC port and GND?

Exactly the way it sounds. Take a (non-polarized) capacitor, and attach one leg to VCC, and the other leg to GND. If it's polarized, then just match GND for -, and VCC for + on the capacitor.