I was watching the video on led powering using buck and in that video he said if you want to control the brightness you’ve to use a microcontroller. Can anyone explain how to achieve that?
Hi Sooraj,
Welcome to the forum
There are really three main ways to adjust the brightness of an LED
- Adjust the voltage across the LED (this is the least effective as LEDs don’t vary a great deal within their normal operating range)
- Adjust the current limit supplied to the LED (this works well for adjusting the brightness of an LED but isn’t practical when the adjustment requires a screwdriver)
- Apply the operating voltage and current limit for maximum brightness, then use a microcontroller to connect and disconnect the supply thousands of times per second so your eyes average out the brightness. (This is called Pulse Width Modulation or PWM and is where the microcontroller comes into play)
Option 3 is what Tim was referring to in the video, we have another guide that covers how that works in more detail. The basic idea is to use a microcontroller and a electronic switch like a MOSFET or relay to control the brightness using PWM, then you can tell the microcontroller how to adjust the brightness based on code, or a button, or any other kind of input your microcontroller understands.
Hi All
Relay is not really practical in this example as the operating time is too slow. Even for a quite small relay several mSec. Quoted 10mSec for Omron LY2 series.
Cheers Bob
Hi Bob,
Thank you, you are right, I was trying to think of a similar device to describe a MOSFET switch to someone who was unfamiliar and thought a relay would be more familiar but of course, a mechanical relay would be totally unsuitable in this application due to the speed of switching (not to mention the wear over time).
I’ll chalk that one up to a Friday afternoon.
Thank you for taking out your time and replying