WS2812B + Propeller Issue
Jon Keinath
Posts: 146
I recently purchased a 10-pack of the WS2812B modules and wired 3 of them up on a Propeller Professional Development Board. I downloaded the demo code from the downloads section and everything was working well. I then cycled power (and disconnected my USB connection). When they turned back on they did not light (or do anything else).
Troubleshooting already completed:
1] Reconnect USB - No difference
2] Verify 5V and 3V3 available on PPDB - Check
3] Re-program Propeller w/Demo Code - No difference
Troubleshooting needed.
1] Verify propeller is running by toggling a PPDB LED.
2] ???
Right now the first WS2812B sits at a dim red output and the others (2) are off.
Is there a way to "reset" them?
I have a few more modules that weren't hooked up yet, but I don't want the same thing to happen to them as well.
Thanks!
Troubleshooting already completed:
1] Reconnect USB - No difference
2] Verify 5V and 3V3 available on PPDB - Check
3] Re-program Propeller w/Demo Code - No difference
Troubleshooting needed.
1] Verify propeller is running by toggling a PPDB LED.
2] ???
Right now the first WS2812B sits at a dim red output and the others (2) are off.
Is there a way to "reset" them?
I have a few more modules that weren't hooked up yet, but I don't want the same thing to happen to them as well.
Thanks!
Comments
I'd suggest removing the first board from the chain and make sure the ground has a solid connection and try again. You've probably lost one of your WS2812B Fun Boards. May it R.I.P. (unless you try a LED transplant (I've done this several times)).
Edit: Check out the "Losing Ground" thread in the Similar Threads section.
I agree but Jon Keinath would likely see some activity with 3.3V logic (other than the dim red output on the first LED).
My bet is still a burned out chip in the first LED.
BTW, apparently these LEDs can use 3.3V as Vdd and when doing so don't have the communication problems associated with the mismatched logic.
No problems for me.
* Propeller supplied from FT232RL's 3.3V onchip regulator output(Pin 17 on SSOP packate) . Bad idea, but works perfectly.
* 128 WS2812b's supplied from ATX PSU +5V bus. No problems (max current ~6.5A) with asymmetrical load (+12V bus not connected to load).
* No level translator from propeller to LED board. Interconnection wire length ~ 20 centimeters (data+gnd).
Everything work like charm. I am testing software part right now.
Not all the time. Just when a picture would be very helpful.
The quick and easy solution is to put a diode in the +5V line to the LEDs so that they receive a reduced supply voltage which also reduces the Vih level enough to work properly with 3.3V. The diode can even be a schottky and still have enough margin but a normal 1N4004 works well.
For 10 LEDs it's OK, but for long strips...
I'd prefer to use simple level shifter with 2 NPN transistors+3 resistors.
Remember that this is a "quick" solution, it lets you know if there is a level translation problem at least, and it's still fine for shorter lines or if you happen to have a TO220 Schottky handy. Remember that CMOS Vih min is 0.7Vdd and either we boost up the signal or lower the LED's Vdd, either way will work.
I state facts first independent of my personal preference so there is a real choice, then maybe my personal preference which in a PCB design would be for a simple 74HCT86 single-gate XOR configured as a level translation buffer. Stating a personal preference without backing up the pros & cons really doesn't help anyone make an informed choice. BTW, your simple "RTL" level shifter (circuit?) may not work too well at those higher speeds, have you actually tried it out before recommending it?
Each WS2812 reshapes the input before presenting it to the output, hence if you can get one LED to work well, you can get 100 to work just as well. Remember that these LEDs can consume about 60mA when on full white, so be careful with your power supply.
I have heard a few accounts of first led failing though. I just haven't seen it myself.
One thing that could be going on is to do with the timing of the collapse of multiple rails. If the 5v rail collapses faster than the 3v3 prop output, due to all those leds taking so much current, depleting the 5v caps faster than the 3v3 ones associated with the prop, that leaves the 3v3 prop output trying to power the strip via the DIN pin and its body diode, although the 28 ohm prop fet impedance should help limit the damage. So, an external diode here between DIN and +5V might help.
An alternative to a pulse driver / voltage translator would just be to put a single WS2812 (or WS2811 ic) right next to the prop. The output from that is 5v reshaped as Jon points out.
The props 3v3 output always worked fine for me, but this would be an easy and cheap way to achieve the 5v signalling level without potential timing issues
I would think too that the Din pin trying to power the chain during power sequencing or 5V loss would be solved easily with a resistor in series with the first Din, maybe around 1K or so.
I do know that I didn't have the ground connected right on the first LED of the first set of three (was wired to the wrong side of the breadboard power rails aka. no connection to anything), but after fixing this they worked fine. It was only after a power cycle that they quit working. I'll probably attempt a replacement of the LED on the burned out modules. Not a big deal. My final project is going to use a custom board with these LEDs directly on the board. They modules were just a quick way of testing.
Thanks for all the help!
Questin about Your "jm_ws2812_ss" library.
Why after 1st strip.execute(...) I am gatting green on 1st LED?
Bug in ws2812 ASM init part?
See code snippet below:
Seems that there are problems in ASM driver initialization part.
_xinfreq = 5_000_000
Do you have a CON section with this in it?
Where is this posted?
Just a guess since I can't test your code without that object _ss version, if it works the second pass then maybe the first pass is causing enough delay for the cog driver to launch. Try removing the first execute, and insert in it's place a waitcnt of some amount to insure the cog has launched and is running.
http://obex.parallax.com/object/703
I'll have a look. I'm pretty careful about testing before putting anything into ObEx, but I am human and may have erred.
It's OK. Your libraries are great. Thank you for your great! DMX in; DMX out (with my little patches ) Some bugs? Well that happens to everyone.
I'm just lasy and don't want to debug myself.
BTW, is ws2812b_ss asm compatible with PASD? I saw that you are using numbered references to registers... Or am I missed something...
PS: PASD debugger
Yes, that happens a lot: people claim my code is broken, but don't have the fortitude to show me where. I guess people assume that an unknown actor in Hollywood has very thick skin and they can sling unfounded Smile at will.
I used to call my general-purpose work variables t1, t2, etc. -- I changed to r1, r2, etc. as this seemed to be a trend. It has nothing to do with PASD.
If you decide post your little DMX patches, please remove my name. I will be responsible for my own code, but not yours.
Thank you for latest version. I am going to test it NOW!
Well. It's diffrerent story for different topic. Sneak peek: I want to build enttec USB DMX Pro clone with propeller. So, I need to start and stop DMX correctly. Put DMX bus on idle state or switch from DMX out to DMX in. Configure on the fly (without reload ASM cog) DMX packet lenght and point to new data buffer. It's not completed now.
BTW: Full duplex parallel (ft245) library (in OBEX) have bugs in ASM. I will post fix one one day.
Why not today?
Or at least point out the bugs so others wanting to use the driver don't have to repeat your work?