Base Resistor with Transistor required?

Why do all of the schematics use a ~1kohm resistor going to the base of a transistor? I wouldn't think this is required, and it isn't needed in my testing.

Thanks, William

A resistor is often used in series with the base of a transistor to limit base current. Without limiting base current you run the risk of damaging your transistor. You probably haven’t encountered problems yet because something else is limiting current, such as the source capability of whatever is connected to your base (I’m assuming an I/O line?). It’s the same reason why people can power an LED via an I/O line with no resistor in series. It sometimes works, but it’s a terrible practice and it’s just asking for trouble. Relying on this mechanism runs the risk of burning out your I/O pin as well as damaging your transistor, so I recommend you use a base resistor.

As far as not thinking a resistor would be required, remeber that a transistor is a PNP or NPN while a diode is just NP (or PN, if you look at it the other way). The base connects to the middle of the NPN/PNP triplet, so the base-emitter path is essentially a diode. This diode will have a voltage drop across it, but it doesn’t limit current once you exceed that drop.

  • Ben

Using it without a resistor will also stop the Arduino from reading correctly that there is a logic 1 on it's output. This could mean that when you set or clear another bit on that port then you might also switch off your transistor. This is because actually the bits are accessed in groups of 8 and some software simplifies the process of turning a single bit on or off. It does this by reading the port ( the correct group of 8 bits ), performing a logic operation on it (AND to make a zero OR to make a one) to change just the bit you are interested in and then writing the whole 8 bits back again to the port. Without a base resistor although the transistor is on that bit reads back as a zero and so is written back as a zero. These sort of operations are known as "read / modify / write" operations.

@swilly, look up ohm's law. Without a resistor, you are placing 5V on a low impedance input ( The B-E of the transistor), and asking the Atmega/Arduino pins to source a lot of current. Eventually, if not immediately, that is going to destroy your Atmega. Even if it works for a while, you are wasting lots of current through that pin.


Hey, dumb question but how do i know how strong the resistor has to be. If i use a 1k an led connected to the transistor only lights up a bit. 220Ohm is probably not enough, but seems to work.. I'm using a BC327/16 Resistor which is PNP and Max Ic = 1A, Uceo = 45 V..

how do i know how strong the resistor has to be

It's called ohms law and relates the voltage and current to the resistance. E = I * R Where E is the voltage in volts I is the current in Amps R is the resistance in ohms.

So suppose an LED has a turn on voltage of 2V and you use a 1K resistor power from 5V. As the LED has 2V across it the resistor will have 5-2 = 3V across it. So you get a current of:- 3 = I * 1000 re arrange and get I = 3 / 1000 = 0.003A or 3mA LEDs normally have 5 to 20mA to get them bright enough. So work out the resistor for 10mA. Report back to me ::)

Should be 300 Ohm.. ;) but thats when i connect the led direct to a 5V output pin. I guess the Max Ic = 1A in the data sheet of the transistor probably says that it should get a max of 1Amp on the Base Input? This would require a 5Ohm resistor... but seems strange.....

When a transistor is conducting, you effectively have the base connected to ground through a diode (voltage drop around 0.7 volts). If you connect your digital output directly, you're basically driving it high while connecting it to ground and you will blow the IO line. You put the resistor in series with the base to limit this current (and you do the exact same calculation you used to find the 300 ohms).

The Max current for the transistor is a different thing, and there should be a couple of max currents between various pairs of pins on the transistor datasheet.

Should be 300 Ohm

Yes correct :D

I guess the Max Ic = 1A in the data sheet of the transistor probably says that it should get a max of 1Amp on the Base Input?

No no no. Ic is the collector current, that's the current flowing from collector to emitter AND that is the maximum you can let it be before damaging the device. All transistors have a value of gain. That is the multiplying factor to calculate the current flowing in the base to that flowing in the collector. So if your transistor has a gain of 100 (typical value) you only need 1mA flowing in the base to get 100mA flowing from collector to emitter.

Think of the collector emitter junction of the transistor as being like a variable resistor, the thing that controls it is the base current. When a transistor is conducting as much as the collector load will allow it is said to be saturated (or the pot turned down to zero), more base current won't give you any more collector current. With digital electronics like this we want the transistor to be saturated, we say it is turned on. So you see only a few mA are needed to turn a transistor on and hence a resistor is put in the base to limit the current.

Too much base current can destroy the transistor, the data sheet will say how much this is. If the transistor is too saturated (with base current) then when the base current is removed (transistor is switched off) there will be a delay in switching off and the collector current will slowly drop (not rapidly like you want), this is called the charge storage effect. In fact you often see 1K in the base, with 5V this gives you a base current of 5mA, which given a gain of 100 will only not saturate at collector currents of 500mA. Which is good enough most of the time. Some power transistors (lots of Ic capability) have low gains some down to about 10, then you might need a second transistor to drive the first.

Hope that makes sense. 8-)

1 Like

Think of the collector emitter junction of the transistor as being like a variable resistor, the thing that controls it is the base current.

That is a confusing way of looking at it if you start trying to calculate the current through various loads connected in series with the collector/emitter junction.

It will seem like this "variable resistor" is also changed by changing a resistor in series with it.