Transistor Base Resistor Calculator

Base Resistor Calculator Circuit

A base resistor provides the necessary resistance to bias the base junction of a bipolar junction transistor (BJT). The resistor “Rb” controls the amount of current “Ib” flowing into the base, which controls the amount of current flowing through the collector “Ic”.

Usually an NPN transistor controls a load such as a relay or a motor; it is required to behave as a switch and conduct fully known as saturation. A proper value of base resistance is required for conduction in the saturation region. The value of this resistance is different for different input voltages.


Calculator

Vbe


Vce


hFE

First, check the documentation of the transistor and find the values Vbe, Vce, and hFE. You need the values for saturation. The initial values shown are for a BC548.

RL


Vcc


Vi

The load resistance RL is in ohms, the power supply is Vcc, and the input signal voltage is Vi.

Rb:




Use the Standard Resistor Values chart to find the nearest standard resistor value. This chart will show you the colour code. For small-signal applications, a ¼-watt resistor works fine, with 5% tolerance.

hFE and hfe

In transistor literature, there are two different types of gain parameters with the same three letters. Small case “hfe” represents the small-signal current gain or AC gain. We do not use this parameter when using the transistor as a switch.

The parameter “hFE” represents the DC gain, and this is the parameter to use for switching loads.

When selecting the hFE value for transistor switching purposes we always choose the minimum rating as the worst case because we want the transistor to conduct in the saturation region.

If you are using the BC547 then it has three ratings. BC547 has a minimum rating of 110, BC547B has a typical rating of 150, and BC547C has a minimum rating of 420. These transistors have a maximum collector rating of 100 mA, which is fine for lighting a couple of light emitting diodes in series or parallel.

hFE and Collector Current

hFE and Collector Current

Students often find it difficult to visualise the relationship between hFE and collector current.

The graph above shows hFE on the y-axis and collector current on the x-axis for a BC547B transistor. As the collector current increases, hFE decreases.

As you can see from the red line, to achieve the maximum collector current of 100 mA, a minimum hFE value of around 110 is required. That is why you must use the minimum hFE value.

Base Resistor Theory

A bipolar transistor is a current amplifier, because a small amount of current “Ib” through the base controls a larger amount of current “Ic” flowing through its collector. How large the current flow is depends upon a gain factor known as “hFE”, also sometimes called the DC current gain, and beta. Hence, the current flowing through the collector is proportional to the base current multiplied by gain, as shown by the formula.

Ic = Ib × hFE

The hFE parameter is not really a constant though because a transistor may have many ratings for different collector currents Ic. However, the short and fast rule is to determine the current required by the load. For example, a relay load may require 100 mA to operate. For a general-purpose transistor, the gain (hFE) is normally 100, hence Ib = Ic / 100. Since the relay load requires 100 mA, this will be the collector current, and therefore a base current of 1 mA will saturate the transistor to a fully conducting state.

Resistor Calculation and Formula

Formula and Circuit Diagram

The base resistor calculation is very simple but students often find it confusing because of the way it is drawn. I had a great lecturer for analogue electronics and this is how he drew the circuit diagram. In the diagram above, the inverted base resistor makes more sense.

As you can see, the input voltage Vi -- whether it is 3.3 V from a Raspberry Pi, or 5 V from a TTL circuit -- is equal to the sum of voltage across resistor Rb and the base-emitter junctions Vbe. If you are a student you may have come across potential dividers (PD), and it is a similar concept.

The voltage across the base resistor must be Ib × Rb, this is simple Ohm’s Law. The Vbe parameter is something you can easily find from the transistor reference sheet.

Vi = (Ib × Rb) + Vbe

Therefore, with simple transposition of the above formula, the following formula provides the base resistance:

Rb = (Vi – Vbe) / Ib

To guarantee that the transistor operates in the saturation region, we multiply the base current by a factor of three.

Rb = (Vi – Vbe) / (3 × Ib)

The base-emitter junctions of the bipolar transistor typically behave as a forward-biased diode with a 0.6 V drop across it.

Vb - Ve ≈ 0.6

Since Vbe is usually very small in comparison to “Vi”, this parameter may be set to zero and therefore the following formula gives the base resistance.

Rb = Vi / (3 × Ib)

You might be wondering how the current Ib is calculated. As explained earlier, the formula below calculates it.

Ib = Ic / hFE

As you can see, hFE is the DC gain, and Ic is the collector current which is the same current flowing through the load.

NPN Base Resistor Calculator

If you do not have the value of the load resistance, but know the current that the load requires to operate then this simple calculator will calculate the base resistance for you. It uses the same formulas as shown above.

Vbe


hFE

From the transistor documentation, find the values Vbe (sat) and hFE.

Ic


Vi

The load current Ic is in amps, and the input signal voltage is Vi in volts.

Rb:




NPN and PNP Calculators

This is an NPN base resistor calculator, where the transistor parameters are positive. Usually when switching loads an NPN transistor is used and the load connects between the positive rail and the collector junction of the transistor. This way a “logic 1” signal from a microcontroller will switch ON the current to the load.

If you are using a PNP transistor, then the load position is usually between the emitter junction and ground.

Power transistors often have complimentary versions, this is where one transistor is PNP and another is NPN. Both types are a matched pair with identical parameters, except the PNP parameters will have negative values, and the NPN will have positive values.

For example, TIP32 is PNP and its complimentary TIP31 is NPN. They are both identical and usually found in symmetrical push-pull arrangements. For TIP 32 the Vbe (sat) parameter is -1.8 V, whilst for TIP31 the same parameter is +1.8 V.

This Article Continues...

Standard Resistor Values
Transistor as a Switch