Shop OBEX P1 Docs P2 Docs Learn Events
WS2812 strip problems — Parallax Forums

WS2812 strip problems

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:
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
1280 x 720 - 171K

Comments

  • I take it you're using the "single shot" object?

    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.
  • Jon's code requires that you specify whether it is a WS2812A or B. Make sure you are using the correct calles for your LED's.
    Jim
  • RS_Jim wrote: »
    Jon's code requires that you specify whether it is a WS2812A or B. Make sure you are using the correct calles for your LED's.
    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.

  • Shawn LoweShawn Lowe Posts: 635
    edited 2015-12-03 03:10
    Which program? Which strip?


    edit:by which program I meant the single shot or the standard. this strip: https://www.sparkfun.com/products/12027 ?
  • Hi Guys

    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
  • NWCCTVNWCCTV Posts: 3,629
    edited 2015-12-03 19:20
    I will have to do some digging but I do believe there is an issue using the Demo board and certain pins. I will do a bit of research and get back about it.

    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
  • Javalin wrote: »
    Hi Guys

    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
    When you download jobs code there are two versions, an standard and a single shot version.
    Are you using the string I referenced in my response?

  • tried the continous version (hadn't noticed that there was one), its worse... just a mesh of colours. With the single shot I can at least set the whole string to be a colour reasonbly reliably.

  • just a mesh of colours.

    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.
  • ok thanks Jon, i'll double check power, etc, and see if that solves it. it is better if you slow the single shot updates down, maybe psu can't keep up....
  • Javalin wrote: »
    it is better if you slow the single shot updates down, maybe psu can't keep up....

    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.

  • hiya

    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
  • ok so I solved it :-)

    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
Sign In or Register to comment.