Have you ever wondered how a relay works?
A relay is an electromechanical switch. It works in the same way as a manual switch, but instead of having to manually push the switch, you apply power to it to change the switch position.
This was the first component I learned about and it helped me to start understanding how to electronics works.
It is very useful for turning the power of a device on and off automatically, like I did in this story. And it is also useful for switching higher power devices with a low power.
A relay consists of
- an electromagnet
- a mechanical switch
An electromagnet is a simple device made up of a wire wound in a coil around a core of ferromagnetic material such as iron.This is a very interesting device and it is easy to build one yourself.
To create your own electromagnet all you need is a nail and some insulated wire. Wind the wire into a coil around the nail and apply power. Beware, it can get very hot if you have too few windings or too much voltage!
How it works
When a wire conducts current, it produces a magnetic field. If we wind a wire into a coil around a core of ferromagnetic material such as iron, we magnify this field and we get an electromagnet with enough magnetism to do some interesting stuff.
The relay also consists of a mechanical switch. It may look like this:
When the electromagnet (1) is powered, it will break the initial connection between the middle (3) and the left (2) pin and create a new connection between the middle (3) and the right (4) pin.
On many relays there are at least two switches inside so that you can switch two devices at once.
Notes of caution
Always check the voltage and current rating of the relay switch. Some are designed for switching only low voltages, while others are meant for switching higher voltages.
I hope this simple guide on how a relay works has helped you to understand how a relay works. Now run along and start soldering some relay circuits!