Intro: Simple Power LED Linear Current Regulator, Revised & Clarified
This Instructable is essentially a repeat of Dan's linear current regulator circuit. His version is very good, of course, but lacks something in the way of clarity. This is my attempt to address that. If you understand and can built Dan's version, my version will probably not tell you anything terribly new. However...
...While assembling my own regulator based on Dan's, I kept looking at his photographs of the components and squinting— which pin connects to which other pin?? Is this connected to that or not? It's a simple circuit, of course, but I am not an electrical engineer and I did not want to get it wrong... Because getting it wrong, even a little, sometimes causes things to immolate.
I have added a component: a switch between the positive lead of the DC power supply and the rest of the circuit so that I can turn it on and off. No reason to exclude it, and it is very handy.
I should also note here at the beginning: whatever "Dan's" claims may be to the contrary, this circuit is NOT ultimately well-suited for driving an LED from a power supply that is significantly above the voltage drop of the LED. I have tried driving a single 3.2V blue LED at 140 mAh (tested current was actually 133 mAh— very close) from a power supply rated for 9.5 volts and the end result was that within 60 seconds, the LED began to flicker and then eventually shut off... It did this several times with ever-decreasing periods of time between turn-on and failure. Now it will not turn on at all. Having said that, I have also driven a single RGB high power LED almost continuously for a month now using a different power supply that more closely matches the voltage drop of the LED— so this circuit can work, sort of, but not always, certainly not as originally promised, and may very well ruin your power LED along the way. The voice of experience here says that it will work as long as the demands of your LEDs closely match the power in volts coming from your power supply. If you notice flicker, that means the LED(s) is/are burning out and is/are already permanently damaged. It has taken me six destroyed power LEDs to figure this out. "Many Bothans died to bring us this information..."
Here is Dan's supply list of components, word for word but corrected for the first item (Dan had mistakenly given the product number of a 10K ohm resistor, not a 100K ohm— the list now shows a number for the correct type). I have also added links to the actual products mentioned:
R1: approximately 100k-ohm resistor (such as: Yageo FMP100JR-52-100K )
R3: current set resistor - see below
Q1: small NPN transistor (such as: Fairchild 2N5088BU)
Q2: large N-channel FET (such as: Fairchild FQP50N06L)
LED: power LED (such as: Luxeon 1-watt white star LXHL-MWEC)
The switch component, S1, should be rated to the voltage of the DC power supply you are going to use. A 12V switch, for example, will not be designed to handle 18V of power.
Note that Q2 is also called a MOSFET, an nMOSFET, an NMOS, an n-channel MOSFET, and an n-channel QFET MOSFET interchangeably, Q1 is also called an NPN bipolar junction transistor or NPN BJT.
Dan does not go into what "approximately" means, nor does he explain how far afield you can go or what this will affect; neither does he explain "small" or "large" and the effects they might have. Sadly, neither can I. It seems we are stuck adhering to these specific components unless we get a degree in electrical engineering. Especially given the delicacy of the LED involved, strict adherence seems the only reasonable option.
According to Dan, the value for R3 in ohms needs to be related to the current at which you wish to drive your LED (the limits of which will have been already set by the manufacturer) such that your desired current in amps=0.5/R3. In this way, an R3 of 5 ohms will produce a constant current of 0.5/5=0.1 amps or 100 miliamps. A large proportion of power LEDs seem to run around 350 mAh, so for these you will need to establish an R3 value of right around 1.5 ohms. For those less familiar with resistors, keep in mind that you can establish that 1.5 ohms by using a combination of different resistors in parallel, so long as your final combined result is 1.5 ohm of resistance. If using two resistors, for example, your R3 value will be equal to the value of resistor 1 multiplied by the value of resistor 2, and the product divided by the total of R1+R2. Another example: 1 resistor of 5 ohms combined in parallel with another of, say, 3 ohms, gives you (5x3)/(5+3)=15/8=1.875 ohms which would then result in a constant current in this circuit of 0.5/1.875=0.226 amps or 266 mAh.
Resistors are rated for different abilities to dissipate power. Small resistors can dissipate less power than larger ones because larger ones won't incinerate as quickly if too much current is run through them. You cannot use a surface mounted resistor in this circuit because it cannot handle the power dissipation. Also, you will not be able to find a resistor which is "too big." Bigger/ Physically larger resistors are just able to handle more power than smaller ones. Bigger ones may cost more to obtain, and will take up more space, but the cost is usually negligible (every broken stereo has a hundred resistors in it with huge power ratings) and the difference in space is on the order of cubic millimeters, so feel free to err on the side of caution and use the biggest resistors of suitable resistance that you can find. You can select one too small, but it is impossible to select one too large.
Regarding heat sinks:
Dan also mentions the possible importance of heat sinks for this project, and the need for an external DC power supply of between 4 and 18 volts (apparently amps do not matter for this power supply, though I do not know this for certain). If you are operating a power LED, you will need some kind of heat sink attached to it, and will probably need one beyond the scope of the simple aluminum batwing "star" provided with many Luxeon LEDs. You will only need a heat sink for Q2 if you are running more than 200 mAh of power through your circuit and/ or the voltage difference between your DC power supply and the combined voltage "drop" of your LEDs is "large" (if the difference is more than 2 volts, I would be sure to use a heat sink). The most efficient use of any heat sink also requires the use of a tiny amount of thermal grease (Arctic Silver is considered a high end product): clean both the heat sink and the body of the MOSFET/ LED with alcohol, smear a smooth, even, THIN layer of thermal grease over each surface (I like to use an X-acto knife blade for the absolutely smoothest, most even, thinnest results), then press the surfaces together and secure using one or more screws in the appropriate place. Alternatively, there are several kinds of thermal tape which will also serve this same purpose.
Here are some suitable options for a heat sink and power supply for a typical single-LED set-up (remember, you may need TWO heat sinks— one for the LED and one for the MOSFET— in many setups):
Regarding power supplies:
Quick note with regard to power supplies: virtually all power supplies state somewhere on their packaging how many volts they will and amps they can deliver. However, the number of volts is nearly universally understated and virtually all power supplies actually deliver some amount of voltage greater than that indicated on their packaging. For this reason, it will be important to test any given power supply that claims to deliver volts near the upper end of our spectrum (i.e., near 18 volts) to make sure it isn't actually delivering too much power (25 volts would likely exceed the design limitations of our circuit). Fortunately, because of the nature of the circuit, this overstatement of voltage will not typically be a problem as the circuit can manage a wide range of voltages without damaging the LED(s).
Step 1: Create the Heat Sink(s)
If you will be in need of a heat sink for your Q2, you may need to drill a hole in that heat sink in order to run a screw through the large hole in the MOSFET's body. There is no need for an exact screw as long as your screw is able to fit through the MOSFET hole, the head of the screw is larger (only slightly) than this hole, and the diameter of the hole you create in the heat sink is not much smaller than the diameter of the cylinder of the screw. Generally, if you use a drill bit whose diameter is close to but slightly smaller than your screw's cylinder diameter, you will have no difficulty attaching the MOSFET to the heat sink. The threads on most steel screws are more than strong enough to cut into a heat sink (provided it is aluminum or copper) and thereby "create" the necessary threaded hole. Drilling into aluminum should be done with a few drops of very thin machine oil on the tip of the bit (such as 3-in-One or a sewing machine oil) and the drill pressed down with gentle firm pressure at around 600 rpms and 115 in-lbs of torque (this Black & Decker drill or something similar will work well). Be careful: this will be a very small, shallow hole and your very thin drill bit may break if too much pressure is applied to it for too long!
Note well: the "body" of Q2 is electrically connected to the "source" pin of Q2— if anything in your circuit touches this heat sink other than the MOSFET's body, you may create an electrical short which could blow your LED. Consider covering the side of the heat sink facing your wires with a layer of electrical tape to prevent this from happening (but do not encase the heat sink with any more of this than necessary, since its purpose is to move heat from the MOSFET to the surrounding air-- electrical tape is an insulator, not a conductor, of thermal energy).
Step 2: The Circuit
Step 3: Turn It On: Troubleshoot If Necessary
Once the heat sink(s) are attached and your solder joints are all firm and you are certain that your LED(s) is(are) oriented correctly and you have connected the correct leads to the correct wires, it is time to plug in the DC power supply and flip the switch!
At this point, one of three things is likely to happen: the LED(s) will light up as expected, the LED(s) will briefly flash brightly and then go dark, or nothing will happen at all. If you get the first of these outcomes, congratulations! You now have a working circuit! May it last you a very long time. If you get outcome #2, then you have just blown your LED(s) and will need to start over with brand new ones (and you will need to re-evaluate your circuit and figure out where you went wrong, probably by either connecting a wire incorrectly or letting 2 wires cross which you should not have). If you get outcome #3, then there is something wrong with your circuit. Switch it off, unplug the DC power supply, and go over your circuit connection-by-connection making sure you are attaching each lead correctly and that your LEDs are all oriented correctly within the circuit. Also, consider double checking the known miliamp value of your LED(s) and making sure that the value you have chosen and are using for R3 will provide enough current to drive it/ them. Double check the value of R1 and make sure it is 100k ohms. Finally, you can test Q1 and Q2, but the methods for doing this are beyond the scope of this Instructable.
Again: the most likely reasons for no light appearing are these:
1.) your LEDs are not oriented correctly— check their orientation using the multimeter and re-orient them if necessary
2.) you have a loose solder joint somewhere in your circuit— take a soldering iron and re-solder any connections that might be loose
3.) you have a crossed wire somewhere in your circuit— check all wires for shorts and separate any that might be touching
4.) your R3 is of too high a value to allow the LED(s) to operate— consider replacing it with a resistor of lower resistance
5.) your switch is failing to close the circuit— test with the multimeter and fix or replace it
6.) you have previously damaged the LED(s) or one of the other components in the diagram by either:
a.) failing to use adequately large resistors (i.e., a resistor of sufficient wattage— R3 should be at least a .25 watt resistor) or a sufficiently large heat sink for Q2 or for your LED(s) (both Q2 and your LEDs are quickly subject to potential thermal damage if not connected to heat sinks before you turn the circuit on), or;
b.) crossing wires and accidentally damaging your LED(s) (this is usually accompanied by a puff of smelly smoke)
7.) you are using a Q1 or Q2 that is not correct for this circuit. No other types of resistor are known compatible replacements for these two components— if you attempt to create this circuit from other types of transistors, you should expect the circuit not to work.
I wish I could answer technical questions regarding the construction of LED circuits and drivers, but as I have said before, I am not an expert and most of what you see here was already covered in another Instructable written by someone who knows more about this process than I do. Hopefully what I have given you here is at least clearer and more explicit than other similar Instructables available on this site. Good luck!