Relays are electromechanical devices employed to manage electrical circuits by opening or closing a contact based on an input signal. Its construction typically consists of a coil, a set of terminals, and a mechanical armature. When electricity passes through the coil, it creates a magnetic field that pulls the armature, causing the contacts to mak