Looking for an RGB LED addressable strip 1 LED per segment

Sorry, that's my bad. I had multiple windows open. What I meant to link was the 2801 version:


Note that the same vendor also sells a full reel, 5m, for a little over $144. Buying it straight from China will be a little under $90 including shipping. Just saying.

KirAsh4:
The only issues with length is that at some point you need to add some pull-downs to the data and clock lines at the END of the string, to avoid reflection of the signal.

Do you have any more info on this?

More specifically, I purchased a similar 5m led digital strip,WS2801IC 32pcs IC+32pcs 5050 SMD RGB/meter with a total of 160 (32*5) LEDs. I've paired this up with a duemillanove and a 5V 5A PS. On the arduino, I've ran the fastSPI test leds PDE and the adafruit WS2801 strand test PDE, with consistent errors after exceeding about 60 LEDs. The failure that occurs are the first led pixel being off color and some leds toward the end of the string or all leds begin to behave erratically. Any thoughts? Maybe throw in a pull down resistor after the 50th?

Read the data sheet on the WS2801. It tells you when/where you need to add the resistors.

However, I have run the FastSPI testled sketch on a full 5m reel straight out of the box with no problems what so ever. The only change I made to the sketch was to add the proper dataRate line, which is missing from the sketch. No resistors added, just hook up the four wires, make sure the 4 wires at the end aren't touching anything metal, and turn it on. In fact, I just grabbed two reels, hooked them up in parallel to my Uno, using FastSPI. I only ran one sequence, which is the single color down the whole strip, because it's not hooked up to a high amp power supply:

(the freezing that you're seeing, if any, is just the way YouTube processed the video - the chase is smooth with no hiccups.)

KirAsh4:
Read the data sheet on the WS2801. It tells you when/where you need to add the resistors.

However, I have run the FastSPI testled sketch on a full 5m reel straight out of the box with no problems what so ever. The only change I made to the sketch was to add the proper dataRate line, which is missing from the sketch. No resistors added, just hook up the four wires, make sure the 4 wires at the end aren't touching anything metal, and turn it on. In fact, I just grabbed two reels, hooked them up in parallel to my Uno, using FastSPI. I only ran one sequence, which is the single color down the whole strip, because it's not hooked up to a high amp power supply:

(the freezing that you're seeing, if any, is just the way YouTube processed the video - the chase is smooth with no hiccups.)
- YouTube

Thanks for posting this up. I looked in the spec sheet and it only states what's below. I changed the pull up resistors from 10K to 50 with no positive effect.

The Connection and Driving of Cascading Operation
The transmit the data over long distance by cascading, the WS2801 integrates push-pull output stage with strong driving capability which enables the data and clock can be transmitted up to 6 meters at 2MHz clock frequency.
To prevent the reflection, it is necessary to connect a 50? resistor at the data input or output port for impedance match.

Any thoughts on what the problem could be? A bad/faulty strip? This wouldn't surprise me because the quality does not look top notch...
This afternoon I will try swapping out to a spare arduino to see if that changes anything.

Maybe post your sketch so I can see what you're doing ...

KirAsh4:
Maybe post your sketch so I can see what you're doing ...

FastSPI: Google Code Archive - Long-term storage for Google Code Project Hosting.
Adalight: GitHub - adafruit/Adalight

I've found that the adalight package fails almost immediately. However, with FastSPI, if I set the data rate to 7 (the slowest), and increase all of the delay times, it more or less works but eventually fails.

strandtest.pde (4.28 KB)

testleds.ino (2.43 KB)

You don't need the PIN definition nor the .setPin call() for the WS2801, you can safely comment those out (or just delete them since you'll never use them with the WS2801 anyway.) Same for the other .setChipset() lines. They become clutter anyway.

The WAIT_TIME definition is for ....? It's not used anywhere.

However, neither of those are affecting what the rest of the program is doing anyway. I don't see why you're having problems. A full reel has 160 LEDs on it and I can run that with a dataRate of 2 with no issues what so ever. This is with the strip still on the reel, no resistors, nothing. This is how I test the reels before I start using them, right out of the box.

I'll do some more testing when I get home tonight, maybe there's something I'm missing.

You definitely shouldn't need termination resistors with WS2801s. They buffer the data from chip to chip - there's no continuous wire along the strip.

I just bought one of these, I guess I'll find out in the next couple of days.

Eventually you need to add the resistors to prevent reflection, but that's only on long runs between each IC. When they're this close together, it's not needed. There's something else going on with his setup ... I'm about to do some testing on a string of 224 pixels, see what happens.

Here you go poldim. Brand new 5m reel, just opened the package today. I connected the VCC and GND wires to an external 5V/30A supply. Connected an Uno to my computer and connected a wire from the PSU GND to the Uno's GND. Connected the remaining two wires to CLK and MOSI. Then, for good measure, I downloaded the latest FastSPI which as of tonight was 20121014. After installing the library and launching Arduino IDE 1.0.1, I loaded the testleds sketch and made the following changes:

  • changed the NUM_LEDS value to 160 (5 meter of 32 per meter => 5 x 32 = 160)
  • set the RGB struct to b, g, r (this I know from working with these strings from this vendor for a while now)
  • uncommented the WS2801 .setChipset() line and commented the other one
  • added a .setDataRate(2); line before the call to .init() (I have yet to go any slower than that)
  • hit Upload

As soon as the sequence started I noticed discoloration towards the last 20-25% of the string. Ah, I need to inject power! So I connected the end of the string's power wires to the PSU also (only the power wires, the data and clock lines weren't touched.)

And the result is this:

Honestly, I don't know what could be going wrong with your setup besides perhaps a lack of current. If you are driving these only from USB power, that may be the issue, but I don't know. It should still run at the very least the first sequence or a single pixel being lit, chasing from the beginning of the string to the end. The others will start to draw more current. 90 pixels at 20mA is 1.8A - something your USB connection will not provide. But the single chase should work because it's only drawing 20mA at a time.

So your next step is to try and run it with an external power supply like I do. Run the UNO from your computer (so you can keep uploading sketches to it without having to reconnect/disconnect each time.) But connect the string's power wires to an external power supply. An old computer PSU works great. Mine provides 30A on the 5V line which is plenty to drive a full 5 meter string at full power, 60mA each (9.6A total.) Make sure you connect the PSU's ground to the UNO's ground. Let it rip. Report back.

The max draw for the ws2801 strips from GreeLED is 2A per meter, that's full white all led's on.
The ws2801 strips you posted from Ebay are from GreeLED as far as i can tell and they are about $12.5 per meter.
Wish i knew that before i spent $90 on 3 meters about 2 months ago on ebay. Found the manufacturer after I bought mine.

Also, I ran into an issue powering my Mega boards from my Laptop. The led's would be erratic and not function properly, as soon as i changed USB to another device, a desktop monitor with USB it worked just fine.

KirAsh4:
Honestly, I don't know what could be going wrong with your setup besides perhaps a lack of current. If you are driving these only from USB power, that may be the issue, but I don't know. It should still run at the very least the first sequence or a single pixel being lit, chasing from the beginning of the string to the end. The others will start to draw more current. 90 pixels at 20mA is 1.8A - something your USB connection will not provide. But the single chase should work because it's only drawing 20mA at a time.

So your next step is to try and run it with an external power supply like I do. Run the UNO from your computer (so you can keep uploading sketches to it without having to reconnect/disconnect each time.) But connect the string's power wires to an external power supply. An old computer PSU works great. Mine provides 30A on the 5V line which is plenty to drive a full 5 meter string at full power, 60mA each (9.6A total.) Make sure you connect the PSU's ground to the UNO's ground. Let it rip. Report back.

Thanks a ton for the help KirAsh4! I should have posted a video of my problem from the get go and you probably would have figured it out sooner.

Below is the PS I've been using the whole time. I have estimated that I would be using somewhere between 115 and 134 LED for this project. And being that its an ambilight, I better not need a 30A PS.... :slight_smile:

Also attached the code I used in the video.

testleds_working.ino (1.96 KB)

Yeah, it had to be something fairly simple because you were doing everything else correct, and I should've picked up on that early on but didn't. As far as amperage, what you need to calculate is the maximum amp you might be pulling. So, on 115 LEDs, that 115 * 60mA = 6.9A and on 134 that's 134 * 60mA = 8.04A. So no, you won't need a 30A power supply. And this is assuming a full 100% duty cycle on all three channels.

In my case, I create installations with quite a few more. The 30A PSU allows me to put a maximum of 500 of those LEDs. But, I always keep it below that with no more than 15 meters (3 reels), or 480 LEDs. That runs about 28.8A ... I have 1.2A left to run a controller with whatever peripherals ... :slight_smile: As for power injections, I try to inject power every 3 to 5 meters, depending on the total length of the string.

Glad to see things working now.

I've now gotten to a working LED strip for my ambilight, now just need to get lightpack working...

I had my lstrip from China.
I want to test if all works
Someone has a source code example for FastSPI library and ws2801 to test if all works

Thanks
Nic

contecavour:
I had my lstrip from China.
I want to test if all works
Someone has a source code example for FastSPI library and ws2801 to test if all works

Thanks
Nic

Yep, it's all written for you already. Download the library, install it, and run the testled sketch that comes with it.

Thanks.
It's clear how to wire the pin to Arduino?
<N

How i connect the strip to Arduino.
In the strip i have 5v, ck, sI and GND.

N