I decided to write this quick tutorial for two reasons: First because there are many people who would like to know more about driving and controlling LED lights, and second because i was provided an excellent LED driver chip from Farnell for test, and i wanted to put it under the microscope. So i will place this chip against some other LED drivers to see how good it is.
The chip that I'm talking about is the A6210 from Allegro Microsystems. It is a Buck-Regulating LED Driver able to drive up to 3A load with constant current, with switching frequencies up to 2 MHz and supply voltage from 9 to 46 volts. It has an optional PWM input to control the brightness of the LED. The sense voltage is down to 0.18 volts for higher efficiency.
The previous description may sound Greek to you, but after reading this tutorial you will be able to design your own LED driver. Special thanks to Farnell and Element14 for offering three of these chips for test.
There seems to be an inconsistency in your measured values.
The sum of the voltmeter readings should be around 11.3V 0.7 for Rs = 12V for Vdd.
The actual values in the first picture is:
Vdd = 3.36V 8.03V 0.7V = 12.06V Correct.
The value for the second picture is:
Vdd = 3.36V 4.43V 0.7V = 8.49V Which is wrong. It should have been 12V.
Two errors is visible. a) the Vled would be higher in the second instance most probably at 3.5-3.6V while the Vfet should be the difference. You cant loose voltage in a circuit. It must be somewhere and we know it is not on Rs as the transistor will keep it at 0.7V,
I know most all of your suggestions talk about how the resister is a loss of power. If one was to use a buck converter to step the V down to 3.2, what option would be best to limit current to 1w LED's.
@oliver You can connect the output of the arduino at an open-collector transistor circuit. Say a 1K resistor goes to the base of an NPN, the emitter goes to the ground and the collector goes to the input of this circuit. It will provide enough sink current.
Thanks for the great tutorials. With the transistor-MOSFET driver, when connecting an Arduino PWM pin, only half the current is flowing through the LED, even at 100% duty cycle. I assume this PWM is not sinking current? How to connect an arduino (or any microcontroller PWM output) properly?
Can you please show how can these circuits be incorporated with a microcontroller?
I'm in a search for an efficient way to drive a 1 watt LED via Arduino (right now I'm using a non-efficient way to do this with a TIP120 transistor and 2 resistors which one of them needs to be at least 1 watt resistor).
I'm wishing to use currents between 10mA and 1A depending upon the type of LED connected. I'd like the efficiency to be 90% plus if possible. I've seen Rds(on) values as low as 0.021 ohm, which I'd guess would translate into less power losses?
I'm guessing that from a 5v PIC micro that a logic level mosfet is the only way to go as opposed to a normal mosfet?
@Ian depends on the current and your efficiency requirements. Typically, on resistance of mosfets is very low. In many cases it is lower than 1Ohm (not high current mosfets). What current requirements you have? More than 1 amp?
Hi Giorgos, Thank you for your help with current measurement. Can you also tell me in the selection of a power MOSFET if Rds(on) should be as low as possible or doesn't it matter? I'm presuming the MOSFET is operating in saturation mode or would be if PWM was applied to the gate? Thank you, Ian
Circuits are plenty for pwm control of led brightness. It is agreed that there cannot be a linear control of led brightness. Assuming that the pwm controls applied and the led current exceeds the 20ma limit in case of 4mm and 5mm Leds and 350ma in one watt, how a feed back control either shuts off the led or keeps the led current at maximum is yet to be published
Just wanted to mention, tha in the example it seems you forgot to subtract V_Z in the calculation of I_RB_MAX.
On the other hand, I got an issue on how you calculated P_RB in the video (around 5:50). You added the base current to I_RB_MAX. Isn't that already included?
Still many thanks for all the explanations and videos! I'm teaching a beginners electronics course (diodes, transistors, opamps) next semester at uni. Teaching applications, when you got to do theory first always falls short. I guess I'll refer some students to your page if they want to know more.