Relay switch modules are used as high voltage AC switches by connecting a signal and DC power supply to it. These modules are made up by a relay (the ‘heart’), screw terminal connectors, a resistor, diode, capacitor, transistor and LED – making it perfect for electronic hobbyists to use in projects.
Table of Contents
What is a relay?
A relay on its own is an electromagnetic switch operated by a small amount of electric current. The electromagnetic switch is used for turning much higher voltages on or off. Typically, the relay is powered by direct current (DC) and the electromagnetic switch is used to turn alternate current (AC) devices (power lines) on and off.
A relay needs a digital signal (HIGH or LOW) to know when to trigger the switch. The digital signal is typically the same as the voltage rating of the relay module (see below).
A popular relay used in relay switch modules is the 5 pin Songle SRD relay. They are typically 19.1 mm in length, 15.5 mm wide and 15.3 mm high. Songle relays have models which can operate with DC voltages ranging from 3 to 48 V.
Why use Relay switch modules?
Apart from being used as a switch, it is also an isolated, safe link between AC and DC currents. The popular 5V relay switch module needs for example 5V DC to power and can control/switch power lines between 110 and 250 V AC (at 10A). Relay switch modules are commonly used with microcontroller modules (e.g. Arduinos, ESP-01s and ESP32s) and the Raspberry Pi to supply power to the module, calculate logic and to send trigger signals to open or close the power line. These modules are great to use as controllable switches for example garage door motors, lights, etc.
With their relative small sizes and variations, they are suitable to fit all kinds of microelectronic projects.
Relay switch module specifications (based on Songle relays)
DC Pins: 3. IN, VCC, GND / S, +, – (marked)
AC Sockets: 3. NO (normal open), COM, NC (normal closed)
Trigger mode (digital write): Low-level, but high-level can also be used on some modules (dependent on AC socket configuration)
Working voltage: 3 – 48 V AC (model dependent)
Coil sensitivity: 0.36 – 0.45 Watt (Songle model dependant)
Level output: 3 – 48 V low (module dependent), 0 V high (on-board LED will turn on when voltage is low)
On-board LED: module dependent (very handy)
Module size: about 20 mm high, length & width dependent on amount of relays
Pin size: male, 5 x 2.54 mm
Breadboard friendly: na
NC vs NO
On the AC side of Relay switch modules, there are three plugin-in screw terminal connectors marked COM, NC and NO. These three connectors are used to connect the AC powered device / power lines. The way the device is connected to these three connectors will determine how it will function.
One end of the device should always be connected to COM. When the Relay switch module is turned off (i.e. no signal is supplied and the on-board LED is off) or the module’s power is disconnected, NC will connect with COM. In other words, the power line will be connected until a signal is supplied.
When the Relay switch module is turned on (i.e. signal is supplied and the on-board LED is on), NO will connect with COM. In other words, the power line will be disconnected until a signal is supplied.
Low level trigger vs. high level trigger
It is considered that the default trigger level is low, meaning the Relay switch module will activate (i.e. the on-board LED will switch on) when a 0 (LOW) signal is supplied (this might be module dependent).
In some modules, a jumper plug which can switch between low level triggering and high level triggering might also be present. When high level triggering is jumped, the Relay switch module will activate when a 1 (HIGH) signal is supplied. High level triggering might, for example, be very handy when NC/COM is connected, but the default status of the power line should disconnected.
To get started with Relay switch modules you will need
- Single 5V relay switch module (buy 1 from BangGood)
- 5V DC 2A power supply converter module (buy 1 from BangGood | buy 3 from BangGood | buy 5 from BangGood)
- Metal film resistors (buy a set from BangGood)
- 20cm female to female jumper cable dupont wire set (buy 1 from BangGood)
- Solderless developing breadboard kit (buy 1 from BangGood | buy 5 from BangGood)
- NPN 2N2222 switch transistors (optional) (buy 50 from BangGood)
- Metal film resistors (optional) (buy a set from BangGood)
- Breadboard wiring (buy 1 from BangGood – Arduino and Raspberry Pi compatible)