Blue LED addressing problem

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
cng1024
 
Posts: 3
Joined: Tue Nov 20, 2012 11:54 pm

Blue LED addressing problem

Post by cng1024 »

I purchased a set of 160 digitally addressable LEDs a few weeks ago (the kind with the LPD8806 chip) and there seems to be a software glitch in the Arduino library. I cut the strips into 10 strips to make a 16 x 10 matrix for a holiday sign. I've glued the 10 strips to a wood backing, then soldered them back together. Each 16 LED strip has it's own power wires, connected together on the back of the sign with screw terminals. I also bought a proper ATX 2.2 12x2 connector to power the sign with a computer PSU, but it isn't wired yet and I wanted to do some simple testing to make sure the sign works ok, so its all powered off the Arduino which is running the long strand test. (The test that only powers one LED at a time.)

The problem I've run across is that the second last LED in the strand (LED 158) is yellow when its supposed to be white while running the test. (The blue LED isn't lighting.) If I modify the code so it thinks its addressing 180 LEDs instead of 160, it all works fine. I've tried writing a simple sketch to light just that LED, with the library set to 160 LEDs, and I get the same problem.

The wrong color is always the same (not lighting the blue LED) and its always on that particular LED. During the test of individual red, green and blue channels the LED works fine.

The fact that things work fine if I set the library to address 180 LEDs suggests that this is a software problem. (I really hope its a software problem because I'd hate to have to remove the strip from the sign.)

I'm using an Arduino Mega 2560 with nothing but the library and the simple long strand test program, so this shouldn't be a memory issue. By the looks of it, the library would be using 494 bytes of SRAM with 160 LEDs which, even accounting for C++ and Arduino library overhead is nowhere near the 8K limit of the Mega.

User avatar
pburgess
 
Posts: 4161
Joined: Sun Oct 26, 2008 2:29 am

Re: Blue LED addressing problem

Post by pburgess »

Howdy.

Please see this post and give it a try. Let me know if it works for you, in which case it's time to update the library...

cng1024
 
Posts: 3
Joined: Tue Nov 20, 2012 11:54 pm

Re: Blue LED addressing problem

Post by cng1024 »

I modified the library code as suggested in the other post, but that didn't fix things. The problem is a little different with the modified code though. Doing the long strand test, that LED turns yellow, then blue before moving to the next LED on the white cycle. Also, if I try setting just that LED to white, it will display white very briefly then turn off.

I tried moving to hardware SPI to see if maybe this was related to clock rates. It didn't fix the problem, though I've discovered that the LEDs update reliably at 8MHz.

I can initialize the library to 162 LEDs and it works fine. I don't mind sacrificing 6 bytes SRAM and programming around the LED count discrepency is easy enough. As it stands, I'm quite happy with the product and would buy more if another project comes up. Considering the fact that there isn't even a proper datasheet to work from, it all works quite well.

cng1024
 
Posts: 3
Joined: Tue Nov 20, 2012 11:54 pm

Re: Blue LED addressing problem

Post by cng1024 »

I just realized I missed the code change modifying the show function. The change to the library does work. Sorry for any confusion.

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

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”