View Full Version : resistor back

08-10-2005, 02:50 PM
how do i know how big of a resistor back to use with a npn switching transistor circuit??? i usually use 2n2222 transistors with a 2200 ohms resistor back. but i saw in a nuts and volts(steroids for stamps) it said to use 390ohms. i usually use the transistors to switch multipul leds in series...

thanks for the help

Beau Schwabe (Parallax)
08-10-2005, 09:24 PM
Assuming you are refering to the current limiting resistor that you use between the I/O pin and the BASE of the transistor...

Ibe = Ice / hfe
Rbase = ( Vsource - Vbe ) / Ibe

Ibe is the current you want to apply across the BASE-EMITTER junction of the transistor.
Ice is the current you require to be "switched" by the transistor assuming this does not exceed the transistor specifications.
hfe is the amount of amplification the transistor is rated for. (located in the transistors datasheet)
Rbase is the current limiting resistor value in Ohms needed at the BASE of the transistor.
Vsource is your supply voltage to the transistor BASE. ( from a Stamp I/O pin this is 5V )
Vbe is the junction voltage across the BASE-EMITTER of the transistor. ( usually 0.6V )

Assume you want to drive a 250mA load from your transistor...

17.6 Ohms
5V+ >--------/\/\/----------CBE------< GND

...and your transistor has a minimum hfe of 50 ( find this in the data sheet for your particular transistor )

Ibe = Ice / hfe
Ibe = 250mA / 50
Ibe = 5mA

...So from the Stamp, you are only required to supply 5mA to the BASE of the transistor.

Rbase = ( Vsource - Vbe ) / Ibe
Rbase = ( 5V - 0.6V ) / 5mA
Rbase = 4.4V / 5mA
Rbase = 880 Ohms

...In this case you should only need an 880 Ohm resistor from the Stamp I/O pin to the tarnsistors BASE,
however it is common practice to bump up or down this value to the closest standard resistor value.

17.6 Ohms
5V+ >--------/\/\/----------CBE-----------< GND
250mA |
o---/\/\/----< Stamp I/O
880 Ohms


The 17.6 Ohm resistor is simply a 250mA load at 4.4V

R = V / I

R = ( 5 - 0.6 ) / 250mA

R = 4.4 / 250mA

R = 17.6 Ohms

Beau Schwabe (mailto:bschwabe@parallax.com)

IC Layout Engineer
Parallax, Inc.

08-11-2005, 01:16 AM
i figured there must be a formula.

08-11-2005, 01:32 AM
according to my calculations driving a smaller load through the transistor reqires a larger resistor back???

the load i want to drive is about 100ma and the hfe of the transistor is 200 so...

Ibe = Ice / hfe
ibe = 100/200

Rbase = ( Vsource - Vbe ) / Ibe
rbase= 4.4/.5

rbase = 8.8k resistor


Beau Schwabe (Parallax)
08-11-2005, 01:59 AM
You said...
according to my calculations driving a smaller load through the transistor reqires a larger resistor back???

This is correct,· the·smaller the current the larger the resistor.

Just wanted to clarify....

100mA is .100 not 100

.100 / 200 = .0005

4.4 / .0005 = 8800 Ohms = 8.8K

Beau Schwabe (mailto:bschwabe@parallax.com)

IC Layout Engineer
Parallax, Inc.

Post Edited (Beau Schwabe (Parallax)) : 8/10/2005 7:05:01 PM GMT

08-11-2005, 02:33 AM
thanks for all the help.

08-11-2005, 02:59 AM
As long as you don't harm the stamp by drawing too much current, I don't think there will be a problem in using a smaller resistor... the transistor should just operate in saturation mode.

08-15-2005, 12:00 AM

How would the calculation above apply to a MOSFET? I have an IRF7488, I'm driving 2W@9V (220mA) using a BS2 on the gate (Vsource = 5.0V).

Ids = 220 mA
Vsource = 5.0 V
Vgs = ?
hfe = ?

I've attached the data sheet for the mosfet, I'd really appreciate your help in understanding the MOSFET application to protect the BS2.

Thank you,


Beau Schwabe (Parallax)
08-15-2005, 06:23 AM

You can't really apply the above formula to a MOSFET.
First of all the relationship between the Gate and the Source/Drain of a MOSFET is more like a capacitor. Initially you must consider the "surge"
that happens between a charge and discharge. Once the "Gate-capacitor" is charged it requires almost zero current to keep it there.
The charge/discharge rate of the "Gate-capacitor" mostly affects the rise and fall time the MOSFET has to react. What can happen, and thus why
MOSFETS are static sensitive, is that if you apply too much voltage you can "punch through" the gate capacitor and cause it to arc. This tiny
arc can damage the operation of the MOSFET.

With a bipolar transistor, the relationship between the Base and Emitter is more like a diode, independent of the transistor being "on" or "off".
Because of this there is always "current" that you need to deal with, thus the formulas above. If you exceed these ratings you can dammage the
operation of the bipolar transistor.

When a MOSFET is "on" it acts like a resistor between the Source and Drain with a resistance value determined by the Rds(on). In your case this
is 24 milliOhms.

When a bipolar transistor is on it acts like a diode between the Collector and the Emitter similar to the Base and the Emitter. In most cases
the diode drop is about 0.6V

Take for example the following circuits.

Bipolar(NPN - Assume transistor is "ON"):
Collector Emitter
+5V >--/\/\------------>|-------------< GND
Load 0.6V

Drain Source
+5V >--/\/\-----------/\/\------------< GND
Load .024 Ohms

In the Bipolar circuit you are always going to loose about 0.6 Volts across the C-E junction, so with a 5V supply your Load will only
"see" 4.4 Volts (5V - 0.6V). To obtain a current of 220mA your load must be at 20 Ohms ( R = V / I ).

For the MOSFET, voltage loss across the Source and Drain is going to be much less for the same amount of current required...
about 0.0053V ( V = I * R )
...So the load resistance must be 22.7 Ohms for both circuits to have the same amount of current through them.

Why is this important?
For the Bipolar in this example, the amount of wasted energy is 132mW ( P = I * V )
For the Mosfet in this example, the amount of wasted energy is 1.2mW ( P = I * V ) or ( P = I^2 *R )

To be wasting small amounts such as milli Watts might seem trivial, but you application also only requires 220mA.
What if you needed to drive 20Amps or 200Amps?

Beau Schwabe (mailto:bschwabe@parallax.com)

IC Layout Engineer
Parallax, Inc.

08-15-2005, 05:31 PM
Thank you for the excellent explanation with regards to MOSFETS. Given that I am using a MOSFET, is there a need for any sort of protection circuitry analogous to the resistor in the case of the bipolar?

Beau Schwabe (Parallax)
08-16-2005, 02:59 AM
The RG value is usually selected to control the dv/dt or "slew rate". The capacitance from Gate to Source in combination with RG form an RC filter
which effects the overall response time of the MOSFET. Usually on this front, I take the recommendation from the application note on the MOSFET
since this would mainly apply to high speed switching and I personally don't do much of that.

By googleing, I did find a way to calculate RGS for use as protection circuitry" (towards the middle of the document)


Beau Schwabe (mailto:bschwabe@parallax.com)

IC Layout Engineer
Parallax, Inc.