Tuesday, 14 July 2026

AI Smart Building Automation with Predictive Energy Saving

This is an excellent industry-level final-year project because it combines IoT + AI + Edge Computing + Cloud + Automation + Predictive Analytics, making it suitable for: IEEE Final Year Project Smart Building Research Startup Prototype Smart City Innovation Challenge Hackathons Industry Demonstration Product Development AI Smart Building Automation with Predictive Energy Saving Complete Title AI Smart Building Automation System with Predictive Energy Saving using ESP32, Agentic AI, n8n Automation, Telegram Voice Alerts, Google Sheets, ThingSpeak Cloud and Intelligent IoT Dashboard Project Overview Modern buildings waste huge amounts of electricity because lights, fans, air conditioners and appliances remain ON even when unnecessary. This project develops an intelligent building that continuously monitors environmental conditions, occupancy and power usage. An ESP32 collects sensor data and sends it to cloud services. An AI prediction engine estimates future power consumption. An AI Agent analyzes the collected information and automatically decides whether devices should remain ON or OFF. The automation platform (n8n) generates voice notifications, stores reports, sends Telegram alerts, updates Google Sheets, and logs data into ThingSpeak. The result is an autonomous building capable of reducing energy consumption while maintaining occupant comfort. Main Objectives ✔ Reduce electricity consumption ✔ Automatic building control ✔ AI-based energy prediction ✔ Occupancy-based automation ✔ Cloud monitoring ✔ Remote monitoring ✔ Historical analytics ✔ Voice alerts ✔ Telegram notifications ✔ Automatic reports Features Real-Time Monitoring Temperature Humidity Light intensity Occupancy Motion detection Current consumption Voltage Power Energy Room status Device status WiFi status Cloud status Automatic Control Lights Fans AC Exhaust fan Emergency lights Smart plugs AI Prediction Predict next-hour electricity consumption. Predict peak usage. Predict unnecessary consumption. Suggest energy-saving actions. AI Agent The AI Agent acts as the building manager. Example reasoning: Nobody detected ↓ Room temperature = 23°C ↓ Lights ON ↓ Fan ON ↓ Power usage increasing ↓ Decision: Turn OFF lights Turn OFF fan Send notification Update cloud Store report Complete Architecture Sensors PIR Motion Sensor LDR DHT22 ACS712 Voltage Sensor │ ESP32 │ WiFi Internet Connection │ ────────────Cloud──────────── ThingSpeak Google Sheets Telegram Bot n8n Server AI Prediction Engine Dashboard │ AI Decision Making │ Relay Module ↓ Lights Fan AC Motor Building Devices Hardware Components Component Quantity ESP32 DevKit 1 DHT22 1 PIR Sensor 2 LDR Module 2 ACS712 Current Sensor 1 ZMPT101B Voltage Sensor 1 Relay Module (4 Channel) 1 OLED Display 1 Buzzer 1 LEDs 4 Push Buttons 2 Breadboard 1 Jumper Wires Many 5V Adapter 1 Sensor Purpose DHT22 Measures Temperature Humidity PIR Detects Human movement Occupancy LDR Measures Room brightness Automatically controls lights. ACS712 Measures Current ZMPT101B Measures Voltage Relay Controls Lights Fan AC Appliances Circuit Diagram +--------------------+ | ESP32 | | | | GPIO34 <- ACS712 | | GPIO35 <- ZMPT101B | | GPIO32 <- LDR | | GPIO33 <- PIR | | GPIO4 <- DHT22 | | | | GPIO25 -> Relay1 | | GPIO26 -> Relay2 | | GPIO27 -> Relay3 | | GPIO14 -> Relay4 | +--------------------+ Relay1 → Light Relay2 → Fan Relay3 → AC Relay4 → Smart Plug Project Flowchart Start ↓ Initialize ESP32 ↓ Connect WiFi ↓ Initialize Sensors ↓ Read Sensors ↓ Calculate Power ↓ Send to ThingSpeak ↓ Send to Google Sheets ↓ AI Prediction ↓ Decision Engine ↓ Turn Devices ON/OFF ↓ Send Telegram Voice ↓ Repeat Software Stack ESP32 Arduino IDE ↓ ThingSpeak ↓ Google Sheets ↓ n8n ↓ Telegram Bot ↓ AI Agent ↓ Dashboard ESP32 Program Structure setup() ↓ Initialize WiFi ↓ Initialize Sensors ↓ Initialize OLED ↓ Initialize Relays ↓ loop() ↓ Read DHT22 ↓ Read PIR ↓ Read ACS712 ↓ Read Voltage ↓ Calculate Power ↓ Upload Cloud ↓ AI Logic ↓ Relay Control ↓ Repeat AI Power Prediction Logic Input Temperature Humidity Current Voltage Time Occupancy Previous Energy LDR Device Status ↓ Feature Extraction ↓ Prediction Model ↓ Output Expected Power Next Hour Expected Daily Consumption Peak Load Time Energy Saving % Recommendations Example Current Usage 5.2 kWh ↓ AI predicts 7.8 kWh by evening ↓ Recommendation Switch OFF AC Dim Lights Delay Washing Machine Reduce Peak Load AI Decision Rules Example IF Occupancy = 0 AND Lights = ON ↓ Turn OFF Lights Send Alert IF Temperature >30°C AND Occupancy=1 ↓ Turn ON Fan IF Power >2.5kW ↓ Warning Send Telegram Voice Alert Store Event n8n Workflow Workflow Steps Webhook ↓ Receive ESP32 Data ↓ JSON Parser ↓ AI Node ↓ IF Node ↓ Telegram ↓ Google Sheets ↓ ThingSpeak ↓ Email ↓ Voice Notification Typical nodes include: Webhook (HTTP In) Set / Function (normalize payload) IF (threshold logic) HTTP Request (ThingSpeak update) Google Sheets (append row) Telegram (send message or voice) Optional AI model node (OpenAI or local LLM via HTTP) Schedule Trigger (daily reports) Telegram Automation Events Light ON Light OFF AC Started Power High Fire Alarm Emergency Motion Detection Daily Report Example ⚡ Building Status Power = 2.3kW Temperature = 28°C Occupancy = 5 AI Recommendation Turn OFF Meeting Room AC Voice Notification Example Attention Meeting Room Lights have been switched OFF automatically. Energy Saving Mode Activated. Voice messages can be generated in n8n using a text-to-speech service and sent to Telegram as audio. Google Sheets Columns Date Time Temperature Humidity Voltage Current Power Energy Occupancy AI Prediction AI Decision Relay Status Useful for long-term analysis and model training. ThingSpeak Dashboard Charts Temperature Humidity Voltage Current Power Energy Occupancy Relay Status Energy Saving % AI Prediction Widgets: Time-series graphs Gauges Numeric displays Status indicators MATLAB Analytics (optional) Automation Logic Room Empty ↓ Lights OFF ↓ Fan OFF ↓ Update Cloud ↓ Voice Alert ↓ Save Data ↓ AI Learning Energy Saving Strategy Morning ↓ Low Occupancy ↓ Only Essential Loads ↓ Office Hours ↓ Occupancy Detection ↓ Automatic Lighting ↓ Evening ↓ AI Peak Saving ↓ Night ↓ Sleep Mode Future Enhancements Camera-based occupancy detection using ESP32-CAM or edge AI. Room-level digital twin visualization. Solar energy integration with battery optimization. Smart HVAC optimization using weather forecasts. Dynamic electricity tariff-aware scheduling. Face recognition for access-controlled automation. Mobile application for Android/iOS. MQTT-based scalable architecture. Voice control using Alexa or Google Assistant. Predictive maintenance for electrical equipment. Multi-building centralized monitoring. Integration with Building Management Systems (BMS) using Modbus/BACnet gateways. Project Deliverables A complete engineering package can include: 200–250 page project report with chapter-wise documentation. IEEE-format research paper. Seminar PowerPoint presentation. Complete ESP32 firmware (modular Arduino code). n8n workflow export (JSON). Telegram Bot configuration guide. Google Sheets Apps Script integration. ThingSpeak channel and dashboard configuration. Circuit schematic (KiCad or EasyEDA). PCB layout and Gerber files. Wiring diagram. Block diagrams and flowcharts. Database and web dashboard (PHP/MySQL or Node.js if extended). Testing procedures, sample datasets, and expected outputs. User manual, installation guide, deployment guide, and viva questions. This architecture is scalable from a single room to an entire office building or campus, making it suitable both as an academic project and as the foundation for a commercial smart-building energy management system.

No comments:

Post a Comment