Relays
A relay makes use of the electric field generated around a conductor carrying an electric current.
In a relay thin wire is wound around a soft iron core to become a powerful "electro-magnet". As current flows though the coil a metal 'arm' is attracted by the magnetic field generated by the coil.
A Single Pole, Double Throw - SPDT 12 volt relay. |
![]()
This relay would be described as Single Pole, Single Throw - SPST (see below). |
Switch contacts are arranged on the 'arm' so that when the arm moves it causes the switches to either open, or close. On some relays, as one switch opens another closes. This type of relay is called a "double throw" type. A relay may have two 'arms' that move at the same time. This type of relay is called a "double pole" type.
| SPDT | DPDT |
| Single Pole, Double Throw | Double Pole Double Throw |
|
|
Power Rating
When a relay 'switches', contacts inside the body of the relay close, just like a light switch. The size of the contacts determines how much current the relay can handle. Most small relays can safely pass several amps without the contacts overheating. If you tried to control a car horn from a car battery with a conventional relay the contacts would overheat and eventually melt! In general you should only attempt to control small motors and lamps with a relay.
| NOTE about 240 Volts - Relays do exist for use with 240 volts. Only a licensed electrician is permitted to work with 240 volt equipment. It is illegal and STUPID to experiment with 240 volts!!! It can KILL. Use only small devices designed for up to 12 volt BATTERY supplies. |
Why we Need an Interface
The current from the printer port of a computer is not sufficient to switch a relay. (Some VERY tiny relays can actually be driven directly by the computer, but they tend to be expensive.) Either a transistor circuit, or a 'driver' IC must be used to avoid damaging the computer itself. In general the power to run the relays must be provided by an external power supply.
Back emf
When current to the coil is switched off the magnetic field around the coil collapses very quickly. This can cause a phenomenon called "Back emf" where a very high voltage 'spike' is produced of opposite polarity to the current originally driving the coil. This 'reverse voltage' spike can damage other components used in the interface.
To avoid this problem a 'signal' diode is connected across the coil of the relay so that any Back emf is safely 'shorted' out and never reaches the rest of the components. The interfaces described on this Site using the ULN2803 are protected from this effect by the 15 volt zener diode connected between the "common" line of the IC and the positive rail (+ 5 volts).
A 1N914 Signal Diode used to protect against "Back emf" on the relay board. |
A 15 volt Zener Diode on a board using the ULN2803 integrated circuit. |
Relays - QUIZ