I am working on a hobby project involving controlling LED strips (working at 12 volt and drawing up to 5A). The light intensity of the strip is controlled using a single MOSFET transistor (specifically FDA8440) connected to the MCU. I am controlling the light intensity with the microcontroller using PWM.
The project is powered by a Mean Well LRS-100-12 power supply. The problem is that I hear an audible and bothersome noise when the LEDs are not fully off or fully on, which comes from the transformer inside the power supply unit.
Other that the LEDs, the PSU is also powering the PSU (an ESP32) trough a buck converter (a circuit based on the XL4015 chip ). At the moment the wiring is done over a breadboard.
The amount of audible noise depends on both the frequency and duty cycle of the PWM signal (the frequency of the sound seems to be very roughly that of the PWM somehow scaled down by the duty cycle). If I set the frequency at around 100 Hz I hear a more or less constant amount of noise. Decreasing the frequency from there reduces the noise but then LEDs start to perceptibly flicker, which is not ideal. Increasing the frequency above 100 Hz makes the problem worse and the amount of noise I hear acquires a dependency on the duty cycle: It seems to pick two or three resonant frequencies between 0% and 100%. If I try to escape the audible range by setting the frequency at something like 50 kHz, I still hear loud noises when the duty cycle is about 30%. This also makes lower duty cycles (10% or so) not work well as I observe LEDs flickering substantially.
I note that if I add some constant and high enough load (a resistance), then the PSU is quiet. How could I make it quieter? Maybe some kind of capacitor bank would help making the transformer vibrate less?