I’ll make a new discussion here since power draw is a common question:
Patrick Aversenq, you said"
“One question more, to be sure to understand:
32*32 = 1024 lights
1024 * 3 (leds by lights) = 3072 leds
3096 * 20mA (per led if you want a white screen) = 61,44 A !!!”
@Patrick_Aversenq your math is correct, but what you give is maximum current draw although 16x16 pixel matrix actually takes closer 10A at full bright white instead of 15A (60mA * 256), so 40A for 32x32
What you forget is:
- in most applications, you maybe light up 2/3rd or one half the pixels at most
- then they are typically not white, but maybe 2/3rd or one half of white
So, this takes 1/2.5 to 1/4th of the power at full brightness.
This brings your 40A to a worst likely case scenario of 10A at full brightness.
Now, full bright is actually too bright for many uses, so you divide this further by 2, 4 or 8 to get more reasonable brightness, and that takes you down to 1.25 to 5A for 1024 pixels, and even less if you display small moving patterns or moving fonts.
As per previous reply, if you draw more than the power supply can give, you may get flickering. Take down the brightness in fastled and it should work around the issue. Then you decide whether to bring it back up with a better power supply, or live with the smaller amp draw and lesser brightness.
If I set the brightness to 100 (100,100,100) the light stay fixed. But normaly with 10A I should be go more higher. For my project I use 4 matrix 8x8 so 256 lights. So, in worst case the supply must delivered 15A. It’s the reason why I use an power at 10A, because, you are right, I will never activate all led at 255. But the phenomenon appears upper than 128 with a small image. I suspect the chinese power supply. I will measure the current to verify.
This is, of course, assuming that there’s no bugs in your code that will turn all the leds on full brightness. And if your leds and MCU are sharing the same power supply, then the leds being too bright can starve the MCU of power and cause it to shut down. Also - be careful making “most applications” statements - folks who are building things that will double as ambient lighting, will have full bright white occasionally, as are folks who are interested in having that be part of their patterning (some of the generative stuff that I do cycles along saturation enough that it does, occasionally, hit full white for a moment before cycling back into color and patterns).
Also - folks, when talking about power, don’t forget about voltage drop and remember to inject power regularly!
And eat your vegetables!
Yeah @Daniel_Garcia is very correct about re-injecting power in the middle of the strip in several places.
As for powering the MCU from another source when you’re running close to your power limit, that’s also very sound advise, because otherwise you won’t get blinking but a reboot 
As for “bug in your code”, if you set brightness to a low value at the very beginning, it does limit the odds of messing up quite a bit, though
@Daniel_Garcia you are right but I already separate the power by matrix. This type of matrix have a power IN and power OUT. You can chained several matrix. But I have remarked that the power of the lights decreased between the first and the last. I have decided to connect all the power IN together directly to the supply. The result is better but the consumption stay important. I will make a new test with a laboratory power supply as soon as possible. I will give you the return. Thanks for your attention.
@Patrick_Aversenq just a question you are using 4 data pins ? Or are you chaining the matrix ? If so how far are they from each other ? I had the same issues (flickering when more power required ) when working on my panel (4 meters long). also plug the gnd of your controller board also to the gnd at the end of the strips and twist the data signal with a ground attached wire. (Like the cable in a Ethernet wire.
@Yves_BAZIN you can see my installation below. The power supply is not chain.
Don’t take into account the type of matrix. I don’t find my model in the library. It’s just to understand the principle.
missing/deleted image from Google+
@Patrick_Aversenq thx you. How do you power your Arduino ? If with a separate power supply then plug the gnd of the controller to the gnd of the led.
yeap, separate supply with ground connected
@Patrick_Aversenq looks good like that. Just maybe a large Capacitor between gnd and +5v at the entrance of each matrix and a 470ohms and the entrance of the first data.
Interesting @Yves_BAZIN , I will test this proposal. Finally I have reduce the brightness at 100 and added the function FastLED.setMaxPowerInVoltsAndMilliamps(5, 2000);. It’s better but I am frustrated. I suspect le chinese power supply.
I must find a solution to measure the current.
@Patrick_Aversenq measuring the current is easy, just get an in line current meter. That’s what I added to my power supply.
select the 10A one which has a built in shunt Anything above that requires an external shunt.
You can also spend a bit more money and get a 100A one with shunt: https://www.amazon.com/gp/product/B013PKYILS/ref=oh_aui_search_detailpage?ie=UTF8&psc=1
@Marc_MERLIN you are a father for me! French expression.
@Yves_BAZIN the capacitor and resistor suggestion that come from https://learn.adafruit.com/adafruit-neopixel-uberguide/basic-connections , do they actually help with reliability (anti-glitching), or just to protect the pixels, as implied in the adafruit learning guide?
@Marc_MERLIN this is to protect the leds. It does not help for the glitching. I do advice the condensators for fast changing images ( especially from dark to bright)
@Yves_BAZIN cool, thanks for confirming what I thought was the case. I’m also thinking that the newer pixels (WS2812B) in matrices we buy today are more resilient than the original WS2811 the adafruit wrote their recommendations for.
I’ve just never had a single pixel go bad despite honestly not following those recommendations anymore.
Anyway, back to figuring out why I only get glitching in parallel mode and not serial mode. I may have to start doing twisted pair stuff…
@Marc_MERLIN you are using the esp32 or esp8266? If you are using the esp32 run the fastled.show() on core 0. The twisted wire for the data is really useful when long wires
@Marc_MERLIN you are using the esp32 or esp8266? If you are using the esp32 run the fastled.show() on core 0. The twisted wire for the data is really useful when long wires
@Yves_BAZIN the details are on https://plus.google.com/+MarcMERLIN/posts/XYU3xjDYRJM
it’s on esp8266. I haven’t found ESP32 to be quite stable enough, and my existing setup is using ESP8266 anyway.
I may switch to ESP32 eventually given that it’s indeed a much better chip.