Trouble with flickering neopixel strips.

Hi there,

So I've been building a 20x20 word clock with 400 neopixel led's. Power has by far been the most challenging part of the build. Currently I have a PC power supply with 2 12v 14A pins, and 2 5v 24A pins. I have split the strip into halfs with the two 5v pins connected to each half respectively. I also have one of the 12v pins connected to the arduino with the VIN pin. I've programmed it to cycle through using the rainbow script but there is quite a strong flickering. I have no idea what's causing it or how to stop it. Please help!

Hi Matthew.

Simple: turn around twice, clap three times and say the words "occullas repairum" in a loud clear voice, using a swish-and-flick movement of your wand.

If that doesn't work (for some strange reason) you could try posting a schematic diagram and your code (using code tags, of course).

Yes please post your schematic. Also what type of strip do you have? Neopixels normally need 5V and not 12V, so that could be the problem.

Sounds like the OP is running the Arduino off the 12V line, Mike. Does not realise the Arduino can run off the 5V too, using less current than two of those leds...

Yes, PaulRB is right, the arduino is powered from the 12v line, the strips are running off the 5v lines. The LED's that I'm using are the ws2812b's. As for a schematic, I don't really have one, I've just been doing it all as I go. I can send you a photo of my basic whiteboard drawings and a photo of the actual thing. In the mean time though, here is the code: https://codeshare.io/UPUxh

Here is the link to the photos: http://imgur.com/a/DcnWr

Just remember that for the whiteboard photo, the numbers don't necessarily represent the actual pin number unless stated otherwise.

matthewinglis: I have split the strip into halfs with the two 5v pins connected to each half respectively.

So the two thin +5volt and ground wires from a floppy drive connector are carrying the current for 400 LEDs? Those wires shouldn't carry more than two amps, otherwise voltdrop could become a problem. A PC supply also has thicker ~5Amp wires for the hard drives. Can't you use them? Leo..

I’ll give them a go. Also, I have very thin wires on the LEDs themselves. Would there be any point in replacing them all with larger wires?

So I just tried the larger wires, no difference. My multi meter is broken too so it doesn’t measure current correctly, only voltage…

matthewinglis: My multi meter is broken too so it doesn't measure current correctly, only voltage...

There should be a glass fuse for the low current ranges inside the DMM. Replace it.

Current can be calculated if you know the current of each LED x how many LEDs are on. RGB LEDs are 3*20mA when all colours are fully on (PWM 255).

5volt and ground of the supply can be injected anywhere on the strip. The middle of a string could be the best place.

Don't know if the supply is the problem. Just saying that those thin wires shouldn't carry more than 2Amps. Leo..

Yes I have done that already. Just so you know, it was working perfectly not that long ago. Without significant/visible voltage drop and without flickering.

matthewinglis: . Just so you know, it was working perfectly not that long ago. Without significant/visible voltage drop and without flickering.

And you didn't think to mention this until post 10. And no schematic and no code actually posted.

I think you are a time waster.

matthewinglis: here is the code: https://codeshare.io/UPUxh

I can see why you did not paste it into your post using code tags, as we were hoping. It is very long, and at first glance extremely repetitive, I'm sorry to have to tell you. We can give you some tips to reduce the size of it by a significant amount.

Have you eliminated the code as the cause of the flickering? If you say it was not flickering before, perhaps a change to the code is causing it. May be you should write a very short test sketch to simply light all leds the same colour, eg. white. If that does not flicker...

Good idea, I'll try the Neopixel example scripts. As for the code, right now I'm not too concerned about the length or the repetitiveness, perhaps once this is fixed I'll improve that.

Ok, seems like it is my code. I tried the rainbow thing from the neopixel example scripts and it worked just fine. However with all 400 leds on at one go those little jumper wires really heated up quite intensly. Any tips?

matthewinglis: those little jumper wires really heated up quite intensly. Any tips?

Thicker wires!

Try this modification to your code:

   if (now != rtc.now()) {

      now = rtc.now();
      
      Clock ();
      
      Color (10);
      
      strip.show();

    }

Cool, wires are now replaced and the temperature is fine now. What will the modification do? Are you making it only update when the time has actually changed...is that right?

Yes, that was the idea. Does it work?

No, got this error, seems a bit weird...

no match for 'operator!=' (operand types are 'DateTime' and 'DateTime')

Try

   if (!(now == rtc.now())) {