What is PWM used for with LEDs?

PWM stands for Pulse Width Modulation and it’s used to dim LEDs, unlike with other type of lighting you can’t just change the voltage the LED receives since this can negatively impact it’s color, efficiency and other attributes. The solution is turning on and off the LED real vast to create a “brightness average” our eyes perceive as a dimmed light.

Please see the following article for more information on this subject!

Switching frequency vs power handling

When raising the PWM frequency used to dim your LEDs a downside is that more heat will be generated. Or better said, the more often a MOSFET needs to switch from off to on and back to off again the less efficient it’s going to be and this in turn generates heat.

Thus the amount of power a PWM dimmer board can effectively handle is partly determined by the frequency you are going to PWM dim your LEDs.

Each transition is efficiency loss

As mentioned above each time a MOSFET turns on or off there is a slight loss and generally this is electricity being converted to heat and thus a higher frequency means more heat. There are however ways to minimize this effect which the pre-assembled QuinLED-An boards employ.

In part this is selecting the right MOSFETs for the job and the other side of the coin is driving those MOSFETs as efficiently as possible with a MOSFET gate driver and high voltage on the gate.

Next to that all boards make sure the MOSFETs are heatsinked directly into the board and the multiple copper planes it has, this spreads out the heat from the tiny MOSFET area to basically the whole board area giving it a much greater surface area to dissipate the heat from.

Too steep curves are bad too…

Now the above would make you think the faster we can have the MOSFET turn on and off, so basically as straight a curve as possible would be best. And while that is true, this creates a new issue and that’s EMI interference. Looking at EMI interference a smooth sine wave generates much less interference then a very fast rising and falling “sawtooth” PWM waveform.

So although we want to charge and drain the MOSFET gates very fast, we also intentionally slow it down somewhat to create more of a rounded curve then a straight edged one to minimize EMI interference from long cables and long LED strip, basically trying to prevent them from becoming an antenna.

On my pre-assembled this has been tuned to allow up to a max of 120kHz PWM effectively.

How much power can my board handle?

So all of the above combined, how much power can the boards handle? Sadly there is not one single figure I can give you because of the many differences between the boards. That’s why I’ve created a power handling article per board! Please go to the pre-assembled QuinLED-An board you are looking at and study the power handling guide closely to see which board can fit your needs!

Run the frequency you need

Another important bit of information I’d like to give you is to run the frequency you need, not the max it can handle. It’s no use running all your PWM dimmers at 120kHz when in reality around 20kHz would also be perfectly fine for your use case.

Another downside of running a very high PWM frequency is lowered bitrate available so less dimming steps and granular control. This is also seen in the lower regions of the LED dimming curve at higher frequencies the LED will need a higher average voltage and thus a high % of the dimming curve to start showing light.

Each QuinLED-An pre-assembled board has their PWM resolution listed on the specification page.

I’d say the following would be good values to target for their use cases:

  • General home lighting
    • 9765Hz
      • This gives you 13Bit so 8192 steps of dimming resolution and should generally be high enough for any normal activity
  • Critical home lighting
    • 19531Hz
      • This gives you 12Bit so 4096 steps of dimming resolution and is plenty high frequency for even critical motion situations
    • Let’s also call this the “silent mode” since the frequency is above what normal human ears can hear
  • Video lighting
    • 39062Hz
      • This gives you 11Bit so 2048 steps of dimming, still very smooth
    • Let’s call this “video mode”. The reason is that this frequency is generally plenty high enough so that even a camera sensor will not pick up the flicker anymore but it’s also plenty far out of the audio range so that it won’t interfere with any audio recording equipment and such.
  • I dunno
    • 78124Hz
      • Gives you 10Bit so 1024 steps of dimming
    • Not sure what you’d use this mode for, maybe if you are feeling paranoid?
  • Uber mode
    • 117186Hz
      • Gives you 9Bit so 512 steps of dimming
    • If you want to run the maximum frequency supported because you feel you still see flickering otherwise, this is it!

Why are you not using “whole” numbers?

The reason we’re using 9765Hz and 19531Hz, etc. is because of the PWM resolution of the micro-controllers (The ESP32 or ESP32-C3) used in the QuinLED-An boards. Moving beyond a certain frequency basically cuts the resolution in half so we use a frequency that’s just slightly below that threshold to get the maximum frequency for that given resolution!

Running multiple frequencies

Although officially the ESP32 micro-controller supports running multiple channels at different frequenties I’ve seen weird issues happen when this is done so I generally advise to run all channels at the same frequency.