Relay Logic
Relay Logic
Relay Logic
Figure 2.1: A simple relay consisting a coil that when energized closes the magnetic loop, which changes
the state by moving the centre contact to the left of the switch contacts that can be seen at the bottom
right of the photograph. This relay has a switch which is normally-closed (NC) on the right hand side and
a normally-open (NO) switch on the left hand side of the moving contact. When the coil is energized the
left hand switch closes and the right hand switch opens.
An observant reader would ask the question: “Why do we need the relay? We could do the same with
some switches on their own.” This is true. So what is the advantage of using a relay circuit? Let us
consider that you want to install some spot-lights on your car so that you can travel in the country at
night. One method would be to run cables from the spot-lights installed on the front bumper to battery
and then return through a switch installed on the dash inside the car. A 100W spot-light running off
6 CHAPTER 2. RELAY LOGIC
PB1
L1 L2
relay coil
Figure 2.2: A circuit diagram of an application of the relay shown in figure 2.1 is shown here. When
push-button PB1 is pressed the relay switches state causing the green lamp to turn off and the red lamp
to turn on. Once the push-button is released the power to the relay is cut and the relay returns to the
original state: green light turns on and the red light turns off.
12V requires over 8 amps of current. This means that we need to use a thick cable to carry this amount
current. Such a cable is thick, bulky, heavy and expensive. A better solution is to use a use a short circuit
to the battery using a thick cable through relay switches. The relay could then be controlled by a low
current circuit from the dash as shown in figure 2.4.
Another application where a relay is useful is where we have high voltages such as the voltages needed
to drive a pump or high wattage flood-lamps used in a stadium. It is potentially dangerous to run high
voltages through a switch controlled by a human (while this can be done when absolutely necessary this
has risks and consequently the switch or breaker is very expensive). An alternative and effective solution
is to use low voltages to control a relay that then switches the high voltages as shown in figure 2.5.
Let us now consider an application. We have been contracted to install a system to maintain the water
in a large tank perhaps for the supply of water to a building. As an aside, an example of this type of design
that is close at hand is the design of a toilet cistern. Inside the tank of a cistern is a ball float that controls
the water valve used to fill the tank. When the flush button is pressed a valve opens at the bottom of
the cistern and the water in the tank fills the bowl. The float will drop down which will cause the filling
valve to open filling the tank. When the float reaches the specified level the filling valve will close and the
cistern will be ready for the next flush. We are going to design the filling system using a relay circuit and
limit switches. Will use a normally-open (NO) limit switch for the low-level and normally-closed (NC)
limit switch for the high level. The circuit is shown in figure 2.6.
PB1
PB2
L1 L2
relay coil
Figure 2.3: A latched relay circuit. Pressing push button PB1 activates the relay which changes the
state of the change-over switches causing the green light to turn off and the red light to turn on. In this
circuit once PB1 is pressed the red light will stay on even after releasing push-button PB1 because of
the activation circuit through PB2. Pressing push-button PB2 will break the circuit to the relay coil,
deactivate the coil and change the state of the switches back to the original state: red off, green on.
PB1
PB2
12 VDC
L1 L2
relay coil
Figure 2.4: Application where a relay is used to control a high current circuit. The thick lines indicate
the high current path. The thin lines the low current path.
8 CHAPTER 2. RELAY LOGIC
PB1 240V AC
PB2
24V DC
L1 L2
relay coil
Figure 2.5: A circuit demonstrating the use of a relay to separate the power supply controlling a system
from the power required by the load.
High Level
24V DC
M Pump
relay coil
RL1 RL1 L1
PB1
RL1
L2
Figure 2.7: Abstraction of a relay logic circuit. The circuit on the left is the circuit that controls the relay.
The circuit on the right is controlled by the relay. When RL1 is activated all switches with labels RL1
will change state. This abstraction corresponds to the circuit shown in figure 2.2.
RL1 RL1 L1
PB1 PB2
RL1 RL1
L2
Figure 2.8: Abstraction of a relay logic circuit. The circuit on the left is the circuit that controls the relay.
The circuit on the right is controlled by the relay. When RL1 is activated all switches with labels RL1
will change state. This abstraction corresponds to the circuit shown in figure 2.3.