Skip to content

Two Channel GSM Relay Switch

Two Channel GSM Relay Switch Using Arduino

This article explains how to build a two channel GSM relay switch using Arduino. The two channel GSM relay switch allows remote control of electrical devices via SMS. Learn about the components, circuit design, and working principle of the two channel GSM relay switch in detail. The two channel GSM relay switch is an ideal DIY project for beginners and advanced electronics hobbyists.


Introduction

Remote switching has become a vital part of modern electronics. Instead of being physically present to turn on or off devices, you can control them using wireless communication. One of the simplest yet effective ways to achieve this is by using GSM technology.

In this project, we are going to build a two channel GSM relay switch using Arduino. By sending an SMS command from your mobile phone, you can control two different electrical loads such as lights, fans, pumps, or appliances.

This project is highly practical for home automation, industrial automation, and IoT applications where remote access is needed.


 Materials for the Project

ComponentQuantityDescriptionBuy Link
Arduino Nano1Microcontroller boardBuy Here
GSM Module (SIM800L/SIM900A)1For SMS communicationBuy Here
BC547 Transistor2NPN transistor for relay driverBuy Here
5V Relay Module2For switching AC/DC loadsBuy Here
1K Resistor2Base resistor for transistorBuy Here
1N4148 Diode2Flyback diode for relay protectionBuy Here
2-Pin Terminal Block2Load connectionBuy Here
Jumper WiresAs requiredFor circuit connectionsBuy Here
Power Supply (5V 2A)1To power Arduino + GSM moduleBuy Here

Useful Tools 

ToolQuantityPurpose / NotesClick & Buy
Soldering Iron Kit1For making permanent connectionsClick & Buy
Solder Wire (60/40, 0.8mm)1Electrical solderingClick & Buy
Wire Stripper & Cutter1Stripping jumper wiresClick & Buy
Mini Screwdriver Set1For module and relay terminal screwsClick & Buy
Multimeter1Testing voltages and continuityClick & Buy
Hot Glue Gun (optional)1Securing components in placeClick & Buy
Small Pliers1Holding and bending wiresClick & Buy
Heat Shrink Tubing Set1Insulating exposed wiresClick & Buy

Circuit Diagram Explanation

The circuit is built around Arduino Nano, a GSM module, and two relays controlled by transistors.

  1. Power Section

    • Arduino provides a regulated 5V supply to both the GSM module and relays.

    • A 2-pin terminal block is used to connect external DC power.

  2. GSM Module Connections

    • VCC → Arduino 5V

    • GND → Arduino GND

    • TX → D2 pin of Arduino

    • RX → D3 pin of Arduino

    This setup allows Arduino to send and receive AT commands from the GSM module.

  3. Relay Driver Circuit

    • Each relay is driven by a BC547 transistor.

    • The base of the transistor is connected to Arduino pins (D4 and D5) through a 1K resistor.

    • The collector drives the relay coil, and the emitter is connected to ground.

  4. Flyback Diode Protection

    • A 1N4148 diode is placed across each relay coil to protect the transistor from voltage spikes when the relay switches.

  5. Relay Output

    • Each relay is connected to a 2-pin terminal block for easy connection to AC or DC loads.

    • Devices like lights, fans, or pumps can be controlled.

Download Circuit Diagram

Two Channel GSM Relay Switch Circuit Diagram
9/29/2025

Working Principle

The two channel GSM relay switch works as follows:

  • When you send an SMS (e.g., “ON1” or “OFF1”), the GSM module receives the message.

  • Arduino reads the incoming SMS via the serial communication pins (D2 and D3).

  • Based on the message, Arduino activates or deactivates the corresponding relay by sending a HIGH or LOW signal to the transistor base.

  • The transistor switches the relay coil ON or OFF, which in turn controls the connected electrical load.

This way, two separate devices can be controlled remotely via SMS.


Step-by-Step Guide

Step 1: Preparing the Components

Gather all the required components listed in the BOM. Make sure you have a working SIM card (preferably 2G supported) for the GSM module.

Step 2: Wiring the Arduino and GSM Module

  • Connect VCC of GSM to Arduino 5V.

  • Connect GND of GSM to Arduino GND.

  • Connect TX of GSM → D2 of Arduino.

  • Connect RX of GSM → D3 of Arduino.

Step 3: Relay Driver Circuit

  • Connect BC547 transistor pin 3 (emitter) to ground.

  • Connect pin 2 (base) to Arduino pin D4 via a 1K resistor.

  • Connect pin 1 (collector) to one coil terminal of the relay.

  • Connect the other relay coil terminal to Arduino 5V.

  • Place a diode (1N4148) across the relay coil for protection.

Repeat the same steps for the second relay, using Arduino pin D5.

Step 4: Load Connection

  • Connect the common terminal of each relay to the AC live wire.

  • Connect the normally open terminal to the device (lamp, fan, pump).

  • Neutral wire goes directly to the device.

⚠️ Safety Note: Be cautious while handling AC mains connections. Use proper insulation and enclosures.

Step 5: Uploading Arduino Code

  • Write an Arduino sketch to read SMS from the GSM module.

  • Use simple AT commands to read incoming messages.

  • If the SMS contains “ON1”, turn on Relay 1. If it contains “OFF1”, turn off Relay 1.

  • Similarly, use “ON2” and “OFF2” for Relay 2.

Step 6: Testing the Project

  • Insert the SIM card into the GSM module.

  • Power up the circuit.

  • Send an SMS from your mobile with the command “ON1”. The first relay should activate.

  • Send “OFF1” and the relay will turn off.

  • Repeat the same for the second relay with “ON2” and “OFF2”.

Congratulations! Your two channel GSM relay switch is ready to use.


Applications

  • Home Automation – Control lights, fans, or other appliances via SMS.

  • Industrial Automation – Switch machines remotely.

  • Agriculture – Control water pumps from distant locations.

  • Security Systems – Turn ON/OFF alarms or CCTV systems.

  • IoT Projects – Extend this to internet-controlled devices.


Advantages

  • Simple and cost-effective.

  • Works with any mobile network supporting GSM.

  • Can be scaled up to multiple channels.

  • No internet required – works in remote areas.


Limitations

  • Requires a GSM network (not suitable where signals are weak).

  • Switching delay due to SMS processing time.

  • Limited to the number of relays Arduino can handle.


FAQs

Q1. Can I use this project with 220V AC appliances?
Yes, but make sure to use a 5V relay with proper current rating. Ensure electrical safety and isolation.

Q2. Can I expand it to more than 2 channels?
Yes, you can add more relays by using additional Arduino pins and transistors.

Q3. Which SIM card should I use?
A standard 2G GSM SIM card is recommended. Some 3G/4G SIMs also work if they support GSM fallback.

Q4. Can I use Arduino Nano instead of Nano?
Yes, Arduino Nano works perfectly with the same wiring.

Q5. Can this be controlled with internet (IoT)?
This version works with SMS. For IoT control, you can use ESP32 or NodeMCU with Wi-Fi.


Conclusion

We successfully built a two channel GSM relay switch using Arduino. This project demonstrates how easily we can integrate GSM communication with microcontrollers to remotely control appliances. It’s a powerful yet simple project suitable for DIY enthusiasts, students, and engineers.

You can extend this project by adding more relays, sensors, or even integrating with IoT platforms for enhanced automation.

Leave a Reply

Your email address will not be published. Required fields are marked *