Relay modules (or power relay modules) are ubiquitous electronic components. They are an exceedingly significant component of any home automation project. You will require a relay module if you use a low voltage microcontroller such as an Arduino to control motors or lighting circuits.
Relay modules are straightforward components. Essentially, they work as switches. Your average relay module comprises two internal metal contacts. Usually, these contacts do not connect or touch each other. However, relays include an internal switch connecting these contacts to complete an electrical circuit that allows current flow.
Relay modules do not work like manual light switches. To illustrate, when you switch on a light, you must press a button to connect the two metal contacts within it. Inversely, a relay switch uses electric pulses to turn its internal switch on and off.
You power a voltage power current on one side of the circuit that powers an electromagnetic coil which pulls the metal contacts together. Consequently, this allows the current to flow on the other side of the relay. Your Arduino Uno or Raspberry Pi can send a digital signal to the relay, which can then power whatever application you need. As you may expect, there are different relay module types. We will cover that further down this guide.
How Do Relay Modules Work?
Firstly, we need to distinguish between relay and relay modules. A relay module is an array of one or more relays. While it is possible to purchase individual relays separate from the module, we recommend that you purchase them in a module format. This is because it comes with a few advantages.
On the input side of your standard single-channel relay module, you will find that you can access the relay’s input through three jumper pin connectors. You’ll find that the output connectors are wires suitable for a hardware connection. This makes it easier to attach whatever your single digital output load is. Most modules also have an LED at the bottom of the module. It turns on when you activate the relay and off when you deactivate it.
Additionally, there is a diode that goes across the electromagnetic coil that’s inside the relay. Essentially, it is what is known as a flyback diode. When we energize the coil and the relay reaches deactivation, it needs to discharge that count somewhere. This flyback diode prevents input voltage from going back into the output pin.