Boring Details (This is the part you can skip!)
The circuit I have been testing with is shown below:
I believe I've followed all of the best practices - 1000uF cap across the power supply which is regulated 5V/2.5A, 74AHCT125 for level shifting, and a 470ohm resistor in series with the data line (though I'm not entirely sure that's necessary after going through the level shifter). I've disabled the unused buffers on the 74AHCT125 with 47k pullups on the active-low enable inputs, which also may not be necessary but doesn't hurt. For testing, I've been using the string of 8 NeoPixels shown in the diagram, which are driven by digital pin 7 on a Metro M4 Grand Central. Everything is powered by the same, single 5V/2.5A supply, so the Grand Central and NeoPixels most definitely have a common ground.
As far as code goes, I'm currently using CircuitPython 6.3.0, using the stock demo code straight from the NeoPixel UberGuide (it displays each color for 1 sec, then does the rainbow dance, then it all repeats), but I've added the following to the end:
Code: Select all
for _ in range(10):
rainbow_cycle(0)
ranges = ((0, 256, 1), (255, -1, -1))
for start, stop, step in ranges:
for i in range(start, stop, step):
pixels.fill((i, i, i))
pixels.show()
When the code runs, the flashes of solid color work perfectly and look great, as does the rainbow dance. No flickers, no artifacts, no issues at all - it looks fantastic! But then the fade up to white starts, and the LEDs start flickering like crazy throughout the entire fading process. I've double- and triple-checked the wiring and soldering, made a second chain of 8 LEDs to test with, tried running without the "best practice" pieces (no big cap, no level shifter, no data line resistor), and even switched to a 5V Arduino Uno using the fastled library in C, and it always behaves exactly the same way - everything works great until the fade at the end. I cut an 8 pixel section off of a 60 LED/meter (Product 1461) strip, and hooked it up in place of the original chain, and everything worked perfectly, including the fade. I connected an 8x8 NeoPixel Grid (Product 1487), and the first 8 pixels worked perfectly as well.
In trying to figure out the difference between the NeoPixel arrangements that worked and the one that didn't, I noticed that all of the various NeoPixel formats have a 0.1uF decoupling capacitor per pixel, and the 8x8 matrix has a single series resistor on the data line, but *only* the individual pixel boards had a 75ohm resistor per pixel. I assumed this resistor was on the DIN on each pixel, which makes sense. On closer inspection, it appeared to be in series between the 5V input pad and Vdd on the NeoPixel, which makes significantly less sense to my limited understanding of DC circuits.
Sanity Check Please (This is the part you should read!)
I sacrificed a single NeoPixel board by removing all of the components in order to meter out the pads/connections and verify the odd location of the resistor. (I couldn't find a schematic for this particular part anywhere, but could very well have just missed it.) I have tested, re-tested and confirmed the connections shown below in the left scribble, which I believe translates to the circuit shown in the right scribble: I cannot for the life of me figure out why that 75ohm resistor would be located where it is. I took some voltage measurements and found:
- When an LED is powered but dimmed to full off, I get 5.247V at the "5V" input pad and 5.192V at Vdd.
- With an LED powered and at full brightness, I get 5.171V at the "5V" input pad and 3.119V at Vdd. That doesn't seem right.
So I did some precision destruction, removed the 75ohm resistor from 8 pixel boards, replaced it with a solder bridge, and tried it out. It works perfectly. No issues whatsoever. More voltage measurements got me exactly what I expected:
- When an LED is powered but dimmed to full off, I get 5.247V at the "5V" input pad and 5.247V at Vdd.
- With an LED powered and at full brightness, I get 5.158V at the "5V" input pad and 5.158V at Vdd.
With a bit more testing (on unmodified pixel boards), I found that the flickering only seems to be an issue during particular types of lighting, most notably when doing rapid fades in fine increments that involve all three colors. A crossfade from (255, 0 ,0) to (0, 255, 0) to (0, 0, 255) works perfectly fine, but crossfading from (255, 255, 0) to (0, 255, 255) is all kinds of flickery.
So at this point I'm trying to decide if I'm crazy or not. I can't possibly be the first one to run into this if there really is an errant resistor on these boards, but I can't think of any reason why it would be where it is. Either way, removing it from the equation most definitely makes the problem go away, and creates a circuit that matches what I see on the strip and matrix NeoPixel form factors. I'm hoping someone more knowledgeable than I can possibly provide some insight as to what's going on here.
If you made it this far, I truly appreciate that you took the time to read through my ramblings!
Best regards,
Edward