The relay module is a simple but powerful tool that allows hacking and controlling any external device easily

<aside> ⛔ Relays allow you to control the power in an external circuit. This is really useful for controlling appliances like lamps, sockets, etc. If you do this, keep in mind that when working with a relay and wiring in high current (amp) or high voltage (V) circuits you should be extremely careful. We will cover best practice in class

</aside>

For this we will use the SRD-03VDC-SL-C Relay

Recognizing Relays

Depicted above is the SRD-03VDC-SL-C Relay on a breakout board

Depicted above is the SRD-03VDC-SL-C Relay on a breakout board

This is a breakout board containing a relay. A relay is very similar to a transistor in operation in that it’s designed to allow you to use a low powered microcontroller to act upon another high powered circuit. However, the two circuits are kept completely independent.

The relay is a mechanical switch (see below). It uses a magnetic coil to open or close a switch internally allowing power to flow to the other circuit. This is depicted below.

A relay can be used to quickly, and safely wire in and control external power.

A relay has three pins that you wire into, depending on what you want to achieve:

You get to choose the default behavior.