relay is an electrically operated switch. Many relays use an electromagnet to operate a switching mechanism mechanically, but other operating principles are also used. 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 used extensively in telephone exchanges and early computers to perform logical operations.




Relays come in many package configurations, but I specifically wanted to use the 5V DC micro relay. I carefully cut away the case around the relay using my utility knife, by slowly shaving down the corner edges until I could snap the lid and then the sides off, revealing the relay. Since I don’t have a PIR sensor available, and simply wanted to actuate the relay, I needed a novel circuit. Low and behold, I used this simple circuit for driving a relay with the Arduino’s 5V power supply. For R1 I used a 1KΩ resistor; for TR1 I used a 2N2222 transistor; and for D1, I used the 1N4004 rectifier diode.


Slowly shave off the edges of the relay’s plastic case to reveal its innards. First, shave and remove the top, then shave and remove the sides, leaving the base intact.



After removing the coil’s sheath, the wire and power leads are seen here.


The armature pulled back, exposing the relay’s core.