DIY Solar Panel Monitoring System

A solar Panel monitoring system with both local and remote display

Public Chat
Similar projects worth following
A few months back, I installed a small-scale Off-Grid Solar System. I am always very curious to see the performance of my solar PV system, and the good news is that the charge controller that I am using has its own local display for monitoring. But, I am badly missing the remote monitoring facility. So, I have decided to make my own monitoring system which must have both local and remote monitoring facilities.

Why We Need Monitoring?

1. It gives clear information about various solar parameters, extracted energy, fault detection, historical analysis of the solar plant, and associated energy loss.

2. You can easily measure your solar production and the saving on your monthly electricity bill.

3. You can track all the important parameters of the solar PV system in real-time from your smartphone.

In this Instructables, I will show you I have made a simple Solar Monitoring System by using an ESP32 development board and ACS723 current sensor.


1. Input Voltage - 0- 24V ( Can be extended up to 50V )

2. Input Current: 0 -15A

3. Solar Panel Rating - 250W (12V ) / 500W ( 24V )

How It Works?

The Solar panel voltage and current are sensed by the voltage and current sensor respectively. Here, a voltage divider network is used to measure the solar panel voltage, and the AC723 hall effect current sensor is used to measure the solar panel current. Similarly, the ambient temperature is sensed by the DS18B20 temperature sensor.

The raw sensor data from all the sensors are processed by an ESP32 board and do all the necessary maths to calculate the power and energy. The processed data is then sent to an OLED display for local monitoring and also to the cloud for remote monitoring. The remote monitoring is done through the Blynk app installed on a Smartphone.

Measuring Voltage:

The solar panel voltage is sensed by a voltage divider network consisting of two resistors R1=47k and R2=6.8k. The output from the R1and R2 is connected to ESP32 analog pin GPIO pin 34. The output from the voltage divider is smoothed out by using a ceramic capacitor C1.

Voltage Measurement :

ESP32’s analog inputs can be used to measure DC voltage between 0 and 3.3V. The solar panel that I have considered can generate 24V ( Open Circuit Voltage). To read this voltage we have to step down the voltage which can be done by using a voltage divider network.

For a voltage divider circuit

Vout = R2/(R1+R2) x Vin

Vin = (R1+R2)/R2 x Vout

The analogRead() function reads the voltage and converts it to a number between 0 and 4095

Calibration :

We’re going to read the output value with one of the analog inputs of Arduino and its analogRead() function. That function outputs a value between 0 and 4095 which is 3.3/4095 for each increment

Vin = Vout*(R1+R2)/R2 ; R1=47k and R2=6.8k

Vin= ADC count * ( 3.3/4095 ) * ( ( 47+6.8) / 6.8 ) Volt

You can use a solar panel with higher voltage by selecting the appropriate resistors R1 and R2.

To select the voltage divider resistance values, you can use this online calculator.

Measuring Current :

For the current measurement, I used a Hall Effect current sensor ACS 723 -20AUvariant. There are other variants of ACS723 Sensor based on the range of its current sensing. The ACS712 sensor reads the current value and converts it into a relevant voltage value, The value that links the two measurements is Sensitivity. The output sensitivity can be obtained from the datasheet. As per the datasheet, the sensitivity is 200mV / A


analog read value = analogRead(Pin);

ADCVoltage = (3.3/4095)*analog read value

Current in amp = ( ADCVoltage – Offset Voltage ) / sensitivity

As per data sheets offset voltage is 0.1 * Vcc ( 0.5V ) and sensitivity is 200mV/A

Note: The output from the ACS723 is stepped down by a voltage divider network consisting of R4 and R5.

Measuring Temperature : 

I have used an external DS18B20 probe for measuring the ambient temperature. It uses a one-wire protocol to communicate with the microcontroller. One-wire devices need a pull-up resistor connected to their signal line to be properly read by your board. Here, I have used a 4.7K resistor ( R6 ) as a pull-up resistor.

It can be hooked up to the PCB through the 3pin screw terminal.

To interface with the DS18B20 temperature sensor, you need to install the One Wire library and the Dallas Temperature library. You can read this article for more details on the DS18B20 sensor.

The connection is as follows:

Red Wire -> Vcc

Yellow Wire -> DATA

Black Wire -> GND

All the above are clearly labeled on the PCB for avoiding any confusion.

 Interfacing OLED Display :

To display the solar panel parameters locally, I have used a 0.96" OLED display. It has a 128 x 64 resolution and uses an I2C bus to communicate with the ESP32. Two pins SCL (GPIO22), SDA (GPIO21) in ESP32 are...

Read more »

RAR Archive - 2.28 kB - 05/02/2022 at 05:08


3D Printed Enclosure.rar

STL files for 3D printed Enclosure

RAR Archive - 127.21 kB - 04/28/2022 at 08:59


RAR Archive - 87.75 kB - 04/28/2022 at 08:57


  • 1 × ESP32 Board - 30 pins
  • 1 × ACS723 Sensor
  • 1 × OLED Display I2C 0.96"
  • 6 × Resistors
  • 3 × Ceramic Capacitors

View all 11 components

  • New PCB Designed

    Debasish Dutta05/06/2022 at 18:54 0 comments

    I have designed a new PCB by incorporating all the features that i have explained in my last log.

  • New PCB Designed

    Debasish Dutta05/06/2022 at 18:54 0 comments

    I have designed a new PCB by incorporating all the features that i have explained in my last log.

  • Adding New Features

    Debasish Dutta05/03/2022 at 12:19 0 comments

    I have drawn a new schematic with the following new features

    1. Replaced the ESP32 development board with onboard ESP32­ WROOM-­32 to reduce the power consumption. Also added the USB programming interface.

    2. Replaced the XL7015 module by using an onboard buck converter for the power supply

    3. Added battery charging circuit for using a Li-ion battery as backup 

    4. Added two new I2C ports for using additional sensors

    5. Added SD card slot for storing the data for analysis

    6. Added an external ADC ( ADS1115 )  for accurate analog readings 

    7. Added a voltage reference IC for getting a stable voltage reference for  calibration of sensor readings

  • PCB Design

    Debasish Dutta05/03/2022 at 12:04 0 comments

    I have drawn the schematic by using EasyEDA online software and then designed a custom PCB for this project. The PCB is designed for mounting the different modules instead of using a lot of components. I have ordered my PCB from JLCPCB and received it within 7 days.

    You can download the Gerber files attached below.

  • 3D Printed Enclosure

    Debasish Dutta05/03/2022 at 11:59 0 comments

    To give a nice commercial product look, I have designed an enclosure for this project by using Autodesk Fusion 360. The dimensions of all the components and PCB mounting holes are measured by a vernier caliper then the same were considered during the design.

    The enclosure has two parts: 1. Main Body 2. Top Lid The

    The main body is basically designed to keep the PCB board. The top lid is to cover up the main body opening and mount the OLED display.

    I used my Creality CR-10 printer and 1.75 mm green PLA filament to print the parts. It took me about 6 hours to print the main body and around 2 hours to print the top lid. My settings are:

    Print Speed : 60 mm/s

    Layer height: 0.2mm ( 0.3 also works well)

    Fill Density: 20%

    Extruder Temperature: 200 deg C

    Bed Temp: 60 deg C

    Download the STL files from Thingiverse

View all 5 project logs

  • 1
    PCB Assembly

    For Soldering, you will need a decent Soldering Iron, Solder, Nipper, and a multimeter. It is good practice to solder the components according to their height. Solder the lesser height components first.

    You can follow the following steps to solder the components :

    1. Push the component legs through their holes, and turn the PCB on its back.

    2. Hold the tip of the soldering iron to the junction of the pad and the leg of the component.

    3. Feed solder into the joint so that it flows all around the lead and covers the pad.

    Once it has flowed all around, move the tip away.

  • 2
    Soldering the ACS723

    In the entire PCB, the lesser height component is the current sensor ACS723 which is the only SMT component used in this project.

    First, apply soldering flux on all 8 pads, and then apply a small amount of solder to the corner pads. Place and align the diode chip using tweezers. Hold the chip in place while touching the pads with the tip of the soldering iron so that the solder melts the pin and the pad together.

    Be sure the dot symbol on the PCB and the ACS723 IC is matching together. The dot symbol represents pin number -1.

    Now apply solder to all the pads, and you are done. If you mess up during the soldering, you can remove the extra solder by using a desoldering wick.

    You can read this tutorial if you are new to soldering SMD components by using a soldering iron.

  • 3
    Assemble the 3D Printed Enclosure

    The PCB can be mounted on the 4 standoffs in the 3D printed enclosure. You can directly secure the PCB by using 4 x M3 screws or you may install threaded thermal inserts for more reliability. Here I have used thermal inserts on each standoff.

    After mounting the PCB onto the main body, we can move to installing the OLED display. The OLED display can be mounted on the backside of the top lid by using hot glue or strong adhesive tape.

    Connect the jumper wires from the OLED display to the PCB OLED port. The header pins on the PCB are clearly labeled.

    Insert the temperature sensor cable into the hole given on the right side of the enclosure. Then connect the wires to the screw terminal.

    Now close the top lid by using 4 x M3 screws.

    To make the enclosure more attractive, I have stuck an Instructables sticker on the top lid.

View all 6 instructions

Enjoy this project?



K Gray wrote 07/03/2022 at 00:56 point

Awesome project!  FYI, the Blynk version you have used in the tutorial is outdated, and no new Blynk members can use it.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates