Flashing on LPD8806

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
User avatar
bridger
 
Posts: 4
Joined: Tue Nov 22, 2011 3:00 pm

Flashing on LPD8806

Post by bridger »

I have 8 meters of the LPD8806 driven by a Raspberry Pi. Unfortunately, near the end of the strand (furthest from the pi), the lights sometimes flash erratically. This is usually on bright settings where many lights are lit up. This suggests a power issue, but I can't figure out what to change.

Here is a video of a setting that should be a solid color, but some pixels flash instead: https://dl.dropboxusercontent.com/u/175 ... 2%20AM.mov

The strip is powered by two of these power supplies, each rated for 10A. https://www.adafruit.com/products/658 I have one powering both the raspberry pi and the first 4 meters of lights. The other power supply is at the far end (where the flashing is), connected to the output side of the strip. A the 4 meter mark I have cut the +5v connection on the strip, but left the ground connected.

I suspect this is a grounding issue of some sort, but I admit I don't fully understand grounding. The power supplies aren't grounded (only two prongs). Is that a problem? The raspberry pi is powered by the same power supply as the first half of the strip. I did this by cutting a usb cable and attaching the power wires to the power supply, as well as running a wire from the ground pin to the ground of the power supply.

- Bridger Maxwell

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

Re: Flashing on LPD8806

Post by pburgess »

Flickering is usually symptomatic of a power issue. There's a few things you can try...maybe start with one or the other, whichever's easier...but these can also be used in combination if one approach doesn't clear it up.

1. Move the power connections from the ends of the two 4m sections to the middles (so each is essentially like a "Y" connector, with 2m of strip in either direction). Less distance means less resistance and voltage drop along the length of the strip. Leave the grounds connected as you have them, good move.

2. Periodically (like maybe every 1/2 meter or so) add a capacitor across the + and - traces on the strip...anything around 100 to 500 uF or thereabouts should be fine. This helps the strip handle sudden surges better.

3. If neither of these resolve it, might need to add hefty power wires (maybe try 18 gauge or a little thicker) run parallel to the strip, with periodic connections (every meter or so) to + and -.

User avatar
bridger
 
Posts: 4
Joined: Tue Nov 22, 2011 3:00 pm

Re: Flashing on LPD8806

Post by bridger »

Boy, that was an adventure. I tried shortening the cable from the power converter to the color strip this morning and everything went bonkers! The lights were blinky and erratic. Even when I sent a solid "all off" signal, it would just be varying shades of purple! It was definitely a huge step backwards and I couldn't get it back to the mostly-working state.

I started to think whatever I did was causing interference with the clock and data wires. I wasn't able to solve it hardware-wise, but I did see that Bibliopixel, the library I was using, was running the SPI at 16 MHz. I reduced it down to 2 MHz and everything is peachy-keen.

As an odd aside, when I reduced it to 8 MHz, I got a solid green color instead of the (255, 170, 120) warm-light color I was trying to send. Animations were a total crapshoot.

For others using Bibliopixel in the future, this is how I set up the LDP8806 driver:

driver = DriverLPD8806(256, c_order = ChannelOrder.GRB, SPISpeed = 2)
driver.gamma = [0x80 | int(pow(float(i) / 255.0, 2.5) * 126.0 + 0.5) + min(i, 1) for i in range(256)]

User avatar
adammhaile
 
Posts: 77
Joined: Fri Sep 10, 2010 9:09 am

Re: Flashing on LPD8806

Post by adammhaile »

@bridger - I wrote BiblioPixel :) Happy to see others using it.
Sorry for the SPI speed issues. I made the decision to default to a higher speed in the interest of people not having to wonder why it takes so long to update their display, but more and more I'm seeing people having problems with LPD8806 which seems to be very, very sensitive to electrical noise.
I think that in future releases I will default the speed to 2MHz, which seems to be a sweet spot for the LPD8806. I've certainly run them MUCH higher but only with significant shielding.

BTW, where did you come up with that particular gamma correction function? I tried it out and it looks really good.

User avatar
bridger
 
Posts: 4
Joined: Tue Nov 22, 2011 3:00 pm

Re: Flashing on LPD8806

Post by bridger »

@adammhaile Thanks for Bibliopixel. It is great! I'll have to contribute back a few of the animations I wrote.

I think changing the default SPI speed is a good idea, but it was dumb of me to not even pay attention to all of the parameters in the first place.

The gama correction function is very similar to the one you have in https://github.com/ManiacalLabs/BiblioP ... LPD8806.py, except for the min(i,1) thing. There were too many values on the low end which were corrected to zero. The correction is just to make sure that everything above the lowest value was corrected to at least 1. I tested it by putting on a "wave" function on the strip the see the overall pattern, and also counting how many of the edge lights were off.

User avatar
adammhaile
 
Posts: 77
Joined: Fri Sep 10, 2010 9:09 am

Re: Flashing on LPD8806

Post by adammhaile »

Thanks!
I'll switch SPI to default to 2MHz in v1.1.5 - Hopefully that should help prevent future confusion.

If you have some animations, feel free to submit them on the forum (http://forum.maniacallabs.com/forumdisplay.php?fid=6) or submit a merge request to our animation repo: https://github.com/ManiacalLabs/BiblioPixelAnimations

User avatar
stadros83
 
Posts: 10
Joined: Tue Oct 07, 2014 8:12 am

Re: Flashing on LPD8806

Post by stadros83 »

Hello !

Sorry to bother you admmhaile but I'm trying to use your BiblioPixel library with my LPD8806.
I'm absolutely a noob and I don't understand how I'm suppose to use it.
Do you have somewhere a simple example to use a ledstrip ?
I've installed your library but cannot use it right now :(.


Or maybe I didn't understand how BiblioPixel is working ? Can I control a LPD8806 connected directly on my Raspberry GPIO's ? If yes which GPIO should I use ?

User avatar
adammhaile
 
Posts: 77
Joined: Fri Sep 10, 2010 9:09 am

Re: Flashing on LPD8806

Post by adammhaile »

No problem! Just checkout the setup documentation here: https://github.com/ManiacalLabs/BiblioP ... spberry-pi
That should get you running in no time :)

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

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