Go Down

### Topic: Transistor Base Resistor Choices? (Read 12052 times)previous topic - next topic

#### dkl65

##### May 11, 2012, 11:29 pm
Hello!
I know that the base of a transistor must have a resistor connected to it. The problem is that I don't know what resistor to use! I've seen examples using 1k, 10k and 220 ohm resistors. How can I determine what resistor to use for the base?
Thanks!

#### RuggedCircuits

#1
##### May 11, 2012, 11:35 pm
It depends upon the transistor you are using and how much current it is expected to carry. Tell us more!

--
The Rugged Audio Shield: Line In, Mic In, Headphone Out, microSD socket, potentiometer, play/record WAV files

#### MarkT

#2
##### May 11, 2012, 11:45 pm
If the transistor is being used as a switch (in the common-emitter configuration) then you need to ensure the base gets enough current to saturate the transistor at the desired collector-current.

You also must ensure the output pin isn't providing more than about 25 or 30mA to protect it.  Thus the minimum resistor value is 180 ohms.

If you want a collector current of 100mA, say, and your transistor has a (minimum) gain of 100, then it needs 1mA to conduct that current, but significantly more current to properly saturate, say 2 to 5mA.  The base resistor will have about 5 - 0.7V = 4.3V across it, so 5mA means something like 820 ohms.

If the transistor isn't saturated its only "sort of" turned on and won't be a good switch.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

#### DVDdoug

#3
##### May 12, 2012, 12:38 am
Are you familiar with Ohm's LawWith Ohm's Law, you can calculate the resistance, if you know the current & voltage.

Assuming you are connecting to the output of the Arduino, you've got 5V.  The 5V output gets divided between the resistor and the transistor's base-emitter junction.  But, with the transistor turned-on, you've got less than 1V across the transistor, so you can just approximate the voltage as 4 or 5V.

Now, you just need to calculate/estimate the required base-current.     For that you need to know the output/load current.    Then you can just divide by the transitor gain (hfe) to find the needed base-current.       As Mark said, in a switching application you need to saturate* the transistor.    So, with a typical gain of around 100, your base-current needs to be somewhere around 1/10th to 1/50th of the collector-emitter current, and your circuit should work!

The current through the resistor is the same current into the transistor base.   Now that you know the voltage across the resistor and the current throught the resistor, you can use Ohm's Law to calculate the resistance.

* Here's an example of transistor-saturation:   You've got an LED & resistor that take 20mA when connected directly to 12V.   You connect it through a transistor with a gain of 100.

If you put 1mA into the transistor base with a gain of 100, you should be getting 100mA through the collector-emitter, (and through the LED & resistor).   But with 12V, you can only get 20mA (Ohm's law)...  The transistor is turned-on all-the-way...  It's in saturation, and the current is limited by the other series devices.

#### dkl65

#4
##### May 13, 2012, 03:34 amLast Edit: May 13, 2012, 05:13 pm by dkl65 Reason: 1
I found a datasheet to my 2N3904 transistor: http://www.fairchildsemi.com/ds/2N/2N3904.pdf. I know that is has a maximum collector current of 200mA. But the h_FE value is a very large range of values. :~ I am familiar with Ohm's law: V = I*R, I = V/R, R = V/I. There is always 0.6V between emitter and base when the transistor is turned on, so that leaves 4.4V across the E and C. So I should do some formula like this: r_B = 4.4V / (0.2A / h_FE). Example: 4.4V / (0.2A / 100) = 4.4V / 0.002A = 2200 ohms. _ = subscript. A found a formula for h_FE: h_FE = i_C / i_B. But that isn't helpful, because I don't know the i_B [i_C / h_FE]; I need to know the h_FE first! Is there a formula for calculating the h_FE given the i_C and V_EC. etc.? Or better: formula for base current required.

#### elandd2011

#5
##### May 13, 2012, 01:06 pm
you have to pick the the from data sheet.

#### dkl65

#6
##### May 13, 2012, 11:03 pm
Quote
you have to pick the the from data sheet.

What?
Is there a way (formula, rule of thumb, etc.) to estimate the required base current, knowing the collector current?

#### dc42

#7
##### May 13, 2012, 11:55 pm
For a normal bipolar transistor (not a darlington), Vce(sat) is typically quoted with Ib = 0.1 * Ic. Therefore, to achieve the value of Vce(sat) on the datasheet, you should plan the base current to be 1/10 of the collector current you want to switch. For example, if you are switching 60mA, design for a base current of 6mA. The base voltage will be around 0.7v and the voltage from the Arduino will be nearly 5V (assuming a 5V Arduino). Therefore a suitable base drive resistor would be around 4.3/0.006 = 717 ohms (nearest standard value 680 ohms).

If you are switching high currents, you should also bear in mind the 40mA current rating of the Arduino output pin. The highest current I switch with bipolar transistors is 500mA and I normally use a BC327 (PNP) or BC337 (NPN) transistor for switching currents up to this value. For these transistors, Vce(sat) is quoted at Ic=500mA, Ib=50mA. However, 50mA is too high for an Arduino pin. So I would design for Ib ~ 30mA and accept a slightly higher saturation voltage.

Above 500mA it is better to use a mosfet. Avoid using darlingtons, they have high saturation voltages so they get hot and need heatsinks.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

#### dkl65

#8
##### May 14, 2012, 12:23 am
Thanks for the advice! If I need to switch a 380mA motor, I can use a 500mA NPN transistor, such as MPSA06. I don't have it yet. 4.4V / (0.38A * 0.1) = ~116 ohms. Closest standard value: 100 ohms. Closest value I have: 330 ohms. I need more resistor values! To control 50mA IR LED: 4.4V / (0.05A * 0.1) = 880 ohms.

#### dc42

#9
##### May 14, 2012, 12:50 am
If you are doing much Arduino development, it's worth buying a resistor kit so that you always have the right resistor, except when you need a power resistor or an unusually high or low value. In the UK, this one http://www.rapidonline.com/Electronic-Components/MR25-Metal-film-resistor-kit-65199 is good value IMO.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

#### dkl65

#10
##### May 14, 2012, 09:32 pm
I'm just having fun with Arduino. 100k, 1k, 1M, 10, 100, 4.7k, 47k, 470k ohms, what other resistors are commonly used?

#11
##### May 14, 2012, 09:50 pm
"standard" values are:
10, 12, 15, 18, 20, 22, 27, 33, 47, 56, 68, 82, 91, 100
Multiply by 10, 100, and 1000
150, 180, 220, 270 for controlling LEDs.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

#### dkl65

#12
##### May 14, 2012, 10:41 pm
I know that resistors are needed to limit the current for LEDs. A have an IR LED that uses 1.6V @ 50mA. I could use a 100 ohm resistor to a I/O pin, but I/O pins are limited to 40mA. Can I use Transistor 1.png? Isn't the 1k ohm resistor on the base supposed to limit the collector current to about 50mA? I will be using the 2N3904 from before.

#### db2db

#14
##### May 15, 2012, 07:23 am

Closest standard value: 100 ohms. Closest value I have: 330 ohms. I need more resistor values!

3x 330 resistors in parallel is 110 ohms.

Go Up