Back to Basics: LEDs: Part 6: PWM Dimming

PWM Dimming LEDs
PWM Dimming LEDs

One of the key ways of dimming LEDs is via PWM dimming. At its core, PWM dimming involves rapidly turning LEDs on and off at a specific frequency. The ON time aka the duty cycle of the PWM signal, determines the average current through the LED. Usually, the LED driver is driven by a microcontroller’s PWM pin. The microcontroller can control three main parameters of the PWM signal. First is the duty cycle or the ON time. Higher the ON time, more the current, brighter the LED intensity.

Second is the frequency of the PWM signal which determines the rise and fall time of the LED current at the output of the driver. You will mostly find a ripple current at the output of the LEDs in an approx triangular fashion. If the frequency is excessively high, the LED might not reach its peak current, leading to diminished dimming/contrast ratios. If any frequency below 150Hz(approx) is used, the human eye will be able to pickup the flickering of the LEDs and cannot be used in lighting use cases. Yet, in specialized scenarios such as using LEDs for high-speed camera imaging(lower exposure rate), flickering becomes visible if a lower rate is used. Another way to mitigate the flicker is to sync the shutter speed of the camera with the LED PWM frequency although this option is often limited to scientific cameras. Hence, your choice of PWM frequency should align with your application’s demands.

Thirdly, let’s talk about PWM resolution, dictating dimming precision or how finely you can control brightness levels. An 8-bit resolution offers 256 levels of brightness, while a 10-bit gives you 1024 levels. PWM resolution is often inversely related to PWM frequency for most microcontrollers. This means you can have a high PWM frequency with lower resolution and vice versa, finding the right equilibrium is key.

In essence, mastering PWM dimming involves this intricate dance between duty cycle, frequency, and resolution, each parameter finely tuned to cater to the unique demands of your application.

If you liked the post, Share it with your friends!

Comments are closed.