Transistor as a Switch for Relay

Transistor driving a relay - circuit diagram.

Transistors are capable of driving small relays without any problems, and usually, an NPN transistor in a common emitter configuration used. Here is a simple circuit that uses a bipolar junction transistor (BJT) to drive a small 5 V relay coil. A cheap general-purpose transistor such as the BC548 is capable of controlling a small relay with a holding current of less than 300 mA. Whilst a single transistor may energise a small relay coil, ideally one should use a Darlington transistor for driving larger relay coils.

If your switching signal is 3.3 V from a Raspberry Pi, or Arduino, then the base resistance should be around 1 kΩ to 1.2 kΩ. Please use the Transistor Base Resistor Calculator if the input signal is 5 V or any other voltage.


When to use a relay: Transistor vs. Relay

  • A relay is an electromechanical device and its mechanical contacts are capable of switching high currents and voltages.
  • Whilst a transistor switches only DC loads, a relay switches AC and DC loads.
  • A relay may have many contacts, such as double changeover poles to implement complex logic.
  • A disadvantage of a relay is that it is an electromechanical device and therefore less reliable than a transistor. The contacts may burn out, and the mechanical parts such as the armature may fail over time.
  • Relays occupy a much larger space on a PCB, and may require a power transistor to drive its coil.

Related Articles

The Transistor
Transistor as a Switch Biasing
Darlington Transistor
Phototransistor
Transistor as a Switch Using LDR
Metal Oxide Semiconductor Field Effect Transistor (MOSFET)
Using a Transistor to Drive a Motor
Transistor Circuit to Drive LED
Transistor as a Switch for Relay
Transistor as a Logic Switch
Transistor as a Switch PDF