Circuit 3D

Common transistors

The common transistors are the BC547 and 2N2222A for small loads, the BC557 for the positive side, and the TIP120 and TIP31 for amps. A pinout tells you which leg is which: a BC547 reads collector, base, emitter with its flat face toward you, and a 2N2222A the reverse.

IB = IC ÷ 10

a rule of thumb for driving one fully on as a switch: base current a tenth of the load’s, so a 20 mA LED needs 2 mA into the base.

Pinouts can differ between makers, so check the datasheet for the part in your hand.

What are the most common transistors?

The most common hobby transistors are the BC547 and 2N2222A for small loads, the BC557 for switching the positive side, and the TIP120 and TIP31 for loads of an amp or more.

All five are bipolar transistors, with a collector, base and emitter, but their legs come in different orders, as Figure 1 shows. Kits often include the 2N3904 and 2N3906 too, a matched NPN and PNP pair with the 2N2222A’s pin order.

BC547 C B E

BC547, NPN, TO-92: collector, base, emitter from left to right, flat face toward you, legs down. Up to 45 V and 100 mA, gain 110 to 800; for small signals and loads up to 100 mA, such as LEDs, small relays and sensor outputs.

Figure 1. Five common transistors, seen from the front with their legs down. These are the usual pinouts; a few makers differ, so check the datasheet for your part.

What is a BC547 transistor?

The BC547 is a small NPN transistor in a TO-92 package, rated 45 V and 100 mA, with a gain of 110 to 800, used to switch and amplify small signals and loads such as LEDs and small relays.

Its pinout, flat face toward you and legs down, is collector, base, emitter. The letter after it, A, B or C, groups the gain; a BC548 or BC549 is the same part with lower voltage ratings.

What is a BC557 transistor?

The BC557 is the PNP twin of the BC547: the same TO-92 package, 45 V, 100 mA and C, B, E pinout, but it turns on when its base is pulled below its emitter.

That makes it the easy way to switch the positive side of a small load, its emitter on the supply. Pull its base low through a resistor to turn it on.

What is the 2N2222 pinout?

The 2N2222A in its plastic TO-92 package reads emitter, base, collector from left to right with the flat face toward you, the reverse of a BC547, and carries up to 600 mA at 40 V.

That extra current makes it the usual choice for relays and buzzers. The older metal-can 2N2222 has a tab beside the emitter instead, so check which package you have.

What is a TIP120?

The TIP120 is an NPN Darlington transistor in a TO-220 package: two transistors in one, with a gain of at least 1,000, so a pin’s few milliamps can switch up to 5 A at 60 V.

Its pinout, label toward you, is base, collector, emitter, and the metal tab is the collector too. A Darlington stays about 1 to 2 V above ground when on, so it runs warm, as Example 2 works out; a MOSFET wastes less.

What is a TIP31?

The TIP31 is an NPN power transistor in a TO-220 package, rated 3 A and 40 V, with a gain of at least 25 at 1 A, for medium loads on a heat sink.

Its pinout matches the TIP120’s, base, collector, emitter. Its low gain means a 1 A load needs about 40 mA or more into the base, too much for a pin, so a small transistor usually drives it.

How do you use a transistor as a switch?

To use a transistor as a switch, put the load between the supply and its collector, its emitter to ground, and feed its base through a resistor, giving about a tenth of the load’s current.

Figure 2 is the lab’s small NPN doing exactly that for an LED. Add a diode across any coil, such as a relay’s, to catch its spike when it switches off.

About 830 µA into the base lets about 14.5 mA through the LED: the transistor is fully on.

Figure 2. The lab’s small NPN transistor, a general-purpose part like the BC547 or 2N3904, switching a red LED from 9 V through a 10 kΩ base resistor.

How do you find a transistor’s pinout?

Find a transistor’s pinout in its datasheet, from the exact part number printed on it, or test it with a multimeter’s diode setting: the base is the leg that conducts to both others.

On an NPN, red probe on the base reads about 0.6 to 0.7 V to each of the others; on a PNP, black probe on the base does. See testing components for the method.

How do you size a base resistor and a transistor’s heat?

Give the base a tenth of the load current and divide the pin’s voltage, less 0.7 V, by it for the resistor, and multiply the voltage across the transistor by its current for its heat.

Example 1: a base resistor from a 5 V pin

A transistor switches a 20 mA load from a 5 V microcontroller pin. Which base resistor makes sure it is fully on?

Given
a 20 mA load switched by a BC547 from a 5 V pin, with base current a tenth of the load’s
Find
the base resistor
Solution
IB = 20 mA ÷ 10 = 2 mAR = (5 V − 0.7 V) ÷ 2 mA = 2.15 kΩ; take the next standard value down, 1.8 kΩ
Answer
1.8 kΩ into the BC547’s base

Example 2: how hot a TIP120 gets

A TIP120 switches a 2 A motor. In the worst case, how much heat must it shed?

Given
a TIP120 switching 2 A, taking the datasheet’s worst case of 2 V across it when fully on
Find
the heat it must shed
Solution
P = VCE(sat) × I = 2 V × 2 A = 4 W
Answer
up to 4 W, well past the 2 W it can shed in free air: bolt it to a heat sink

Summary

Key equations

  • IB = IC ÷ 10 a saturated switch
  • RB = (Vpin − 0.7 V) ÷ IB its base resistor
  • P = VCE × IC its heat

Key terms

Pinout
Which leg is which.
hFE
Current gain.
Darlington
Two transistors in one, very high gain.
TO-92
The small half-round package.

Practice problems

  1. With its flat face toward you and legs down, what is a BC547’s pinout?

  2. What is the BC557?

  3. Which suits a 2 A motor switched straight from a microcontroller pin?

  4. A transistor switches a 70 mA load. About how much base current should it get?

  5. How much does a 2N2222A carry, at most?

FAQ

Can I use a 2N2222 instead of a BC547?

Usually, yes, for switching: it handles more current and similar voltages. Its pins are in the opposite order, so turn it round.

What is the difference between the BC547 and the 2N3904?

Very little: both are small NPN transistors for about 100 to 200 mA. The 2N3904 is rated 40 V and 200 mA, with E, B, C pins like the 2N2222A.

Is the TIP120 better than a MOSFET?

For a few amps from a 5 V pin, a logic-level MOSFET usually runs cooler; the TIP120 is cheap, sturdy and easy to drive, but drops 1 to 2 V.

Which transistor should I use for a 5 V relay?

A BC547 for a coil under 100 mA, or a 2N2222A above it, with a base resistor giving a tenth of the coil current, 560 Ω for 70 mA from 5 V, and a diode across the coil.

What does hFE mean on a transistor?

Its DC current gain: the collector current divided by the base current while it amplifies. A BC547’s is 110 to 800 depending on its letter.