Pages: [1] 2   Go Down
Author Topic: Transistor Base Resistor Choices?  (Read 4654 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Sr. Member
****
Karma: 1
Posts: 462
I am a amateur.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged


0
Offline Offline
Faraday Member
**
Karma: 16
Posts: 2857
ruggedcircuits.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Shannon Member
****
Karma: 200
Posts: 11690
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

[ I won't respond to messages, use the forum please ]

Offline Offline
Edison Member
*
Karma: 32
Posts: 1282
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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. 
Logged

Offline Offline
Sr. Member
****
Karma: 1
Posts: 462
I am a amateur.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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. smiley-confuse 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.
« Last Edit: May 13, 2012, 10:13:20 am by dkl65 » Logged


Offline Offline
Jr. Member
**
Karma: 0
Posts: 89
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

you have to pick the the from data sheet.
Logged

Offline Offline
Sr. Member
****
Karma: 1
Posts: 462
I am a amateur.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged


United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

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.

Offline Offline
Sr. Member
****
Karma: 1
Posts: 462
I am a amateur.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged


United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

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.

Offline Offline
Sr. Member
****
Karma: 1
Posts: 462
I am a amateur.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm just having fun with Arduino. 100k, 1k, 1M, 10, 100, 4.7k, 47k, 470k ohms, what other resistors are commonly used?
Logged


Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 524
Posts: 26421
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

"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.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Sr. Member
****
Karma: 1
Posts: 462
I am a amateur.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.


* Transistor 1.PNG (11.05 KB, 293x247 - viewed 46 times.)
Logged


Tucson, AZ
Offline Offline
Sr. Member
****
Karma: 8
Posts: 312
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

In the US this is a great assortment:  http://www.amazon.com/Joe-Knows-Electronics-Value-Resistor/dp/B003UC4FSS/ref=sr_1_1?ie=UTF8&qid=1337030229&sr=8-1&tag=68656c7064757-20
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 217
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

3x 330 resistors in parallel is 110 ohms.
Logged

Pages: [1] 2   Go Up
Jump to: