Close Menu
Circuit of Things
  • Home
  • Projects
    • Raspberry Pi Projects
    • Arduino Projects
    • ESP8266 Projects
    • ESP32 Projects
    • IoT Tutorials
    • Sensors & Modules
    • IoT Basics
  • About Us
  • Get In Touch
  • 3D Print
  • Shop Now !
  • Electro Calc

Stay in the Loop!

Subscribe to get the latest IoT tutorials, Arduino projects, and electronics guides delivered straight to your inbox.

Instagram WhatsApp
  • Terms and Conditions
  • Disclaimer
  • Privacy Policy
Circuit of Things Circuit of Things
  • Home
  • Projects
    • Raspberry Pi Projects
    • Arduino Projects
    • ESP8266 Projects
    • ESP32 Projects
    • IoT Tutorials
    • Sensors & Modules
    • IoT Basics
  • About Us
  • Get In Touch
  • 3D Print
  • Shop Now !
  • Electro Calc
Hire us
Circuit of Things
Home»Arduino Projects»Relay Module with Arduino: Control High Voltage Appliances Safely
Arduino Projects

Relay Module with Arduino: Control High Voltage Appliances Safely

Sai Preetham KoyyalaBy Sai Preetham KoyyalaMay 4, 2026No Comments2 Mins Read
Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Telegram Email
Share
Facebook Twitter LinkedIn Pinterest Email
Contents
  • Introduction
  • Important Safety Warning
  • Components Needed
  • Wiring the Relay
  • Project 1: Basic Relay Control
  • Project 2: Timer-Controlled Fan
  • Understanding Active LOW vs Active HIGH
  • Conclusion

Introduction

A relay module is the bridge between your Arduino’s low-voltage world (5V) and high-voltage appliances (230V AC). It uses an electromagnet to physically switch high-power circuits on and off under microcontroller control — allowing you to turn on/off bulbs, fans, water pumps, and heaters with just a GPIO pin.

Important Safety Warning

Warning: Working with 230V AC mains electricity is dangerous and potentially lethal. Ensure you are using a proper enclosure and following electrical safety guidelines. If you are not confident, ask a qualified electrician for help.

Components Needed

  • Arduino Uno
  • 5V Relay Module (1-channel or 4-channel)
  • An appliance to control (lamp recommended for testing)

Wiring the Relay

Relay Module Pin Arduino
VCC 5V
GND GND
IN Digital Pin 7

Project 1: Basic Relay Control

#define RELAY_PIN 7
void setup() {
  pinMode(RELAY_PIN, OUTPUT);
  digitalWrite(RELAY_PIN, HIGH); // Most relay modules are active LOW - HIGH = OFF
}
void loop() {
  digitalWrite(RELAY_PIN, LOW);  // Relay ON (appliance ON)
  delay(5000);
  digitalWrite(RELAY_PIN, HIGH); // Relay OFF (appliance OFF)
  delay(5000);
}

Project 2: Timer-Controlled Fan

#define RELAY_PIN 7
void setup() {
  Serial.begin(9600);
  pinMode(RELAY_PIN, OUTPUT);
  digitalWrite(RELAY_PIN, HIGH); // Start OFF
}
void loop() {
  Serial.println("Fan ON for 10 seconds...");
  digitalWrite(RELAY_PIN, LOW); delay(10000);
  Serial.println("Fan OFF for 5 seconds...");
  digitalWrite(RELAY_PIN, HIGH); delay(5000);
}

Understanding Active LOW vs Active HIGH

Most relay modules are Active LOW — sending a LOW signal triggers the relay (connects COM to NO). Always check your module’s datasheet. Writing HIGH to IN means OFF, and LOW means ON.

Conclusion

The relay module is one of the most powerful tools in the maker toolkit. Combined with ESP32 Wi-Fi and MQTT, you can build a full smart home automation system that controls real appliances from your phone!

Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
Previous ArticleNodeMCU ESP8266 Sensor Data to ThingSpeak IoT Platform
Sai Preetham Koyyala
  • Website
  • Facebook
  • X (Twitter)
  • Instagram
  • LinkedIn

Hello, I am Sai Preetham Koyyala. I'm an electronics engineer by profession, a DIY enthusiast by passion. ESP32 and Arduino are the main topics of my work.

Related Posts

Arduino Projects

PIR Motion Sensor with Arduino: Smart Security Alarm System

May 4, 2026
Arduino Projects

Arduino Servo Motor Control: Sweep, Potentiometer and Button Projects

May 4, 2026
Arduino Projects

LDR Light Sensor with Arduino: Auto Night Light Project

May 4, 2026
Add A Comment
Leave A Reply Cancel Reply


KSP Electronics
✓ Trusted Store
Everything for Your
Next IoT Build
Boards, sensors, modules & kits delivered fast across India.
ESP32 Arduino Sensors Modules DIY Kits
500+
Products
Fast
Delivery
★★★★★
Rated
🛒 Shop Now →
kspelectronics.in
💻
● Available for Projects
Hire Me for
IoT Projects
ESP32, LoRaWAN, cloud dashboards & custom hardware — end-to-end IoT solutions for your needs.
ESP32 LoRaWAN MQTT Arduino Cloud PCB Design
3+
Yrs Exp
20+
Projects
★★★★★
Rated
💬 Chat on WhatsApp
View services →
Top Posts

Raspberry Pi: How to Control a DC Motor with L298N and PWN on a Web Server

July 14, 2023

Relay Module with Arduino: Control High Voltage Appliances Safely

May 4, 2026

Esp8266 / NodeMCU Pinout: A Comprehensive Guide for Beginners

June 25, 2023
Follow Us
  • Telegram

Stay in the Loop!

Subscribe to get the latest IoT tutorials, Arduino projects, and electronics guides delivered straight to your inbox.

Most Popular

Raspberry Pi: How to Control a DC Motor with L298N and PWN on a Web Server

July 14, 2023

Relay Module with Arduino: Control High Voltage Appliances Safely

May 4, 2026

Esp8266 / NodeMCU Pinout: A Comprehensive Guide for Beginners

June 25, 2023
Our Picks

Relay Module with Arduino: Control High Voltage Appliances Safely

May 4, 2026

NodeMCU ESP8266 Sensor Data to ThingSpeak IoT Platform

May 4, 2026

ESP32 Firebase Realtime Database: Send and Receive Data from the Cloud

May 4, 2026

Stay in the Loop!

Subscribe to get the latest IoT tutorials, Arduino projects, and electronics guides delivered straight to your inbox.

© 2026 Circuit of Things. All Rights Reserved. Built with ❤️ for the Maker Community.

  • About
  • Privacy
X (Twitter) Instagram YouTube WhatsApp
  • Book an Appointment
  • My Bookings
  • Support Us
© 2026 Circuit of Things. Designed by Sai Preetham Koyyala.

Type above and press Enter to search. Press Esc to cancel.