Controlling Relay with IR Sensor using Raspberry Pi | Home Automation Project

Опубликовано: 03 Июль 2026
на канале: VivTronics
130
7

In this video, we demonstrate how to control a relay state using an IR sensor with Raspberry Pi. This project is a simple yet powerful example of home automation and IoT applications.

We’ll cover:
🔹 Interfacing an IR sensor with Raspberry Pi
🔹 Controlling a relay module for switching devices (Like: a Bulb or Fan)
🔹 Step-by-step coding and circuit explanation

This experiment is part of the IoT Laboratory experiments (JNTUA) and is ideal for beginners in Raspberry Pi, IoT, and home automation projects.

👉 Try this project to learn how sensors and actuators work together in real-time!

💡 Don’t forget to like 👍, share 🔁, and subscribe 🔔 for more Raspberry Pi & IoT tutorials.


We are going to upload New Videos of these experiments.
List of Experiments:

1. Serial Monitor, LED, Servo Motor - Controlling
• Experiment1: Controlling actuators through Serial Monitor. Creating different led patterns and controlling them using push button switches. Controlling servo motor with the help of joystick.

2. Distance Measurement of an object
• Experiment 2: Calculate the distance to an object with the help of an ultrasonic sensor and display it on an LCD.
3. LDR Sensor, Alarm and temperature, humidity measurement
• Experiment 3:
• Controlling relay state based on ambient light levels using LDR sensor.
• Basic Burglar alarm security system with the help of PIR sensor and buzzer.
• Displaying humidity and temperature values on LCD
4. Experiments using Raspberry Pi
• Experiment 4:
• Controlling relay state based on input from IR sensors
• Interfacing stepper motor with R-Pi
• Advanced burglar alarm security system with the help of PIR sensor, buzzer and keypad. (Alarm gets disabled if correct keypad password is entered)
• Automated LED light control based on input from PIR (to detect if people are present) and LDR(ambient light level)

5. IOT Framework
• Experiment 5: Upload humidity & temperature data to ThingSpeak, periodically logging ambient light level to ThingSpeak.
• Experiment 6: Controlling LEDs, relay & buzzer using Blynk app

6. HTTP Based
• Experiment 7: Introduction to HTTP. Hosting a basic server from the ESP32 to control various digital based actuators (led, buzzer, relay) from a simple web page.
• Experiment 8: Displaying various sensor readings on a simple web page hosted on the ESP32.

7. MQTT Based
• Experiment 9: Controlling LEDs/Motors from an Android/Web app, Controlling AC Appliances from an android/web app with the help of relay.
• Experiment 10: Displaying humidity and temperature data on a web-based application

8. UAV/Drone:
• Experiment 11:
o Demonstration of UAV elements, Flight Controller
o Mission Planner flight planning design
• Experiment 12: Python program to read GPS coordinates from Flight Controller