Make LED tube light RC driver, LED Bulb driver circuit life time running
High-power LED's: the future of lighting!
but... how do you use them? where do you get them?
1-watt and 3-watt Power LED's are now widely available in the $3 to $5 range, so I've been working on a bunch of projects lately that use them. In the process it was bugging me that the only options anyone talking about for driving the LED's are: (1) a resistor, or (2) a really expensive electronic gizmo. now that the LED's cost $3, it feels wrong to be paying $20 for the device to drive them!
So I went back to my "Analog Circuits 101" book, and figured out a couple of simple circuits for driving power LED's that only cost $1 or $2.
This instructable will give you a blow-by-blow of all the different circuits for powering Big types LED's, everything from resistors to switching supplies, with some tips on all of them, and of course will give much detail on my new simple Power LED driver circuits and when/how to use them (and I've got 3 other instructables so far that use these circuits). Some of this information ends up being pretty useful for small LED's too
Here's my other power-LED instructables, check those out for other notes & ideas
This article is brought to you by Monkey Electric and the Monkey Light bike light.
Step 1: Overview / Parts
There are several common methods out there for powering LED's. Why all the fuss? It boils down to this:
1) LED's are very sensitive to the voltage used to power them (ie, the current changes a lot with a small change in voltage)
2) The required voltage changes a bit when the LED is placed in hot or cold air, and also depending on the color of the LED, and manufacturing details.
so there's several common ways that LED's are usually powered, and I'll go over each one in the following steps.
Parts
This project shows several circuits for driving power LED's. for each of the circuits i've noted at the relevant step the parts that are needed including part numbers that you can find at www.digikey.com . In order to avoid much duplicated content this project only discusses specific circuits and their pros and cons. To learn more about assembly techniques and to find out LED part numbers and where you can get them (and other topics), please refer to one of my other power LED projects.
Step 2: Power LED Performance Data - Handy Reference Chart
Below are some basic parameters of the Luxeon LED's which you will use for many circuits. I use the figures from this table in several projects, so here I'm just putting them all in one place that I can reference easily.
Why not just connect your battery straight to the LED? It seems so simple! What's the problem? Can I ever do it?
The problem is reliability, consistency & robustness. As mentioned, the current through an LED is very sensitive to small changes in the voltage across the LED, and also to the ambient temperature of the LED, and also to the manufacturing variances of the LED. So when you just connect your LED to a battery you have little idea how much current is going through it. "But so what, it lit up, didn't it?". ok sure. Depending on the battery, you might have way too much current (led gets very hot and burns out fast), or too little (led is dim). The other problem is that even if the led is just right when you first connect it, if you take it to a new environment which is hotter or colder, it will either get dim or too bright and burn out, because the led is very temperature sensitive. Manufacturing variations can also cause variability.
So maybe you read all that, and you're thinking: "so what!". if so, plow ahead and connect right to the battery. for some applications it can be the way to go.
- Summary: only use this for hacks, don't expect it to be reliable or consistent, and expect to burn out some LED's along the way.
- One famous hack that puts this method to outstandingly good use is the LED Throwie.
Notes:
- If you are using a battery, this method will work best using *small* batteries, because a small battery acts like it has an internal resistor in it. This is one of the reasons the LED Throwie works so well.
- If you actually want to do this with a power-LED rather than a 3-cent LED, choose your battery voltage so that the LED will not be at full power. This is the other reason the LED Throwie works so well.
The Humble Resistor
This is by far the most widely used method to power LED's. Just connect a resistor in series with your LED(s).
pros:
- This is the simplest method that works reliably
-only has one part
- costs pennies (actually, less than a penny in quantity)
cons:
- not very efficient. you must trade off wasted power against consistent & reliable LED brightness. If you waste less power in the resistor, you get less consistent LED performance.
- must change resistor to change LED brightness
- If you change the power supply or battery voltage significantly, you need to change the resistor again.
an LED. They do it all, but thThey are pricey. what is it they "do" exactly? the switching regulator can either step-down ("buck") or step-up ("boost") the power supply input voltage to the exact voltage needed to power the LED's. Unlike a resistor it constantly monitors the LED current and adapts to keep it constant. It does all this with 80-95% power efficiency, no matter how much the step-down or step-up is.
Pros:
- LED performance for a wide range of LED's and consistent power supply
- High efficiency, usually 80-90% for boost converters and 90-95% for buck converters
- can power LED's from both lower or higher voltage supplies (step-up or step-down)
- Some units can adjust LED brightness
- Packaged units designed for power-LED's are available & easy to use
Cons:
- complex and expensive: typically about $20 for a packaged unit.
- Making your own requires several parts and electrical engineering skillz.
lets get to the new stuff!
The first set of circuits are all small variations on a super-simple constant-current source.
Pros:
- LED performance with any consistent power supply and LED's
- costs about $1
- only 4 simple parts to connect
- efficiency can be over 90% (with proper LED and power supply selection)
- can handle LOTS of power, 20 Amps or more no problem.
- low "dropout" - the input voltage can be as little as 0.6 volts higher than the output voltage.
- Super-wide operation range: between 3V and 60V input
Cons:
- must change a resistor to change LED brightness
- If poorly configured it may waste as much power as the resistor method
- you have to build it yourself (oh wait, that should be a 'pro').
- current limit changes a bit with ambient temperature (may also be a 'pro').
So to sum it up: this circuit works just as well as the step-down switching regulator, the only difference is that it doesn't guarantee 90% efficiency. On the plus side, it only costs $1.
How does it work?
- Q2 (a power NFET) is used as a variable resistor. Q2 starts out turned on by R1.
- Q1 (a small NPN) is used as an over-current sensing switch, and R3 is the "sense resistor" or "set resistor" that triggers Q1 when too much current is flowing.
- The main current flow is through the LED's, through Q2, and through R3. When too much current flows through R3, Q1 will start to turn on, which starts turning off Q2. Turning off Q2 reduces the current through the LED's and R3. So we've created a "feedback loop", which continuously monitors the LED current and keeps it exactly at the set point at all times. transistors are clever, huh!
- R1 has high resistance, so that when Q1 starts turning on, it easily overpowers R1.
- The result is that Q2 acts like a resistor, and its resistance is always perfectly set to keep the LED current correct. Any excess power is burned in Q2. Thus for maximum efficiency, we want to configure our LED string so that it is close to the power supply voltage. It will work fine if we don't do this, we'll just waste power. This is really the only downside of this circuit compared to a step-down switching regulator!
setting the current!
the value of R3 determines the set current.
Calculations:
- LED current is approximately equal to: 0.5 / R3
- R3 power: the power dissipated by the resistor is approximately: 0.25 / R3. Choose a resistor value at least 2x the power calculated so the resistor does not get burning hot.
so for 700mA LED current:
R3 = 0.5 / 0.7 = 0.71 ohms. The closest standard resistor is 0.75 ohms.
R3 power = 0.25 / 0.71 = 0.35 watts. we'll need at least a 1/2 watt rated resistor.
the only real limit to the current source circuit is imposed by NFET Q2. Q2 limits the circuit in two ways:
1) power dissipation. Q2 acts as a variable resistor, stepping down the voltage from the power supply to match the need of the LED's. so Q2 will need a heatsink if there is a high LED current or if the power source voltage is a lot higher than the LED string voltage. (Q2 power = dropped volts * LED current). Q2 can only handle 2/3 watt before you need some kind of heatsink. With a large heatsink, this circuit can handle a LOT of power & current - probably 50 watts and 20 amps with this exact transistor, but you can just put multiple transistors in parallel for more power.
2) voltage. the “G” pin on Q2 is only rated for 20V, and with this simplest circuit that will limit the input voltage to 20V (lets say 18V to be safe). If you use a different NFET, make sure to check the "Vgs" rating.
The current set-point is somewhat sensitive to temperature. This is because Q1 is the trigger, and Q1 is thermally sensitive. The part nuber i specified above is one of the least thermally sensitive NPN's i could find. Even so, expect perhaps a 30% reduction in current set point as you go from -20C to +100C. that may be a desired effect, it could save your Q2 or LED's from overheating.
These slight modifications on circuit #1 address the voltage limitation of the first circuit. we need to keep the NFET Gate (G pin) below 20V if we want to use a power source greater than 20V. It turns out we also want to do this so we can interface this circuit with a microcontroller or computer.
in circuit #2, i added R2, while in #3 i replaced R2 with Z1, a zener diode.
Circuit #3 is the best one, but i included #2 since it's a quick hack if you don't have the right value of zener diode.
we want to set the G-pin voltage to about 5 volts - use a 4.7 or 5.1 volt zener diode (such as: 1N4732A or 1N4733A) - any lower and Q2 won't be able to turn all the way on, any higher and it won't work with most microcontrollers. If your input voltage is below 10V, switch R1 for a 22k-ohm resistor, the zener diode doesn't work unless there is 10uA going through it.
After this modification, the circuit will handle 60V with the parts listed, and you can find a higher-voltage Q2 easily if needed.
Now what? Connect to a micro-controller, PWM or a computer!
now you've got a fully digital controlled high-power LED light.
The micro-controller's output pins are only rated for 5.5V usually, that's why the zener diode is important.
if your micro-controller is 3.3V or less, you need to use circuit #4, and set your micro-controller's output pin to be "open collector" - which allows the micro to pull down the pin, but lets the R1 resistor pull it up to 5V which is needed to fully turn on Q2.
if your micro is 5V, then you can use the simpler circuit #5, doing away with Z1, and set the micro's output pin to be normal pull-up/pull-down mode - the 5V micro can turn on Q2 just fine by itself .
now that you've got a PWM or micro connected, how do you make a digital light control? To change the brightness of your light, you “PWM” it: you blink it on and off rapidly (200 Hz is a good speed), and change the ratio of on-time to off-time.
This can be done with just a few lines of code in a micro-controller. to do it using just a '555' chip, try this circuit. to use that circuit get rid of M1, D3 and R2, and their Q1 is our Q2.
ok, so maybe you don't want to use a microcontroller? here's another simple modification on "circuit #1"
The simplest way to dim the LED's is to change the current set-point. so we'll change R3!
Shown below, i added R4 an a switch in parallel with R3. so with the switch open, the current is set by R3, with the switch closed, the current is set by the new value of R3 in parallel with R4 - more current. So now we've got "high power" and "low power" - perfect for a flashlight.
Perhaps you'd like to put a variable-resistor dial for R3? Unfortunately, they don't make them in such a low resistance value, so we need something a bit more o do that.
Make LED tube light RC driver, LED Bulb driver circuit life time running
High-power LED's: the future of lighting!
but... how do you use them? where do you get them?
1-watt and 3-watt Power LED's are now widely available in the $3 to $5 range, so I've been working on a bunch of projects lately that use them. In the process it was bugging me that the only options anyone talking about for driving the LED's are: (1) a resistor, or (2) a really expensive electronic gizmo. now that the LED's cost $3, it feels wrong to be paying $20 for the device to drive them!
So I went back to my "Analog Circuits 101" book, and figured out a couple of simple circuits for driving power LED's that only cost $1 or $2.
This instructable will give you a blow-by-blow of all the different circuits for powering Big types LED's, everything from resistors to switching supplies, with some tips on all of them, and of course will give much detail on my new simple Power LED driver circuits and when/how to use them (and I've got 3 other instructables so far that use these circuits). Some of this information ends up being pretty useful for small LED's too
Here's my other power-LED instructables, check those out for other notes & ideas
This article is brought to you by Monkey Electric and the Monkey Light bike light.
Step 1: Overview / Parts
There are several common methods out there for powering LED's. Why all the fuss? It boils down to this:
1) LED's are very sensitive to the voltage used to power them (ie, the current changes a lot with a small change in voltage)
2) The required voltage changes a bit when the LED is placed in hot or cold air, and also depending on the color of the LED, and manufacturing details.
so there's several common ways that LED's are usually powered, and I'll go over each one in the following steps.
Parts
This project shows several circuits for driving power LED's. for each of the circuits i've noted at the relevant step the parts that are needed including part numbers that you can find at www.digikey.com . In order to avoid much duplicated content this project only discusses specific circuits and their pros and cons. To learn more about assembly techniques and to find out LED part numbers and where you can get them (and other topics), please refer to one of my other power LED projects.
Step 2: Power LED Performance Data - Handy Reference Chart
Below are some basic parameters of the Luxeon LED's which you will use for many circuits. I use the figures from this table in several projects, so here I'm just putting them all in one place that I can reference easily.
Why not just connect your battery straight to the LED? It seems so simple! What's the problem? Can I ever do it?
The problem is reliability, consistency & robustness. As mentioned, the current through an LED is very sensitive to small changes in the voltage across the LED, and also to the ambient temperature of the LED, and also to the manufacturing variances of the LED. So when you just connect your LED to a battery you have little idea how much current is going through it. "But so what, it lit up, didn't it?". ok sure. Depending on the battery, you might have way too much current (led gets very hot and burns out fast), or too little (led is dim). The other problem is that even if the led is just right when you first connect it, if you take it to a new environment which is hotter or colder, it will either get dim or too bright and burn out, because the led is very temperature sensitive. Manufacturing variations can also cause variability.
So maybe you read all that, and you're thinking: "so what!". if so, plow ahead and connect right to the battery. for some applications it can be the way to go.
- Summary: only use this for hacks, don't expect it to be reliable or consistent, and expect to burn out some LED's along the way.
- One famous hack that puts this method to outstandingly good use is the LED Throwie.
Notes:
- If you are using a battery, this method will work best using *small* batteries, because a small battery acts like it has an internal resistor in it. This is one of the reasons the LED Throwie works so well.
- If you actually want to do this with a power-LED rather than a 3-cent LED, choose your battery voltage so that the LED will not be at full power. This is the other reason the LED Throwie works so well.
The Humble Resistor
This is by far the most widely used method to power LED's. Just connect a resistor in series with your LED(s).
pros:
- This is the simplest method that works reliably
-only has one part
- costs pennies (actually, less than a penny in quantity)
cons:
- not very efficient. you must trade off wasted power against consistent & reliable LED brightness. If you waste less power in the resistor, you get less consistent LED performance.
- must change resistor to change LED brightness
- If you change the power supply or battery voltage significantly, you need to change the resistor again.
an LED. They do it all, but thThey are pricey. what is it they "do" exactly? the switching regulator can either step-down ("buck") or step-up ("boost") the power supply input voltage to the exact voltage needed to power the LED's. Unlike a resistor it constantly monitors the LED current and adapts to keep it constant. It does all this with 80-95% power efficiency, no matter how much the step-down or step-up is.
Pros:
- LED performance for a wide range of LED's and consistent power supply
- High efficiency, usually 80-90% for boost converters and 90-95% for buck converters
- can power LED's from both lower or higher voltage supplies (step-up or step-down)
- Some units can adjust LED brightness
- Packaged units designed for power-LED's are available & easy to use
Cons:
- complex and expensive: typically about $20 for a packaged unit.
- Making your own requires several parts and electrical engineering skillz.
lets get to the new stuff!
The first set of circuits are all small variations on a super-simple constant-current source.
Pros:
- LED performance with any consistent power supply and LED's
- costs about $1
- only 4 simple parts to connect
- efficiency can be over 90% (with proper LED and power supply selection)
- can handle LOTS of power, 20 Amps or more no problem.
- low "dropout" - the input voltage can be as little as 0.6 volts higher than the output voltage.
- Super-wide operation range: between 3V and 60V input
Cons:
- must change a resistor to change LED brightness
- If poorly configured it may waste as much power as the resistor method
- you have to build it yourself (oh wait, that should be a 'pro').
- current limit changes a bit with ambient temperature (may also be a 'pro').
So to sum it up: this circuit works just as well as the step-down switching regulator, the only difference is that it doesn't guarantee 90% efficiency. On the plus side, it only costs $1.
How does it work?
- Q2 (a power NFET) is used as a variable resistor. Q2 starts out turned on by R1.
- Q1 (a small NPN) is used as an over-current sensing switch, and R3 is the "sense resistor" or "set resistor" that triggers Q1 when too much current is flowing.
- The main current flow is through the LED's, through Q2, and through R3. When too much current flows through R3, Q1 will start to turn on, which starts turning off Q2. Turning off Q2 reduces the current through the LED's and R3. So we've created a "feedback loop", which continuously monitors the LED current and keeps it exactly at the set point at all times. transistors are clever, huh!
- R1 has high resistance, so that when Q1 starts turning on, it easily overpowers R1.
- The result is that Q2 acts like a resistor, and its resistance is always perfectly set to keep the LED current correct. Any excess power is burned in Q2. Thus for maximum efficiency, we want to configure our LED string so that it is close to the power supply voltage. It will work fine if we don't do this, we'll just waste power. This is really the only downside of this circuit compared to a step-down switching regulator!
setting the current!
the value of R3 determines the set current.
Calculations:
- LED current is approximately equal to: 0.5 / R3
- R3 power: the power dissipated by the resistor is approximately: 0.25 / R3. Choose a resistor value at least 2x the power calculated so the resistor does not get burning hot.
so for 700mA LED current:
R3 = 0.5 / 0.7 = 0.71 ohms. The closest standard resistor is 0.75 ohms.
R3 power = 0.25 / 0.71 = 0.35 watts. we'll need at least a 1/2 watt rated resistor.
the only real limit to the current source circuit is imposed by NFET Q2. Q2 limits the circuit in two ways:
1) power dissipation. Q2 acts as a variable resistor, stepping down the voltage from the power supply to match the need of the LED's. so Q2 will need a heatsink if there is a high LED current or if the power source voltage is a lot higher than the LED string voltage. (Q2 power = dropped volts * LED current). Q2 can only handle 2/3 watt before you need some kind of heatsink. With a large heatsink, this circuit can handle a LOT of power & current - probably 50 watts and 20 amps with this exact transistor, but you can just put multiple transistors in parallel for more power.
2) voltage. the “G” pin on Q2 is only rated for 20V, and with this simplest circuit that will limit the input voltage to 20V (lets say 18V to be safe). If you use a different NFET, make sure to check the "Vgs" rating.
The current set-point is somewhat sensitive to temperature. This is because Q1 is the trigger, and Q1 is thermally sensitive. The part nuber i specified above is one of the least thermally sensitive NPN's i could find. Even so, expect perhaps a 30% reduction in current set point as you go from -20C to +100C. that may be a desired effect, it could save your Q2 or LED's from overheating.
These slight modifications on circuit #1 address the voltage limitation of the first circuit. we need to keep the NFET Gate (G pin) below 20V if we want to use a power source greater than 20V. It turns out we also want to do this so we can interface this circuit with a microcontroller or computer.
in circuit #2, i added R2, while in #3 i replaced R2 with Z1, a zener diode.
Circuit #3 is the best one, but i included #2 since it's a quick hack if you don't have the right value of zener diode.
we want to set the G-pin voltage to about 5 volts - use a 4.7 or 5.1 volt zener diode (such as: 1N4732A or 1N4733A) - any lower and Q2 won't be able to turn all the way on, any higher and it won't work with most microcontrollers. If your input voltage is below 10V, switch R1 for a 22k-ohm resistor, the zener diode doesn't work unless there is 10uA going through it.
After this modification, the circuit will handle 60V with the parts listed, and you can find a higher-voltage Q2 easily if needed.
Now what? Connect to a micro-controller, PWM or a computer!
now you've got a fully digital controlled high-power LED light.
The micro-controller's output pins are only rated for 5.5V usually, that's why the zener diode is important.
if your micro-controller is 3.3V or less, you need to use circuit #4, and set your micro-controller's output pin to be "open collector" - which allows the micro to pull down the pin, but lets the R1 resistor pull it up to 5V which is needed to fully turn on Q2.
if your micro is 5V, then you can use the simpler circuit #5, doing away with Z1, and set the micro's output pin to be normal pull-up/pull-down mode - the 5V micro can turn on Q2 just fine by itself .
now that you've got a PWM or micro connected, how do you make a digital light control? To change the brightness of your light, you “PWM” it: you blink it on and off rapidly (200 Hz is a good speed), and change the ratio of on-time to off-time.
This can be done with just a few lines of code in a micro-controller. to do it using just a '555' chip, try this circuit. to use that circuit get rid of M1, D3 and R2, and their Q1 is our Q2.
ok, so maybe you don't want to use a microcontroller? here's another simple modification on "circuit #1"
The simplest way to dim the LED's is to change the current set-point. so we'll change R3!
Shown below, i added R4 an a switch in parallel with R3. so with the switch open, the current is set by R3, with the switch closed, the current is set by the new value of R3 in parallel with R4 - more current. So now we've got "high power" and "low power" - perfect for a flashlight.
Perhaps you'd like to put a variable-resistor dial for R3? Unfortunately, they don't make them in such a low resistance value, so we need something a bit more o do that.
No comments:
Post a Comment