I have a 32x8 RGB LED (WS2812B) matrix that I'm powering from a PSU (repurposed old Dell PSU to a bench power supply). I'm controlling the LEDs using ESP32 that is powered by the same power supply. There is a rotary encoder connected to the ESP32 to control the brightness. When I crank it up, the LEDs get brighter but sometimes they switch off when close to the max value (I'm using the FastLED library to drive them).
While trying to troubleshoot the problem, I noticed that the voltage on the PSU output drops continuously from its initial 5V to far below 4V as I increase the target brightness of the matrix (using the encoder). And when the voltage is low enough, the LEDs tend to switch off.
I was surprised to see this happen as the PSU certainly has enough power to drive the matrix (its specs say it can deliver 18.8A @ 5V). I was also surprised to see that the current that flows out of the PSU is only about 2A (measured with a multimeter) when the problems happen. I expected something closer to 32860mA = 15.4A. Btw. I have a 100microF capacitor between 5V and GND.
I will create a simple wiring and code configuration that I will share here, but I was wondering if someone knows right off the bat what the problem could be so that I don't blow up something before I post a picture :).
In general, can I damage the matrix or the ESP (or any microcontroller) by supplying low voltages? Once my problems happen, I need to disconnect the source and sometimes press the reset button on the ESP32 several times to get the matrix light up again.
This is a very different code than what I had initially and the wiring is also simpler (fewer components), but I'm still running into problems.
The code incrementally turns the LEDs to white; one by one after 100ms (see the red arrow in voltage_measurement.jpg to get an idea of the order).
As soon as roughly 1/4 of the LEDs are on, then suddenly all of them switch on but with much lower brightness and nothing else happens. (see voltage_measurement_02.jpg; please ignore the overall exposure and the number on the multimeter, the measured voltage was still going down at that point)
The voltage drops only by a little bit. After the glitch when all LEDs light up, the multimeter measures ~4.95V.
When I was measuring current, the LEDs stopped turning on (again around 1/4 of the matrix) and the ESP32 started blinking red. The current at that point was around 2A (see current_measurement.jpg). It felt like something went wrong with the ESP.
Could the problem be related to wiring or is it rather a software issue? In all my tests I was running into issues when I was setting the LEDs to high brightness.
I made some progress. I'm not sure if it was the PSU or the super thin wires that I temporarily used for testing, but replacing the PSU with MeanWell LPS 75-5 (which I initially bought for the project) and removing all the thin wires from the wiring between the PSU and the LED matrix removed the problems. The matrix now lights up as expected drawing ~9A with all LEDs 100% on.
The MeanWell PSU can deliver 75 Watts @ 5 Volts, i.e. 15 amps. In theory, the matrix can draw as much as 256*60mA = 15.360 Amps. Then there is the ESP32, which will also draw something. I'm aware that the PSU would not be able to provide sufficient current (at least not for a long time), so I initially planned to limit the current in software by never exceeding a certain intensity value (I couldn't find another power source with the form factor I need for the project).
However, now that I see that the matrix with all LEDs ON draws only about 9 amps, it seems I don't need to limit anything. Would you guys agree? Or should I still obey the theoretical 60mA value and calculate an integer threshold that I should not exceed in software?
Some computer power supplies have been reported to react badly when 5v is loaded but 12v is not - they are not designed for that operating condition, since it would never happen in a computer.
Also a 100uF capacitor is way too small for currents this big I would use one about 100 times bigger.
Computer PSUs regulate on the 12V current drain so are not very stable if you just use the 5V. So put a load on the 12V line and see how this improves the stability of the 5V. The more load the better the stability.