Tuesday, 6 October 2026

AI Floating Solar Tracker with Sun Path Prediction

Absolutely. This can be designed as a complete AI-powered floating solar tracker + IoT + ESP32 + n8n + Telegram + Google Sheets + ThingSpeak system, with an AI agent supervising the system and sending voice alerts.

Below is a complete project architecture and documentation structure you can use for a final-year project, prototype, paper, GitHub repository, or product demonstration.

AI Floating Solar Tracker with Sun -Path Prediction

1. Project Title

AI-Powered Floating Solar Tracker with Sun-Path Prediction, ESP32 IoT, n8n Automation, Telegram Voice Alerts, Google Sheets Logging and ThingSpeak Cloud Dashboard

Short name

AI-FST-IoT

Core technologies

  • ESP32

  • Floating solar panel platform

  • Dual-axis solar tracking

  • GPS / RTC

  • LDR or solar irradiance sensors

  • INA219/INA226 voltage-current sensor

  • Servo motors / geared DC motors

  • Temperature and water-level sensors

  • Wi-Fi

  • MQTT/HTTP

  • n8n

  • AI Agent

  • Telegram Bot

  • Telegram voice notifications

  • Google Sheets

  • ThingSpeak

  • Web dashboard

  • Solar-position/sun-path algorithm

  • Optional weather API

  • Optional machine-learning prediction


2. Project Abstract

The proposed system is an AI-enabled floating photovoltaic tracking system designed to improve solar -energy collection from photovoltaic panels installed on a floating platform.

Unlike a conventional fixed solar panel, the proposed system continuously determines the position of the sun and automatically adjusts the orientation of the floating solar panel using an ESP32-based control system.

The system combines astronomical sun-position prediction, sensor feedback, IoT communication and AI-assisted decision-making.

The ESP32 collects parameters such as:

  • Solar panel voltage

  • Solar panel current

  • Power output

  • Panel temperature

  • Water temperature

  • Water level

  • GPS position

  • Panel orientation

  • Light intensity

  • Motor position

  • Battery voltage

  • System status

The ESP32 transmits the data through Wi-Fi to an automation platform based on n8n.

n8n acts as the central automation layer. It can receive sensor data, store historical information in Google Sheets, update ThingSpeak, evaluate abnormal conditions and communicate with an AI agent .

The AI agent analyzes the incoming information and determines whether the system requires:

  • Normal operation

  • Tracker adjustment

  • Maintenance

  • Low-power operation

  • Over-temperature warning

  • Low-water warning

  • Sensor-failure warning

  • Motor-failure warning

  • Weather-related protection

  • Emergency notification

When an important event occurs, n8n automatically sends a Telegram notification. For critical events, a text-to-speech service can generate a voice alert that is delivered through Telegram.

A web dashboard provides real-time monitoring of the floating solar plant.


3. Main Objective

The main objective is:

To develop an autonomous floating solar tracking system that predicts the sun's position, automatically tracks the sun, monitors photovoltaic performance through IoT, and uses AI-assisted n8n automation to analyze conditions and send intelligent alerts.


4. Specific Objectives

The project has several objectives.

Hardware objectives

  1. Build a floating solar-panel platform.

  2. Install a photovoltaic panel on a motorized tracking mechanism.

  3. Measure voltage and current.

  4. Calculate real-time power.

  5. Measure environmental parameters.

  6. Control the tracking motors using ESP32.

  7. Monitor battery/system voltage.

  8. Detect abnormal mechanical or electrical conditions.

Software objectives

  1. Calculate solar position.

  2. Predict sunrise, solar noon and sunset.

  3. Calculate solar azimuth and elevation.

  4. Control the tracker according to predicted solar position.

  5. Send sensor data to the cloud.

  6. Store historical measurements.

  7. Visualize data.

  8. Automate alerts.

  9. Use an AI agent for intelligent analysis.

  10. Provide Telegram notifications and voice alerts.


5. High-Level Architecture

                    ┌───────────────────────┐
                    │       SUN / SKY       │
                    └───────────┬───────────┘
                                │
                                ▼
                    ┌───────────────────────┐
                    │ Sun Position Algorithm│
                    │ Azimuth + Elevation   │
                    └───────────┬───────────┘
                                │
                                ▼
┌───────────────┐      ┌───────────────────────┐
│ Solar Panel   │─────▶│         ESP32         │
└───────────────┘      │                       │
                       │ Sensor Acquisition    │
┌───────────────┐      │ Tracker Control       │
│ LDR Sensors   │─────▶│ Power Measurement     │
└───────────────┘      │ Wi-Fi / MQTT / HTTP   │
                       └───────────┬───────────┘
                                   │
                                   │ Wi-Fi
                                   ▼
                         ┌──────────────────┐
                         │       n8n        │
                         │ Automation Layer │
                         └────────┬─────────┘
                                  │
             ┌────────────────────┼─────────────────────┐
             │                    │                     │
             ▼                    ▼                     ▼
       ┌───────────┐        ┌─────────────┐       ┌────────────┐
       │ AI Agent  │        │ Google      │       │ ThingSpeak │
       │           │        │ Sheets      │       │ Dashboard  │
       └─────┬─────┘        └─────────────┘       └────────────┘
             │
             ▼
       ┌─────────────┐
       │ Decision /  │
       │ Automation  │
       └──────┬──────┘
              │
              ▼
       ┌──────────────┐
       │   Telegram   │
       │ Text Alert   │
       │ Voice Alert  │
       └──────────────┘

6. Complete System Flow

START
  │
  ▼
ESP32 BOOT
  │
  ▼
Initialize Wi-Fi
  │
  ▼
Initialize sensors
  │
  ▼
Read GPS / RTC
  │
  ▼
Calculate solar position
  │
  ├───────────────┐
  │               │
  ▼               ▼
Azimuth         Elevation
  │               │
  └───────┬───────┘
          ▼
Calculate desired tracker position
          │
          ▼
Read actual tracker position
          │
          ▼
Calculate tracking error
          │
          ▼
Move motors
          │
          ▼
Read electrical parameters
          │
          ▼
Calculate power
          │
          ▼
Read environmental sensors
          │
          ▼
Create JSON packet
          │
          ▼
Send to n8n
          │
          ▼
       n8n Webhook
          │
          ├───────────────┐
          │               │
          ▼               ▼
    Google Sheets     ThingSpeak
          │
          ▼
     AI Agent
          │
          ▼
Analyze system condition
          │
          ├──── NORMAL ────────▶ Continue
          │
          ├──── WARNING ───────▶ Telegram
          │
          └──── CRITICAL ──────▶ Voice Alert
                                      │
                                      ▼
                                   Operator

7. Hardware Architecture

A practical prototype can use the following components.

Component Purpose
ESP32 DevKit Main controller
Solar panel Energy generation
Servo motors / geared motors Solar tracking
Motor driver Motor control
LDR × 4 Light-direction feedback
INA219/INA226 Voltage/current measurement
DS18B20 Temperature
Ultrasonic sensor Water/platform level
MPU6050 Platform tilt detection
GPS module Location/time
RTC DS3231 Accurate timekeeping
Battery Energy storage
Buck converter Regulated supply
Float/platform Floating structure
Limit switches Mechanical safety
Fuse Electrical protection
Waterproof enclosure Electronics protection

8. Floating Platform

The physical platform can be constructed using:

  • HDPE pipes

  • PVC pontoons

  • Foam floats

  • Marine-grade plastic

  • Aluminium frame

  • Stainless-steel brackets

A basic arrangement is:

             SOLAR PANEL
       ┌─────────────────────┐
       │                     │
       │       PV PANEL      │
       │                     │
       └─────────────────────┘
              │       │
              │ TILT  │
              ▼       ▼

        ┌───────────────────┐
        │   ROTATING FRAME  │
        └─────────┬─────────┘
                  │
             ROTATION AXIS
                  │
       ┌──────────┴──────────┐
       │                     │
   ┌───────┐             ┌───────┐
   │FLOAT 1│             │FLOAT 2│
   └───────┘             └───────┘

~~~~~~~~~~~~ WATER SURFACE ~~~~~~~~~~~~

For a prototype, the system can first be built on a small water tank rather than a pond.


9. Solar Tracking Mechanism

A dual-axis tracker is preferable for a demonstration project.

It provides:

  • Azimuth rotation

  • Elevation/tilt adjustment

                  SUN
                   ☀
                  /|
                 / |
                /  |
               /   |
              ▼    |
        ┌──────────────┐
        │  SOLAR PANEL │
        └──────────────┘
              ↕
          ELEVATION
             MOTOR

               │
               │
             ROTARY
              BASE
               ↻
            AZIMUTH

10. Four-LDR Tracking Sensor

Four LDRs can be placed around a small cross-shaped divider.

                 NORTH
                   ↑

              ┌───────┐
              │ LDR-N │
              └───┬───┘
                  │
       LDR-W ─────┼───── LDR-E
                  │
              ┌───┴───┐
              │ LDR-S │
              └───────┘

The ESP32 compares the readings.

For example:

Horizontal error:

Error_H = (LDR_E + LDR_NE + LDR_SE)
        - (LDR_W + LDR_NW + LDR_SW)

Vertical error:

Error_V = (LDR_N + LDR_NE + LDR_NW)
        - (LDR_S + LDR_SE + LDR_SW)

The motor moves until the error approaches zero.


11. Why Use Both AI and Sun-Path Prediction?

This is an important part of the project.

The system should not depend entirely on AI to control the motor.

The deterministic solar-position calculation should provide the primary tracking command.

AI should operate as a higher-level supervisory system.

Conventional control

Sun position
     ↓
Tracker position
     ↓
Motor

Proposed AI system

Sun prediction
       ↓
ESP32 tracker
       ↓
Sensor measurements
       ↓
AI Agent
       ↓
Performance analysis
       ↓
Decision / warning / optimization

This makes the system more reliable.


12. Sun-Path Prediction

The ESP32 can calculate the position of the sun using:

  • Latitude

  • Longitude

  • Date

  • Time

  • Time zone

The result is:

Solar azimuth

Direction of the sun measured around the horizon.

Solar elevation

Angle of the sun above the horizon.

Example:

                  SUN
                   ☀
                  /|
                 / |
                /  | elevation
               /   |
              / θ  |
-------------/-----|------------- horizon
            /
           /
        Azimuth

13. Sun Tracking Algorithm

Simplified logic:

if (sunElevation <= 0) {
    trackerToParkPosition();
}
else {
    targetAzimuth = calculateSolarAzimuth();
    targetElevation = calculateSolarElevation();

    moveAzimuth(targetAzimuth);
    moveElevation(targetElevation);
}

The tracker should also impose mechanical limits:

if (azimuth < AZ_MIN)
    azimuth = AZ_MIN;

if (azimuth > AZ_MAX)
    azimuth = AZ_MAX;

if (elevation < EL_MIN)
    elevation = EL_MIN;

if (elevation > EL_MAX)
    elevation = EL_MAX;

14. Hybrid Tracking Algorithm

A better implementation combines astronomical prediction and LDR feedback.

              Solar Position
                    │
                    ▼
             Target Position
                    │
                    ▼
             Motor Controller
                    │
                    ▼
             Physical Panel
                    │
                    ▼
                LDR Array
                    │
                    ▼
             Actual Position
                    │
                    ▼
              Error Correction
                    │
                    └─────────────┐
                                  │
                                  ▼
                             Motor Driver

The solar algorithm gives the expected location while the LDR array provides real-world correction.

This helps compensate for:

  • Small mounting errors

  • Mechanical backlash

  • Sensor inaccuracies

  • Incorrect initial orientation

  • Small clock errors

  • Structural movement


15. Electrical Measurement

The ESP32 measures:

Voltage = V
Current = I

Power = V × I

Energy can be estimated as:

Energy = ∫ Power dt

For sampled data:

Energy += Power × Δt

For example:

Voltage = 18.2 V
Current = 1.45 A

Power = 18.2 × 1.45
      = 26.39 W

16. ESP32 Data Packet

The ESP32 can send JSON to n8n.

Example:

{
  "device_id": "FLOAT_SOLAR_01",
  "timestamp": "2026-10-07T12:30:00",
  "latitude": 17.3850,
  "longitude": 78.4867,
  "solar_azimuth": 142.5,
  "solar_elevation": 54.2,
  "tracker_azimuth": 141.8,
  "tracker_elevation": 53.9,
  "voltage": 18.2,
  "current": 1.45,
  "power": 26.39,
  "panel_temperature": 42.5,
  "water_temperature": 28.4,
  "water_level": 74,
  "battery_voltage": 12.6,
  "tilt_x": 0.7,
  "tilt_y": -1.2,
  "motor_status": "OK",
  "tracking_status": "TRACKING"
}

17. ESP32 Software Architecture

The ESP32 program should be divided into modules.

ESP32 Firmware
│
├── WiFi Manager
│
├── Sensor Manager
│   ├── LDR
│   ├── INA219
│   ├── DS18B20
│   ├── MPU6050
│   └── Water sensor
│
├── GPS/RTC Manager
│
├── Solar Position Calculator
│
├── Tracker Controller
│
├── Safety Manager
│
├── Energy Calculator
│
├── JSON Generator
│
└── Cloud Communication

18. ESP32 Example Code

Below is a starting firmware architecture.

#include <WiFi.h>
#include <HTTPClient.h>
#include <Wire.h>
#include <ArduinoJson.h>

const char* WIFI_SSID = "YOUR_WIFI";
const char* WIFI_PASSWORD = "YOUR_PASSWORD";

const char* N8N_URL =
    "https://YOUR-N8N-SERVER/webhook/solar";

#define LDR_N 34
#define LDR_S 35
#define LDR_E 32
#define LDR_W 33

float panelVoltage = 0;
float panelCurrent = 0;
float panelPower = 0;

float solarAzimuth = 0;
float solarElevation = 0;

float trackerAzimuth = 90;
float trackerElevation = 30;

void setup() {

  Serial.begin(115200);

  pinMode(LDR_N, INPUT);
  pinMode(LDR_S, INPUT);
  pinMode(LDR_E, INPUT);
  pinMode(LDR_W, INPUT);

  WiFi.begin(WIFI_SSID, WIFI_PASSWORD);

  Serial.print("Connecting to WiFi");

  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }

  Serial.println();
  Serial.println("WiFi connected");
}

void loop() {

  readSensors();

  calculateSolarPosition();

  trackingControl();

  sendDataToN8N();

  delay(10000);
}

19. Sensor Function

void readSensors() {

  int north = analogRead(LDR_N);
  int south = analogRead(LDR_S);
  int east  = analogRead(LDR_E);
  int west  = analogRead(LDR_W);

  Serial.println("LDR readings:");

  Serial.println(north);
  Serial.println(south);
  Serial.println(east);
  Serial.println(west);

  // Replace these with INA219/INA226 readings
  panelVoltage = 18.2;
  panelCurrent = 1.45;

  panelPower = panelVoltage * panelCurrent;
}

20. LDR Tracking Control

void trackingControl() {

  int north = analogRead(LDR_N);
  int south = analogRead(LDR_S);
  int east  = analogRead(LDR_E);
  int west  = analogRead(LDR_W);

  int horizontalError = east - west;
  int verticalError = north - south;

  const int deadBand = 100;

  if (horizontalError > deadBand) {

    trackerAzimuth += 1;

  } else if (horizontalError < -deadBand) {

    trackerAzimuth -= 1;
  }

  if (verticalError > deadBand) {

    trackerElevation += 1;

  } else if (verticalError < -deadBand) {

    trackerElevation -= 1;
  }

  trackerAzimuth = constrain(
      trackerAzimuth,
      0,
      180
  );

  trackerElevation = constrain(
      trackerElevation,
      0,
      90
  );
}

In the real system, this function should drive actual servos/motors rather than simply changing variables.


21. Sending Data to n8n

void sendDataToN8N() {

  if (WiFi.status() != WL_CONNECTED)
    return;

  HTTPClient http;

  http.begin(N8N_URL);
  http.addHeader("Content-Type", "application/json");

  StaticJsonDocument<1024> doc;

  doc["device_id"] = "FLOAT_SOLAR_01";

  doc["solar_azimuth"] = solarAzimuth;
  doc["solar_elevation"] = solarElevation;

  doc["tracker_azimuth"] = trackerAzimuth;
  doc["tracker_elevation"] = trackerElevation;

  doc["voltage"] = panelVoltage;
  doc["current"] = panelCurrent;
  doc["power"] = panelPower;

  String json;

  serializeJson(doc, json);

  int responseCode = http.POST(json);

  Serial.print("n8n response: ");
  Serial.println(responseCode);

  http.end();
}

22. n8n Architecture

n8n becomes the automation brain around the ESP32.

Recommended workflow:

                    ESP32
                      │
                      ▼
              ┌─────────────┐
              │ n8n Webhook │
              └──────┬──────┘
                     │
                     ▼
              Validate Data
                     │
                     ▼
              Normalize Data
                     │
             ┌───────┴────────┐
             │                │
             ▼                ▼
        Google Sheets    ThingSpeak
             │
             └───────┬────────┘
                     ▼
                 AI Agent
                     │
                     ▼
               Decision Node
               /     |      \
              /      |       \
          NORMAL   WARNING   CRITICAL
             │        │          │
             ▼        ▼          ▼
           Log     Telegram   Voice Alert

23. n8n Workflow Nodes

A complete workflow could contain:

1. Webhook
2. Set / Edit Fields
3. JSON Validation
4. Function / Code
5. IF – Sensor Valid?
6. Google Sheets
7. HTTP Request – ThingSpeak
8. AI Agent
9. Structured Output Parser
10. IF – Alert Required?
11. Telegram
12. Text-to-Speech
13. Telegram Voice
14. Logging

24. n8n Webhook

The ESP32 sends:

POST /webhook/solar

with:

{
  "device_id": "FLOAT_SOLAR_01",
  "power": 26.39,
  "temperature": 42.5,
  "water_level": 74,
  "battery_voltage": 12.6,
  "tracking_status": "TRACKING"
}

The n8n webhook receives the information.


25. Data Validation

The workflow should check:

Is voltage valid?
       │
       ├── NO ──> Sensor Error
       │
       └── YES
            │
            ▼
Is current valid?
            │
            ├── NO ──> Sensor Error
            │
            └── YES
                 │
                 ▼
Continue

This prevents the AI agent from making decisions based on corrupt data.


26. Google Sheets Database

Create columns such as:

Timestamp Device Voltage Current Power Temp Water Level Azimuth Elevation Battery

Example:

2026-10-07 12:30
FLOAT_SOLAR_01
18.2
1.45
26.39
42.5
74
142.5
54.2
12.6

Google Sheets is useful for:

  • Historical data

  • Reports

  • Excel-compatible analysis

  • Maintenance records

  • Daily energy summaries


27. ThingSpeak Dashboard

ThingSpeak can be used for real-time visualization.

Possible fields:

Field 1 = Voltage
Field 2 = Current
Field 3 = Power
Field 4 = Panel Temperature
Field 5 = Water Temperature
Field 6 = Battery Voltage
Field 7 = Solar Azimuth
Field 8 = Solar Elevation

Dashboard:

┌─────────────────────────────────────┐
│       FLOATING SOLAR MONITOR        │
├─────────────────────────────────────┤
│ Voltage       18.2 V                │
│ Current        1.45 A               │
│ Power         26.39 W               │
│ Panel Temp    42.5 °C               │
│ Battery       12.6 V                │
├─────────────────────────────────────┤
│ Solar Azimuth       142.5°          │
│ Solar Elevation      54.2°          │
├─────────────────────────────────────┤
│ Status: TRACKING                    │
└─────────────────────────────────────┘

28. AI Agent

The AI agent should not directly control dangerous hardware without constraints.

Instead, it should act as a supervisory intelligence layer.

It receives:

{
  "power": 26.39,
  "panel_temperature": 42.5,
  "water_level": 74,
  "battery_voltage": 12.6,
  "tracking_error": 1.4,
  "motor_status": "OK"
}

The AI evaluates the condition.


29. Example AI Prompt

A useful system instruction for the AI agent is:

You are the supervisory AI agent for a floating solar
photovoltaic tracking system.

Analyze the sensor data provided by the ESP32.

Your responsibilities are:

1. Detect abnormal operating conditions.
2. Identify possible sensor failures.
3. Identify excessive panel temperature.
4. Identify low battery voltage.
5. Identify abnormal water level.
6. Identify excessive tracking error.
7. Identify unusual power reduction.
8. Recommend maintenance when appropriate.
9. Determine alert severity.

Severity levels:

NORMAL
WARNING
CRITICAL

Never invent sensor values.

Never claim that hardware has moved unless movement
confirmation is available.

Do not issue unrestricted motor commands.

Return structured JSON.

30. AI Output

Example:

{
  "status": "WARNING",
  "reason": "Panel temperature is elevated",
  "severity": 2,
  "recommended_action": "Increase monitoring frequency",
  "telegram_alert": true,
  "voice_alert": false
}

For a critical event:

{
  "status": "CRITICAL",
  "reason": "Battery voltage is below safe operating threshold",
  "severity": 3,
  "recommended_action": "Enter low-power mode",
  "telegram_alert": true,
  "voice_alert": true
}

31. Agentic IoT Concept

The project becomes agentic IoT when the system can observe, reason, decide and initiate actions.

OBSERVE
   │
   ▼
ESP32 Sensors
   │
   ▼
UNDERSTAND
   │
   ▼
n8n + AI Agent
   │
   ▼
REASON
   │
   ▼
Determine condition
   │
   ▼
DECIDE
   │
   ▼
Choose action
   │
   ▼
ACT
   │
   ├── Telegram
   ├── Voice Alert
   ├── Database
   ├── Dashboard
   └── ESP32 command

32. Telegram Alert

Example normal warning:

☀️ FLOATING SOLAR ALERT

Device: FLOAT_SOLAR_01

Status: WARNING

Panel Power: 26.4 W
Panel Temperature: 42.5 °C
Battery: 12.6 V

Reason:
Panel temperature is above the preferred operating range.

Recommendation:
Continue monitoring.

33. Telegram Critical Voice Alert

Example:

🚨 CRITICAL FLOATING SOLAR ALERT

Device FLOAT_SOLAR_01 has detected critically low
battery voltage.

Current battery voltage: 10.8 volts.

The system recommends entering low-power mode
and inspecting the battery and charging circuit.

n8n can:

AI Agent
   ↓
Generate alert text
   ↓
Text-to-Speech service
   ↓
MP3/OGG audio
   ↓
Telegram Bot
   ↓
Operator's phone

34. Telegram Conversation / Chat Architecture

The system can also become interactive.

                 USER
                  │
                  ▼
              Telegram
                  │
                  ▼
             n8n Webhook
                  │
                  ▼
              AI Agent
                  │
       ┌──────────┼──────────┐
       │          │          │
       ▼          ▼          ▼
   Current     History    Commands
    Data       Data       /status
       │          │          │
       └──────────┼──────────┘
                  ▼
              AI Response
                  │
                  ▼
              Telegram

35. Example Telegram Chat

User

/status

AI Agent

☀️ Solar System Status

Power: 26.4 W
Voltage: 18.2 V
Current: 1.45 A

Panel temperature: 42.5 °C
Battery: 12.6 V

Solar azimuth: 142.5°
Solar elevation: 54.2°

Tracker: NORMAL
Water level: NORMAL

Overall condition: GOOD

36. Natural-Language Commands

The Telegram AI agent could support:

What is the current power?
How much energy did we generate today?
Is the tracker working correctly?
Why is the power lower than yesterday?
Show today's maximum power.
Is the battery healthy?
Give me a daily report.

37. AI Daily Report

n8n can run automatically at a selected time.

Example:

☀️ DAILY SOLAR REPORT

Device:
FLOAT_SOLAR_01

Energy generated:
1.82 kWh

Peak power:
143 W

Average power:
76 W

Maximum temperature:
47.2 °C

Tracking performance:
96.4%

Tracker errors:
3

Critical alerts:
0

Warnings:
2

System health:
GOOD

38. Web Dashboard

The project should have a webpage.

Recommended dashboard:

┌──────────────────────────────────────────────────┐
│             AI FLOATING SOLAR SYSTEM             │
├──────────────────────────────────────────────────┤
│                                                  │
│   POWER             ENERGY TODAY                │
│   126 W             1.82 kWh                    │
│                                                  │
├──────────────────────────────────────────────────┤
│ Voltage     Current     Temperature   Battery   │
│ 18.4 V       6.8 A        42 °C        12.7 V   │
├──────────────────────────────────────────────────┤
│                                                  │
│             ☀ SUN POSITION                       │
│                                                  │
│       Azimuth: 142°                             │
│       Elevation: 54°                            │
│                                                  │
├──────────────────────────────────────────────────┤
│             TRACKER POSITION                     │
│                                                  │
│       Azimuth: 141°                             │
│       Elevation: 53°                            │
│                                                  │
├──────────────────────────────────────────────────┤
│ AI STATUS:       ● NORMAL                        │
│ MOTOR:           ● OK                            │
│ INTERNET:        ● CONNECTED                    │
│ BATTERY:         ● GOOD                         │
└──────────────────────────────────────────────────┘

39. Webpage Technology Options

You can build the dashboard using:

Simple

HTML
CSS
JavaScript

More advanced

React
+
Chart.js
+
REST API
+
n8n

Example architecture

ESP32
  │
  ▼
n8n
  │
  ├── Google Sheets
  ├── ThingSpeak
  └── Dashboard API
          │
          ▼
      Web Browser

40. Example HTML Dashboard

<!DOCTYPE html>
<html>
<head>
    <title>AI Floating Solar Tracker</title>

    <style>
        body {
            font-family: Arial;
            background: #081b29;
            color: white;
            margin: 0;
        }

        header {
            background: #0d6efd;
            padding: 20px;
            text-align: center;
        }

        .dashboard {
            display: grid;
            grid-template-columns:
                repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            padding: 20px;
        }

        .card {
            background: #102d42;
            padding: 25px;
            border-radius: 15px;
            text-align: center;
        }

        .value {
            font-size: 32px;
            color: #00ff99;
        }
    </style>
</head>

<body>

<header>
    <h1>☀️ AI Floating Solar Tracker</h1>
</header>

<div class="dashboard">

    <div class="card">
        <h3>Voltage</h3>
        <div class="value" id="voltage">-- V</div>
    </div>

    <div class="card">
        <h3>Current</h3>
        <div class="value" id="current">-- A</div>
    </div>

    <div class="card">
        <h3>Power</h3>
        <div class="value" id="power">-- W</div>
    </div>

    <div class="card">
        <h3>Temperature</h3>
        <div class="value" id="temperature">-- °C</div>
    </div>

    <div class="card">
        <h3>Battery</h3>
        <div class="value" id="battery">-- V</div>
    </div>

    <div class="card">
        <h3>Tracker</h3>
        <div class="value" id="tracker">--</div>
    </div>

</div>

<script>

async function updateDashboard() {

    const response =
        await fetch("/api/status");

    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("battery")
        .innerText = data.battery + " V";

    document.getElementById("tracker")
        .innerText = data.tracker;
}

setInterval(updateDashboard, 5000);

updateDashboard();

</script>

</body>
</html>

41. Recommended API Response

The dashboard API can return:

{
  "voltage": 18.2,
  "current": 1.45,
  "power": 26.39,
  "temperature": 42.5,
  "battery": 12.6,
  "tracker": "TRACKING",
  "azimuth": 142.5,
  "elevation": 54.2,
  "waterLevel": 74,
  "status": "NORMAL"
}

42. Complete n8n Workflow

A production-oriented workflow can look like this:

                     ┌───────────────┐
                     │     ESP32     │
                     └───────┬───────┘
                             │
                             ▼
                     ┌───────────────┐
                     │    WEBHOOK    │
                     └───────┬───────┘
                             │
                             ▼
                     ┌───────────────┐
                     │ VALIDATE JSON │
                     └───────┬───────┘
                             │
                             ▼
                     ┌───────────────┐
                     │ NORMALIZATION │
                     └───────┬───────┘
                             │
              ┌──────────────┼───────────────┐
              │              │               │
              ▼              ▼               ▼
        Google Sheets    ThingSpeak      Database
              │              │
              └──────────────┼───────────────┘
                             ▼
                       ┌───────────┐
                       │ AI AGENT  │
                       └─────┬─────┘
                             │
                             ▼
                    ┌────────────────┐
                    │ Decision Logic │
                    └───────┬────────┘
                            │
          ┌─────────────────┼────────────────┐
          │                 │                │
          ▼                 ▼                ▼
       NORMAL            WARNING          CRITICAL
          │                 │                │
          ▼                 ▼                ▼
         LOG             Telegram      Telegram Text
                                             │
                                             ▼
                                       Text-to-Speech
                                             │
                                             ▼
                                       Telegram Voice

43. Safety Layer

This is extremely important.

The AI agent should not be allowed to bypass hardware safety limits.

Implement:

                 AI COMMAND
                     │
                     ▼
              SAFETY VALIDATOR
                     │
        ┌────────────┼────────────┐
        │            │            │
    Position      Current       Voltage
      limit         limit         limit
        │            │            │
        └────────────┼────────────┘
                     ▼
               COMMAND SAFE?
                 /       \
               NO         YES
               │           │
               ▼           ▼
             REJECT       ESP32

The ESP32 itself must enforce limits even if n8n or the AI sends an invalid command.


44. Watchdog System

The ESP32 should have a watchdog.

ESP32
 │
 ├── Sensor task
 ├── Tracker task
 ├── Wi-Fi task
 └── Communication task
       │
       ▼
    Watchdog
       │
       ├── System healthy
       │
       └── System frozen
                │
                ▼
              RESET

45. Offline Mode

A robust system should continue working if Wi-Fi disappears.

             Wi-Fi?
             /    \
           YES     NO
            │       │
            ▼       ▼
         Cloud    Local
         Mode     Mode
            │       │
            └──┬────┘
               ▼
          ESP32 Tracker

During Wi-Fi failure:

  • Sun tracking continues.

  • Safety functions continue.

  • Local sensor control continues.

  • Data can be buffered.

  • Data can be uploaded after connection returns.


46. Data Buffering

For example:

if (WiFi.status() != WL_CONNECTED) {

    saveDataLocally();

} else {

    uploadBufferedData();

}

For a more robust design, use:

  • LittleFS

  • SPIFFS

  • SD card

  • external flash


47. AI Fault Detection

The AI agent can detect patterns such as:

Case 1 — High temperature

Temperature ↑
Power ↓
Solar radiation high
       │
       ▼
AI suspects thermal derating

Case 2 — Motor failure

Target position ≠ actual position

Motor command = ON
Position change = 0

       ↓

AI:
Possible motor/gear obstruction

Case 3 — Dirty panel

Solar radiation = high
Tracking = normal
Power = unusually low

       ↓

Possible:
- Dust
- Shading
- Panel degradation
- Electrical fault

48. Predictive Maintenance

The project can become more advanced by storing historical data.

Example:

Date       Power     Temp     Motor Error
------------------------------------------
Day 1      145 W     37°C       1
Day 2      142 W     38°C       1
Day 3      139 W     39°C       2
Day 4      132 W     41°C       3
Day 5      126 W     43°C       5

AI can identify:

Power trend ↓
Motor error ↑
Temperature ↑

and generate:

MAINTENANCE RECOMMENDATION

The tracker has shown increasing positioning error
over the last five days.

Recommended inspection:
- Azimuth motor
- Mechanical bearings
- Gear mechanism
- Mounting structure

49. Energy Optimization

The AI system can compare:

Fixed panel output
        VS
Tracked panel output

Calculate:

Tracking gain (%) =
((Tracked Energy - Fixed Energy)
 / Fixed Energy) × 100

For example:

Fixed = 1.20 kWh/day
Tracked = 1.48 kWh/day

Gain =
(1.48 - 1.20) / 1.20 × 100

= 23.3%

The actual improvement must be measured experimentally rather than assumed.


50. Floating-Solar-Specific Monitoring

Because the project is floating, add sensors that a conventional solar tracker doesn't need.

Water level

Normal
  │
  ├── Low → inspect flotation
  │
  └── High → possible flooding/wave condition

Tilt

Tilt X
Tilt Y
   │
   ▼
Platform stability

Water temperature

Useful for environmental monitoring and research.

Wind

A future version can include an anemometer.

Wind speed > safety limit
             │
             ▼
         Park panel

51. Emergency Logic

Example:

IF wind_speed > MAX_WIND
       ↓
Park tracker

IF battery_voltage < MIN_BATTERY
       ↓
Low-power mode

IF panel_temperature > MAX_TEMP
       ↓
Send warning

IF water_level abnormal
       ↓
Critical alert

IF platform_tilt > MAX_TILT
       ↓
Stop motors + alert

IF motor_current > MAX_MOTOR_CURRENT
       ↓
Stop motor + alert

These rules should be implemented locally on the ESP32, not solely through the AI/cloud layer.


52. Complete Communication Architecture

                 ┌────────────────────┐
                 │ Floating PV System  │
                 └──────────┬─────────┘
                            │
                            ▼
                       ┌─────────┐
                       │  ESP32  │
                       └────┬────┘
                            │
                    Wi-Fi / HTTP
                            │
                            ▼
                     ┌───────────┐
                     │    n8n    │
                     └─────┬─────┘
                           │
       ┌───────────────────┼─────────────────────┐
       │                   │                     │
       ▼                   ▼                     ▼
 Google Sheets         ThingSpeak            AI Agent
       │                                         │
       │                                         ▼
       │                                  Decision Engine
       │                                         │
       │                          ┌──────────────┼───────────┐
       │                          │              │           │
       ▼                          ▼              ▼           ▼
 Historical Data             Telegram       Voice Alert   ESP32
                                     

53. Complete Hardware Wiring Concept

                         ESP32
                  ┌─────────────────┐
                  │                 │
 LDR North ───────┤ GPIO 34         │
 LDR South ───────┤ GPIO 35         │
 LDR East ────────┤ GPIO 32         │
 LDR West ────────┤ GPIO 33         │
                  │                 │
 INA219 SDA ──────┤ GPIO 21         │
 INA219 SCL ──────┤ GPIO 22         │
                  │                 │
 DS18B20 ─────────┤ GPIO 4          │
                  │                 │
 MPU6050 SDA ─────┤ GPIO 21         │
 MPU6050 SCL ─────┤ GPIO 22         │
                  │                 │
 Servo AZ ────────┤ GPIO 18         │
 Servo EL ────────┤ GPIO 19         │
                  │                 │
 GPS RX/TX ───────┤ Serial          │
                  │                 │
 Wi-Fi ───────────┤ ESP32 Radio     │
                  └─────────────────┘

Important: motor/servo power should normally come from a suitable separate power supply, with a common ground and appropriate protection. Do not power high-current motors directly from ESP32 GPIO pins.


54. Suggested Pin Assignment

Device ESP32 Pin
LDR North GPIO 34
LDR South GPIO 35
LDR East GPIO 32
LDR West GPIO 33
I²C SDA GPIO 21
I²C SCL GPIO 22
DS18B20 GPIO 4
Azimuth servo GPIO 18
Elevation servo GPIO 19
GPS RX/TX Hardware UART
Motor driver Dedicated GPIOs
Limit switch 1 GPIO 25
Limit switch 2 GPIO 26

The exact pins should be adapted to the particular ESP32 board and peripherals.


55. Project State Machine

A professional implementation should use states.

             ┌───────────┐
             │   START   │
             └─────┬─────┘
                   ▼
             ┌───────────┐
             │  INIT     │
             └─────┬─────┘
                   ▼
             ┌───────────┐
             │   IDLE    │
             └─────┬─────┘
                   ▼
             ┌───────────┐
             │ TRACKING  │
             └─────┬─────┘
                   │
        ┌──────────┼──────────┐
        ▼          ▼          ▼
      NORMAL     WARNING    CRITICAL
        │          │          │
        │          ▼          ▼
        │       ALERT       PARK
        │          │          │
        └──────────┴──────────┘
                   │
                   ▼
              NIGHT MODE
                   │
                   ▼
             PARK POSITION

56. Night Mode

At sunset:

Solar elevation < 0°
        │
        ▼
Stop tracking
        │
        ▼
Move to safe park position
        │
        ▼
Enter low-power mode

At sunrise:

Solar elevation > threshold
        │
        ▼
Wake tracker
        │
        ▼
Move to predicted sunrise position
        │
        ▼
Begin tracking

57. AI + n8n Advanced Workflow

A more advanced system can have several specialized agents.

                    n8n
                     │
       ┌─────────────┼─────────────┐
       │             │             │
       ▼             ▼             ▼
 Energy Agent   Maintenance     Safety Agent
                   Agent
       │             │             │
       └─────────────┼─────────────┘
                     ▼
               Supervisor AI
                     │
                     ▼
              Final Decision

Energy Agent

Analyzes:

  • Power

  • Energy

  • Irradiance

  • Temperature

  • Tracking efficiency

Maintenance Agent

Analyzes:

  • Motor errors

  • Sensor errors

  • Long-term degradation

  • Mechanical anomalies

Safety Agent

Analyzes:

  • Battery

  • Wind

  • tilt

  • water level

  • temperature


58. Example Agentic Scenario

Suppose:

Power = 62 W
Expected power = 120 W
Sun elevation = 55°
Tracker error = 1°
Temperature = 38°C

AI concludes:

Tracking appears correct.

Power output is substantially below expected
performance.

Possible causes:
1. Panel shading
2. Dirt
3. Electrical connection problem
4. PV degradation

Then n8n can:

Create maintenance event
        ↓
Store in Google Sheets
        ↓
Send Telegram notification

59. Telegram Voice Workflow

Sensor
  │
  ▼
ESP32
  │
  ▼
n8n
  │
  ▼
AI Agent
  │
  ▼
CRITICAL?
  │
 YES
  │
  ▼
Generate message
  │
  ▼
Text-to-Speech
  │
  ▼
Audio file
  │
  ▼
Telegram Bot
  │
  ▼
Operator

60. Example Voice Alert Logic

if (severity === "CRITICAL") {

    message =
      "Critical alert. Floating solar system "
      + device
      + " has detected "
      + reason
      + ".";

}

Then n8n passes the message to a TTS service.


61. AI Chat Interface

A web page can also include:

┌─────────────────────────────────────────┐
│        AI SOLAR ASSISTANT               │
├─────────────────────────────────────────┤
│                                         │
│ User:                                   │
│ Why is power lower today?               │
│                                         │
│ AI:                                     │
│ Power is approximately 18% below the    │
│ recent average. Tracking error is low,  │
│ so panel alignment appears normal.     │
│                                         │
│ The most likely factors are temperature │
│ and reduced irradiance.                 │
│                                         │
├─────────────────────────────────────────┤
│ Ask AI...                        [Send]  │
└─────────────────────────────────────────┘

62. Project Folder Structure

A clean GitHub project could use:

AI-Floating-Solar-Tracker/
│
├── README.md
│
├── documentation/
│   ├── architecture.md
│   ├── hardware.md
│   ├── software.md
│   ├── n8n-workflow.md
│   ├── ai-agent.md
│   ├── telegram.md
│   └── testing.md
│
├── hardware/
│   ├── schematic/
│   ├── pcb/
│   ├── wiring/
│   └── bom.csv
│
├── firmware/
│   ├── main/
│   ├── sensors/
│   ├── tracker/
│   ├── solar/
│   └── communication/
│
├── n8n/
│   ├── workflows/
│   └── prompts/
│
├── dashboard/
│   ├── index.html
│   ├── style.css
│   └── app.js
│
├── ai/
│   ├── prompts/
│   └── schemas/
│
├── telegram/
│   └── commands.md
│
└── tests/
    ├── sensor-tests/
    ├── motor-tests/
    └── integration-tests/

63. Bill of Materials

A prototype BOM could include:

Component Qty
ESP32 DevKit 1
Small solar panel 1
Servo/geared motors 2
Motor driver 1–2
LDR 4
INA219/INA226 1
DS18B20 1–2
MPU6050 1
GPS module 1
RTC DS3231 1
Water-level sensor 1
Battery 1
Buck converter 1
Limit switches 2–4
Waterproof enclosure 1
Floating structure 1
Wires/connectors As required
Fuse/protection As required

64. Software Stack

Hardware
   ↓
ESP32 / Arduino C++
   ↓
Wi-Fi
   ↓
HTTP / MQTT
   ↓
n8n
   ↓
AI Agent
   ↓
Google Sheets
ThingSpeak
Telegram
Web Dashboard

Potential software:

  • Arduino IDE / PlatformIO

  • C/C++

  • JavaScript

  • HTML/CSS

  • n8n

  • Telegram Bot API

  • Google Sheets API

  • ThingSpeak API

  • AI API

  • Text-to-Speech API


65. Testing Plan

The project should be tested in stages.

Test 1 — ESP32

Verify:

ESP32 boots
      ↓
Wi-Fi connects
      ↓
Sensors work

Test 2 — LDR

Use a flashlight.

Light left
   ↓
Tracker moves left

Light right
   ↓
Tracker moves right

Test 3 — Motor

Check:

0°
45°
90°
135°
180°

and verify mechanical limits.

Test 4 — Power measurement

Compare INA219/INA226 readings against a calibrated meter.

Test 5 — n8n

Send a simulated JSON packet.

Test 6 — Google Sheets

Verify one row is inserted per valid measurement.

Test 7 — ThingSpeak

Verify all fields update correctly.

Test 8 — Telegram

Trigger a warning manually.

Test 9 — AI

Feed simulated abnormal data.

Test 10 — End-to-end

ESP32
 ↓
n8n
 ↓
AI
 ↓
Telegram

66. Failure-Test Scenarios

Test at least these conditions:

Condition Expected action
Wi-Fi disconnected Local operation
Battery low Low-power mode
High temperature Warning
Excessive tilt Stop tracker
Motor overcurrent Stop motor
Water abnormal Alert
Sensor disconnected Sensor-failure alert
Night Park
High wind Park
AI unavailable Local control continues

67. Key Design Principle

The most important architecture principle is:

                AI / CLOUD
                    │
            Advisory / supervisory
                    │
                    ▼
                 ESP32
                    │
              Deterministic
               safety logic
                    │
                    ▼
                 Motors

Never make the cloud or AI the only safety mechanism.

If n8n goes offline, the tracker should still be safe.

If the AI service fails, the tracker should still operate.

If Wi-Fi fails, the tracker should still protect itself.


68. Final System Flow Diagram

                         ☀ SUN
                          │
                          ▼
                ┌──────────────────┐
                │ Sun-Path Model   │
                │ Azimuth/Elevation│
                └────────┬─────────┘
                         │
                         ▼
                  ┌──────────────┐
                  │    ESP32     │
                  │              │
                  │ Solar Track  │
                  │ Sensors      │
                  │ Safety       │
                  └──────┬───────┘
                         │
             ┌───────────┴───────────┐
             │                       │
             ▼                       ▼
       Motor Control             Sensor Data
             │                       │
             ▼                       ▼
        Floating PV              Wi-Fi
             │                       │
             └──────────┬────────────┘
                        ▼
                 ┌─────────────┐
                 │     n8n     │
                 └──────┬──────┘
                        │
          ┌─────────────┼──────────────┐
          │             │              │
          ▼             ▼              ▼
     Google Sheets  ThingSpeak      AI Agent
                                      │
                                      ▼
                                Decision Engine
                                      │
                           ┌──────────┼──────────┐
                           │          │          │
                           ▼          ▼          ▼
                         Normal    Warning    Critical
                                      │          │
                                      │          ▼
                                      │     Text-to-Speech
                                      │          │
                                      └────┬─────┘
                                           ▼
                                       Telegram
                                           │
                                           ▼
                                      Mobile User

69. Expected Project Output

At the end of the project, the prototype should demonstrate:

                    AI FLOATING SOLAR
                         SYSTEM
                           │
        ┌──────────────────┼──────────────────┐
        │                  │                  │
        ▼                  ▼                  ▼
   SUN TRACKING        IoT MONITORING       AI AGENT
        │                  │                  │
        ▼                  ▼                  ▼
     ESP32              n8n Cloud         Intelligent
        │                  │               Analysis
        │                  │                  │
        └──────────────────┼──────────────────┘
                           │
             ┌─────────────┼──────────────┐
             ▼             ▼              ▼
        Google Sheets  ThingSpeak      Telegram
                                          │
                                          ▼
                                     Voice Alerts

70. Recommended Project Phases

Phase 1 — Hardware

Build:

ESP32
+
PV panel
+
LDR
+
Motor
+
INA219/INA226

Phase 2 — Tracking

Implement:

LDR tracking
+
solar-position calculation

Phase 3 — IoT

Implement:

ESP32 → n8n

Phase 4 — Cloud

Implement:

n8n → Google Sheets
n8n → ThingSpeak

Phase 5 — AI

Implement:

n8n → AI Agent → Decision

Phase 6 — Telegram

Implement:

AI → Telegram text
AI → TTS → Telegram voice

Phase 7 — Dashboard

Implement:

ESP32/n8n
     ↓
Web API
     ↓
Dashboard

Phase 8 — Floating Platform

Move the completed electronics and tracker onto the water platform.

Phase 9 — Testing

Perform:

Indoor test
↓
Outdoor land test
↓
Water-tank test
↓
Real floating test

Phase 10 — Optimization

Compare:

Fixed PV
   VS
Single-axis
   VS
Dual-axis
   VS
AI-assisted optimized tracking

This comparison will make the project much stronger academically.


71. Suggested Final-Year Project Chapters

For a formal report, use:

  1. Introduction

  2. Problem Statement

  3. Existing System

  4. Proposed System

  5. Objectives

  6. System Architecture

  7. Hardware Design

  8. Floating Platform Design

  9. Solar Tracking Mechanism

  10. Sun-Path Prediction

  11. ESP32 Firmware

  12. IoT Communication

  13. n8n Automation

  14. AI Agent Design

  15. Telegram Notification System

  16. Google Sheets Integration

  17. ThingSpeak Integration

  18. Web Dashboard

  19. Safety and Fault Detection

  20. Experimental Methodology

  21. Results

  22. Performance Comparison

  23. Cost Analysis

  24. Limitations

  25. Future Scope

  26. Conclusion

  27. References

  28. Appendix – Source Code


72. Future Scope

The system can eventually be expanded with:

  • Weather forecasting

  • Cloud prediction

  • Machine-learning power prediction

  • Computer vision for cloud detection

  • Camera-based panel inspection

  • Automatic panel-cleanliness detection

  • Wind-speed prediction

  • Wave-motion prediction

  • Digital twin

  • Multi-panel floating solar farm

  • Edge AI

  • LoRaWAN for remote locations

  • Solar irradiance sensor

  • MPPT monitoring

  • Automatic fault classification

  • Predictive motor maintenance

  • AI-generated daily reports

  • Voice-based Telegram commands

  • Multi-agent AI architecture

A particularly interesting extension is:

Weather Forecast
       +
Historical Solar Data
       +
Sun Position
       +
Panel Temperature
       +
Cloud Prediction
       ↓
AI Energy Forecast
       ↓
Expected Solar Generation

That turns the project from a simple solar tracker into an AI-powered predictive floating solar management system.


73. Recommended Final Architecture

For the strongest version of the project, I recommend this exact hierarchy:

                    ┌─────────────────────────┐
                    │        SOLAR FARM       │
                    │ Floating PV + Tracker   │
                    └────────────┬────────────┘
                                 │
                                 ▼
                    ┌─────────────────────────┐
                    │          ESP32          │
                    │                         │
                    │ Sensors                 │
                    │ Solar Position          │
                    │ Tracker                 │
                    │ Local Safety            │
                    │ Offline Operation       │
                    └────────────┬────────────┘
                                 │
                              HTTPS
                                 │
                                 ▼
                    ┌─────────────────────────┐
                    │          n8n            │
                    │ Automation Orchestrator  │
                    └────────────┬────────────┘
                                 │
            ┌────────────────────┼─────────────────────┐
            │                    │                     │
            ▼                    ▼                     ▼
     ┌─────────────┐     ┌──────────────┐      ┌─────────────┐
     │Google Sheets│     │  ThingSpeak  │      │  AI Agent   │
     └─────────────┘     └──────────────┘      └──────┬──────┘
                                                       │
                                              ┌────────┼────────┐
                                              │        │        │
                                              ▼        ▼        ▼
                                           Energy  Safety  Maintenance
                                            Agent   Agent     Agent
                                              │        │        │
                                              └────────┼────────┘
                                                       ▼
                                              ┌────────────────┐
                                              │ Decision Layer │
                                              └───────┬────────┘
                                                      │
                                     ┌────────────────┼──────────────┐
                                     │                │              │
                                     ▼                ▼              ▼
                                  Dashboard       Telegram       Voice Alert

This architecture gives you a project that combines embedded systems + renewable energy + solar tracking + IoT + cloud automation + AI agents + data analytics + messaging automation, rather than simply being an ESP32 solar tracker.

If you build it in this order—ESP32 hardware → sun tracking → sensor monitoring → n8n → cloud logging → AI agent → Telegram/voice → dashboard → floating platform → predictive maintenance—you can test each subsystem independently before integrating the entire system.

 

Project Summary

AI-Powered Floating Solar Tracker with Sun-Path Prediction and Agentic IoT

The project is an ESP32-based floating solar photovoltaic system that automatically tracks the sun, monitors solar-panel and environmental parameters, sends data to the cloud, and uses n8n + an AI agent for automated analysis and alerts.

Core System

☀️ Sun
  ↓
Sun-Path Prediction
  ↓
ESP32
  ├── LDR Sensors
  ├── Voltage/Current Sensor
  ├── Temperature Sensor
  ├── Water-Level Sensor
  ├── Tilt Sensor
  ├── GPS/RTC
  └── Motor Control
  ↓
Floating Solar Panel
  ↓
Wi-Fi
  ↓
n8n Automation
  ├── Google Sheets
  ├── ThingSpeak
  ├── AI Agent
  └── Web Dashboard
       ↓
  Telegram
  ├── Text Alerts
  └── Voice Alerts

Main Features

  • Dual-axis solar tracking

  • Sun azimuth/elevation prediction

  • LDR-based tracking correction

  • ESP32-based control

  • Solar voltage, current and power measurement

  • Panel and water temperature monitoring

  • Battery monitoring

  • Platform tilt and water-level monitoring

  • Local safety and offline operation

  • n8n automation

  • AI-based fault analysis

  • Google Sheets historical logging

  • ThingSpeak visualization

  • Real-time web dashboard

  • Telegram notifications

  • Telegram voice alerts

  • AI daily reports

  • Predictive maintenance

AI Agent Role

The AI is primarily a supervisory intelligence layer, not the primary safety controller.

Sensors
   ↓
ESP32
   ↓
n8n
   ↓
AI Agent
   ↓
Analyze
   ↓
NORMAL / WARNING / CRITICAL
   ↓
Telegram / Voice / Dashboard

The ESP32 retains local safety controls so the system can continue operating safely even if Wi-Fi, n8n, or the AI service fails.

Major Hardware

  • ESP32 DevKit

  • Solar panel

  • Two motors/servos

  • Motor drivers

  • 4 LDRs

  • INA219/INA226

  • DS18B20

  • MPU6050

  • GPS

  • DS3231 RTC

  • Water-level sensor

  • Battery

  • Buck converter

  • Limit switches

  • Floating platform

Software Stack

ESP32 / Arduino C++
        ↓
HTTP / MQTT
        ↓
n8n
        ↓
AI Agent
 ┌──────┼─────────┐
 ↓      ↓         ↓
Sheets ThingSpeak Telegram
                  ↓
             Voice Alerts

Final Project Goal

The finished prototype demonstrates an autonomous floating solar-energy management system capable of:

  1. Predicting the sun's position.

  2. Tracking the sun automatically.

  3. Measuring solar-energy production.

  4. Monitoring floating-platform conditions.

  5. Sending IoT data to the cloud.

  6. Using AI to identify abnormal conditions.

  7. Automatically recording historical data.

  8. Sending Telegram text and voice alerts.

  9. Providing a real-time web dashboard.

  10. Supporting predictive maintenance and future solar-generation forecasting.

One-Line Description

An ESP32-based AI-agentic floating solar tracker that combines sun-path prediction, IoT sensing, n8n automation, cloud dashboards, Google Sheets, ThingSpeak, and Telegram voice alerts for autonomous solar-energy monitoring and management.

 

No comments:

Post a Comment