WS2812 strip problems
Javalin
Posts: 892
in Propeller 1
Hi All,
using JonnyMac's strip driver with the sparkfun 1 meter (60 leds') strip. Using the Propeller Demo board.
Having problems if I want to set a specific led, or leds. Full strip seems OK. For example:
gives me green, blue, white, and sometimes red pixels!
Using the TC4427 as suggested in a post, which seems to have helped a bit.
Timing looks ok just about, only problem I can see, see attached from the O'scope.
Help or pointers appreciated.
Thanks,
James
using JonnyMac's strip driver with the sparkfun 1 meter (60 leds') strip. Using the Propeller Demo board.
Having problems if I want to set a specific led, or leds. Full strip seems OK. For example:
repeat strip.off(-1) strip.execute(LEDS, -1, -1) waitcnt(clkfreq+cnt) repeat mi from 1 to 30 step 2 color1 := strip.color(255, 0, 0) strip.set(mi, color1, -1) strip.execute(LEDS, 30, -1) pause(10)
gives me green, blue, white, and sometimes red pixels!
Using the TC4427 as suggested in a post, which seems to have helped a bit.
Timing looks ok just about, only problem I can see, see attached from the O'scope.
Help or pointers appreciated.
Thanks,
James
Comments
Is there a reason you don't use the continuously updating object?
I haven't used the single shot object myself so I don't know what is causing the problem.
What sort of power supply are you using? Each pixel can draw up to 60mA.
Jim
I thought the the A and B code was the same?
I think there's an older WS2811 chip which required different timing but I think the usual A and B chips can use the same code.
edit:by which program I meant the single shot or the standard. this strip: https://www.sparkfun.com/products/12027 ?
WS2812 chip - 6 pin - so using the start() function not the start_b() function
>I take it you're using the "single shot" object?
urm?
>Is there a reason you don't use the continuously updating object?
whats that?
power supply is a 5v 4amp HP laptop supply. 60ma x 60 = 3.6amps, so should be good.
Thanks,
James
EDIT: Here's a link that may or may not help.
http://forums.parallax.com/discussion/153352/driver-for-radio-shack-tricolor-led-strip/p2
Are you using the string I referenced in my response?
In my experience that indicates a supply voltage problem or some condition that is fouling the continuous update. Over the holidays I'm going to update the continuous driver with a refresh setting. I tend to like things full-speed, but in bad environments this is not always best.
I'm not sure what you mean by the above comment. There datarate is determined by the WS2812 LEDs. There's not an option to slow it down.
What about only sending data to a few LED? Try sending color information to the first five or so LEDs and either set the rest of the LEDs black (off) or set the number of LED in use to a low number.
I mean that if you have the single shot driver running, but only doing a execute every second, rather than a complex set of updated, every 10ms or similar.
a few LED's seem worse, its more consistent if you use the all_leds and set all red,blue, etc. doing a few gives much worse colour consistency, like its a timing issue as you get transitions from red being sent, and green, blue, etc, shown, and quite often part way down the strip.
James
Thanks for your help chaps.
My Demo board 5v reg is outputing nearly 12v.... The mosfet was doing its job and driving 12v to the led strips, which remarkably have survived this treatment!
Driver code is working great - thanks JonnyMac for sharing.
James