Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Noisy Neopixels 1

Status
Not open for further replies.

tetwin11

Mechanical
Jan 9, 2012
51
0
0
US
So, I'm an ME in a role that forces me to act as an EE sometimes. This is one of those times, and I'm lost on this one.

We have a PCB that drives a Neopixel LED string. We have a string of 6 LEDs on a cable that is only a few inches long. All is well with that setup.

They want another LED string, with the same light patterns mounted a few feet away. So, I used a Y cable to send the power/data to the 2 separate LED strings. With both LED strings just a few inches long, all is well. When I make one of them a few feet long, there are problems (colors are wrong, some are off completely, twinkling, generally noisy looking).

What do I do???

I tried some ferrites on the long cable, but to no avail. I tried an inline resistor with the data line, but that didn't help either. Any thoughts... please?
 
Replies continue below

Recommended for you

Neopixels have very tight requirements on timing; you may have too much capacitance to drive the wires hard enough to maintain the timing. Get an oscilloscope to see what the signal is like at the end of the extension. Also check to see that there is enough power to maintain the required voltage to operate them; as the LEDs are switched on there will be a spike in power draw and that may be causing enough voltage drop to produce erratic results.
 
Dear Mr 3DDave (Aerospace)25 Jun 20 22:30
" Neopixels have very tight requirements on timing; you may have too much capacitance to drive the wires hard enough to maintain the timing. Get an oscilloscope to see what the signal is like at the end of the extension. Also check to see that there is enough power to..."

Sir, your learned advice " Get an oscilloscope to see what ..." could coat 1000 time the cost of the simple Neopixel LED string and on top of that needs a university electronic graduate to analysis the problem. Total estimated cost would come to 2000 times!.
I have nothing to offer, but the above observation.
Che Kuan Yau (Singapore)
 
Or you could contact a local university or electronics trade school and ask if they had a student in their EE department who would like this as a lab project for FREE. Perhaps you have a misunderstanding of how difficult it can be to diagnose and correct timing and power critical operations involving microcontroller based systems like NeoPixels.

 
Thank you all for the feedback. I certainly don't understand how difficult it can be to diagnose and correct these types of problems, so this could be quite a struggle. I'll look at the voltage at the end of the long run, and we do have a scope, so I can look at what the signal looks like. But I'm not sure what I'll do with it from there!
 
Hook a single string up and measure voltages and waveforms, then hook both up and see how much it changes.
My hunch is that it is a timing issue.

= = = = = = = = = = = = = = = = = = = =
P.E. Metallurgy, consulting work welcomed
 
If you are placing a Y in the data stream, you're more than likely getting reflections... depending upon the length of the cables, those reflection can utterly destroy a data signal's integrity, and nothing will work from that point on. You can make some educated guesses on what the signal will look like based upon length and clocking frequency of the data, but in the end you'll have to rely on the scope (or simulation) for an accurate representation of what the signal truly looks like. NeoPixel runs at 800kHz, so quite slow, but those pretty square waves can be demolished by the capacitance/inductance of crappy cable.

Dan - Owner
Footwell%20Animation%20Tiny.gif
 
How critical is the optical timing? I'd forget the Y connection, just make your string 12 neopixels long and duplicate the pattern in the driving software.
 
I let this linger out there, but I wanted to post back about what I found.
I didn't end up scoping the signal, but I did find something interesting.
When the Y comes off of our board and drives parallel LED strings, all hell breaks loose.
BUT... when I connect a single LED to the PCB, then put 2 strings in a Y off of that single Neopixel, they all seem happy, displaying colors and patterns just as I would want.
So, that makes me think there is something weird/different about how our PCB generates the signal, compared to how the Neopixel modules relay the signal.
I uploaded an applicable excerpt from our schematic if anyone has any interest in seeing it.
I did end up going the software route and just editing the driving software instead of finding a hardware solution. But I'm still interested, in knowing why the PCB driver is different from the Neopixel driver.
 
 https://files.engineering.com/getfile.aspx?folder=785b59c2-9dae-4824-992c-c196066f8f8f&file=Untitled.png
Too little info to be sure of anything. Is the +5V on your board the same as the external +5V coming in through the connector? If not, how are you ensuring the ground potential is the same between all boards? I see multiple ground symbols, but that doesn't mean ground is truly ground from one board to the next, and a floating (or high-impedance) ground is a sure way to lose comms (and not always in a consistent manner).

Why such a large series resistor inline with your buffer output? That will kill your signal pretty quickly. If you're trying to control impedance (which is unlikely, given the value and the fact that this is running over a wire and not a controlled-impedance trace), a more appropriate value would be a few 10's of ohms, at most. Otherwise, I see no real value in having it in there.

BTW, that is not a level shifter... it is a signal buffer that you are abusing into shifting the output voltage, which is not the same thing. Whatever signal is controlling the Output Enable pin, it's likely a 3.3V signal, but you're pulling it up to 5V... poor practice, at best, damaging to chip up stream, at worst.

I see so many things wrong (and even more potentially wrong) in this one tiny schematic it has me questioning the validity of the circuit portion not shown. In the end, you need to be scoping these signals... time to "Engineer up!" and use the correct tools for the job.

Dan - Owner
Footwell%20Animation%20Tiny.gif
 
I appreciate the feedback.

The 5V we are using in this application is the onboard 5V, same as the source that powers the "level shifter".

I have no idea why that large series resistor was chosen. I could remove it and place a 0 Ohm or 10 Ohm and see if that helps.

I did get out the scope and took a few screenshots which are pretty illuminating. I attached a zip with 4 screenshots.

01 is directly from the PCB driver, just a few inches away. Very blunt corners, seems filtered a bit too much.
02 is the output of LED2 in the string, just a couple inches away. Nice crisp signal, no ringing.
03 is the output of LED2 in the string, after 10 ft and with a Y cable in there. A bit noisier, but the signal still seems okay, and the LEDs to illuminate properly
04 is directly from the PCB driver, 10 ft away with a Y cable. Some weird sawtooth looking signal with a higher frequency superimposed upon it.

So, I definitely see the PCB driver is producing a lower quality signal, but I don't know exactly why yet. Maybe that large series resistor? Maybe the "level shifter" should have been a different component or circuit?
 
 https://files.engineering.com/getfile.aspx?folder=b79c4e40-60c9-4a87-bb59-1d3b22fc1665&file=LED_driver_diagnostics.zip
I removed that inline 1.07k resistor, R52, and took a few more screenshots. With that 1k replaced with a 0Ohm, all looks well as far as I can see.

05 is directly from the PCB, just a few inches away. Nice and clean!
06 is directly from the PCB, 10ft away with a Y cable. I'd say, qualitatively, just as good as the same situation from the LED module.

So, that 1k inline resistor does seem to be the source of the problem. But... why was it there in the first place? I assume it was put there for a reason. Instead of a 0 Ohm, should that be a 20 Ohm, and it could perform the same function (whatever that was)?
 
 https://files.engineering.com/getfile.aspx?folder=2336e564-a34b-4166-a4c9-aacf774119c9&file=LED_driver_diagnostics.zip
I had this exact issue recently when the cable length was increased. Turned out to be the extra cable capacitance, which was causing the signal to not reach the required voltage thresholds (and probably messed with timing too).

The reason putting a single LED in front of the other two chains works is because the LED buffers the signal and is passing it on using a stronger output driver than the controller's.

That 1k resistor was there for a reason - to limit current - and while you are driving the line successfully now, you may now also be overloading the output driver. That chip has a max recommended current of 8 mA at 5V; 5 V / 0.008 A = 625 Ω. The absolute maximum ratings are higher than that so you may be able to fudge those numbers just a touch, but potentially reducing lifespan in the process.
 
Status
Not open for further replies.
Back
Top