IoT Home Temperature Control and Automation System
Smart Climate Control with ESP32, Temperature/Humidity Sensing, AC Dimmer, Heater/Fan Relay Automation,
Firebase Monitoring, and GSM Alerts
Category: IoT, Embedded Systems, Home Automation, Climate Control
Tools & Technologies: ESP32, AM2302 Temperature/Humidity Sensor, RBD Dimmer Module (AC Phase Control),
Heater Relay, Fan Relay, 20x4 LCD Display, SIM800L GSM Module, Firebase Realtime Database, NTP Client,
Arduino IDE
Status: Completed
Introduction
This project implements an intelligent home temperature control and automation system using IoT
technologies. The system continuously monitors indoor temperature and humidity using the AM2302
sensor, then automatically activates heating or cooling appliances to maintain a comfortable
temperature range (22°C–30°C). An RBD AC dimmer module provides variable power control for
heater/lighting appliances, while relay modules control heater and fan operations. The system
features both automatic and manual operating modes configurable via Firebase, with a 20x4 LCD
displaying real-time status. GSM integration via SIM800L provides SMS alerts for critical
temperature conditions, and all data is logged to Firebase for remote monitoring and historical
analysis.
System Overview
Aim and Objectives
Aim:
Design and develop an IoT-based home climate control system that
automatically regulates indoor temperature using sensor feedback, relay-controlled appliances, and
cloud-based monitoring.
Objectives:
- Monitor indoor temperature and humidity in real-time using AM2302 sensor.
- Implement automatic temperature regulation with configurable comfort zone (22°C–30°C).
- Control heater and fan appliances via dedicated relay modules with automatic switching logic.
- Provide variable power control through RBD AC dimmer for lighting/heating adjustment.
- Enable remote monitoring and mode switching (auto/manual) via Firebase Realtime Database.
- Display real-time temperature, humidity, and system status on 20x4 LCD.
- Send SMS alerts via SIM800L GSM for critical temperature conditions.
Features & Deliverables
- Automatic Climate Control: Intelligent switching between heater and fan based
on temperature thresholds (below 22°C activates heater, above 30°C activates fan).
- AC Dimmer Control: RBD dimmer module provides smooth variable power control for
AC appliances (heater/lighting).
- Dual Operating Modes: Automatic mode for hands-free operation and manual mode
for direct user control via Firebase.
- Real-Time LCD Display: 20x4 character LCD shows temperature, humidity, mode
status, and appliance states.
- Cloud Remote Monitoring: Firebase dashboard for real-time data viewing, mode
switching, and historical trend analysis.
- GSM SMS Alerts: SIM800L sends critical temperature notifications when
conditions exceed safe thresholds.
- NTP Time Sync: Accurate timestamping for all logged data and alert events.
- Energy Efficiency: Smart switching prevents simultaneous heater/fan operation,
reducing energy waste.
Process / Methodology
Hardware Assembly
Components: ESP32, AM2302, RBD Dimmer Module, Heater Relay, Fan Relay, 20x4 LCD (I2C), SIM800L GSM,
Power Supply.
- Connected AM2302 temperature/humidity sensor for environmental data acquisition.
- Configured RBD dimmer module with zero-crossing detection for smooth AC phase control.
- Wired heater and fan relays with optoisolated drivers for safe AC load switching.
- Integrated 20x4 LCD via I2C for local status display.
Software Development
- Developed temperature control algorithm with configurable comfort zone thresholds.
- Implemented Firebase listener for real-time mode switching and remote parameter adjustment.
- Programmed dimmer control with RBD library for smooth power level transitions.
- Created GSM alert routines with SIM800L AT command interface.
Testing & Calibration
- Validated temperature sensor accuracy against calibrated reference instruments.
- Tested relay switching reliability under various AC load conditions.
- Verified dimmer performance across full power range (0–100%).
- Tested auto/manual mode switching latency via Firebase commands.
Challenges & Solutions
- Challenge: AC dimmer interference causing ESP32 WiFi connectivity issues.
Solution: Implemented proper filtering and shielding between dimmer and ESP32
circuitry.
- Challenge: Preventing rapid relay cycling when temperature oscillates near
threshold boundaries.
Solution: Added hysteresis (dead band) to temperature thresholds to prevent
relay chatter.
- Challenge: Simultaneous Firebase read/write operations causing timing
conflicts.
Solution: Implemented non-blocking Firebase operations with state-based task
scheduling.
Results & Impact
- Temperature Regulation: Successfully maintained indoor temperature within the
22°C–30°C comfort zone.
- Remote Control: Firebase-based mode switching enabled seamless auto/manual
operation from any device.
- Energy Savings: Smart switching logic prevented unnecessary appliance operation
during comfortable conditions.
- Reliable Alerts: GSM SMS delivered critical temperature notifications even
without internet connectivity.
Future Enhancements
- Add multiple room zones with independent temperature control.
- Implement occupancy detection for energy-saving schedules.
- Develop mobile app with scheduling and temperature programming features.
- Integrate with voice assistants (Alexa, Google Home) for voice control.
Demonstration / Access
- GitHub Repository: Coming
soon
- Live Demonstration Video: Coming
soon