blog

Voltage Sensor Module: Measure Solar Panel Voltage level

Hello dear reader , in this tutorial we will be talking about using the Voltage Sensor Module to Measure Solar panel voltage level. The Voltage Sensor Module is a voltage sensing module that can be interfaced with an Arduino for measuring DC voltages within 2V – 25V. To read more about the technical details, go to shop.

The voltage sensor

Components Used for Project Tutorial:

In this practical, we will be using the Following Component.

All these components can be bought on our online store. Alternatively, if you can’t find them, leave us a message on WhatsApp or Telegram group for assistance or in the comment section way down below.

Arduino Voltage Sensor Module: The Principle of Operation

Arduino Voltage sensor module pinout

The Voltage sensors are made up of  the following input pinouts (VCC and GND) socket – (which can take in Maximum Voltage of 25v). These pinouts are used for measuring the voltage. On the other side, it has 3 pins which contains (VCC, GND and S where S is the Analog pin that can be connected to Arduino).

The internal circuit of the voltage sensor

The Arduino Sensor Module contains 2 Resistors 30kΩ and 7.5kΩ that uses the principle voltage divider rule. This is given in the Equation as:

Read up more on this this link. Let us proceed to how to hook this up to an Arduino Uno board and use it to measure DC voltage from a Solar panel up to 24V DC.

A typical solar panel used in this project

Solar Panels and How They are Made

Solar panels use photovoltaic cells, or PV cells, which are made using silicon crystalline wafers similar to the wafers used to make computer processors. The silicon wafers can be either polycrystalline or monocrystalline and are produced using several different manufacturing methods. The most efficient type is monocrystalline (mono) which are manufactured using the well known Czochralski process. This process is more energy-intensive compared to polycrystalline (poly) and therefore more expensive to produce.

Polycrystalline wafers, on the other hand, are slightly less efficient and are made using several purification processes followed by a simpler, lower cost, casting method. More recently, cast monocrystalline or cast mono cells have been gaining popularity. The reason is due to the lower-cost casting process used to make cast mono cells which is similar to the process used for polycrystalline silicon cells. However, cast-mono wafers are not quite as efficient and pure mono wafers made using the Czochralski process. The various types are namely:

  • Monocrystalline silicon cells – Highest efficiency and highest cost
  • Cast monocrystalline cells – High efficiency and lower cost
  • Polycrystalline silicon cells – Lower efficiency and lowest cost
The solar panel breakdown part

Read all about solar panels and how they are manaufactured here. However, for this tutorial our focus is to use Arduino Voltage Sensor Module to Measure Solar Panel Voltage level .

Voltage Sensor Module: Measure Solar Panel Voltage level

The Circuit Diagram

Circuit Diagram for the connection

To use the Arduino Voltage Sensor Module with Arduino Uno board, the 3 pins of the Voltage sensors are connected to Arduino Uno as shown above. In which, the VCC is connected to 5V. The GND is also connected to the GND of the Arduino. The “S” which is the Analog pins slot is connected to the Analog part on the Arduino board, which could be connected to (A0, A1, A2, A3 and …). For this project we used the A1 analog pin on the Arduino Uno board. To read the battery level for a 3V battery, the above circuit was used.

Voltage Sensor Module: Measure Solar Panel Voltage Level(Arduino Sketch)

Explanation of Source Code (Arduino Sketch)

float PVr1 = 30000.0;
float PVr2 = 7500.0;
float batteryVoltSensor, vinBattery;
const int voltagePinBattery = A0;

void setup() {
  Serial.begin(9600);
   Serial.println("Now in Setup");
Serial.println("Now exiting Setup function");
}

void loop(){ 
Serial.println("Now in loop function");

  //now doing calculations
  batteryVoltSensor = analogRead(voltagePinBattery);
 batteryVoltSensor = (batteryVoltSensor * 5.0)/1023.0;
 vinBattery = batteryVoltSensor/(PVr2/(PVr1+PVr2));

Serial.println(vinBattery);

Serial.println("Now exiting loop function");
 delay(1000);
}

The Arduino sketch is the same as the sketch used for measuring the various battery level voltages. You can take a look at it here. The sketch begins with declaring and assigning floating point variables that takes care of the values of resistors used to form the voltage divider rule. Other variables were declared to later compute the voltage of the PV (solar panel) measured. In the setup() function, the serial communication is began at a baudrate of 9600 bits per second, we printed out some dummy string text to know when we have entered the setup() function and have exited out of it.
In the loop() function, we carried out the calculation that measured the PV voltage. This was done using the analog pin where the Analog pinout of the Arduino voltage sensor was connected. Then this was multiplied by 5V since the Arduino Development board can take a maximum of 5V of logic voltage. Converted to to actual voltage when divided by 1023 for 16 bits microcontrollers.

Results

Serial monitor result
The final connection

Explanation of Circuit Diagram

The circuit diagram for this 21V PV panel uses the same source code (Arduino Sketch) given above. The voltage level of the solar panel for this Arduino Voltage sensor module measure Solar panel voltage level project was observed to increase by up to 22V and it was printed out on a serial monitor.

Conclusion

The serial monitor printing shows that we can measure or take the reading of various DC voltage levels of any solar panel that is within the range of 25V MAXIMUM using this voltage sensor. To take measurements above 25V, you have to see our other project tutorial. The readings obtained in this project would then be uploaded to a cloud dashboard using an Arduino Uno and an ESP8266-01 WiFi module.

So what do you think about this tutorial? Can you reproduce this? or make further modifications to it? Let us know if you tried it and how it built you in the comment section below.
Thank you.

smartechlabs

Recent Posts

AI-Powered Soil Analysis for Precision Nutrient Management: Revolutionizing Agriculture

In the ever-evolving landscape of modern agriculture, artificial intelligence (AI) is emerging as a game-changing…

1 day ago

IoT Applications in Enhancing Manufacturing Flexibility

The Internet of Things (IoT) is reshaping the way we live, work, and produce goods.…

1 day ago

AI-Driven Process Optimization in Continuous Manufacturing

Introduction Have you ever wondered how some manufacturing industries consistently deliver high-quality products while minimizing…

1 day ago

Implementing IoT for Real-Time Monitoring of Livestock Feed Intake

In the ever-evolving landscape of modern agriculture, the integration of Internet of Things (IoT) technology…

1 day ago

Implementing IoT Solutions for Remote Equipment Diagnostics

Introduction Have you ever imagined diagnosing equipment issues without even being on-site? Welcome to the…

1 day ago

Leveraging AI for Inventory Management in Smart Manufacturing

In the ever-evolving world of manufacturing, staying competitive means adopting innovative solutions to optimize every…

1 day ago

This website uses cookies.