Solar Power Monitoring System - Complete DIY Tutorial & Code⭐ Featured
Both
Solar Power Monitoring System - Complete DIY Tutorial & Code
Contact for pricing· Completed

Introduction & Project Overview Solar panel owners often have no easy way to know how much power their system is actually generating and consuming at any given moment, making it hard to spot underperformance, wiring faults, or battery issues early. The Solar Power Monitoring System solves this by using voltage and current sensors to continuously measure the electrical output of a solar panel setup, calculating real-time power generation and displaying it locally while also streaming the data to an IoT dashboard for remote tracking. This project is an excellent Final Year Project (FYP) or semester project for Electrical and Energy Engineering students, since it demonstrates practical power electronics measurement combined with IoT data logging — a combination directly relevant to Pakistan's growing solar energy sector and highly valued by FYP evaluators.

Contact Us About This Project

Working Process

Key Features & Functionality

Continuously measures solar panel output voltage using a voltage sensor module
Continuously measures current flow using a current sensor (ACS712)
Calculates real-time power output (Watts) from combined voltage and current readings
Displays live voltage, current, and power readings on a 16x2 LCD screen
Sends real-time power generation data to an IoT dashboard (Blynk/ThingSpeak) for remote monitoring
Logs daily energy generation trends to help identify panel underperformance over time

Core Hardware Components Required

Arduino Uno R3: Main microcontroller that processes voltage and current readings
Voltage Sensor Module (0-25V): Measures the solar panel's output voltage safely
ACS712 Current Sensor Module: Measures the current flowing from the solar panel to the load/battery
16x2 LCD Display with I2C Module: Displays live voltage, current, and power readings
ESP8266 Wi-Fi Module: Sends power generation data to the cloud dashboard
Small Solar Panel and Charge Controller: The power source and regulation being monitored
Breadboard and Jumper Wires: For assembling and testing the complete measurement circuit

Circuit Design & Pin Connections

The voltage sensor module uses a resistor divider network to scale down the solar panel's voltage to a safe 0-5V range readable by the Arduino's analog input. The ACS712 current sensor measures current using the Hall-effect principle and outputs an analog voltage proportional to the current flowing through it, which must be connected in series with the solar panel's output line. Both readings are combined in software to calculate real-time wattage, then displayed locally and sent to the ESP8266 for cloud logging.

ComponentComponent PinMicrocontroller PinNotes / Description
Voltage Sensor ModuleVCC5VPower Line
Voltage Sensor ModuleGNDGNDCommon Ground Line
Voltage Sensor ModuleS (Output)A0Scaled Analog Voltage Signal
Voltage Sensor Module+ / -Solar Panel OutputConnect across panel's positive/negative terminals
ACS712 Current SensorVCC5VPower Line
ACS712 Current SensorGNDGNDCommon Ground Line
ACS712 Current SensorOUTA1Analog Current Signal
ACS712 Current SensorIP+ / IP-In series with load lineCurrent flows through the sensor's terminals
16x2 LCD (I2C)VCC / GND5V / GNDPower Line
16x2 LCD (I2C)SDA, SCLA4, A5I2C Data Lines
ESP8266VCC3.3VPower Line (Do not use 5V)
ESP8266TX, RXPin 10, Pin 11Serial Communication (SoftwareSerial)

Bill of Materials (BOM)

Bill of Materials (BOM)

Use the table below as a shopping checklist. Quantities reflect what a single build of this project requires; add your own purchase link for each item in the Link column.

Step-by-Step Assembly Tutorial

Product Quantity Link Arduino Uno R3 1

Voltage Sensor Module (0-25V) 1

ACS712 Current Sensor Module 1

16x2 LCD Display with I2C Module 1

ESP8266 Wi-Fi Module 1

Small Solar Panel and Charge Controller 1

Breadboard and Jumper Wires 1 set

1.Step 1: Mount the Microcontroller Place the Arduino Uno inside a small enclosure near the solar charge controller, positioned so the sensor wires can comfortably reach the panel's output terminals.
2.Step 2: Connect the Power Rails Wire the Arduino's 5V and GND pins to the breadboard rails so the voltage sensor, current sensor, and LCD all share consistent, stable power.
3.Step 3: Wire the Primary Sensor Connect the voltage sensor module's input terminals across the solar panel's positive and negative output leads, and wire its signal output to analog pin A0.
4.Step 4: Wire the Secondary Sensor (if applicable) Connect the ACS712 current sensor in series with the wire carrying current from the panel to the charge controller, and wire its analog output to A1.
5.Step 5: Setup the Communication Module Wire the ESP8266 using a SoftwareSerial connection on Pin 10 and Pin 11, making sure it is powered only from the 3.3V rail to avoid damage.
6.Step 6: Connect Output Displays Wire the 16x2 I2C LCD to A4 and A5 so the current voltage, current, and calculated power output are always visible on-site.
7.Step 7: Wire up the Buzzers/Alarms Optionally add a buzzer on a spare digital pin to alert if power output drops to near-zero during daylight hours, which could indicate a panel fault.
8.Step 8: Double-Check for Short Circuits Double-check the current sensor is wired in series (not parallel) with the load line, since an incorrect connection here can give false readings or damage the sensor.
9.Step 9: Connect the USB Cable and Power Up Connect the Arduino to your computer via USB with the solar panel disconnected first, upload the code, then reconnect the panel and observe live readings.
  1. Step 10: Final Assembly Check and Testing Expose the solar panel to sunlight and confirm the LCD displays sensible, stable voltage, current, and power values that increase and decrease naturally with light intensity before final mounting.

Arduino Source Code

// Measures solar panel voltage, current, and calculated power output
 
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <SoftwareSerial.h>
 
// ----- Pin Definitions -----
#define voltagePin A0
#define currentPin A1
 
LiquidCrystal_I2C lcd(0x27, 16, 2);
SoftwareSerial espSerial(10, 11); // RX, TX for ESP8266
 
// ----- Calibration Constants -----
const float voltageDividerRatio = 5.0; // Adjust based on your voltage sensor's resistor ratio
| const float acsSensitivity = 0.185; | // V per Amp for the ACS712 30A variant |
| --- | --- |
| const float acsZeroPoint = 2.5; | // Zero-current voltage midpoint |
 
void setup() {
  lcd.init();
  lcd.backlight();
  lcd.print("Solar Monitor");
 
  espSerial.begin(9600);
  Serial.begin(9600);
  delay(1500);
  lcd.clear();
}
 
void loop() {
  float voltage = readVoltage();
  float current = readCurrent();
  float power = voltage * current;
 
  updateDisplay(voltage, current, power);
  sendToCloud(voltage, current, power);
 
  delay(2000); // Wait before next reading cycle
}
 
// Reads and scales the panel voltage using the voltage sensor
float readVoltage() {
  int rawValue = analogRead(voltagePin);
  float sensorVoltage = (rawValue / 1023.0) * 5.0;
  return sensorVoltage * voltageDividerRatio;
}
 
// Reads and calculates current using the ACS712 sensor
float readCurrent() {
  int rawValue = analogRead(currentPin);
  float sensorVoltage = (rawValue / 1023.0) * 5.0;
  return (sensorVoltage - acsZeroPoint) / acsSensitivity;
}
 
// Updates the LCD with voltage, current, and power readings
void updateDisplay(float voltage, float current, float power) {
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("V:" + String(voltage, 1) + " I:" + String(current, 2));
  lcd.setCursor(0, 1);
  lcd.print("Power: " + String(power, 1) + " W");
}
 
// Sends the calculated readings to the cloud dashboard
void sendToCloud(float voltage, float current, float power) {
  espSerial.print(voltage); espSerial.print(",");
  espSerial.print(current); espSerial.print(",");
  espSerial.println(power); // ESP8266 firmware forwards this to ThingSpeak/Blynk

Questions, Custom Pricing, or Requests

Want this project customized, a quote for your budget, help understanding a feature, or anything else related to it? Send us a message.

Prefer to talk? Call or WhatsApp us at +92 3176572690

Similar Projects

⭐ Featured
Smart Stick - Complete DIY Tutorial & Code
Smart Stick - Complete DIY Tutorial & Code
ProjectBoth
WhatsApp
⭐ Featured
Traffic Signal Monitoring & Controller System - Complete DIY Tutorial & Code
Traffic Signal Monitoring & Controller System - Complete DIY Tutorial & Code
ProjectBoth
WhatsApp
⭐ Featured
Patient Health Monitoring Project - Complete DIY Tutorial & Code
Patient Health Monitoring Project - Complete DIY Tutorial & Code
ProjectBoth
WhatsApp
⭐ Featured
Smart Plant Monitoring System - Complete DIY Tutorial & Code
Smart Plant Monitoring System - Complete DIY Tutorial & Code
ProjectBoth
WhatsApp