Relays are
electromechanical components. A relay is an electrically operated switch. Many relays use an electromagnet to operate a switching mechanism
mechanically.
A simple electromagnetic relay consists of a coil of wire wrapped around a soft iron core, an iron yoke which provides a low reluctance path for magnetic flux, a movable iron armature, and one or more sets of contacts. The armature is hinged to the yoke and
mechanically linked to one or more sets of moving contacts. It is held in place by a spring so that when the relay is de-energized there is an air gap in the magnetic circuit. When an electric current is passed through the coil it generates a magnetic field that activates the armature, and the consequent movement of the movable contact(s) either makes or breaks (depending upon construction) a connection with a fixed contact. If the set of contacts was closed when the relay was de-energized, then the movement opens the contacts and breaks the connection, and vice versa if the contacts were open.
When the current to the coil is switched off, the armature is returned by a force, approximately half as strong as the magnetic force, to its relaxed position. Usually this force is provided by a spring, but gravity is also used commonly. Most relays are manufactured to operate quickly. Relays are used where it is necessary to control a circuit by a low-power signal (with complete electrical isolation between control and controlled circuits), or where several circuits must be controlled by one signal. The first relays were used in long distance telegraph circuits, repeating the signal coming in from one circuit and re-transmitting it to another. Relays were then used extensively in telephone exchanges and early computers to perform
logical operations.
Electromechanical logic gates can be build with relays.
Konrad Zuse's Z3 was an
electromechanical machine which employed relays in all of its functional units. In contrast the
Z2 used both relays and
mechanical means for different functional units.
Animation of a original relay built in the Z3.
Animation of the original stepping switch that was used in the Z3.
(Photos: Horst Zuse) cf.
Wikipedia