AI Smart Cold Storage Monitoring and Food Preservation System
ESP32 + AI Agent + IoT Web Dashboard + n8n Automation + Telegram Voice Alerts + Google Sheets + ThingSpeak
AI Smart Cold Storage Monitoring and Food Preservation System
ESP32 + AI Agent + n8n Automation + Telegram Voice Alerts + Google Sheets + ThingSpeak
1. Project Overview
This project is an AI powered IoT cold storage monitoring system.
ESP32 collects temperature, humidity, gas leakage, door status and power
consumption data. AI analyzes the data and predicts failures.
2. Features
- Real Time Temperature Monitoring
- Humidity Monitoring
- Food Spoilage Detection
- AI Prediction
- Telegram Voice Alerts
- Google Sheets Logging
- ThingSpeak Cloud Dashboard
- ESP32 Web Dashboard
3. Components Required
| Component |
Quantity |
| ESP32 Board | 1 |
| DHT22 Sensor | 1 |
| DS18B20 Temperature Sensor | 1 |
| MQ135 Gas Sensor | 1 |
| ACS712 Current Sensor | 1 |
| OLED Display | 1 |
| Relay Module | 1 |
| Buzzer | 1 |
4. ESP32 Pin Configuration
| Sensor |
ESP32 Pin |
| DHT22 | GPIO 4 |
| DS18B20 | GPIO 5 |
| MQ135 | GPIO 34 |
| Door Sensor | GPIO 18 |
| ACS712 | GPIO 35 |
| Buzzer | GPIO 26 |
| Relay | GPIO 27 |
5. System Flow
Sensors
|
ESP32
|
WiFi
|
n8n Automation
|
AI Agent
|
---------------------
| | |
Telegram Google ThingSpeak
Voice Sheet Cloud
6. Working Principle
- ESP32 starts and connects to WiFi.
- Sensors collect cold storage data.
- Data is sent to n8n webhook.
- AI Agent checks abnormal conditions.
- Alerts are generated automatically.
- Data stored in Google Sheets.
- Dashboard updated in ThingSpeak.
7. ESP32 Source Code
#include <WiFi.h>
#include <HTTPClient.h>
#include "DHT.h"
#define DHTPIN 4
#define DHTTYPE DHT22
DHT dht(DHTPIN,DHTTYPE);
void setup()
{
Serial.begin(115200);
dht.begin();
}
void loop()
{
float temp=dht.readTemperature();
float hum=dht.readHumidity();
Serial.println(temp);
Serial.println(hum);
delay(5000);
}
8. n8n Automation Workflow
ESP32 Webhook
|
|
Data Processing
|
|
AI Agent
|
|
Condition Check
|
----------------
| |
Normal Alert
| |
Sheets Telegram
|
ThingSpeak
9. Telegram Bot Setup
Open Telegram and search:
BotFather
/newbot
Create Bot
Copy Token
Add Token in n8n Telegram Node
10. Telegram Voice Alert
AI Alert
|
Text To Speech
|
Telegram Audio Message
Example:
"Warning.
Cold storage temperature is high.
Please check compressor."
11. Google Sheets Integration
| Time |
Temperature |
Humidity |
Power |
Status |
| 10:00 |
5°C |
60% |
120W |
Normal |
12. ThingSpeak Dashboard
- Temperature Graph
- Humidity Graph
- Power Usage Graph
- Gas Level Graph
13. AI Power Prediction Logic
Input:
Temperature
Humidity
Compressor Current
Runtime
AI Model:
Power Prediction =
Temperature Difference
+
Cooling Load
+
Time
If power increases:
Cooling failure warning
14. Future Enhancements
- ESP32 Camera Food Inspection
- Mold Detection using AI Vision
- Mobile Application
- Machine Learning Shelf Life Prediction
- Solar Backup System
15. Deployment Steps
- Assemble Hardware
- Upload ESP32 Code
- Create n8n Workflow
- Configure Telegram Bot
- Connect Google Sheets
- Create ThingSpeak Channel
- Install in Cold Storage
Final Output
The system provides intelligent food preservation,
automatic monitoring and AI based failure prediction
using ESP32 IoT technology.

Comments
Post a Comment