In the previous page we analyzed a transistor relay driver with specific characteristics:
Trigger voltage: 5V
Relay voltage: 24V
Relay current: 16.6mA
Here is the circuit:
In this example we will use the all-times classic BC548B (datasheet). The hFE of this transistor varies form 110 to 800 which is actually quite a large range. For my calculations i will make an educative guess for the hFE, I will use the value 250. later on I will verify this value.
So, let's start with the base current. We will again calculate the collector current according to the relay requirements. It is a good practice to overpower the output of the switch if the transistor limitations allows. So, let's say we will calculate the base current for hFE=250 and IC=35mA:
IB = 35/250 = 0.14 mA
VB = 5V - VBE = 5 - 0.7 = 4.3V
RB = VB / IB = 4.3 / 0.14 = 30 KOhm
I have a 33K resistor readily available which is 10% more, but lets not forget that I have already overpower the output by almost 100%, so there will be no problem. Here is the setup:
And here is the circuit on a breadboard:
Some explanations. First of all you will see an LED that does not appear in the schematic. This LED is only used to indicate the state of the relay. I've used a normal-open contact of the relay to drive the LED through a resistor, so when the relay arms (current flows through its coil) the LED lights.
Also one word about the diode across the relay. The relay coil is an inductive load. As all inductive loads, when current runs though it builds a magnetic field. This field is maintained as long as current keeps running. But when you stop powering the coil (when you switch off the relay) this magnetic field collapses "instantly". The energy that was stored in this magnetic field is then returned to the coil. The coil generates a voltage of high magnitude and reverse polarity. This voltage can potentially damage the transistor. Here is where the diode pops in. The energy will be dissipated by this diode as the reverse current will flow through it in a closed circuit with the coil itself protecting this way the transistor. This diode is generally called "flyback diode" or "freewheeling diode" or "suppressor diode" or "clamp diode" or "catch diode"...
Regarding the circuit, the red wire is the pushbutton. When it is not connected or it is connected into ground, no current flows through the base of the transistor, so no current flows through the collector, and the relay remains unarmed. By connecting the red wire to 5V, the predetermined amount of current will flow through the base, therefore current will flow through the collector and the relay will arm:
First of all, let's "see" this VBE that we talk about through all the theory. I will connect the voltmeter across the base and the emitter of the transistor. What i expect is a voltage around 0.7V, typical for silicon transistors:
And 0.72V it is! Now let's see the voltage that builds across the collector and the emitter. Remember that this circuit operates in hard saturation or cut-off area, so we expect a voltage close to 0 volts. Ideally it should be zero, but...
...but we do not live in an ideal world. The voltage is 0.15V, close but not zero. Although this is not a critical value for transistor amplifiers, we will use this later on to estimate how much power is dissipated as head on the transistor.
And now the big test. I will measure the current through the base and through the collector. The meter on the left (base) measures micro amperes (uA) while the meter on the right (collector) is in the scale of mA:
The base current is 123uA and the collector current is 16mA. So, with this simple circuit we've managed to control a load of 24 volts 16mA with a signal of 5V 123uA! Welcome to the world of the transistors! This is your very first and most basic transistor amplifier. Look at the numbers: The input power is around 615uW (5x123) -that's MICRO-watts- or 0.615mW and the output power is 384mW. If you do the division, the rough power amplification achieved is 384/0.615 = 624! So, we've amplified the input power by 624 times.
More calculations coming up next, stat tuned