MB10F Rectifier Se Led driver banaye || How to make LED driver use MB10F | 3W 6W 9W 12W 16W
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
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.
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.
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.
Luxeon 1 and 3 with no current (turn-off-point):
white/blue/green/cyan: 2.4V drop (= "LED forward voltage")
red/orange/amber: 1.8V drop
Luxeon-1 with 300mA current:
white/blue/green/cyan: 3.3V drop (= "LED forward voltage")
red/orange/amber: 2.7V drop
Luxeon-1 with 800mA current (over spec):
All colors: 3.8V drop
Direct Power!
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.
- 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).
- This is the simplest method that works reliably
-only has one part
- costs pennies (actually, less than a penny in quantity)
- 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 or to change LED brightness
- If you change the power supply or battery voltage significantly, you need to change the resistor again.
There are a lot of great web pages out there already explaining this method. Typically you want to figure out:
- what value of resistor to use
- How to connect your LED's in series or parallel
There's two good "LED Calculators" I found that will let you just enter the specs on your LED's and power supply, and they will design the complete series/parallel circuit and resistors for you!
If you are using the resistor method with power LED's, you'll quickly want to get a lot of cheap power resistors! Here's some cheap ones from digikey: "Yageo SQP500JB" are a 5-watt resistor series.
$witching Regulators
Switching regulators, aka "DC-to-DC", "buck" or "boost" converters, are the fancy way to power an LED. They do it all, but they 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.
One off-the-shelf device designed specifically for power-led's is the Buckpuck from LED Dynamics. I used one of these in my power-led headlamp project and was quite happy with it. These devices are available from most of the LED web stores.
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!
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.
thermal sensitivity:
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 complicated to do that.
This circuit lets you have an adjustable-brightness, but without using a microcontroller. It's fully analog! It costs a little more - about $2 or $2.50 total - I hope you won't mind.
The main difference is that the NFET is replaced with a voltage regulator. The voltage regulator steps-down the input voltage much like the NFET did, but it is designed so that its output voltage is set by the ratio between two resistors (R2+R4, and R1).
The current-limit circuit works the same way as before, in this case it reduces the resistance across R2, lowering the output of the voltage regulator.
This circuit lets you set the voltage on the LED's to any value using a dial or slider, but it also limits the LED current as before so you can't turn the dial past the safe point.
I used this circuit in my RGB Color Controlled Room/Spot lighting project.
please see theAbove project for part numbers and resistor value selection.
This circuit can operate with an input voltage from 5V to 28V, and up to 5 amps current (with a heatsink on the regulator)
ok, so it turns out there's an even simpler way to make a constant-current source. the reason i didn't put it first is that it has at least one significant drawback too.
This one doesn't use an NFET or NPN transistor, it just has a single Voltage Regulator.
Compared to the previous "simple current source" using two transistors, this circuit has:
- even fewer parts.
- much higher "dropout" of 2.4V, which will significantly reduce efficiency when powering only 1 LED. If you're powering a string of 5 LED's, perhaps not such a big deal.
- No change in current set-point when temperature changes
- less current capacity (5 amps - still enough for a lot of LED's)
how to use it:
Resistor R3 sets the current. the formula is: LED current in amps = 1.25 / R3
so for a current of 550mA, set R3 to 2.2 ohms
you'll need a power resistor usually, R3 power in watts = 1.56 / R3
This circuit also has the drawback that the only way to use it with a micro-controller or PWM is to turn the entire thing on and off with a power FET.
and the only way to change the LED brightness is to change R3, so refer to the earlier schematic for "circuit #5" which shows adding a low/high power switch in.
regulator pinout:
ADJ = pin 1
OUT = pin 2
IN = pin 3
Regulator: either LD1585CV or LM1084IT-ADJ
capacitor: 10u to 100u capacitor, 6.3 volt or greater (such as: Panasonic ECA-1VHG470)
resistor: a 2-watt resistor minimum (such as: Panasonic ERX-2J series)
You can build this with pretty much any linear voltage regulator, the two listed have a good general performance and price. The classic "LM317" is cheap, but the dropout is even higher - 3.5 volts total in this mode. There are now a lot of surface mount regulators with ultra-low dropouts for low current use, if you need to power 1 LED from a battery these can be worth looking into.
Haha! There's an Even Easier Way!
I'm embarrassed to say I did not think of this method myself, I learned of it when I disassembled a flashlight that had a high brightnesss LED inside it.
Put a PTC resistor (aka a “PTC resettable fuse”) in series with your LED. wow. It doesn't get easier than that.
ok. Although simple, this method has some drawbacks:
- Your driving voltage can only be slightly higher than the LED “on” voltage. This is because PTC fuses are not designed for getting rid of a lot of heat so you need to keep the dropped voltage across the PTC fairly low. You can glue your ptc to a metal plate to help a bit.
-You won't be able to drive your LED at its maximum power. PTC fuses do not have a very accurate “trip” current. Typically they vary by a factor of 2 from the rated trip point. So, if you have a LED that needs 500mA, and you get a PTC rated at 500mA, you will end up with anywhere from 500mA to 1000mA - not safe for the LED. The only safe choice of PTC is a bit under-rated. Get the 250mA PTC, then your worst case is 500mA which the LED can handle. For a single LED rated about 3.4V and 500mA. Connect in series with a PTC rated about 250 mA. Driving voltage should be about 4.0V.
MB10F Rectifier Se Led driver banaye || How to make LED driver use MB10F | 3W 6W 9W 12W 16W
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
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.
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.
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.
Luxeon 1 and 3 with no current (turn-off-point):
white/blue/green/cyan: 2.4V drop (= "LED forward voltage")
red/orange/amber: 1.8V drop
Luxeon-1 with 300mA current:
white/blue/green/cyan: 3.3V drop (= "LED forward voltage")
red/orange/amber: 2.7V drop
Luxeon-1 with 800mA current (over spec):
All colors: 3.8V drop
Direct Power!
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.
- 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).
- This is the simplest method that works reliably
-only has one part
- costs pennies (actually, less than a penny in quantity)
- 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 or to change LED brightness
- If you change the power supply or battery voltage significantly, you need to change the resistor again.
There are a lot of great web pages out there already explaining this method. Typically you want to figure out:
- what value of resistor to use
- How to connect your LED's in series or parallel
There's two good "LED Calculators" I found that will let you just enter the specs on your LED's and power supply, and they will design the complete series/parallel circuit and resistors for you!
If you are using the resistor method with power LED's, you'll quickly want to get a lot of cheap power resistors! Here's some cheap ones from digikey: "Yageo SQP500JB" are a 5-watt resistor series.
$witching Regulators
Switching regulators, aka "DC-to-DC", "buck" or "boost" converters, are the fancy way to power an LED. They do it all, but they 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.
One off-the-shelf device designed specifically for power-led's is the Buckpuck from LED Dynamics. I used one of these in my power-led headlamp project and was quite happy with it. These devices are available from most of the LED web stores.
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!
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.
thermal sensitivity:
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 complicated to do that.
This circuit lets you have an adjustable-brightness, but without using a microcontroller. It's fully analog! It costs a little more - about $2 or $2.50 total - I hope you won't mind.
The main difference is that the NFET is replaced with a voltage regulator. The voltage regulator steps-down the input voltage much like the NFET did, but it is designed so that its output voltage is set by the ratio between two resistors (R2+R4, and R1).
The current-limit circuit works the same way as before, in this case it reduces the resistance across R2, lowering the output of the voltage regulator.
This circuit lets you set the voltage on the LED's to any value using a dial or slider, but it also limits the LED current as before so you can't turn the dial past the safe point.
I used this circuit in my RGB Color Controlled Room/Spot lighting project.
please see theAbove project for part numbers and resistor value selection.
This circuit can operate with an input voltage from 5V to 28V, and up to 5 amps current (with a heatsink on the regulator)
ok, so it turns out there's an even simpler way to make a constant-current source. the reason i didn't put it first is that it has at least one significant drawback too.
This one doesn't use an NFET or NPN transistor, it just has a single Voltage Regulator.
Compared to the previous "simple current source" using two transistors, this circuit has:
- even fewer parts.
- much higher "dropout" of 2.4V, which will significantly reduce efficiency when powering only 1 LED. If you're powering a string of 5 LED's, perhaps not such a big deal.
- No change in current set-point when temperature changes
- less current capacity (5 amps - still enough for a lot of LED's)
how to use it:
Resistor R3 sets the current. the formula is: LED current in amps = 1.25 / R3
so for a current of 550mA, set R3 to 2.2 ohms
you'll need a power resistor usually, R3 power in watts = 1.56 / R3
This circuit also has the drawback that the only way to use it with a micro-controller or PWM is to turn the entire thing on and off with a power FET.
and the only way to change the LED brightness is to change R3, so refer to the earlier schematic for "circuit #5" which shows adding a low/high power switch in.
regulator pinout:
ADJ = pin 1
OUT = pin 2
IN = pin 3
Regulator: either LD1585CV or LM1084IT-ADJ
capacitor: 10u to 100u capacitor, 6.3 volt or greater (such as: Panasonic ECA-1VHG470)
resistor: a 2-watt resistor minimum (such as: Panasonic ERX-2J series)
You can build this with pretty much any linear voltage regulator, the two listed have a good general performance and price. The classic "LM317" is cheap, but the dropout is even higher - 3.5 volts total in this mode. There are now a lot of surface mount regulators with ultra-low dropouts for low current use, if you need to power 1 LED from a battery these can be worth looking into.
Haha! There's an Even Easier Way!
I'm embarrassed to say I did not think of this method myself, I learned of it when I disassembled a flashlight that had a high brightnesss LED inside it.
Put a PTC resistor (aka a “PTC resettable fuse”) in series with your LED. wow. It doesn't get easier than that.
ok. Although simple, this method has some drawbacks:
- Your driving voltage can only be slightly higher than the LED “on” voltage. This is because PTC fuses are not designed for getting rid of a lot of heat so you need to keep the dropped voltage across the PTC fairly low. You can glue your ptc to a metal plate to help a bit.
-You won't be able to drive your LED at its maximum power. PTC fuses do not have a very accurate “trip” current. Typically they vary by a factor of 2 from the rated trip point. So, if you have a LED that needs 500mA, and you get a PTC rated at 500mA, you will end up with anywhere from 500mA to 1000mA - not safe for the LED. The only safe choice of PTC is a bit under-rated. Get the 250mA PTC, then your worst case is 500mA which the LED can handle. For a single LED rated about 3.4V and 500mA. Connect in series with a PTC rated about 250 mA. Driving voltage should be about 4.0V.
No comments:
Post a Comment