Pages: 1 [2]   Go Down
Author Topic: Looking for an RGB LED addressable strip 1 LED per segment  (Read 4152 times)
0 Members and 1 Guest are viewing this topic.
Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Valencia, Spain
Online Online
Faraday Member
**
Karma: 146
Posts: 5497
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
Logged

Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.... smiley



Also attached the code I used in the video.

* testleds_working.ino (1.96 KB - downloaded 12 times.)

* Power Supply.jpg (1107.72 KB, 1920x2560 - viewed 25 times.)
Logged

Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 ...  smiley  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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Milan
Offline Offline
Sr. Member
****
Karma: 0
Posts: 375
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Milan
Offline Offline
Sr. Member
****
Karma: 0
Posts: 375
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Milan
Offline Offline
Sr. Member
****
Karma: 0
Posts: 375
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

N
Logged

Pages: 1 [2]   Go Up
Jump to: