How to use a Bipolar Junction Transistor as a switch?

A mechanical switch has good conductive properties and can switch high current/voltage. However, the big downside is that it needs to be operated manually, which is not good for automation projects. On the other side, a generic IO pin of an integrated circuit can provide up to 20mA, which is probably OK to power an LED but it is far less than it is necessary to power more powerful devices. And here, where BJT transistors come in handy. We mostly used a transistor switch circuit in the automation projects where you want to control other higher power devices such as motors, solenoids, lamps, etc. with a relatively small signal. We can use BJT transistors as a signal amplifier, filter, rectifier, oscillator, but in this article we will focus only on how to use them as a switch.

The transistor switch configuration is the simplest transistor circuit to build and understand. It is worth mentioning that the BJT transistors are not the only devices that we can use as Solid-State switches. A transistor can operate as a Single-Pole Single-Throw (SPST) switch. The transistor’s Collector and Emitter are like mechanical switch terminals, and the transistor’s Base is like the switch lever.

In order to make the BJT transistor work as a switch, we need to bias it in the Cut-Off and Saturation regions. With a relatively small current at the Base, we can control a much larger current that flows between the Collector and Emitter. Conventionally, in an NPN transistor, the current flows from Collector to the Emitter. In a PNP transistor, it is the other way around. The arrow in the Emitter shows the conventional current flow.

NPN Switch Configuration

The switch configuration using an NPN transistor is probably the most popular configuration and we’ll cover it in just enough detail to understand how it works. In the NPN switch configuration, the transistor’s Emitter connects to the common ground, and we connect the load between the power source terminal and the transistor’s Collector.

Cut-Off region

In the Cut-Off region, the transistor acts as an open switch. There is no current flow between Collector and Emitter. In reality, between the Collector and Emitter, there is a small current leakage that is negligible. The voltage drop between Collector and Emitter is equal to the Vcc source voltage. To bring the transistor in this state, simply connect the Base terminal to the circuit’s common ground (Figure 1), so there is no current between Base and Emitter (IB=0A).

NPN Switch Circuit - Open

Figure 1. NPN switch configuration, Cut-Off region

Saturation region

In the Saturation region, the transistor acts as a closed switch. To bring the transistor to the Saturation region, we apply a small enough amount of current to the Base (Figure 2). The current flowing through the collector is the same amount of current flowing through the load: IC=Vcc/IRL. Ideally, the voltage drop between Collector and Emitter should be 0V, but in reality, there is a small voltage drop in the 0.2-0.4V range.

NPN Switch Circuit - Closed

Figure 2. NPN switch configuration, Saturation region

Figure 3 shows a sample circuit where we have an integrating circuit controlling a DC motor. Since the IO pin doesn’t provide enough current to power the motor, we use an NPN transistor as a switch. Also, we can power the integrated circuit with a lower voltage than the motor (Vin < Vcc). The Rpd is a pull-down resistor; it connects the Base to the ground to cancel any noise that can close or open the circuit unintentionally. Since the motor is just another inductance, we add the flyback diode D to protect the transistor from high voltage spikes.

NPN Switch Circuit Example

Figure 3. Sample circuit using NPN transistor as a switch

PNP switch configuration

In the PNP switch configuration, we connect the transistor’s Emitter to the power source, and the load between the transistor’s Collector and circuit’s common ground.

PNP Switch Circuit

Figure 4. PNP switch configuration

Cut-Off region

To set the PNP transistor in the Cut-Off region, simply connect the Base to the power source, as shown in Figure 4. The voltage drop between Emitter and Base should be greater or equal to Vcc. As the SW switch is open, no current flows between Emitter and Base (IB=0A). As the transistor acts as an open switch, the voltage drop between Emitter and Collector is equal to Vcc. No current flows through the Collector (IC=0A).

Saturation region

To bring the PNP transistor in the saturation region, close the SW switch, this will connect the Base to the circuit common ground. A small current will flow from Emitter to Base, which will increase the current that flows through the Collector as well. And the transistor will act as a closed switch. The voltage drop between Emitter and Collector will be minimum.

Summary

You can use BJT transistors as a switch to control a relatively higher current/voltage with a relatively small current applied to the Base. The BJT transistors have other operational modes, but if you want to use them as a switch, you need to bias them either in the Cut-Off or Saturation region. You can set the transistor in one of these regions by controlling the current at the Base.

In the Cut-Off region, the transistor acts as an open switch, no current flows through the Collector and we consider it to be turned “OFF”.

In the Saturation region, the transistor acts as a close switch, the current flows from the Emitter, through the Collector, to the load, and we consider it to be turned “ON”.