OctoWS2811 random flashing colors

Status
Not open for further replies.

Neto-Zeme

Member
Hello!

Like the title says: my LEDs are randomly showing random colors. Sometimes it's good for hundreds of Data-cycles, sometimes it occurs 10 cycles in a row, and sometimes every 10, 20, and so on.

So I'm using the octows2811-library for a small 4-button rgb-led illuminated pad. The pad is the smal 2x2 button pad from sparkfun. I needed to cut the DIn/DOut connections on the pcb between the LED-pins and solder the DOut and DIn together via small metal wires.
I am using a 480 Ohm-Resistor for the first DIn right at the teensy board, but not directly soldered like mentioned in the library on the pjrc page. It is placed right next to the pin-connection on the breadboard. The Teensy is a 3.2. My Teensyduino and Arduino are up to date (I'm using the sloeber eclipse IDE, because using Arduino for more complex projects is really annoying).

I've connected every LED-ground with the ground on the board, which is the teensy board ground too. I tried that with just USB-Power and external power. With both constellations the problem occurs.
Because the problem occurs with the basic test of the octows-examples too, I'm not getting further into the project.

I changed the number from "octo" to single by commenting this part for the other 7 strips in the library. (Is there a chance that this library is built up more like the other arduino-libraries? like setting the Pins for yourself via Constructor or by assignment? This would help since my whole project is structured like this, because every other component I use acts like that. I need a special treatment only for this library. I can understand that using the DMA-Controller needs some pre-instantiated stuff you can't just put into a class, that you instantiate later on. If that's the reason I understand and can live with that. )

The problem only occurs when data is sent out and sometimes the wrong color shifts one LED further.
I tracked the sent out data from the library with serial and the data is exactly what it should be, so I don't think it has anything to do with the software (I'm using 24 bit html-code).
I also placed a big 1000µF-Capacitor right after the power source, but having it or not doesn't change anything.

I will take a picoScope today from work at home with me to see some signal-stuff and pictures will follow later on.

As I always read everywhere it's a bad ground connection. I checked all the connections but they are fine so far. I also changed from 800 kHz down to 400 kHz, but this doesn't help.
I also shortened the wires but it doesn't matter if they are like 10 cm or 3 cm.

Since pictures are delivered later on, maybe someone has an idea right now what could cause that problem? Or is it really that ground connection somewhere and I'm just too dumb?
 
Gonna need some more information about what you're trying to do.
Can you post a sketch? Hardware setup - pin connections, etc?
 
of course.

I took pictures of the setup and of my waveforms, which look pretty noise-free I would say.
ws2811_01.png

WP_20180219_002.jpg
WP_20180219_004.jpg
WP_20180219_006.jpg

and here the sparkfun board with cut connections:
WP_20180219_009.jpg

The sketch is "BasicTest" of examples->OctoWs2811 .

For my purpose the wrong color appears way more problematic because with the basicTest, which sends out the data in short intervalls (measured ~64 ms) all the time, I will send them out all 500 ms, which then appears not just flickering but static for half a second. I changed the resistor to a lower value btw but it doesn't help.
I also tried with a 3V-> 5V Level Shifter from adafruit which doesn't solve the problem.

I also now watched the DOut of the first LED and the data there jitters a bit and sometimes shows wrong fragments, right when the color gets wrong, even bits seem to come out with low instead of high sometimes. When sending data continouously you can see if there are wrong bits easily when one color should be hold. My power source has really even 5 V without any smallest spikes.
The Data at Dout shows spikes. Right here I put an example where I captured the wrong Data at DOut:
wrongdata_32.png

It should normally look like this:
wrongdata_30.png

Damnit. Could it be that I got some bad ws2811 LEDs?

ANd yes VUSB and VIN are cut and not connected and the source delivers straight 5 V.
 
Last edited:
what does the data look like going into your first pixel after the level shifter. 3.3v may work sometimes on some strips.
 
Basic step to rule out level conversion issues is to run LEDs off 3.3V. The Blue LED isn't going to light well, and you want to be very careful of your current draw from your 3.3V supply if using the teensy 3.3V rail (if you have just the four pixels suggest cycling a red 5 level through the four, other three black). Have never had success with ordinary level converters and neopixels due to the data rate, you need very high slew rates.
 
I will try running them by 3.3V. I have two power sources in the end, because there is a secondary rail I can switch to 3.3V. Results will come later. Thanks so far.
 
running them with 3.3V does not solve the problem :( I connected the ground to the 3.3V rail too, but no success... The flickering with wrong colors still appears.

And now I think I found out why.

As I watched again if it is really the ws2811, but it is the ws2812B.

And the data sheet says it has different High and Low times than W2811. comparing: http://www.seeedstudio.com/document/pdf/WS2812B Datasheet.pdf to https://cdn-shop.adafruit.com/datasheets/WS2811.pdf

The times are way shorter than the ws2811.

Why is there no possibility for tables here? Ok, let's try:
Code:
      ws2812B           ws2811
T0H 0.35µs             0.5 µs
T1H 0.9 µs             1.2 µs
T0L 0.9 µs             2.0 µs
T1L 0.35 µs            1.3 µs

So this is the answer I think. I will try to tweak the library for operating parameters for that.

And as I watched into the source code, I found this:
Code:
// Discussion about timing and flicker & color shift issues:
// http://forum.pjrc.com/threads/23877-WS2812B-compatible-with-OctoWS2811-library?p=38190&viewfull=1#post38190

Well the thread doesn't help really, but I may watch the Voltage at all LEDs for now. But the thread is about 120 or more LEDs... I just use four.
 
Last edited:
If it's an unknown LED problem may be worth pointing fastLED or adafruitNeopixel libraries at the strips. Both are bitbanging the signal so blocking code and fight over inturupts but having more setting options may give you lead on what timing does work.
 
Edit: It is still flickering with FastLED. But way not that hard like with OctoWs2811 library. Still searching... I changed the ground to a shorter one with a star-point int the middle of the small button pcb and a short ground wire. well... it is way better when using a longer ground wire.

Edit2: I think I give up. even putting the LEDs close together on a breadboard with shortest ways even from output to first led get's them flickering... I have no more idea what I can do. trying around with different ground cable lengths can't be the answer.

Edit3: Ok. I didn't give up. Putting small pF and nF capacitors between every source and ground connection helps a bit... Seems like I need to try again.
 
Last edited:
Status
Not open for further replies.
Back
Top