Home     Contact     Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science     RSS     Terms of services     Privacy policy  
   
 Home      Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science   



LED driving and controlling methodsAuthor
Giorgos Lazaridis
February 5, 2012

PAGE 2 of 6 - Single Transistor Constant Current Driver


Single Transistor Constant Current Driver

Before we begin let me inform you that i have upload an on-line calculator to speed-up your calculations for this circuit. You will find this calculator in the Dr.Calculus section of my site in this link.

Let's see some transistor theory... The following analysis is explained in details in my Transistor Theory page. You may wanna read this to have a better idea in the transistor operation. The circuit that we will use is a Common Emitter amplifier with voltage divider biasing and emitter feedback resistor.




From the theory we know that the base voltage VBof the transistor depends on the values of the resistors R1 and R2 which perform a voltage divider.


VB = VDD x R2 / ( R1 + R2 )


The voltage on the emitter is calculated by subtracting the VBE voltage from the base voltage. A typical value for VBE for silicon transistors is about 0.7 volts:


VE = VB - VBE


The emitter current can be calculated with the Ohm's law:


IE = VE / RE



Finally, from the transistor theory we know that IC is almost equal to IE. From this quick analysis we come to the conclusion that the current through the load (LED) is constant and it equals to:


IC = IE = VE / RE = ( VB - VBE ) / RE


Circuit Considerations: The circuit works well for low current applications, but things get tougher as current increases. First of all, the resistor RE must be properly selected to avoid excessive power dissipation. The amount of power that will be dissipated onto this resistor is calculated as follows:


PRE = I2C x RE


Small resistor values should be selected, between 1 and 220 Ohms. But this brings up another problem: Transistor are temperature-sensitive devices. The current IC increases with temperature. RE provides a small feedback compensation, but since it is very small this compensation is usually inefficient. Another consideration is the power that the transistor is put to dissipate. From the Kirchhoff's law we can calculate the VCE voltage:


VCE = VDD - VF_LED - VE


Now we can calculate the power dissipation on the transistor:


PT = VCE x IC


Finally, one more consideration is the current amplification of the transistor. Since there is no AC voltage applied, we only need the DC equivalent to do the analysis. The current through the base must be sufficient to provide enough current for the LED. So, for the worst case scenario (lowest hfe for biggest IC current), we can calculate the minimum IB:


IB_Min = IC / hfe_min


The voltage divider must be either firm or stiff. This means that the base current must be 10 or 100 times smaller than the current through the voltage divider. The current through the voltage divider is:


IVD = Vdd / (R1+R2)


So the condition is that IB_Min < 0.01 x IVD (or 0.1 for firm). If this condition is true, then the circuit will work properly.




An Example

This example made on a breadboard for test

Suppose that we want to control an LED that draws 20mA at 3.3 volts. We will use 12 Volts supply. First i will estimate the RE with an educative guess. From experience i choose RE = 47 Ohm. The power that will be dissipated on this resistor is:


PRE = I2C x RE => PRE = 0.022 x 47 = 18.8mW


A 1/4W resistor is more than enough for this application. To achieve IC current of 20mA, the VE must be:


VB = IC x RE => VB = 20mA x 47 Ohm => VB = 940 mV


Therefore, the base voltage must be 0.94 + 0.7 = 1.64 Volts. Then, i use my on-line Voltage Divider Calculator to estimate a proper pair of R1-R2 resistors to get 1.64 Volts fro 12 Volts. After some trial-and-error, i decided to use R1=9.47 KOhms and R2 = 1 KOhms.

Let's test the current condition now for a firm voltage divider (x10). Suppose that we use the 2N2222 transistor which has minimum hfe of 100. The minimum IB must be 20mA / 100 = 0.2mA. The current through the voltage divider is:


IVD = 12/(9470+1000) = 1.14 mA. The condition states that the base current must be 10 times smaller than this current, or else:


0.2 x 10 < 1.14 => 2 < 1.14 which is FALSE. So, we scale down both R1 and R2 by a factor of 10 and re-try:


R1 = 4735 Ohms
R2 = 750 Ohms
IVD = 12 / 1150 = 2.188 mA


The previous condition is now TRUE, since 2 < 2.188. The closest values are R1=4.7K and R2=680 Ohm.


 
The circuit regulates the current of the LED at 19.8 mAmps. For this current, the voltage across the LED is 3.2 Volts. If another LED is placed instead, the same current will appear but the voltage may be different.
 



We need to make sure that the power dissipation on the transistor will not exceed the maximum rating (500mW). First we calculate the VCE:

VCE = VDD - Vf_LED - VE = 12 - 3.2 - 0.94 = 7.86 Volts

PT = VCE x IC = 7.86 x 0.0198 = 155.6 mW

So, the circuit can operate normally without the smell of the toasting transistor. As for RE:

PRE = I2C x RE = 0.01982 x 47 = 18.4mW


ADVANTAGES:
  • It can handle higher power than a simple resistor - Depends on the transistor ratings, package and cooling.
  • Still it is cheap and simple
  • LED current is regulated regardless of the LED voltage



  • DISADVANTAGES:
  • Not very efficient since a lot of power is lost across the transistor
  • Unstable - A small change on the supply voltage will cause a large change on the LED current, since the base voltage from the voltage divider changes.
  • Any temperature change in the transistor package will result in output current change











  • Continue reading. Click here to go to the next page >>>.
     OR click here to view the presentation.



    Comments

      Name

      Email (shall not be published)

      Website

    Notify me of new posts via email


    Write your comments below:
    BEFORE you post a comment: Long comments or comments of general interest are NOT to be posted here. Please use the forum instead. You will receive a reply much faster.


          

  • At 14 September 2014, 15:15:54 user Kothandapani wrote:   [reply @ Kothandapani]
    • please send some notes of led and led driver then and there

      thanks for services

      truly yours,
      kothandapani


  • At 3 September 2014, 6:03:09 user duncan wrote:   [reply @ duncan]
    • Just wanted to say thanks for sharing. Your presentations are very clear and informative.


  • At 2 August 2014, 2:56:09 user Ancel wrote:   [reply @ Ancel]
    • @Giorgos Lazaridis Hi, I'd like to create a 7 segment constant current driver using these transistors. Is there a way to use a single resistor current reference or will I need one for each segment?


  • At 6 May 2014, 7:44:48 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @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.


  • At 20 April 2014, 16:23:39 user oliver wrote:   [reply @ oliver]
    • @Giorgos Lazaridis

      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?


  • At 18 April 2014, 10:51:40 user MaxiD wrote:   [reply @ MaxiD]
    • I can put another transistor that controls the gnd bjt transistor for use with pwm?


  • At 22 March 2014, 16:13:13 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @Leon Not quite sure, sorry


  • At 18 March 2014, 19:55:22 user Leon wrote:   [reply @ Leon]
    • can we apply this to operate a laser diode?


  • At 2 February 2014, 9:34:02 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @karthikeyan check out the datasheet of the LED, this is where you find the info


  • At 2 February 2014, 9:28:06 user karthikeyan wrote:   [reply @ karthikeyan]
    • dear sir can you send to my email about ampere and voltage of one led


  • At 27 December 2013, 5:21:45 user thiru wrote:   [reply @ thiru]
    • VR voltage 230vAc and LED voltage is 15vAc now resistor value? so please send the formula as soon as possible.


  • At 14 December 2013, 23:58:32 user fabelizer wrote:   [reply @ fabelizer]
    • Very helpful! Thanks for all your work!


  • At 14 October 2013, 19:14:30 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @yony Simply provide PWM pulses to the proper PWM input of the circuits is the easiest way. Foe more sophisticated solutions you have to do the research yourself


  • At 14 October 2013, 13:44:32 user yony wrote:   [reply @ yony]
    • 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).
      Thank you


  • At 16 June 2013, 8:03:14 user jai ochani wrote:   [reply @ jai ochani]
    • please advice me the circuit diagrm for 12v out put, 2Amp led driver.


  • At 14 February 2013, 17:14:10 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @shamim get a n-channel


  • At 11 February 2013, 11:46:22 user shamim wrote:   [reply @ shamim]
    • we wanted to drive a LED using Mosfet. what Mosfet to use???


  • At 16 January 2013, 15:39:39 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @Ian for 90% efficiency you will need other type of circuits, not a linear driver. An SMPS instead


  • At 14 January 2013, 13:22:32 user Ian wrote:   [reply @ Ian]
    • Hi Giorgos,

      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?

      Thank you, Ian


  • At 14 January 2013, 9:17:48 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @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?


  • At 11 January 2013, 17:49:19 user Ian wrote:   [reply @ Ian]
    • 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


  • At 7 January 2013, 5:34:43 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @Ian I put the scale of the multimeter to amperes and connected it in series with the LED


  • At 6 January 2013, 22:01:19 user Ian wrote:   [reply @ Ian]
    • Hello Giorgos, Could you tell me how you measured the current through the LEDs as shown in your photos please? Thank you, Ian


  • At 3 January 2013, 8:41:11 user adithyan wrote:   [reply @ adithyan]
    • 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


  • At 2 October 2012, 15:17:29 user Ajay wrote:   [reply @ Ajay]
    • Pls. give detail related to LED Driver Design.

      Regards
      Ajay


  • At 28 September 2012, 18:38:22 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @kwstas there is no "specific" number. I would not go above 3.3 volts though, just to maintain the power dissipation on the emitter resistor low.


  • At 27 September 2012, 7:44:27 user kwstas wrote:   [reply @ kwstas]
    • @Giorgos Lazaridis Thank you very much but i'm asking about the zener diodes..


  • At 26 September 2012, 17:48:15 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @kwstas same diodes (1n4001 if i remember well or similar)


  • At 26 September 2012, 17:15:07 user kwstas wrote:   [reply @ kwstas]
    • I would like to tell me what diodes did you use for the 1w Led.
      Thank you


  • At 9 March 2012, 8:53:16 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @Ghlargh although i plan to use such drivers, i will not go into details.


  • At 9 March 2012, 8:46:17 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @Alvie it is the most stable of all. i tried it with 10w led. i prepare video for this.


  • At 9 March 2012, 7:46:04 user Ghlargh wrote:   [reply @ Ghlargh]
    • You should, if possible, explain how multiple constant current drivers with a single reference resistor work. Such as the Allegro A6282


  • At 8 March 2012, 22:13:28 user Alvie wrote:   [reply @ Alvie]
    • Regarding the BJT MosFET circuit:

      Can you prove it's stability ? Just by looking at the diagram I think it might oscillate, eventually at high frequencies, and eventually amplify the thermal noise.


  • At 7 March 2012, 20:10:23 user Daniel wrote:   [reply @ Daniel]
    • hey you should take a look at how leds could be used as sensors(ldrs)
      http://www.instructables.com/id/Light-Sensing-LEDs/


  • At 26 February 2012, 6:32:30 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @Lupin Thank you very much for pinpointing those mistakes. You are right for both. The first one is already corrected, as for the second i will recompile the video. Thanks for noticing it soon.


  • At 25 February 2012, 22:54:05 user Lupin wrote:   [reply @ Lupin]
    • 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.





    delicious
    digg
    reddit this Reddit this
    Faves



     HOT in heaven!


    NEW in heaven!



    New Project: Lab Power Supply 0-20V 10mA-2A



     Contact     Forum     Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science     RSS   

    Site design: Giorgos Lazaridis
    © Copyright 2008
    Please read the Terms of services and the Privacy policy