Connect with us

Current limiting for transistor base

Discussion in 'General Electronics Discussion' started by Yoshidk, Jan 23, 2013.

Scroll to continue with content
  1. Yoshidk


    Jan 23, 2013
    Hello everyone

    I have a circuit where my µC (ATmega16) triggers a transistor (ULN2001) to open for a LED
    I know i need a resistor between the ATmega16 output and transistor base to limit the current, but i cant figure out which resistor value would be best?
    I guess too low would waste power, and too high might kill the signal..

    I made a simple drawing of the setup here:

  2. Harald Kapp

    Harald Kapp Moderator Moderator

    Nov 17, 2011
    Ibase= Iled/beta.
    Iled~10.4V/330 Ohm = 30mA (assuming red LED with Vf~1.6V)
    beta ~60 (from the transistor datasheet for Ic=50mA)
    => Ibase= 500µA
    Ibase= (Vh(cpu)-Vbe)/R2.
    Vh = 4.5V (the ATmega should be able to deliver that voltage worst case at Vcc=5V and 500µA)
    Vbe = 0.6V
    => R2=3.9V/500µA = 7800 Ohm.

    To ensure that the transistor is saturated under worst case conditions use the next lower standard value, e.g. 7500 Ohm.

    You can get a quick and dirty estimate from R2=R1*beta*V1/V2 (this neglects base-emitter voltage, Vf of the LED, VoH of the ATmega, but comes close).
  3. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    Nov 28, 2011
    The ULN2003 and ULN2004 have base current limiting resistors built in. The 2004 is probably the most suitable if you're just driving LEDs with it.
  4. Harald Kapp

    Harald Kapp Moderator Moderator

    Nov 17, 2011
    I obviously I overlooked that note saying ULN2001 and only looked at the 2N3904. My fault. Kris is right concerning the ULN IC.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day