Yes . I can structure this as a complete engineering/project document covering the SolarPulse AI architecture, ESP32 firmware , IoT webpage/dashboard, n8n workflow, AI agent, Telegram voice alerts, Google Sheets logging, ThingSpeak integration, circuit/schematic, data flow, and testing.
A good final project title would be :
SolarPulse AI
An IoT-Enabled Intelligent Framework for Real-Time Solar PV Performance Monitoring and Multi-Channel AI Alerting
1. Project concept
SolarPulse AI is an intelligent IoT-based solar photovoltaic monitoring system in which an ESP32 continuously measures the electrical and environmental parameters of a solar PV system and sends the data to cloud services.
The system combines:
-
ESP32 — sensor acquisition and local intelligence
-
Solar PV sensors — voltage, current, temperature and irradiance
-
IoT webpage/dashboard — real-time visualization
-
ThingSpeak — cloud IoT data storage/visualization
-
n8n — workflow automation
-
AI Agent — interprets abnormal operating conditions
-
Google Sheets — historical data/event logging
-
Telegram — instant text notifications
-
Telegram voice alerts — spoken warning notifications
-
Webhooks/API — communication between the different layers
The overall concept is:
┌─────────────────────┐
│ SOLAR PV │
│ PANEL │
└──────────┬──────────┘
│
┌─────────────┴─────────────┐
│ SENSOR LAYER │
│ │
│ Voltage │ Current │
│ Temp. │ Irradiance │
└─────────────┬─────────────┘
│
▼
┌─────────────────────┐
│ ESP32 │
│ │
│ ADC + Sensors │
│ Data Processing │
│ Wi-Fi Communication │
└──────────┬──────────┘
│
Wi-Fi / HTTP
│
┌────────────────┼────────────────┐
│ │ │
▼ ▼ ▼
┌────────────┐ ┌─────────────┐ ┌──────────────┐
│ ThingSpeak │ │ IoT Webpage │ │ n8n Webhook │
│ Cloud │ │ Dashboard │ │ │
└────────────┘ └─────────────┘ └──────┬───────┘
│
▼
┌──────────────────┐
│ AI AGENT │
│ │
│ Analyze PV Data │
│ Detect Anomaly │
│ Generate Reason │
└────────┬─────────┘
│
┌────────────────┼─────────────────┐
│ │ │
▼ ▼ ▼
┌────────────┐ ┌────────────┐ ┌─────────────┐
│ Telegram │ │ Voice │ │ Google │
│ Message │ │ Alert │ │ Sheets │
└────────────┘ └────────────┘ └─────────────┘
2. Main objectives
The project has six primary objectives.
Objective 1 — Real-time monitoring
Measure PV parameters continuously:
-
PV voltage
-
PV current
-
PV power
-
panel temperature
-
ambient temperature
-
solar irradiance
-
energy generation
PV power is calculated as:
PPV=VPV×IPVP_{PV}=V_{PV}\times I_{PV}
where:
-
PPVP_{PV} = PV power in watts
-
VPVV_{PV} = PV voltage in volts
-
IPVI_{PV} = PV current in amperes
Energy can be estimated using:
E=∫P(t)dtE=\int P(t)dt
For discrete measurements:
E≈∑PiΔtE \approx \sum P_i\Delta t
3. Proposed hardware
A practical prototype can use:
| Component | Function |
|---|---|
| ESP32 DevKit | Main IoT controller |
| Solar panel | PV energy source |
| Voltage sensor/divider | PV voltage measurement |
| Current sensor | PV current measurement |
| DS18B20 | Panel/environment temperature |
| BH1750 / irradiance sensor | Light measurement |
| OLED display | Local status display |
| Wi-Fi | Internet communication |
| 5 V/USB supply | ESP32 power |
| Resistors | Voltage scaling/protection |
| Breadboard/PCB | Prototype assembly |
| Optional relay | Protection/control |
| Optional buzzer | Local alarm |
For an actual PV installation, the voltage/current sensing circuitry must be selected according to the maximum PV voltage and current. The ESP32 ADC must never be exposed directly to a voltage beyond its permitted input range.
4. Hardware block diagram
SOLAR PANEL
│
┌─────────┴─────────┐
│ │
▼ ▼
Voltage Measurement Current Measurement
│ │
│ │
└─────────┬─────────┘
│
▼
┌─────────┐
│ ESP32 │
│ │
│ ADC │
│ GPIO │
│ I2C │
│ Wi-Fi │
└────┬────┘
│
┌──────────┼──────────┐
│ │ │
▼ ▼ ▼
OLED Temp. Wi-Fi
Display Sensor │
▼
Internet
5. Suggested ESP32 pin configuration
One possible prototype configuration:
ESP32
────────────────────────────
GPIO 34 → PV Voltage ADC
GPIO 35 → PV Current ADC
GPIO 21 → I2C SDA
GPIO 22 → I2C SCL
GPIO 4 → DS18B20
GPIO 2 → Status LED
GPIO 25 → Buzzer
3.3 V → Sensors
GND → Common GND
Example:
ESP32
┌────────────────┐
│ │
PV Voltage ───────► GPIO34 │
PV Current ───────► GPIO35 │
│ │
DS18B20 ──────────► GPIO4 │
│ │
OLED SDA ─────────► GPIO21 │
OLED SCL ─────────► GPIO22 │
│ │
Buzzer ◄────────── GPIO25 │
LED ◄────────── GPIO2 │
│ │
└────────────────┘
6. Voltage measurement circuit
The ESP32 ADC cannot directly measure typical PV-panel voltages.
Therefore, a voltage divider is required.
PV+
│
R1
│
├────────────► ESP32 ADC
│
R2
│
GND
The ADC voltage is:
VADC=VPVR2R1+R2V_{ADC}=V_{PV}\frac{R_2}{R_1+R_2}
Therefore:
VPV=VADCR1+R2R2V_{PV}=V_{ADC}\frac{R_1+R_2}{R_2}
For example, the resistor values must be calculated from the maximum expected PV voltage, with suitable margin and appropriate resistor power ratings.
For a real installation, add suitable:
-
fuse/protection
-
filtering
-
overvoltage protection
-
isolation where required
7. Current measurement
A Hall-effect current sensor can be used.
Conceptually:
PV+ ───────► CURRENT SENSOR ───────► LOAD/CHARGE CONTROLLER
│
│ Analog output
▼
ESP32 ADC
The firmware converts the sensor output into current according to the selected sensor's calibration equation.
For example:
I=Vsensor−VoffsetSensitivityI=\frac{V_{sensor}-V_{offset}}{Sensitivity}
The actual offset and sensitivity must come from the selected current sensor and be calibrated experimentally.
8. Temperature measurement
A DS18B20 can be attached to the rear of the solar panel.
Panel
──────────────────────
│ │
│ PV CELLS │
│ │
──────────────────────
│
│ thermal contact
▼
DS18B20
│
▼
ESP32
Temperature is important because PV output generally changes with cell temperature.
The AI layer can therefore compare:
Solar irradiance
+
Panel temperature
+
PV voltage
+
PV current
↓
Expected PV behavior
↓
Actual PV behavior
↓
Anomaly detection
9. IoT data structure
The ESP32 can transmit a JSON payload such as:
{
"device_id": "SOLARPULSE_001",
"voltage": 18.72,
"current": 2.84,
"power": 53.16,
"temperature": 42.6,
"irradiance": 815,
"energy": 1.284,
"status": "NORMAL"
}
The important advantage of JSON is that the same payload can be consumed by:
-
n8n
-
web application
-
cloud APIs
-
database
-
AI agent
10. Complete software architecture
┌───────────────────────────────────────────────────────┐
│ SOLARPULSE AI │
└───────────────────────────────────────────────────────┘
HARDWARE
│
▼
┌──────────────────────┐
│ ESP32 │
│ │
│ Sensor acquisition │
│ Filtering │
│ Power calculation │
│ Wi-Fi │
└──────────┬───────────┘
│
│ JSON / HTTP
▼
┌──────────────────────┐
│ IoT Cloud Layer │
│ │
│ ThingSpeak │
│ Web API │
└──────────┬───────────┘
│
├─────────────────┐
│ │
▼ ▼
┌───────────┐ ┌─────────────┐
│ Webpage │ │ n8n │
│ Dashboard │ │ Automation │
└───────────┘ └──────┬──────┘
│
▼
┌────────────┐
│ AI Agent │
└─────┬──────┘
│
┌──────────┼──────────┐
▼ ▼ ▼
Telegram Voice Google Sheets
Message Alert Logging
11. IoT webpage
The webpage is the user-facing monitoring interface.
A dashboard could contain:
╔══════════════════════════════════════════════════╗
║ SOLARPULSE AI ║
║ Solar PV Dashboard ║
╠══════════════════════════════════════════════════╣
║ ║
║ Voltage Current Power ║
║ 18.72 V 2.84 A 53.16 W ║
║ ║
║ Temperature Irradiance Energy ║
║ 42.6 °C 815 W/m² 1.284 kWh ║
║ ║
╠══════════════════════════════════════════════════╣
║ SYSTEM STATUS ║
║ ║
║ 🟢 NORMAL ║
║ ║
╠══════════════════════════════════════════════════╣
║ PV POWER GRAPH ║
║ ║
║ ╭──╮ ║
║ ╭───╯ ╰──╮ ║
║ ──╯ ╰──────── ║
║ ║
╠══════════════════════════════════════════════════╣
║ AI ANALYSIS ║
║ ║
║ "PV generation is operating within the expected ║
║ range for the measured irradiance." ║
╚══════════════════════════════════════════════════╝
12. n8n automation architecture
n8n becomes the central orchestration layer.
ESP32
│
▼
HTTP Request
│
▼
┌───────────┐
│ Webhook │
└─────┬─────┘
│
▼
Parse JSON
│
▼
Validate Sensor Data
│
▼
Calculate/Check Rules
│
┌────────┴────────┐
│ │
NORMAL ABNORMAL
│ │
▼ ▼
Google Sheets AI Agent
│ │
│ ┌─────┴─────┐
│ │ │
│ ▼ ▼
│ Diagnosis Recommendation
│ │
│ ▼
│ Telegram
│ │
│ ▼
│ Voice Message
│
▼
Dashboard
13. n8n workflow nodes
A complete workflow can be organized as:
[Webhook]
↓
[Set / Normalize Data]
↓
[Function: Calculate Power]
↓
[IF: Sensor Valid?]
↓
[Store Data]
↓
[Rule Evaluation]
↓
[AI Agent]
↓
[Decision]
/ \
/ \
Normal Alert
| |
▼ ▼
Sheets Telegram
|
▼
Text-to-Speech
|
▼
Telegram Voice
14. AI Agent responsibilities
The AI Agent should not simply say "high" or "low."
It should interpret several parameters together.
For example:
PV Voltage = 17.1 V
PV Current = 0.4 A
Irradiance = 850 W/m²
Temperature = 39 °C
The AI agent could determine that the current output is unusually low relative to the available irradiance and report a possible performance issue.
Potential anomaly categories:
-
low power
-
sudden power drop
-
abnormal voltage
-
abnormal current
-
overheating
-
sensor failure
-
communication failure
-
nighttime/low-light condition
-
prolonged underperformance
The AI should distinguish actual faults from expected environmental changes.
For example:
Irradiance = 50 W/m²
Power = 2 W
should not automatically be treated as a PV fault.
15. AI Agent input
A useful AI-agent prompt can be structured around machine-readable input:
You are SolarPulse AI, an assistant responsible for
interpreting solar PV monitoring data.
Analyze:
PV voltage
PV current
PV power
panel temperature
solar irradiance
historical values
previous alerts
Determine:
1. Current operating condition
2. Whether an anomaly exists
3. Severity
4. Possible cause
5. Recommended action
Do not declare a hardware failure unless the available
measurements provide sufficient evidence.
Return JSON:
{
"status": "NORMAL|WARNING|CRITICAL",
"anomaly": true,
"reason": "...",
"recommendation": "...",
"voice_message": "..."
}
16. AI agent decision example
Suppose:
Voltage = 18.4 V
Current = 2.9 A
Power = 53.36 W
Temperature = 41 °C
Irradiance = 820 W/m²
AI output:
{
"status": "NORMAL",
"anomaly": false,
"reason": "PV output is consistent with the measured operating conditions.",
"recommendation": "Continue monitoring.",
"voice_message": "Solar PV system is operating normally."
}
For an abnormal case:
{
"status": "WARNING",
"anomaly": true,
"reason": "PV current has decreased significantly while irradiance remains high.",
"recommendation": "Inspect panel shading, connections and PV-side equipment.",
"voice_message": "Warning. Solar PV output has dropped unexpectedly. Please inspect the system."
}
17. Telegram text alert
Example workflow:
ESP32
↓
n8n
↓
AI Agent
↓
Telegram Bot
↓
Mobile Phone
Example message:
⚠️ SOLARPULSE AI ALERT
Device: SOLARPULSE_001
Status: WARNING
PV Voltage: 18.1 V
PV Current: 0.72 A
PV Power: 13.0 W
Irradiance: 830 W/m²
Temperature: 44.2 °C
AI Analysis:
PV output is significantly below the expected level
for the measured irradiance.
Recommended Action:
Inspect the PV panel for shading, contamination or
connection problems.
18. Telegram voice alert
The voice-alert pipeline is:
AI Agent
│
▼
Voice message text
│
▼
Text-to-Speech service
│
▼
Audio file
│
▼
Telegram Bot
│
▼
User's smartphone
Example spoken message:
"SolarPulse warning. PV output has dropped unexpectedly while solar irradiance remains high. Please inspect the solar panel and electrical connections."
This is particularly useful when the operator is not continuously looking at the dashboard.
19. Google Sheets integration
Google Sheets can act as a simple historical event/data repository.
Example:
| Timestamp | Device | Voltage | Current | Power | Temp | Irradiance | AI Status | Alert |
|---|---|---|---|---|---|---|---|---|
| 10:01 | SP001 | 18.7 | 2.8 | 52.4 | 41.2 | 810 | NORMAL | No |
| 10:02 | SP001 | 18.5 | 2.7 | 49.9 | 41.5 | 825 | NORMAL | No |
| 10:03 | SP001 | 18.1 | 0.8 | 14.5 | 42.1 | 830 | WARNING | Yes |
This makes it possible to perform later analysis such as:
-
daily energy
-
maximum power
-
minimum voltage
-
abnormal-event frequency
-
temperature/output relationship
-
historical performance
20. ThingSpeak architecture
ThingSpeak can provide a cloud IoT channel .
Example field assignment:
Field 1 → Voltage
Field 2 → Current
Field 3 → Power
Field 4 → Temperature
Field 5 → Irradiance
Field 6 → Energy
Field 7 → Status
Conceptually:
ESP32
│
│ HTTP/MQTT
▼
ThingSpeak
│
├────► Charts
├────► Historical data
└────► API
The webpage can either retrieve data from the cloud API or receive data through the project's backend architecture.
21. End-to-end communication
The complete sequence is:
1. Solar panel produces electricity
↓
2. Sensors measure PV parameters
↓
3. ESP32 reads sensors
↓
4. ESP32 filters/calculates measurements
↓
5. ESP32 calculates PV power
↓
6. ESP32 creates JSON packet
↓
7. Data transmitted over Wi-Fi
↓
8. Cloud/dashboard receives data
↓
9. n8n receives event
↓
10. n8n validates data
↓
11. AI Agent analyzes operating condition
↓
12. AI returns structured diagnosis
↓
13. n8n stores record in Google Sheets
↓
14. If abnormal:
↓
15. Telegram text alert
↓
16. Text converted to speech
↓
17. Telegram voice alert
22. ESP32 firmware architecture
The firmware should be divided into logical modules.
main()
│
├── initializeSensors()
│
├── initializeDisplay()
│
├── connectWiFi()
│
├── synchronizeTime()
│
└── loop()
│
├── readVoltage()
├── readCurrent()
├── readTemperature()
├── readIrradiance()
├── calculatePower()
├── calculateEnergy()
├── validateMeasurements()
├── updateDisplay()
└── sendCloudData()
23. Example ESP32 Arduino code
Below is a prototype/reference implementation. The voltage/current calibration values must be changed for the actual sensors used.
#include <WiFi.h>
#include <HTTPClient.h>
#include <ArduinoJson.h>
#include <OneWire.h>
#include <DallasTemperature.h>
// ---------------------------
// Wi-Fi configuration
// ---------------------------
const char* WIFI_SSID = "YOUR_WIFI";
const char* WIFI_PASSWORD = "YOUR_PASSWORD";
// n8n webhook
const char* WEBHOOK_URL =
"https://YOUR-N8N-DOMAIN/webhook/solarpulse";
// ---------------------------
// ESP32 pins
// ---------------------------
#define PV_VOLTAGE_PIN 34
#define PV_CURRENT_PIN 35
#define TEMP_PIN 4
#define STATUS_LED 2
// ---------------------------
// Temperature sensor
// ---------------------------
OneWire oneWire(TEMP_PIN);
DallasTemperature tempSensor(&oneWire);
// ---------------------------
// Calibration
// IMPORTANT:
// Replace these with values
// determined for your hardware.
// ---------------------------
float voltageScale = 6.0;
float currentOffset = 1.65;
float currentSensitivity = 0.066;
// ---------------------------
// Energy calculation
// ---------------------------
float energyWh = 0.0;
unsigned long previousMillis = 0;
const unsigned long sampleInterval = 10000;
// ---------------------------
// Read PV voltage
// ---------------------------
float readPVVoltage()
{
int raw = analogRead(PV_VOLTAGE_PIN);
float adcVoltage =
(raw / 4095.0) * 3.3;
return adcVoltage * voltageScale;
}
// ---------------------------
// Read PV current
// ---------------------------
float readPVCurrent()
{
int raw = analogRead(PV_CURRENT_PIN);
float sensorVoltage =
(raw / 4095.0) * 3.3;
float current =
(sensorVoltage - currentOffset)
/ currentSensitivity;
if (current < 0)
current = 0;
return current;
}
// ---------------------------
// Send JSON data
// ---------------------------
void sendData(
float voltage,
float current,
float power,
float temperature)
{
if (WiFi.status() != WL_CONNECTED)
return;
HTTPClient http;
http.begin(WEBHOOK_URL);
http.addHeader(
"Content-Type",
"application/json"
);
StaticJsonDocument<512> doc;
doc["device_id"] = "SOLARPULSE_001";
doc["voltage"] = voltage;
doc["current"] = current;
doc["power"] = power;
doc["temperature"] = temperature;
doc["energy_wh"] = energyWh;
String payload;
serializeJson(doc, payload);
int responseCode =
http.POST(payload);
Serial.print("HTTP Response: ");
Serial.println(responseCode);
http.end();
}
// ---------------------------
// Setup
// ---------------------------
void setup()
{
Serial.begin(115200);
pinMode(STATUS_LED, OUTPUT);
tempSensor.begin();
WiFi.begin(
WIFI_SSID,
WIFI_PASSWORD
);
Serial.print("Connecting");
while (WiFi.status() != WL_CONNECTED)
{
delay(500);
Serial.print(".");
}
Serial.println();
Serial.println("Wi-Fi connected");
Serial.println(WiFi.localIP());
}
// ---------------------------
// Main loop
// ---------------------------
void loop()
{
unsigned long currentMillis =
millis();
if (currentMillis - previousMillis
>= sampleInterval)
{
previousMillis =
currentMillis;
float voltage =
readPVVoltage();
float current =
readPVCurrent();
tempSensor.requestTemperatures();
float temperature =
tempSensor.getTempCByIndex(0);
float power =
voltage * current;
// Energy in Wh
float hours =
sampleInterval / 3600000.0;
energyWh +=
power * hours;
Serial.println("-------------------");
Serial.print("Voltage: ");
Serial.println(voltage);
Serial.print("Current: ");
Serial.println(current);
Serial.print("Power: ");
Serial.println(power);
Serial.print("Temperature: ");
Serial.println(temperature);
Serial.print("Energy: ");
Serial.println(energyWh);
sendData(
voltage,
current,
power,
temperature
);
}
}
24. Improved ESP32 architecture
For the final version, I would recommend adding:
Sensor
↓
Moving Average Filter
↓
Outlier Rejection
↓
Calibration
↓
Range Validation
↓
Power Calculation
↓
Energy Calculation
↓
Local Fault Detection
↓
Cloud Transmission
This prevents noisy sensor values from triggering unnecessary AI alerts.
25. Local fault detection
Some faults can be identified without AI.
For example:
if (voltage < 1.0 && current < 0.1)
{
status = "LOW_OUTPUT";
}
or:
if (temperature > 75)
{
status = "OVER_TEMPERATURE";
}
But thresholds should be configurable according to the actual PV system.
A useful architecture is:
Sensor Data
│
┌────────┴────────┐
│ │
▼ ▼
Rule Engine AI Agent
│ │
└────────┬────────┘
▼
Final Decision
This reduces unnecessary AI calls.
26. n8n workflow pseudo-configuration
Node 1 — Webhook
POST /solarpulse
Receives:
{
"device_id": "SOLARPULSE_001",
"voltage": 18.7,
"current": 2.8,
"power": 52.36,
"temperature": 42.1,
"irradiance": 815
}
Node 2 — Code/Function
Calculate derived values:
const d = $json;
const power =
Number(d.voltage) *
Number(d.current);
return [{
json: {
...d,
calculated_power: power
}
}];
Node 3 — Validation
Voltage valid?
│
├── NO → Error workflow
│
└── YES
↓
Current valid?
│
├── NO → Error workflow
│
└── YES
Node 4 — AI Agent
Send the validated sensor information.
Node 5 — Google Sheets
Append:
timestamp
device
voltage
current
power
temperature
irradiance
AI status
AI explanation
Node 6 — IF
AI status == WARNING
OR
AI status == CRITICAL
Node 7 — Telegram
Send notification.
Node 8 — Text-to-Speech
Generate audio.
Node 9 — Telegram Voice
Send audio message.
27. AI-agent conversation example
The project can document the AI Agent interaction as follows:
SYSTEM
You are SolarPulse AI.
USER
Device: SP001
Voltage: 18.2 V
Current: 0.71 A
Power: 12.9 W
Temperature: 43.7 °C
Irradiance: 840 W/m²
Analyze the PV operating condition.
AI AGENT
Status: WARNING
The measured power is substantially lower than
expected for the reported irradiance.
Possible causes include:
1. Panel shading
2. Surface contamination
3. Electrical connection problem
4. PV-side equipment issue
Recommended action:
Inspect the panel and electrical connections.
Then n8n converts the AI response into:
Telegram Text
+
Telegram Voice
+
Google Sheets Event
28. Multi-channel alert architecture
One of the major contributions of the project is that an event does not depend on a single notification channel.
AI DETECTS EVENT
│
┌─────────────┼─────────────┐
│ │ │
▼ ▼ ▼
Webpage Telegram Google Sheets
Alert Text Log
│
▼
Text-to-Speech
│
▼
Voice Alert
Therefore:
-
dashboard = visual monitoring
-
Telegram = immediate textual notification
-
voice = hands-free notification
-
Sheets = historical record
29. Webpage software structure
A simple web application can have:
/frontend
index.html
style.css
dashboard.js
/backend
server.js
api.js
/data
sensor-data
/assets
logo
icons
Dashboard components:
Header
│
├── Device status
├── Last update
└── Connection status
Metrics
│
├── Voltage
├── Current
├── Power
├── Temperature
├── Irradiance
└── Energy
Charts
│
├── Power vs Time
├── Voltage vs Time
├── Current vs Time
└── Temperature vs Time
AI
│
├── Status
├── Explanation
└── Recommendation
Alerts
│
├── Recent alerts
└── Alert history
30. Dashboard HTML prototype
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>SolarPulse AI</title>
<style>
body {
margin: 0;
font-family: Arial, sans-serif;
background: #101820;
color: white;
}
header {
padding: 20px;
background: #17232c;
}
.dashboard {
display: grid;
grid-template-columns:
repeat(auto-fit, minmax(220px, 1fr));
gap: 20px;
padding: 20px;
}
.card {
background: #1d2d38;
padding: 20px;
border-radius: 15px;
}
.value {
font-size: 32px;
color: #ffd166;
}
.normal {
color: #00e676;
}
.warning {
color: #ffb300;
}
.critical {
color: #ff5252;
}
</style>
</head>
<body>
<header>
<h1>☀ SolarPulse AI</h1>
<p>Intelligent Solar PV Monitoring System</p>
</header>
<div class="dashboard">
<div class="card">
<h3>Voltage</h3>
<div id="voltage"
class="value">-- V</div>
</div>
<div class="card">
<h3>Current</h3>
<div id="current"
class="value">-- A</div>
</div>
<div class="card">
<h3>Power</h3>
<div id="power"
class="value">-- W</div>
</div>
<div class="card">
<h3>Temperature</h3>
<div id="temperature"
class="value">-- °C</div>
</div>
<div class="card">
<h3>Irradiance</h3>
<div id="irradiance"
class="value">-- W/m²</div>
</div>
<div class="card">
<h3>AI Status</h3>
<div id="status"
class="value normal">
NORMAL
</div>
</div>
</div>
<script>
async function updateDashboard()
{
try
{
const response =
await fetch("/api/latest");
const data =
await response.json();
document.getElementById("voltage")
.innerText =
data.voltage + " V";
document.getElementById("current")
.innerText =
data.current + " A";
document.getElementById("power")
.innerText =
data.power + " W";
document.getElementById("temperature")
.innerText =
data.temperature + " °C";
document.getElementById("irradiance")
.innerText =
data.irradiance + " W/m²";
document.getElementById("status")
.innerText =
data.status;
}
catch(error)
{
console.error(error);
}
}
setInterval(updateDashboard, 10000);
updateDashboard();
</script>
</body>
</html>
31. Complete project workflow
The complete SolarPulse AI system can therefore be represented as:
☀ SUN
│
▼
┌───────────┐
│ SOLAR PV │
│ PANEL │
└─────┬─────┘
│
┌─────────────┼─────────────┐
│ │ │
▼ ▼ ▼
Voltage Current Temperature
Sensor Sensor Sensor
│ │ │
└─────────────┼─────────────┘
▼
┌───────────┐
│ ESP32 │
│ │
│ Sampling │
│ Filtering │
│ Compute │
└─────┬─────┘
│
Wi-Fi
│
▼
┌────────────────────────┐
│ IoT CLOUD/API │
└───────────┬────────────┘
│
┌───────────┴────────────┐
│ │
▼ ▼
┌───────────┐ ┌───────────┐
│ ThingSpeak│ │ n8n │
└─────┬─────┘ └─────┬─────┘
│ │
▼ ▼
Cloud Charts Data Validation
│
▼
Rule Engine
│
▼
AI AGENT
│
┌────────┼────────┐
│ │ │
▼ ▼ ▼
Telegram Voice Sheets
Text Alert Log
│
▼
USER
│
▼
Corrective Action
32. Fault-detection logic
A useful rule hierarchy is:
Level 0 — Normal
All sensor readings valid
+
PV output consistent with conditions
Level 1 — Warning
Moderate deviation
OR
temperature approaching limit
OR
unexpected output reduction
Level 2 — Critical
Severe abnormal condition
OR
dangerous temperature
OR
sensor/system failure
Example:
Sensor Data
│
▼
┌─────────────────┐
│ Data Validation │
└────────┬────────┘
│
Valid data?
/ \
NO YES
│ │
▼ ▼
SENSOR AI ANALYSIS
ERROR │
▼
Severity Level
/ | \
NORMAL WARNING CRITICAL
│ │ │
▼ ▼ ▼
Log Telegram Telegram
Voice Voice
33. Security architecture
The final system should not expose credentials in ESP32 source code.
Avoid:
const char* API_KEY = "actual-secret";
for production repositories.
Instead use:
ESP32
│
└── HTTPS
│
▼
Secure API/Webhook
│
▼
n8n credentials
│
├── Telegram credential
├── Google credential
├── AI API credential
└── ThingSpeak credential
Recommended protections include:
-
HTTPS
-
authenticated webhook
-
API keys
-
secret/environment variables
-
n8n credential management
-
rate limiting
-
input validation
-
device identification
-
timestamp validation
34. Failure scenarios
The documentation should explicitly test:
| Failure | Expected response |
|---|---|
| Wi-Fi disconnected | ESP32 retries connection |
| Internet unavailable | Local buffering/retry |
| Sensor disconnected | Sensor error |
| Abnormal voltage | Warning/critical event |
| Current suddenly drops | AI analysis |
| High temperature | Temperature warning |
| n8n unavailable | Retry transmission |
| Telegram unavailable | Log event/retry |
| AI service unavailable | Rule-based fallback |
| ThingSpeak unavailable | Continue local/cloud retry |
| Invalid JSON | Reject request |
35. Important design principle: AI is not the only protection
The system should not depend exclusively on an AI model for electrical safety.
Use deterministic protection for hard limits:
Hardware protection
↓
Local ESP32 safety/range checks
↓
n8n rule engine
↓
AI interpretation
↓
Human notification
AI is particularly useful for contextual interpretation, rather than replacing electrical protection circuitry.
36. Project methodology
The project can be implemented in these stages.
Phase 1 — Hardware
-
Assemble ESP32.
-
Connect voltage sensor.
-
Connect current sensor.
-
Connect temperature sensor.
-
Verify each sensor independently.
-
Calibrate measurements.
-
Test under controlled PV conditions.
Phase 2 — Firmware
-
Configure ADC.
-
Read voltage.
-
Read current.
-
Read temperature.
-
Calculate power.
-
Calculate energy.
-
Add filtering.
-
Add Wi-Fi.
-
Create JSON payload.
-
Send test data.
Phase 3 — Cloud
-
Create ThingSpeak channel.
-
Configure fields.
-
Test cloud transmission.
-
Verify charts.
-
Configure API access.
Phase 4 — n8n
-
Create webhook.
-
Receive ESP32 JSON.
-
Validate data.
-
Calculate derived values.
-
Add rule engine.
-
Connect AI Agent.
-
Add Google Sheets.
-
Add Telegram.
-
Add voice generation.
-
Test complete workflow.
Phase 5 — Web application
-
Create dashboard.
-
Add metric cards.
-
Add charts.
-
Add status indicator.
-
Add AI explanation.
-
Add alert history.
-
Connect backend/API.
Phase 6 — Testing
-
Normal operation.
-
Low irradiance.
-
High temperature.
-
Artificial current reduction.
-
Sensor disconnection.
-
Wi-Fi failure.
-
n8n failure.
-
Telegram failure.
-
Recovery testing.
37. Suggested final project directory
SolarPulse-AI/
│
├── README.md
│
├── documentation/
│ ├── project-description.md
│ ├── system-architecture.md
│ ├── hardware-design.md
│ ├── software-design.md
│ ├── n8n-workflow.md
│ ├── ai-agent.md
│ ├── testing.md
│ └── user-manual.md
│
├── esp32/
│ ├── SolarPulse.ino
│ ├── sensors.h
│ ├── sensors.cpp
│ ├── config.h
│ └── calibration.h
│
├── web/
│ ├── index.html
│ ├── style.css
│ └── dashboard.js
│
├── n8n/
│ ├── solarpulse-workflow.json
│ └── ai-agent-prompt.txt
│
├── diagrams/
│ ├── system-block-diagram.png
│ ├── circuit-schematic.png
│ ├── data-flow.png
│ └── n8n-flow.png
│
└── tests/
├── sensor-test
├── api-test
└── alert-test
38. Proposed research contribution
For an academic/project report, the novelty can be framed around the integration of multiple layers, rather than claiming that each individual technology is novel.
The proposed framework combines:
IoT sensing
+
Edge processing
+
Cloud monitoring
+
Workflow automation
+
AI-based contextual analysis
+
Multi-channel notification
into one solar PV monitoring architecture.
A suitable research contribution statement is:
SolarPulse AI proposes an integrated IoT-agentic architecture for real-time photovoltaic performance monitoring in which edge-based ESP32 sensing, cloud telemetry, workflow automation, AI-assisted anomaly interpretation, historical logging, and multi-channel human notification operate as a unified monitoring pipeline.
39. Recommended final report structure
For a B.Tech/M.Tech/project thesis/paper, I would structure the documentation as:
CHAPTER 1
Introduction
CHAPTER 2
Literature Review
CHAPTER 3
Problem Statement
CHAPTER 4
Objectives and Scope
CHAPTER 5
Proposed SolarPulse AI Architecture
CHAPTER 6
Hardware Design
CHAPTER 7
ESP32 Firmware Design
CHAPTER 8
IoT and Cloud Architecture
CHAPTER 9
n8n Automation Architecture
CHAPTER 10
AI Agent Design
CHAPTER 11
Telegram Voice Alert System
CHAPTER 12
Google Sheets and ThingSpeak Integration
CHAPTER 13
Web Dashboard
CHAPTER 14
System Implementation
CHAPTER 15
Flowcharts and Algorithms
CHAPTER 16
Experimental Setup
CHAPTER 17
Results and Discussion
CHAPTER 18
Fault/Anomaly Detection
CHAPTER 19
Limitations
CHAPTER 20
Future Scope
CHAPTER 21
Conclusion
REFERENCES
APPENDIX
ESP32 Code
n8n Workflow
Circuit
API Configuration
Test Results
40. Final system in one diagram
┌───────────────┐
│ SOLAR PV │
│ PANEL │
└───────┬───────┘
│
┌──────────────┼──────────────┐
│ │ │
▼ ▼ ▼
Voltage Current Temperature
Sensor Sensor Sensor
│ │ │
└──────────────┼──────────────┘
│
▼
┌───────────────┐
│ ESP32 │
│ │
│ Sensor Read │
│ Filtering │
│ P = V × I │
│ Energy │
│ Wi-Fi │
└───────┬───────┘
│
HTTPS
│
┌──────────────┼──────────────┐
│ │
▼ ▼
┌───────────────┐ ┌───────────────┐
│ ThingSpeak │ │ n8n Webhook │
│ Cloud Storage │ │ Automation │
└───────┬───────┘ └───────┬───────┘
│ │
▼ ▼
┌───────────────┐ ┌───────────────┐
│ IoT Dashboard │ │ Data Validate │
└───────────────┘ └───────┬───────┘
│
▼
┌───────────────┐
│ Rule Engine │
└───────┬───────┘
│
▼
┌───────────────┐
│ AI AGENT │
│ │
│ Analyze │
│ Explain │
│ Recommend │
└───────┬───────┘
│
┌──────────────────────┼──────────────────────┐
│ │ │
▼ ▼ ▼
┌────────────┐ ┌──────────────┐ ┌────────────┐
│ Telegram │ │ Text-to- │ │ Google │
│ Alert │ │ Speech │ │ Sheets │
└────────────┘ └──────┬───────┘ └────────────┘
│
▼
┌────────────┐
│ Telegram │
│ Voice │
│ Alert │
└─────┬──────┘
│
▼
👤 USER
This gives you the complete conceptual and implementation foundation for SolarPulse AI. The next practical step is to turn this into a fully buildable version with the exact sensor modules you intend to use: a complete circuit/schematic, calibrated ESP32 firmware, n8n workflow JSON, AI-agent prompt, Telegram bot configuration, Google Sheets structure, ThingSpeak configuration, and a polished responsive web dashboard.
## SolarPulse AI — Project Summary **SolarPulse AI** is an IoT-enabled intelligent solar PV monitoring system that combines **ESP32 sensing, cloud monitoring, n8n automation, AI-based anomaly analysis, Telegram notifications/voice alerts, Google Sheets logging, ThingSpeak, and a web dashboard**. ### Core workflow ``` Solar PV Panel ↓ Voltage / Current / Temperature / Irradiance Sensors ↓ ESP32 ↓ Wi-Fi + JSON ↓ ┌───────────────┬────────────────┐ │ │ │ ▼ ▼ ▼ ThingSpeak Web Dashboard n8n ↓ Data Validation ↓ Rule Evaluation ↓ AI Agent ↓ ┌───────────────────┼─────────────────┐ ↓ ↓ ↓ Telegram Text Voice Alert Google Sheets ``` ### Main functions - **Real-time PV monitoring** - Voltage - Current - Power - Temperature - Irradiance - Energy generation - **ESP32 edge processing** - Sensor acquisition - Filtering/calibration - Power calculation - Energy calculation - Wi-Fi communication - **Cloud/IoT** - ThingSpeak data storage and visualization - Web dashboard for live monitoring - **n8n automation** - Receives ESP32 data - Validates measurements - Runs rules - Calls the AI agent - Logs events - Triggers notifications - **AI Agent** - Interprets PV operating conditions - Detects potential anomalies - Determines severity - Explains possible causes - Provides recommended actions - **Multi-channel alerts** - Telegram text - Telegram voice notification - Dashboard warning - Google Sheets event history ### Example AI scenario ``` Irradiance: 830 W/m² PV Voltage: 18.1 V PV Current: 0.72 A PV Power: 13 W Temperature: 44 °C ↓ AI Agent ↓ WARNING: PV output is significantly lower than expected for the measured irradiance. Possible causes: - Shading - Panel contamination - Electrical connection problem - PV equipment issue ↓ Telegram Text + Voice Alert + Google Sheets Log ``` ### Hardware Typical prototype: ``` ESP32 ├── PV Voltage Sensor ├── PV Current Sensor ├── DS18B20 Temperature Sensor ├── Irradiance/Light Sensor ├── OLED Display ├── Status LED └── Buzzer ``` ### Software stack ``` ESP32 / Arduino + Web Dashboard + ThingSpeak + n8n + AI Agent + Telegram Bot + Text-to-Speech + Google Sheets ``` ### Academic contribution The project integrates **IoT sensing + edge computing + cloud monitoring + workflow automation + AI-based anomaly interpretation + multi-channel alerting** into a unified solar PV monitoring framework. ### Suggested report title **“SolarPulse AI: An IoT-Enabled Intelligent Framework for Real-Time Solar PV Performance Monitoring and Multi-Channel AI Alerting”** The complete implementation can be organized into **hardware design → ESP32 firmware → IoT/cloud → n8n workflow → AI agent → Telegram voice alerts → Google Sheets → web dashboard → testing and results**.


No comments:
Post a Comment