IoT Based Solar Power Monitoring System with ESP32
IoT Based Solar Power Monitoring System using ESP32 WiFi Module, Solar Panel, LM35 Temperature, Light & Voltage Sensor on Thingspeak Server
- Suitable forB.Tech/Diploma ESP32/IoT students
- Build time1-2 weeks
- LevelBeginner
- Available atAjvika Labs, Kakinada
About this project
Overview
In this project we will develop an
IoT Based Solar Power Monitoring System
using
ESP32 WiFi Module
. The ESP32 connects to the
WiFi Network
and uploads the Solar Sensing parameters like
Solar Panel Voltage
Temperature
, and Light Intensity on
Thingspeak
Server.
Solar power plants need
Solar Panel Monitoring
for
optimum power
output. Solar energy is the future of the energy industry. Countries all around the world are focusing on renewable and clean
sources of energy
. Sunlight is the most abundant resource available everywhere and each day. We can use
Sunlight
to generate
electricity
which is pollution free. There are continuous research and innovations going on to improve the
efficiency of solar cells
, reduce the cost of manufacturing
solar panels
and improve power distribution from solar plants. This project is also aimed at innovation to improve the
efficiency of solar panels
The project allows the monitoring
power
output of a solar panel, incident
light intensity
, and the operating
temperature
using an ESP32 WiFi + BLE Microcontroller. The Solar Panel and the
sensors
are precisely connected to the
ESP32 controller
which supervises the panels and loads. Thus, users can view the voltage, temperature, and
Solar Irradiance
online from any part of the world.
There are a wide variety of possible uses of this technology, including Solar cities, Smart villages, Microgrids, and Solar street lighting.
Bill of Materials
We need the following components to build an
IoT Based Solar Power Monitoring System
. You can purchase all the components from Amazon.
S.N.
Components
Quantity
Purchase Link
1
ESP32 WiFi Module
1
Amazon
AliExpress
2
Solar Panel (3-25V)
1
Amazon
AliExpress
3.
Voltage Sensor Module
1
Amazon
AliExpress
4
LM35 Temperature Sensor
1
Amazon
AliExpress
5
LDR
1
Amazon
AliExpress
6
16x2 I2C LCD Display
1
Amazon
AliExpress
7
Resistor 2.2K
1
Amazon
AliExpress
8
Zero PCB/Vero Board
1
Amazon
AliExpress
9
Micro-USB Data Cable
1
Amazon
AliExpress
0-25V Voltage Sensor Module
The
Voltage Sensor Module
is a simple but very useful module that uses a potential divider to reduce an input voltage by a factor of 5. The
0-25V
Voltage Sensor Module allows you to use the analog input of a microcontroller to monitor voltages much higher than it is capable of sensing.
The Voltage Sensor is basically a
Voltage Divider
consisting of two resistors with resistances of
30KΩ
and
7.5KΩ
i.e. a 5 to 1 voltage divider. Hence the output voltage is reduced by a factor of 5 for any input voltage. The internal circuit diagram of the Voltage Sensor Module is given below.
For more details on this sensor refer to
Voltage Sensor Interfacing
guide in one of our previous post.
LM35 Temperature Sensor
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.
For more info on LM35 Temperature Sensor refer to
LM35 Interfacing
guide in one of our previous post.
Light Dependent Resistor (LDR)
Light Dependent Resistor
or LDR or Photoresistors 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.
Block Diagram of IoT Solar Power Monitoring System
Let us take a look at a
block diagram
of
IoT Based Solar Power Monitoring System
with ESP32. The ESP32 is interfaced with the voltage Sensor, LM-35 temperature sensor, and LDR sensor. These three sensors are used to monitor the
power
output,
temperature
, and incident
light intensity
respectively.
A
character LCD
is also interfaced with the board for real-time display of the measured parameters. The solar panels are assumed to be installed with
internet hotspots
at their installation site. The ESP32 not only displays the measured parameters on the LCD screen but also sends the measured values to the
Thingsepak cloud server
The voltage, temperature & light parameters can be monitored in real-time and logged on Thingspeak Server for analytics and performance evaluation.
Circuit: IoT Based Solar Power Monitoring System with ESP32
Let us see the
schematic
for IoT Based Solar Power Monitoring System with ESP32 WiFi Module.
The ESP32 is the main controller for the entire project. There are 3 sensors that directly connect to the GPIO pin of ESP32. The 3 sensors are Voltage Sensor (0-25V), LM35 Temperature Sensor & LDR Sensor.
Connect the input of Voltage Sensor to GPIO14 of ESP32 Board. On the other side of the Voltage, the Sensor connects the Solar Panel with a voltage range between 3V-25V as the voltage sensor’s maximum sensing capacity is 25V only. Similarly, connect the input of the LM35 temperature sensor to the GPIO34 of ESP32. The LDR requires a resistor of 2.2K in series to measure the analog voltage fed to the ESP32 Analog pin. The LDR input pins connect to the GPIO35 of ESP32.
Connect the SDA & SCL pin of I2C LCD Display to GPIO21 & GPIO22 respectively. You can power the LCD Display, & LM35 via 5V pin of ESP32.
Project PCB Gerber File & PCB Ordering Online
If you don’t want to assemble the circuit on a zero PCB and you want
PCB
for the project, then here is the PCB for you. I used EasyEDA to design the PCB. The PCB Board for
IoT Solar Power Monitoring System
looks something like below.
The Gerber File for the PCB is given below. You can simply download the Gerber File and order the PCB from
ALLPCB
at
1$
only.
Download Gerber File:
Solar Power Monitoring System PCB
You can use this Gerber file to order high quality PCB for this project. To do that visit the
ALLPCB
official website by clicking here:
https://www.allpcb.com/
You can now upload the Gerber File by choosing the Quote Now option. From these options, you can choose the Material Type, Dimensions, Quantity, Thickness, Solder Mask Color and other required parameters.
After filling all details, select your country and shipping method. Finally you can place the order.
You can assemble the components on the PCB Board.
Setting up Thingspeak Server
ThingSpeak
provides very good tool for IoT based projects. By using the ThingSpeak site, we can monitor our data and control our system over the Internet, using the Channels and web pages provided by ThingSpeak. So first you need to sign up for ThingSpeak. So visit
https://thingspeak.com
and create an account.
Then create a
new channel
and create three variables as voltage, temperature & lux.
Then create the
API keys
. This key is required for programming modifications and receiving data from ESP32 WiFi Module.
Now click on channels so that you can see the online data streaming.
Source Code/Program
The code for IoT Based Solar Power Monitoring System with ESP32 is simple & can be written on Arduino IDE.
The code requires
I2C LCD Library
for compilation.
From the following lines, you need to change the Thingspeak API Key, WiFi SSID & Password.
1
2
3
String
apiKey
=
\"***************\"
;
const
char
*
ssid
=
\"**************\"
;
// Enter your WiFi Network's SSID
const
char
*
pass
=
\"**************\"
;
// Enter your WiFi Network's Password
Now you can upload the following code to ESP32 Board.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
4
In this project we will develop an
IoT Based Solar Power Monitoring System
using
ESP32 WiFi Module
. The ESP32 connects to the
WiFi Network
and uploads the Solar Sensing parameters like
Solar Panel Voltage
Temperature
, and Light Intensity on
Thingspeak
Server.
Solar power plants need
Solar Panel Monitoring
for
optimum power
output. Solar energy is the future of the energy industry. Countries all around the world are focusing on renewable and clean
sources of energy
. Sunlight is the most abundant resource available everywhere and each day. We can use
Sunlight
to generate
electricity
which is pollution free. There are continuous research and innovations going on to improve the
efficiency of solar cells
, reduce the cost of manufacturing
solar panels
and improve power distribution from solar plants. This project is also aimed at innovation to improve the
efficiency of solar panels
The project allows the monitoring
power
output of a solar panel, incident
light intensity
, and the operating
temperature
using an ESP32 WiFi + BLE Microcontroller. The Solar Panel and the
sensors
are precisely connected to the
ESP32 controller
which supervises the panels and loads. Thus, users can view the voltage, temperature, and
Solar Irradiance
online from any part of the world.
There are a wide variety of possible uses of this technology, including Solar cities, Smart villages, Microgrids, and Solar street lighting.
Bill of Materials
We need the following components to build an
IoT Based Solar Power Monitoring System
. You can purchase all the components from Amazon.
S.N.
Components
Quantity
Purchase Link
1
ESP32 WiFi Module
1
Amazon
AliExpress
2
Solar Panel (3-25V)
1
Amazon
AliExpress
3.
Voltage Sensor Module
1
Amazon
AliExpress
4
LM35 Temperature Sensor
1
Amazon
AliExpress
5
LDR
1
Amazon
AliExpress
6
16x2 I2C LCD Display
1
Amazon
AliExpress
7
Resistor 2.2K
1
Amazon
AliExpress
8
Zero PCB/Vero Board
1
Amazon
AliExpress
9
Micro-USB Data Cable
1
Amazon
AliExpress
0-25V Voltage Sensor Module
The
Voltage Sensor Module
is a simple but very useful module that uses a potential divider to reduce an input voltage by a factor of 5. The
0-25V
Voltage Sensor Module allows you to use the analog input of a microcontroller to monitor voltages much higher than it is capable of sensing.
The Voltage Sensor is basically a
Voltage Divider
consisting of two resistors with resistances of
30KΩ
and
7.5KΩ
i.e. a 5 to 1 voltage divider. Hence the output voltage is reduced by a factor of 5 for any input voltage. The internal circuit diagram of the Voltage Sensor Module is given below.
For more details on this sensor refer to
Voltage Sensor Interfacing
guide in one of our previous post.
LM35 Temperature Sensor
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.
For more info on LM35 Temperature Sensor refer to
LM35 Interfacing
guide in one of our previous post.
Light Dependent Resistor (LDR)
Light Dependent Resistor
or LDR or Photoresistors 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.
Block Diagram of IoT Solar Power Monitoring System
Let us take a look at a
block diagram
of
IoT Based Solar Power Monitoring System
with ESP32. The ESP32 is interfaced with the voltage Sensor, LM-35 temperature sensor, and LDR sensor. These three sensors are used to monitor the
power
output,
temperature
, and incident
light intensity
respectively.
A
character LCD
is also interfaced with the board for real-time display of the measured parameters. The solar panels are assumed to be installed with
internet hotspots
at their installation site. The ESP32 not only displays the measured parameters on the LCD screen but also sends the measured values to the
Thingsepak cloud server
The voltage, temperature & light parameters can be monitored in real-time and logged on Thingspeak Server for analytics and performance evaluation.
Circuit: IoT Based Solar Power Monitoring System with ESP32
Let us see the
schematic
for IoT Based Solar Power Monitoring System with ESP32 WiFi Module.
The ESP32 is the main controller for the entire project. There are 3 sensors that directly connect to the GPIO pin of ESP32. The 3 sensors are Voltage Sensor (0-25V), LM35 Temperature Sensor & LDR Sensor.
Connect the input of Voltage Sensor to GPIO14 of ESP32 Board. On the other side of the Voltage, the Sensor connects the Solar Panel with a voltage range between 3V-25V as the voltage sensor’s maximum sensing capacity is 25V only. Similarly, connect the input of the LM35 temperature sensor to the GPIO34 of ESP32. The LDR requires a resistor of 2.2K in series to measure the analog voltage fed to the ESP32 Analog pin. The LDR input pins connect to the GPIO35 of ESP32.
Connect the SDA & SCL pin of I2C LCD Display to GPIO21 & GPIO22 respectively. You can power the LCD Display, & LM35 via 5V pin of ESP32.
Project PCB Gerber File & PCB Ordering Online
If you don’t want to assemble the circuit on a zero PCB and you want
PCB
for the project, then here is the PCB for you. I used EasyEDA to design the PCB. The PCB Board for
IoT Solar Power Monitoring System
looks something like below.
The Gerber File for the PCB is given below. You can simply download the Gerber File and order the PCB from
ALLPCB
at
1$
only.
Download Gerber File:
Solar Power Monitoring System PCB
You can use this Gerber file to order high quality PCB for this project. To do that visit the
ALLPCB
official website by clicking here:
https://www.allpcb.com/
You can now upload the Gerber File by choosing the Quote Now option. From these options, you can choose the Material Type, Dimensions, Quantity, Thickness, Solder Mask Color and other required parameters.
After filling all details, select your country and shipping method. Finally you can place the order.
You can assemble the components on the PCB Board.
Setting up Thingspeak Server
ThingSpeak
provides very good tool for IoT based projects. By using the ThingSpeak site, we can monitor our data and control our system over the Internet, using the Channels and web pages provided by ThingSpeak. So first you need to sign up for ThingSpeak. So visit
https://thingspeak.com
and create an account.
Then create a
new channel
and create three variables as voltage, temperature & lux.
Then create the
API keys
. This key is required for programming modifications and receiving data from ESP32 WiFi Module.
Now click on channels so that you can see the online data streaming.
Source Code/Program
The code for IoT Based Solar Power Monitoring System with ESP32 is simple & can be written on Arduino IDE.
The code requires
I2C LCD Library
for compilation.
From the following lines, you need to change the Thingspeak API Key, WiFi SSID & Password.
1
2
3
String
apiKey
=
\"***************\"
;
const
char
*
ssid
=
\"**************\"
;
// Enter your WiFi Network's SSID
const
char
*
pass
=
\"**************\"
;
// Enter your WiFi Network's Password
Now you can upload the following code to ESP32 Board.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
4
Technologies used
Hardware components
- ESP32
- Arduino
- LM35
- LDR
Software & tools
- Arduino IDE
- ThingSpeak
- EasyEDA
What you get
- Working project / hardware kit, tested before delivery
- Complete source code with explanation
- Project demo and guidance for your viva
- Project report, PPT and IEEE paper support (on request)
Delivery & Payment
Delivery takes a minimum of two weeks from the date your inquiry is confirmed.
Payment is in two parts:
• 50% advance to start the project
• Remaining 50% before delivery
Note:
• Documentation and PPT are not included by default
• If you need documentation/PPT, it can be arranged for extra time and cost
We'll confirm the exact timeline and cost with you after reviewing your requirements.