
Raspberry Pi
Raspberry Pi Smart Home Automation System Using Raspberry Pi, Relay Module, PIR, DHT22 and Web Dashboard
Abstract:
The Raspberry Pi Smart Home Automation System is an IoT-based solution designed to monitor environmental conditions, detect human motion, and control household appliances remotely. It uses a Raspberry Pi, relay module, PIR motion sensor, and DHT22 temperature and humidity sensor, along with a Python-based web dashboard for monitoring and control.
Project Description:
This project provides a centralized platform for automating and monitoring household appliances. The PIR sensor detects human movement, while the DHT22 measures room temperature and humidity. The Raspberry Pi processes sensor information using Python and controls connected appliances through a relay module.
A Flask-based web dashboard allows users to monitor sensor readings, view appliance status, and manually switch connected devices ON or OFF through a browser. The system can also implement automatic actions based on motion detection and predefined environmental conditions.
Working Principle:
1. The DHT22 sensor measures room temperature and humidity.
2. The PIR sensor detects human movement within its sensing range.
3. The Raspberry Pi reads sensor information through GPIO connections.
4. Python processes the readings and applies configured automation rules.
5. The Raspberry Pi controls the relay module to switch connected appliances.
6. Users can manually control appliances through the Flask web dashboard.
7. The dashboard displays temperature, humidity, motion status, and appliance states.
8. The system continuously updates sensor readings and device information.
Notes:
- Raspberry Pi 3, 4, or 5 acts as the central controller.
- Python handles sensor communication, automation logic, and appliance control.
- A 4-channel relay module can control multiple appliances independently.
- PIR HC-SR501 detects human movement.
- DHT22 measures ambient temperature and relative humidity.
- Flask provides the web dashboard for remote monitoring and manual control.
- HTML, CSS, and JavaScript can be used to build the dashboard interface.
- SQLite or MySQL can optionally store sensor readings and device activity logs.
- Automation rules can be configured to switch appliances based on motion or environmental conditions.
- Check relay input compatibility and provide suitable power supplies for all modules.
- Raspberry Pi GPIO pins operate at 3.3V logic; do not apply 5V signals directly to GPIO pins.
- Mains-powered appliances require properly rated, enclosed relay hardware, fusing, and electrical isolation. Mains wiring must be installed by a qualified electrician. Never handle exposed mains connections during testing.
Expected Outcome:
A functional Raspberry Pi-based smart home automation prototype that detects motion, monitors room temperature and humidity, controls connected appliances, and provides remote access through a web dashboard. The project demonstrates practical applications of Python programming, IoT connectivity, sensor integration, and home automation.
All Projects




