In this article we will comprehensively study a transistor relay driver circuit and learn how to design its configuration by calculating the parameters through formulas.
Importance of Relay
Relays are one of the most important components in electronic circuits. Especially in circuits where high power transfer or mains AC load switching is involved, relays play the major role in implementing the operations.
Here we will learn how to correctly operate a relay using a transistor and apply the design in electronic system for switching a connected load without issues.
A relay, as we all know is an electromechanical device which is used in the form of a switch.
It is responsible for switching an external load connected to its contacts in response to a relatively smaller electrical power applied across an associated coil.
Basically the coil is wound over an iron core, when a small DC is applied to the coil, it energizes and behaves like an electromagnet.
A spring loaded contact mechanism placed at a close proximity to the coil immediately responds and gets attracted toward the energized coil electromagnet force. In the course the contact connects one of its pair together and disconnects an complementary pair associated with it.
The reverse happens when the DC is switched OFF to the coil and the contacts return to its original position, connecting the previous set of complementary contacts and the cycle may be repeated as many times as possible.
An electronic circuit will normally need a relay driver using a transistor circuit stage in order to converter it’s low power DC switching output into a high power mains AC switching output.
However the low level signals from an electronic which may be derived from an IC stage or a low current transistor stage may be be pretty incapable of driving a relay directly. Because, a relay requires relatively higher DC currents which may be normally not available from an IC source or a low current transistor stage.
In order to overcome the above issue, a relay control stage becomes imperative for all electronic circuits which need this service.
A relay driver is nothing but an additional transistor stage attached with the relay which needs to be operated. The transistor is typically and solely employed for operating the relay in response to the commands received from the preceding control stage.
Referring to the above circuit diagram we see that the configuration only involves a transistor, a base resistor and the relay with a flyback diode.
However there are a few complexities that need to be settled before the design could be used for the required functions:
Since the base drive voltage to transistor is the major source for controlling the relay operations, it needs to be perfectly calculated for optimal results.
The base resistor value id directly proportional to the current across the collector/emitter leads of the transistor or in other words, the relay coil current, which is the collector load of the transistor, becomes one of the main factors, and directly influences the value of the base resistor of the transistor.
The basic formula for calculating the base resistor of the transistor is given by the expression:
R = (Us - 0.6)hFE / Relay Coil Current,
Where R = base resistor of the transistor,
Us = Source or the trigger voltage to the base resistor,
hFE = Forward current gain of the transistor,
The last expression which is the “relay current” may be found out by solving the following Ohm’s law:
I = Us/R, where I is the required relay current, Us is the supply voltage to the relay.
The relay coil resistance can be easily identified by using a multimeter.
Us will also be a known parameter.
Suppose the supply Us is = 12 V, the coil resistance is 400 Ohms, then
Relay current I = 12/400 = 0.03 or 30 mA.
Also the Hfe of any standard low signal transistor may be assumed to be around 150.
Applying the above values in the actual equation we get,
R = (Ub - 0.6) × Hfe ÷ Relay Current
R = (12 – 0.6)150/0.03
= 57,000 Ohms or 57 K, the closest value being 56 K.
The diode connected across the relay coil though is no way related with the above calculation, it still cannot be ignored.
The diode makes sure that the reverse EMF generated from the relay coil is shorted through it, and not dumped into the transistor. Without this diode, the back EMF would try to find a path through the collector emitter of the transistor and in the course damage the transistor permanently, within seconds.
Relay driver Circuit using PNP BJT
A transistor works best as a switch when it is connected with a common emitter configuration, meaning the emitter of the BJT must be always connected directly with "ground" line. Here the "ground" refers to the negative line for an NPN and the positive line for a PNP BJT.
If an NPN is used in the circuit, the load must be connected with the collector, which will allow it to be switched ON/OFF by switching its negative line ON/OFF. This is already explained in the above discussions.
If you wish to switch the positive line ON/OFF, in that case you will have to use a PNP BJT for driving the relay. Here the relay may be connected across the negative line of the supply and the collector of the PNP. Please see the figure below for the exact configuration.
However a PNP will need a negative trigger at its base for the triggering, so in case you wish to implement the system with a positive trigger then you may have to use a combination of both NPN and PNP BJTs as shown in the following figure:
If you have any specific query regarding the above concept, please feel free to express them through the comments for getting quick replies.