3

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.

enter image description here enter image description here

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?

Zah
  • 133
  • 4
  • "*... 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.*" There's something odd there. Are you sure you're maintaining PWM frequency at low duty cycles? – Transistor May 23 '21 at 17:48
  • 1
    btw - the way you've drawn your circuit makes it look like the MOSFET drain is connected to the power supply negative terminal (ground). The MOSFET source should be at ground and the drain terminal connected to the cathode (negative) end of the LED. – ErikR May 23 '21 at 17:56
  • 1
    I would like to see a complete schematic, It appears the MOSFET mayo not be fully enhanced. – Gil May 23 '21 at 18:13
  • @Transistor I think I am setting the PWM frequency at the controller output. I think the flickering has to do with non ideal properties of the transistor/setup (not sure which ones though). I also observe flickering with very low duty cycles (as 1/2000) with frequencies of 500 Hz. I should mention that at the moment the transistor is connected to a breadboard. – Zah May 23 '21 at 18:46
  • @Gil What would you like to see more detail on? What I wrote is everything I think I have... – Zah May 23 '21 at 18:47
  • In your schematic you have no ground connection between your buck converter negative and the LED circuit negative. Is there one through the buck converter PCB? (If you can't see it then test with a continuity meter.) – Transistor May 23 '21 at 19:31
  • @Transistor No I don't. However in practice I see that these are at the same voltage as the ground of the PSU. – Zah May 23 '21 at 19:35
  • I notice that if connect the ground from the PSU to the breadboard pin at GND in the ESP32 (rather than the breadboard negative rail), then the flickering at low duty cycles is substantially reduced. So it may be caused by bad wire and breadboard connections. – Zah May 23 '21 at 20:57
  • Please use a more conventional style for your schematics... positive voltages on top, ground on the bottom, N-channel MOSFETs with their source on the bottom, drains on top. And the processing/transformation of signals should flow from left to right. Something like this: https://imgur.com/a/0Ym90do.png Btw, let us know if this schematic is accurate. – ErikR May 24 '21 at 02:05
  • are you compliant on note 9 on the data sheet? (outside of EU or under 220V in) – Jasen Слава Україні May 24 '21 at 03:37
  • Yes post the Schematic not a frizzy thing. Your pictures look nice but are of little use. You have circuit problems for sure and probably software problems as well so save yourself some time and post the software as well. Also how did you measure the PWM frequencies? – Gil May 24 '21 at 03:39
  • You'll probably get better results by varying the voltage instead of using PWM on the LEDS, but that meas you'll need to do a minor modification to the power supply. – Jasen Слава Україні May 24 '21 at 03:51
  • 2
    If the noise is from the PSU, this is really easy: put a decent size cap on the PSU output, well before the PWM and LEDs. That way the PSU never even sees the noisy load. Start with 10,000u or so, increase if needed. Also, is your FET getting hot? 3.3v is often a bit low. Might use a level shifter as a poor man's FET driver. – dandavis May 24 '21 at 04:16
  • @ErikR thanks, I have used your schematic if you don't mind. I believe it is what I had intended. – Zah May 24 '21 at 06:52
  • @Jasen I don't think this note was there on the datasheet when I bought the power supply and might be a problem indeed. – Zah May 24 '21 at 06:55
  • You should try to filter the current going to the LEDs, a cap might be enough but an LC filter would be better. Pick a frequency low enough to be out of band for the PSU transformer, probably below a few 100 Hz is already enough. – Vladimir Cravero May 24 '21 at 07:00
  • @Gil If I disconnect the wire from the GPIO pin I can accurately measure the frequency with a multimeter and it is the one I expect. I have a hunch that part of the light flickering is explained by the physical connections (please see https://electronics.stackexchange.com/questions/566571/how-do-i-deal-with-acoustic-noise-from-a-transformer-under-pwm-load?noredirect=1#comment1481390_566571). – Zah May 24 '21 at 08:04
  • @Jasen The problems with voltage dimming include non linearity (which is bad for something else I want to do) and problems with color shifting. That is why I would prefer PWM if possible. – Zah May 24 '21 at 08:06
  • @dandavis the transistor remains cold all the time and is operating within spec as I understand it. I was thinking about a cap as well. Would that be something that needs bleeder resistors? – Zah May 24 '21 at 08:09
  • @VladimirCravero what would be the advantages of an LC filter over a capacitor? Wouldn't that filter the zero frequency that I want to keep? – Zah May 24 '21 at 08:11
  • @ErikR as an aside, which software did you use to produce that schematic? – Zah May 24 '21 at 08:12
  • I did not meant a series LC filter, but a low pass filter; like an RC low pass filter with an L instead of the C. The advantage to use the L instead of the R is that you get a better tradeoff between filter losses, cap size, cutoff frequency. – Vladimir Cravero May 24 '21 at 08:18
  • @Zah - the schematic editor built into this stackexchange -- type control-M in the editor or click on the schematic symbol: https://imgur.com/a/LL3c1Oc – ErikR May 24 '21 at 11:46
  • no filter, no bleeder (it's a few volts dc behind a diode), just a cap. – dandavis May 24 '21 at 17:23

2 Answers2

1
  1. The PWM frequency is too low. More typically it'd be in the 1-100kHz range.

  2. There are no decoupling capacitors.

  3. That mosfet floating in the air on long wires is waiting to either self-destruct or to destruct the MCU or the LED strip. MCU, MOSFET, R1 and C1 (see below) should be as close together as possible!

The connections should look approximately as follows:

schematic

simulate this circuit – Schematic created using CircuitLab

  • C1 sources load AC current to the LED-MOSFET circuit. It should be a "bulk" capacitor in the 100-5000uF range, in parallel with 100nF
  • C2 sources gate AC current to the MOSFET
  • C3 shunts the AC current from the LED loop - the AC current doesn't do any useful work other than warming up the LEDs, so it might as well be kept inside the box
  • R1 limits the bandwidth of the gate current
  • GPIO1/GPIO2 are a short path through which most of the AC gate current circulates. They should be connected directly across M1 through R1 as shown.
  • GPIO2 should be set to a fixed 0 (low) output
  • GPIO1/2 should be both set to the highest drive strength available (this depends on what a particular MCU provides)
  • C1 to PSU should be a separate pair of wires, going directly from PSU terminals to C1 terminals
  • BUCK to PSU should be a separate pair of wires, going directly from PSU terminals to the BUCK in/gnd terminals
  • C2 should be ceramic and connected as close to MCU pins as possible
  • The solderless breadboard is likely to perform poorly in this design, due to large parasitics.
  • Attention must be paid to minimize the areas of the five AC current loops indicated. LOOPs 3,4 should be twisted pairs. LOOP 5 should be either very short (1" or less), or also a twisted pair. LOOP 2 must be as short as possible. LOOP 1 is long but should be narrow due to the design of the LED strip. Never connect to the LED strip on opposite ends, always connect only from one end. The wires from M1/C1 to the led strip(s) should be a twisted pair if it's longer than 1".
  • The components in the dashed box should be close together.
  • The bottom of M1, C1, and the two wires that connect to it, should be a single point "star ground".
  • Thanks for the very detailed answer. What is the advantage of using GPIO2 versus the ground pin of the MCU? Is it that it improves the drive strength? – Zah Mar 24 '22 at 14:07
  • @Zah Depending on the MCU pinout and how you placed the decoupling capacitors, it may decrease the loop area by routing the VCC and GND currents nearby. In any case it'd have a small effect, but the effect would be localized induction into various other nodes on the MCU. So this little loop, if too large, could induce interference into lots of other signals, just increasing the EMI footprint of the system. Not a big deal if the MCU doesn't do much else, but in larger systems with unshielded internal cabling it makes a measurable difference. – Kuba hasn't forgotten Monica Mar 24 '22 at 15:29
  • Why should the LED strip never be connected on opposite ends? (This seems to contradict with the answers at [/questions/364980](https://electronics.stackexchange.com/questions/364980/can-i-connect-up-led-strip-lighting-at-alternate-ends)) – BillyNate Sep 20 '22 at 08:33
0

The operation of the schematic would be a bit hit and miss if the grounds of the 12V PSU is not connected to the Ov of your PWM source.