Utilizing IOT for Solar Panel Monitoring
As we all know that today’s world is shifting towards renewable energy and the solar panel plays a very critical role in the field of renewable energy. The rapid integration of the solar panel in the solar fields, houses and other commercial places leads to an increased need for efficient monitoring and maintenance strategies.

In this article we’ll talk about an innovative approach to monitor solar panel using Internet of Things “IOT” technology. By developing the network of sensors, communications devices we can able to get the real-time data on various parameter including temperature, light intensity and panel orientation the data is collected and transmitted to the centralized data repository here we’re using cloud service of ThinkSpeaks.
Purposed System
The solar panel monitoring system utilizing Internet of Things(IOT) technology, is designed to optimize the efficiency, reliability, and sustainability of solar energy generation. The system facilitates the continuous monitoring and collection of energy generation data, which is then transmitted to a cloud server, enabling monitoring from anywhere in the world.
Key Features:
- Real-Time data collection
- Data Transmission
- Analytics and Monitoring
- Energy Efficiency
- User-friendly Interface
Objective
- Utilizing IOT to collect real time data on solar production, enabling remote monitoring from any location through the internet.
- The data of power generation if examine, evaluated, and tends to optimize and enhance overall energy production processes.
- Ability to access data offline and online by utilizing cloud server, ensuring accessibility and synchronization for efficient information management.
Component Required
- ESP32 Wi-Fi Module
- Solar Panel
- Voltage Sensor Module
- LM35 Temperature Sensor
- LDR
- 16x2 I2C LCD Display
- Resistor 2.2k
- Zero PCB/Vero Board
- Micro USB Data Cable
ESP32 Wi-Fi Module

ESP32 comes with an on-chip 32-bit microcontroller with integrated Wi-Fi + Bluetooth + BLE features that targets a wide range of applications. It is a series of low-power and low-cost developed by Espressif Systems.
Features of ESP32:
- 4MB of Flash Memory
- 16 KB SRAM in RTC
- Wi-Fi 802.11b/g/n
- Bluetooth v4.2 BR/EDR and Bluetooth LE specifications
- 520 KB of on-chip SRAM for data and instructions.
- 448 KB of ROM for booting and core functions.
Solar Panel

A solar panel, also known as a photovoltaic (PV) device, converts sunlight into electricity and heat. Solar panels are made of silicon or other semiconductor materials, such as photovoltaic (PV) cells, that are installed in a metal frame with a glass casing. When exposed to sunlight, the material releases electrons and produces an electric charge, which creates an electric current (DC). The rate at which solar panels generate electricity depends on the amount of direct sunlight and the quality, size, number, and location of panels in use The capacity of a solar panel is measured in watt peak (Wp), which is the maximum electrical capacity that a solar cell can produce under ideal conditions. The ideal orientation for solar panels is south facing. The output of a solar panel depends on the type of panel. First generation solar panels use monocrystalline or polycrystalline silicon and have an output of 12 to 19%. Second generation solar panels use amorphous silicon or other materials.
Voltage Sensor Module

A voltage sensor, also known as a voltage detector or voltmeter, is a device that measures and communicates electrical pressure or voltage in a circuit, equipment, devices, batteries, or other sensors. Voltage sensors can measure high voltages and detect low current levels. They can also detect magnetic fields, such as the direction and strength of a magnetic field between two components. Voltage sensors are used in many industrial, commercial, and household applications, including:
- Industrial controls
- Power systems
- Navigation equipment
- Scientific measurement
- Detecting of load
LM35 Temperature Module

The LM35 series are precision integrated-circuit temperature devices with an output voltage linearly proportional to the Centigrade temperature. It has an advantage over linear temperature sensors calibrated in Kelvin, as the user is not required to subtract a large constant voltage from the output to obtain convenient Centigrade scaling. The LM35 device does not require any external calibration or trimming to provide typical accuracies of ±¼°C at room temperature and ±¾°C over a full −55°C to 150°C temperature range.
LDR

Light Dependent Resistor or LDR or Photoresists are electronic components that are often used in electronic circuit designs where it is necessary to detect the presence or the level of light. LDRs are very different from other forms of resistor like the carbon film resistor, metal oxide film resistor, metal film resistor, and the like that are widely used in other electronic designs. They are specifically designed for their light sensitivity and the change in resistance this causes.
16x2 I2C LCD Display

A 16x2 LCD with an I2C interface is a character LCD display with two rows, each capable of displaying up to 16 characters on a blue background. The I2C LCD component is used in applications that require a visual or textual display, or when a character display is needed but seven consecutive GPIOs on a single GPIO port are not possible.
Resistor 2.2k

A 2.2k ohm resistor has a resistance of 2,200 ohms, indicated by the “k” (kilo) which means 1,000. It limits current flow, divides voltage, and protects sensitive components in electrical circuits. The 2.2k resistor is commonly used in various applications due to its balance of resistance value, power rating, and tolerance.
Zero PCB/Vero Board

Zero PCBs, also known as Veroboards or stripboards, are general-purpose circuit boards used for prototyping and experimentation. They are not designed for a specific circuit but rather offer a blank canvas for users to build and test their own designs.
Micro USB Data Cable

micro USB is a miniaturized version of the Universal Serial Bus interface developed for connecting compact and mobile devices, such as smartphones, MP3 players, Global Positioning System devices, printers and digital cameras.
Graphical Representation & Explanation of the system working.

The both the figure above shows the graphical representation and the data flow diagram of the purposed system. Let us discuss in details how to system works. When the sun light falls on the surface of the panel it generated the electricity and the voltage sensor detects the amount of the electricity generated by the solar panel and sends the data to the ESP32 Wi-Fi module. In the same way the Light Dependent Resistor (LDR) measures the light intensity of the surrounding and LM35-Temperature sensors measure the temperature of the surrounding and then both the sensors sends the data to the ESP32 Wi-Fi module. Then the ESP32 Wi-Fi Module process the data then it stores the data on the cloud server which can be accessed remotely and it will also displays the data offline in the LCD Monitor.
Architectural Diagram

This architecture combines hardware components (ESP32, sensors, LCD, solar panel) with software (firmware for ESP32, cloud platform) to create a smart system that collects, displays, and transmits data from various sensors to the cloud.
Code Overview
#include <WiFi.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
const int lm35_pin = 34;
const int voltageSensor = 14;
float vOUT = 0.0;
float vIN = 0.0;
float R1 = 30000.0;
float R2 = 7500.0;
int value = 0;
float RLDR;
float Vout;
float Lux;
String apiKey = “***************”;
const char* ssid = “**************”; // Enter your WiFi Network’s SSID
const char* pass = “**************”; // Enter your WiFi Network’s Password
const char* server = “api.thingspeak.com”;
WiFiClient client;
void setup()
{
Serial.begin(115200);
lcd.begin();
lcd.backlight();
lcd.setCursor(0, 0);
lcd.print(“Welcome To”);
lcd.setCursor(0, 1);
lcd.print(“Our Projects”);
delay(2000);
lcd.clear();
Serial.println(“Connecting to “);
Serial.println(ssid);
WiFi.begin(ssid, pass);
while (WiFi.status() != WL_CONNECTED)
{
delay(100);
Serial.print(“*”);
}
Serial.println(“”);
Serial.println(“WiFi connected”);
}
void loop()
{
int temp_adc_val;
float temp_val;
float tempF = temp_val * 9 / 5 + 32;
temp_adc_val = analogRead(lm35_pin); /* Read Temperature */
temp_val = (temp_adc_val * 4.88); /* Convert adc value to equivalent voltage */
temp_val = (temp_val / 10); /* LM35 gives output of 10mv/°C */
lcd.setCursor(0, 0);
lcd.print(“T:-”);
lcd.print(tempF);
Serial.print(“Temperature = “);
Serial.print(tempF);
delay(1000);
value = analogRead(voltageSensor);
vOUT = (value * 5.0) / 3724.0;
vIN = vOUT / (R2 / (R1 + R2));
int sensorValue = analogRead(35);
Vout = (sensorValue * 0.0048828125);
RLDR = (10000.0 * (3 — Vout)) / Vout;
Lux = (RLDR / 500);
lcd.setCursor(10, 0);
lcd.print(“L:”);
lcd.print(Lux);
delay(1000);
lcd.setCursor(0, 1);
lcd.print(“Solar Volt:”);
lcd.setCursor(12, 1);
lcd.print(vIN);
if (client.connect(server, 80))
{
String postStr = apiKey;
postStr += “&field1=”;
postStr += String(temp_val);
postStr += “&field2=”;
postStr += String(vIN);
postStr += “&field3=”;
postStr += String(Lux);
postStr += “\r\n\r\n\r\n”;
client.print(“POST /update HTTP/1.1\n”);
delay(100);
client.print(“Host: api.thingspeak.com\n”);
delay(100);
client.print(“Connection: close\n”);
delay(100);
client.print(“X-THINGSPEAKAPIKEY: “ + apiKey + “\n”);
delay(100);
client.print(“Content-Type: application/x-www-form-urlencoded\n”);
delay(100);
client.print(“Content-Length: “);
delay(100);
client.print(postStr.length());
delay(100);
client.print(“\n\n”);
delay(100);
client.print(postStr);
delay(100);
}
client.stop();
Serial.println(“Sending….”);
delay(15000);
}
float mapfloat(float x, float in_min, float in_max, float out_min, float out_max)
{
return (x — in_min) * (out_max — out_min) / (in_max — in_min) + out_min;
}
Use the Aurdino IDE to upload the above code into ESP32 Wi-Fi module
Conclusion
It is an IT Based systems are designed to get an optimum power output from the solar panels. A monitoring system is designed for there is any malfunctioning of solar panels will be displayed on and we can also get information about whether the solar for the loads. It now displays these parameters like shown in figure’s the user using an effective GUI and alerts user when the Object detected on the solar panel. Solar panels are used that keeps monitoring sunlight. Here different parameters like voltage, light intensity and temperature are displayed on LCD by using IOT technology. Now we are getting only information we can see it in cloud but in future we can control whole system through IOT which distant is a way.
Comments
Post a Comment