Relays are electromechanical switches. They have very high current rating and both AC and DC motors can be controlled through them because motor will be completely isolated from the remaining circuit. Two common available SPDT relays are shown in the picture below.
Working of a relay : Relays consist of a electromagnet, armature, spring and electrical contacts. The spring holds the armature at one electrical contact and as soon as a voltage is applied across the electromagnet, it coils the armature, changes its contact and moves to another electrical contact. The figure below describes its working.
Example :1
Example :2

Terms associated with relays:
- Normally Open (NO): contacts connect the circuit when the relay is activated; the circuit is disconnected when the relay is inactive.
- Normally Closed(NC): contacts disconnect the circuit when the relay is activated; the circuit is connected when the relay is inactive.
- Change Over (CO): Its the common contact.
- COIL: Its the electromagnet coil inside relay.
Relay ratings :
- Coil rating: Its the Voltage at which the coil gets fully activated. Some also have coil resistance mentioned on them. Relay coil voltage rated 6V and 12V are the most commonly available.
- Contact rating: It depends on whether AC or DC current is passing through the contacts. The blue colored relay shown in the start of this page has a rating of 12A at 120V AC , 5A at 250V AC and 10A at 24V DC.
Relay triggering circuit:
Depending upon a relay's coil rating, some may require current greater than 100mA. If an IC cannot provide this much current, a transistor is used as a switch to trigger the relay as shown below. Don't avoid the protection diode (D1 shown in circuit) as it will protect transistor from back emf induced in relay coil.
Switching speed of a relay is slow, around 10ms. Relays are used to drive an AC load from a small DC circuit, or to drive a high current consuming motors. Have you noticed a sound of tic -tic while car wiper is on, This is the sound of relay inside the car that drives the wiper motor.
Working of H-Bridge
For controlling motor in both directions H bridge circuit is used. Its working is very simple and is
H-bridge working
Closed Switches | Open Switches | Voltage across motor | Motion |
Nil | S1,S2,S3,S4 | 0 | No motion |
S1,S4 | S2,S3 | 12V (say) | Clockwise (say) |
S2,S3 | S1,S4 | -12V | Anti-clockwise |
S1,S3 | S2,S4 | 0V | Brake |