Electronic – Reducing LED PWM Noise: Which is the best option

decoupling-capacitorlednoisepwmsnubber

Driving an LED with a microcontroller should be easy. But when looking into noise, things can get complex…

As an instantaneous voltage indicator used in a variable power supply (which will be used to simulate a photovoltaic array of a student's designed satellite), I am using some LEDs controlled by PWM (~31 KHz).

schematic

simulate this circuit – Schematic created using CircuitLab

After the first revision of the PCB I have realized that each one of the LEDs is generating 200 mVpp in the 5V line:

noise screenshot

My question: which is the best way to reduce this noise? Why?

From my (small) design experience I could come with the following possibilities. Which is the most effective, taking into account real-world components (ESR in capacitors etc)? Any other suggestion? A combination of several?

(Note: changing the PWM frequency is not a good option because that same signal drives other devices)

a) Decoupling Capacitor

schematic

simulate this circuit

b) Low-pass filter

(The resistor forms an RC low pass filter with the gate capacitance of the MOSFET, removing the high frequency components of the switching)

schematic

simulate this circuit

c) Snubber

schematic

simulate this circuit

Best Answer

Your a) solution is a good one, just make sure the capacitor is as close as possible to the resistor/LED/transistor-branch as possible. Start with a 100nF value and see how that works. If ripple is still too large to your liking, add a electrolytic capacitor in parallel to the 100nF. The 100nF will suppress the higher frequency components and the electrolytic capacitor will do better for lower frequency components.

As @pjc50 says in one of the comments, a gate series resistor as shown in b) is good practice too to avoid ringing. I'd personally pick a lower value, say 100Ω. It will suppress ringing and will avoid the transistor spending too much time in linear mode (=dissipating heat).