RGB LED Pixel strand problem

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
trip11
 
Posts: 1
Joined: Fri Apr 08, 2011 7:15 pm

RGB LED Pixel strand problem

Post by trip11 »

I just purchased a strand of the 20mm RGB LED pixels ( these: http://www.adafruit.com/index.php?main_ ... cts_id=307 ). Yesterday I excitedly wired up a circuit and loaded the example code to see what they would do. It almost worked. My problem is that out of the strand of 20 LEDs, the first 14 work perfectly. The last 6 LEDs on the strand however do not.

The 15th and 20th LEDs stay always on bright white no matter what. LEDs 16, 17, 18, and 19, pick random colors (They seem to always be off, bright white, bright red, bright yellow, or bright purple though).

I'm a bit stumped at this point. I'm kinda wondering if the LDP6803 chip in the 15th or 16th LED isn't doing the shifting correctly and is outputting incorrect bits. So my next move would be to cut out those LEDs from the strand and see if I can get it to work without them. But before I cut into my beautiful new toy, I thought I'd ask if anyone else had ideas on how to troubleshoot this.

Thanks in advance for any help! (Details below)

Details on my setup:
Power. The Arduino (UNO) is powered from the USB. The LED strand is powered by a 5V external power supply (a spare ATX power supply I use for this purpose). I have the ATX ground connected to the ground pin on the arduino board and to the ground (blue) wire on the strand. The 5V from the ATX supply is connected to the red wire on the LED strand. I'm using pins 2 and 3 for the clock and data pins as well.

Code. I wrote very simple sketch in the process of debugging. It turns on one LED for half a second and then moves to the next LED until it goes through all 20. As I said, the first 14 behave exactly how I expect, and the last 6 do not. I have also tried adjusting maxcpu up and down, to no effect. In any case, here's the sketch:

Code: Select all

#include <LPD6803.h>
#include <TimerOne.h>
int dataPin = 2;       // 'yellow' wire
int clockPin = 3;      // 'green' wire
LPD6803 strip = LPD6803(20, dataPin, clockPin);

void setup() {
  strip.setCPUmax(50); 
  strip.begin();
  strip.show();
}

void loop() {
  for (int i=0; i < strip.numPixels(); i++) 
  {
      strip.setPixelColor(i,Color(17,17,0));
      delay(500);
      strip.show();
      strip.setPixelColor(i,Color(0,0,0));
      delay(100);
      strip.show();
  }  
}

unsigned int Color(byte r, byte g, byte b)
{
  return( ((unsigned int)g & 0x1F )<<10 | ((unsigned int)b & 0x1F)<<5 | (unsigned int)r & 0x1F);
}

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: RGB LED Pixel strand problem

Post by adafruit »

triple check, are you connected to the 'input' pins?

electrohell
 
Posts: 4
Joined: Thu Jun 09, 2011 1:33 am

Re: RGB LED Pixel strand problem

Post by electrohell »

just received the same led strand and i'm having an almost identical problem, but on my strand, the first 13 pixels work as expected while the last 7 do not.

triple checked that i'm going into the input pins. tried uploading the example sketch as well as the code written by trip11 above and in both cases, only the first 13 led's are addressable. the last 7 led's are constantly on in random non-changing colors.

any ideas?

User avatar
adafruit_support_bill
 
Posts: 88154
Joined: Sat Feb 07, 2009 10:11 am

Re: RGB LED Pixel strand problem

Post by adafruit_support_bill »

What are you using to power the strip?

electrohell
 
Posts: 4
Joined: Thu Jun 09, 2011 1:33 am

Re: RGB LED Pixel strand problem

Post by electrohell »

at first i was just running off the arduino 5V and ground pins; the arduino is connected to a 9V 650mA power supply.

i've since purchased a 5V 1.5A power supply. with the led strand plugged directly into this, all shine white (rgb all on). been searching around to determine how to wire this in so the arduino controls the leds. any further advice would be greatly appreciated.

electrohell
 
Posts: 4
Joined: Thu Jun 09, 2011 1:33 am

Re: RGB LED Pixel strand problem

Post by electrohell »

ok, after grounding the arduino, i'm getting the same results running the led strand off of the 5V 1.5A power supply. the first 13 leds are addressable; the last 7 are not.

wish the op were still around...

User avatar
adafruit_support_bill
 
Posts: 88154
Joined: Sat Feb 07, 2009 10:11 am

Re: RGB LED Pixel strand problem

Post by adafruit_support_bill »

It sounds like you have it wired correctly if you can talk to the first 13. And that power supply should be adequate for the strip. Contact [email protected] about a replacement and reference this thread in your message.

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: RGB LED Pixel strand problem

Post by adafruit »

and make sure you're absolutely postively connecting to the right side (input) not output!

minor9th
 
Posts: 4
Joined: Sun Jun 12, 2011 5:42 pm

Re: RGB LED Pixel strand problem

Post by minor9th »

I've recently purchased and tried out a couple of these light strip - all works really well and the tutorial is great.

Is it possible to control two strands from one arduino? I have tried with a 5V 2A switching supply but I seem to only be able to get it to work with one strand / one set of clock&data pins. Am I being dense?

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: RGB LED Pixel strand problem

Post by adafruit »

connect the end of one strand to the beginning of the other

minor9th
 
Posts: 4
Joined: Sun Jun 12, 2011 5:42 pm

Re: RGB LED Pixel strand problem

Post by minor9th »

No i mean control them independently, not in a long series. I need to control a few strings in parallel for a project...

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: RGB LED Pixel strand problem

Post by adafruit »

not with the current code, no its meant for one strand's worth at a time - you probably can't really control two strands because of the way the protocol works

electrohell
 
Posts: 4
Joined: Thu Jun 09, 2011 1:33 am

Re: RGB LED Pixel strand problem

Post by electrohell »

got the replacement and it works great. thanks for the great customer service!

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”