0

NeoPixel button strand flickering
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

NeoPixel button strand flickering

by paulstraw on Thu Sep 24, 2020 12:24 am

Hi there!

First of all, I've been working with NeoPixels for quite a few years now, and really love them. They're so wonderful in both artistic and functional projects, and I recommend them to friends all the time. Thanks for all the great sample code and documentation for so many use cases.

In my current project, I'm running into a very similar issue to the one described by the OP in this thread. I've spent 10-15 hours troubleshooting and testing so far, and don't really know what to try next, so hopefully you'll be able to lend a hand. :)

Before I go into more details of the problem I'm seeing, here's some information about my hardware setup:

* Microcontroller board: Feather nRF52840 Express
* Level shifter: 74AHCT125
* Main NeoPixels: Mini Button PCB
* RGBW NeoPixel test strip: RGBW strip 144 LED

…and a bit of basic troubleshooting info:

* The Feather and bench power supply providing 5v for the NeoPixels have a common ground. The Feather itself is being powered via USB.
* I'm boosting the logic level voltage of the Feather with the 74AHCT125. All its unused inputs are grounded, and its VCC is connected to the 5v supply line.
* I have a 320Ω resistor on the output side of the 74AHCT125, just before the first pixel's input.
* I have a 1000uF capacitor across the 5v line powering the pixels.
* All described behavior has been confirmed with code I've written as well as the Bluefruit Connect app + example NeoPixel sketch.

Okay, on with the problem description.

I've been putting together a React Native application designed to control some NeoPixels embedded in a desk ornament. The app itself is essentially code complete at this point, and I've been using it pretty extensively with an RGBW NeoPixel test strip I have lying around. Everything is working great there.

Over the last weekend, I started modeling the ornament itself. The end goal is to install button NeoPixel breakouts into a 3D printed sculpture of sorts (a company logo, it's a gift for a friend). After assembling the strand of lights to go in my first test print (16 pixels), I plugged them in, reprogrammed the Feather for the GRB buttons, and saw the flickering issue mentioned above (video of the problem; flashing light warning).

This flickering problem only occurs within a roughly reverse "C"-shaped region as visualized within a HSV sat/val picker square (Here's a visualization of the approximate "safe" region [highlighted]). That is, it's fine anywhere at maximum brightness, close to max saturation, or anywhere in the low brightness range. Lowering the saturation in most of the middle of the brightness range causes varying intensities of flickering.

When close to the edges of the reverse "C", the flickering only affects pixels near the end of the strip. As it gets closer to the middle of that range, pixels closer to the beginning begin to flicker, and those near the end flicker more intensely. Interestingly, the flickering never visibly happens on the first LED in the strand, even when there are only two.

This seems like some sort of data issue, so I figured it was my soldering job on the strand, and cursed myself for not testing after each connection. After disassembly, I reused two of the pixels to start over, and again saw the same issue when testing that section. I then tried another two-pixel strand with brand new button pixels in case I’d overheated the originals or something along those lines, but unfortunately still got the same result.

The initial strand was made with 24 AWG stranded wire, but I switched to 22 AWG stranded for the later two-pixel test strands in case that was part of the problem. I also checked the voltage at the beginning and end of the original test strip, which went from ~5.02 to ~4.95, so that doesn’t seem like it should have been a problem regardless.

I’ve also tried several different things with the level shifter. Interestingly, it seems to have no impact whatsoever on the lights/flickering regardless of whether I have the shifter’s VCC connected 5v, 3.3v, or even bypass it completely and connect the strips directly to the Feather GPIO (pin 9, FWIW). I also tried both the 1 and 2 in/out/enable triads in case one of them was damaged or something else weird, but got the exact same result on both. Unfortunately I don’t have an oscilloscope (though this may be the project that finally drives me to buy one), but I also tried to confirm that the shifter is functioning correctly by connecting the input directly to 3.3v and checking that the output was 5v using my multimeter.

Hopefully that gives a good sense of the issue, as I’m pretty stumped. Thanks for your help, and please let me know if there’s any additional information I can provide.

paulstraw
 
Posts: 12
Joined: Sat Jul 14, 2012 3:44 am

Re: NeoPixel button strand flickering

by paulstraw on Thu Sep 24, 2020 1:16 am

I should also note that this isn't a true "flicker", per se. Whenever the `someStrip.show()` function is called, whatever colors are set will stick until the next time it's called. However, they just won't necessarily be the colors that are supposed to show up.

paulstraw
 
Posts: 12
Joined: Sat Jul 14, 2012 3:44 am

Re: NeoPixel button strand flickering

by emcniece on Fri Sep 25, 2020 8:21 pm

Hello! Excellent diagnosis, thank you... I've rewritten this response 4 times now, each time thinking a different thing, only to re-read your post and discovering that you've already thought of it :D

What happens if you connect ground and power on the far side of the strip? What is your bench power supply rated to produce?

This flickering can be a symptom of many things, including: DC power loss, ground looping, update frequency, RGB/W protocol mismatch.
emcniece
 
Posts: 4
Joined: Thu Aug 22, 2013 6:52 pm

Re: NeoPixel button strand flickering

by emcniece on Fri Sep 25, 2020 8:24 pm

Skipping the level shifter entirely is ok as 3.3V logic falls within 5V TTL ranges: https://www.allaboutcircuits.com/textbo ... ge-levels/. Level shifters can be a handy buffer if you need to send the signal a long distance though.

Do you have a different microcontroller you could test with?
emcniece
 
Posts: 4
Joined: Thu Aug 22, 2013 6:52 pm

Re: NeoPixel button strand flickering

by paulstraw on Sat Sep 26, 2020 9:01 pm

Hey emcniece, thanks for the ideas. I've split my response up by topic, to hopefully improve readability.

1. Connect ground + power at other end of strip: Good idea. I just tried this with my current 2-pixel test strip. It exhibits the same behavior. That is, the LED farther away from the data source flickers regardless of whether the power is fed to the closer or farther LED.
2. Bench power supply rating: The supply I'm using is rated up to 5A 30V. It's just a cheapie from Amazon, but I've not had any issues powering longer NeoPixel strips in the past. I don't think this is the cause of the issues, since two NeoPixels should only pull 120mA max.
3. DC power loss: As mentioned in my original post, the first 16-pixel test strand had a voltage drop from ~5.02V at the beginning to ~4.95V at the end. I just checked with the current 2-pixel test strip, and get ~5.02V at both ends.
4. Ground loop: Not sure what would be causing this/how I would go about diagnosing or fixing it. Any thoughts?
5. Update frequency: This doesn't seem to play into the issue. Whenever `someStrip.show()` is called, the set colors will stick until the next time it's called. They just aren't necessarily set to the actual values you'd expect given the microcontroller output. The frequency that `someStrip.show()` is called at seems to have no impact whatsoever.
6. RGB/W protocol mismatch: I confirmed that the correct setting (GRB) is in place for the strip that's not working. Setting full-saturation colors doesn't pose a problem at all. I don't believe this is the problem.
7. Skipping the level shifter: I currently get the same results whether I plug the data line into the level shifter powered at 5V or 3.3V on its VCC, or plug directly into the GPIO output from the Feather. That said, the reason I'm using a shifter to begin with is because it's recommended by Adafruit in several places. According to the Adafruit Raspberry Pi wiring guide, the data voltage of a Neopixel should be at least 0.7 * VDD (so, at least 3.5V). The WS2812 and SK6812 datasheeets provide even tighter tolerances: within 0.5V of VDD.
8. Test with a different microcontroller board: I hooked up an Uno-compatible (Elegoo UNO R3) I keep around for testing, bypassing the 74AHCT125 entirely since the Uno has 5V logic. I wrote and installed an extremely simple test sketch. This code exhibits the same issue on the Feather as both my "real" code and the Bluefruit Connect app + test sketch. Using the Uno, I see the exact same behavior as the Feather.

Some other things I've tried since my original post, based on ideas from non-forum folks:

9. "try removing the capacitor. I’ve had problems in the past where the capacitor value was wrong and it was actually filtering out the data which was supposed to go to the LED": No change.
10. Try removing the resistor: I originally had this wired without a resistor, and got the same behavior. I added it because I thought it might help with the issue, and it's recommended by Adafruit in the Uberguide (as is the capacitor). Unfortunately, it doesn't seem to have an effect either way.

So, I'm still pretty stumped. I think I'm going to try making yet another 2-pixel strand with fresh LEDs next, now that I have an extremely reduced software/hardware test setup. I'm not really sure what it could even be at this point other than my soldering.

paulstraw
 
Posts: 12
Joined: Sat Jul 14, 2012 3:44 am

Re: NeoPixel button strand flickering

by paulstraw on Sun Sep 27, 2020 12:40 am

Update after putting together another 2-pixel strand using brand new LEDs… no change! I really took my time with this one, using tweezers and only hitting the pre-tinned connections for long enough to get what seemed to me like good joints. Here's an image of the wiring. I don't think I'll be able to do anything better than this by hand, at least not reliably. Using the test sketch mentioned in my last post, I still get the same result. Here's a video of the same problem happening with this new strip. The right hand light in the video is the one at the end of the data signal that shows the problem seen in all previous strips. The strobing effect above the left hand light is from the camera, and not visible IRL.

paulstraw
 
Posts: 12
Joined: Sat Jul 14, 2012 3:44 am

Re: NeoPixel button strand flickering

by theacodes on Sun Sep 27, 2020 1:16 am

Can you post a picture of your wiring setup?

theacodes
 
Posts: 6
Joined: Tue Sep 17, 2019 2:36 am

Re: NeoPixel button strand flickering

by paulstraw on Sun Sep 27, 2020 1:27 am

Yep theacodes, here's an image of the minimal test setup I'm running now. The white (+) and purple (-) wires feeding the breadboard power are 5V from my bench supply. The capacitor is going across them. The red and black wires end up at the alligator clips in the bottom right side of the photo, powering the NeoPixels. The data line is going through the 320Ω resistor to pin 9, and the Uno ground is connected to the bench supply ground. The Feather and level shifter can be seen at the top of the photo, but aren't currently connected to anything

paulstraw
 
Posts: 12
Joined: Sat Jul 14, 2012 3:44 am

Re: NeoPixel button strand flickering

by theacodes on Sun Sep 27, 2020 1:31 am

Since you're only running two neopixels, can you try running them from the Uno's power rails instead of your bench supply and see if that changes anything?

Do you have any pre-made neopixel strips around? Those lil buggers are notoriously heat and moisture sensitive and the tiniest bit of moisture before soldering can make them fussy.

theacodes
 
Posts: 6
Joined: Tue Sep 17, 2019 2:36 am

Re: NeoPixel button strand flickering

by paulstraw on Sun Sep 27, 2020 1:39 am

Ah, great idea. I just tried running them directly off the Uno's power, but unfortunately I'm still getting the same result.

Unfortunately the only other test strip I have around currently is the RGBW one mentioned in my original post, which works perfectly. That (and removing so many other variables) really makes it seem like some kind of issue with my soldering, but at this point I've re-soldered and tried new LEDs so many times and gotten the same result, I'm not really sure what I could try to do differently.

paulstraw
 
Posts: 12
Joined: Sat Jul 14, 2012 3:44 am

Re: NeoPixel button strand flickering

by theacodes on Sun Sep 27, 2020 1:43 am

Can I see the sketch you're using for them? Do you have a link to the Neopixels you soldered yourself?

theacodes
 
Posts: 6
Joined: Tue Sep 17, 2019 2:36 am

Re: NeoPixel button strand flickering

by emcniece on Sun Sep 27, 2020 1:44 am

Quite the mystery. Could it be that one or more of the chips you've soldered are bad, either out of the package, after resoldering, or after receiving an ESD spike? Got any more of those chips that work fine?

Your soldering looks ok and the wire gauge is more than enough, imo.
emcniece
 
Posts: 4
Joined: Thu Aug 22, 2013 6:52 pm

Re: NeoPixel button strand flickering

by paulstraw on Sun Sep 27, 2020 1:45 am


paulstraw
 
Posts: 12
Joined: Sat Jul 14, 2012 3:44 am

Re: NeoPixel button strand flickering

by theacodes on Sun Sep 27, 2020 1:49 am

Can you confirm which 5050 neopixels you're using? Like are they these or one of the other ones?

theacodes
 
Posts: 6
Joined: Tue Sep 17, 2019 2:36 am

Re: NeoPixel button strand flickering

by paulstraw on Sun Sep 27, 2020 1:50 am

Oh, gotcha. I'm using these NeoPixel "button" boards.

paulstraw
 
Posts: 12
Joined: Sat Jul 14, 2012 3:44 am

Please be positive and constructive with your questions and comments.