
So, today we're going to discuss how you
can dim an LED. But before we do that, let's just talk about dimming in general. So, dimming is the process of varying light output of a light source. So, basically it can do full light and how do you make it so it's not full light. So, this can be to create the ambiance and of a specific thing, if you want to have some backlighting, some mood lighting and stuff like that.
And other times it's simply to save energy when you don't need that full light. With incandescent light bulbs, most the dimming system used before the LEDs were for incandescent light bulbs. And they used forward phase in a reverse
phase dimming in which the dimmer interrupts or chops the AC line input to reduce the power going into the driver. So, with less input power, there will be less output on the driver and the brightness of the light is decreased. Now, one of the problems with that dimming method with incandescent is that it reduces the efficiency of an incandescent light bulb, it makes it even less efficient. It also produces unwanted electromagnetic interference or radiation. Also can do current surges and AC distortions. So, that was one of the negatives of having that with an incandescent and also that just flat-out doesn't work with LEDs.
So, what do we with LEDs and why would we consider using LEDs as light source So, LEDs are a little bit more expensive but they're so much more efficient. Their quality of light is so much better their lifespan is orders of magnitude better, they're non-toxic and they're extremely durable. So, that's why we'd use an LED. If we want to dim an LED, they have a lot of benefits or advantages over incandescent light bulbs and other light sources.
So, compared to an incandescent bulb which gets less efficient as you dim it, an LED actually gets more efficient and uses less energy as you dim it. So, that's for a couple of reasons and one of them is that better efficiency is because the light intensity is directly related to the LED current. So, dimming the LEDs saves energy. And then also it's one of those things that you can make it half as bright and your eyes don't see it quite like that because brightness is not linear. So, you're using a tenth of the energy and it's only half as bright something like that. So, that's another reason that dimming with an LED helps because you're getting a linear savings of power.
And you're getting a nonlinear dimming visibly, so kind of strange there. But finally, dimming extends the lifespan of LEDs because LEDs run cooler when dimmed. So, if they're running cooler then they last longer. The dimming range of LEDs is broader than other light sources. They can turn down to about one percent of full output. Whereas with incandescent or fluorescent, they can't quite get that dim before they just put it out completely. So, what controls the brightness of an LED? There's a couple of different ways that you can dim an LED. And it's not always based on an increase or decrease of the voltage and it depends on the power consumption, basically of what method you want to use. So, going back a little bit to the basics, the forward voltage of an LED is the voltage at which it starts to conduct.
And so though increasing the voltage increases the current. The region where that happens without the current getting too much is actually very, very small. So, we take that forward voltage as a fixed value and control the current instead. So, the amount of current flowing through an LED device determines the light output. So, if you're gonna scan some LED data sheets, you're gonna see that the luminous intensity of an LED depends on the forward current and their relationship is almost linear.
So, it's not voltage and brightness, it is current and brightness that's fairly linear. So, even though we can vary the current through the forward voltage as mentioned before, the region where you can adjust the voltage without the current getting too much is just too small to handle predictably. So, it's better to dim the LEDs by varying the current. That is a little bit more complicated because then you have to change the resistance, you have to get a little bit more complicated circuitry or is if you just are changing the voltage, you change it on your power supply and you do something else.
But that is a better way of looking at it. Besides that, there is another way that you can dim LEDs and it's very common when you are dimming with these smaller LEDs. And that is pulse width modulation. So, again the two things are changing the current and using pulse width modulation. So, one of the interesting things about our vision is that we have persistence of vision. So, if something is on and off and blinks
very quickly we just see it as being on. So, the way you can dim an LED is by actually flicking it on and off at a certain ratio, fast enough that it looks solid to you but it's actually fully bright and then fully off for a certain amount of time and it just looks dimmer because of that.
And now the ratio of the on time and off time which is also known as the duty cycle determines that brightness. So, we actually put together this very simple demonstration of how to dim something with a pulse width modulation So, I have a simple Arduino and what it's doing is it's reading this potentiometer and it's taken some samples using an ADC and then depending on the input it's getting from the ADC it's changing the pulse width output to the LED So, I want to show you what this actually looks like.
So, I'm gonna turn this on and I didn't
have it on before because it's quite loud. But as I turn this you will see, that it just gets brighter and brighter and brighter, that's full brightness and that's fully off. And all that's doing is it's changing how much it's on versus how much it's off. Now, the cycle here is about 500 Hertz. So, much faster than our eyes are able to see. And we're gonna be able to see here in just a moment, what it actually looks like, what the waveform looks like. So, right now it's fully off. So, we have a constant off voltage right there but as I turn it on, you can see it's splitting.
And you're getting it off where it looks like it's about 80% off, 20% on. And as I change this, it gets more and more. So, I'm changing the duty cycle. You notice that the width of the waveform doesn't change. That's not what we're modulating, we're modulating the duty cycle of that square wave. So, even though it's very obviously fully on, fully off, fully on, fully off, you look at it. If you don't see any flickering because again it's running at almost 500 Hertz, much, much faster. I don't know exactly what our eyes can see but between 30 and 60 Hertz. I know television is 24 Hertz or something along those lines and so this is much, much faster than we can see.
So, as we do that we can see that it gets a little bit brighter and it completely maxes out. Now this is fully on. And now when it is about 80% on, 20% off, it doesn't look that much different than 100% on or is when we go off there's a huge difference between fully off and about 20% on. So, again that's because our eyes
don't see things linearly even though the amount of current, it's consuming your amount of power. It's consuming is linear. So, that's kind of an interesting thing and that again is one of the ways that you can save power. So, there's a lot of advantages of using a pulse width modulation It keeps a lot of the characteristics of the LEDs such as the color, meaning like the color temperature.
It also has the same efficiency because you are just turning it completely on, and turning completely off. And that is one of the benefits of LEDs is turning it on and off like this is not a big deal at all. Now, as you can see this is also good because you can get it very, very dim. And this is probably not the best example of how dim you can get it. But you can have a very small pulse and now that is significantly dimmer than as we get fully up. So, again benefit of LED versus fluorescent or incandescent is that they can get actually very, very dim. So, this is really good for small LEDs like this. And has a ton of benefits but it does have its disadvantages as well.
So, sometimes the drivers are complex and
expensive. I mean this is overkill, you can definitely automate it but there's all of this just to make this get brighter and dimmer. So, again it can be simplified. But it is at times, much more complex and expensive than you want to be. And since this is cycling at 500 Hertz and you have a fast rising edge and a fast falling edge on each cycle, you're getting some electromagnetic interference. I mean you're definitely producing at least a small amount of EMI. Now, honestly it's not such a big deal with a small and device like this because you're not consuming a lot of power.
But that is also why this method is not great for large LEDs because as you get larger current that's rising and following super fast, you're gonna get a lot more electromagnetic interference. And by the same token if you're running this a long, long distance cables or stuff like that, it's not gonna work that well because you're gonna have a long wire with a lot of inductance that you're trying to switch quickly. So not only is that going to slow down your edges but it's also going to produce even more electromagnetic interference.
So, those are some of the drawbacks and again most of them don't apply to something this small but once you get into the bigger LEDs yeah that becomes a problem. So, that is pulse width modulation and how you dim it. And then there's the other, the analog dimming, the constant current reduction dimming. Now, we're thinking about doing a demo but it's really quite difficult to demonstrate constantly changing the current because I would basically have to be modulating the voltage to get a constant current and modulate the current. And so, it'd be kind of strange a little bit. I don't want to say hypocritical but saying "Hey! don't change the voltage because that's not perfectly linear" but you have to change the voltage to change the current. So, we're not going to do that but in essence, you simply have a circuit that takes a the LED and senses the current that's going through it. And adjust the voltage manually or significantly whatever to make it so you have a constant current
going through that LED and that has benefits over this and it actually is really helpful when you're dealing with those big LEDs for exactly the reasons I said that pulse width modulation is not great for those big LEDs it can be used when there's strict EMI requirements and where you need remote applications where
there's long wire runs.
And there's also typically a higher output voltage limit we're talking like 60 volts, whereas this is at 5 volts. And most PWM is you don't really want to do 60 volts up and down, 500 times a second So, they work much, much better for those large applications. And they're typically more rated for industrial applications for stadiums and things like that So, you get them in better packages that are ip67 rated for dry and damp locations or dirty stuff like that.
So, again they're not perfect either they're not great for applications where you need dimming light levels below 10% because at really low currents LEDs don't perform as well and the light output kind of flicker be erratic and then if you have a low drive current sometimes that can actually change the color of the LED a little bit. So, pros and cons of both situations. Now, if you are just doing embedded systems and you're just doing something for the fun of it. This is probably what you want to do. You probably want to do pulse width modulation and you can see it's pretty straightforward and it gives great results and it's easy to understand conceptually. And you don't have to worry about any sort of voltage following and current mirrors and stuff like that.
So, most applications that I imagine you are dealing with, this is what you want to do. But if you're ever looking at something where you want to have a big lighting project in your house or even if this your school or whatever. Then you can look at other places, there are manufacturers that create constant current devices that they're specifically to drive LEDs and they have a voltage range that they'll vary between to make sure that your LED lighting is consistent. That is how you can dim an LED. I hope that that helped you understand the concepts and kind of the pros and cons of the different ways of doing it. If you like this video, give us a like and subscribe to our channel. And we'll see you next time you..