Real-Time Data Acquisition of Solar Panel Using Arduino

Use of a simple instrumentation method (based on Arduino and Excel) to acquire, monitor and store PV system data in real-time.

Mar 25, 2020

59804 views

23 respects

Components and supplies

1

Rhéostat 330 Ohms

1

INA169 Analog DC Current Sensor

1

Arduino UNO

1

TDC-M20-36 PV panel

1

B25 0 to 25V Voltage Sensor Module

Tools and machines

1

PLX-DAQ

Apps and platforms

1

Arduino IDE

Project description

Code

Real-time data acquisition of solar panel using Arduino and Excel

arduino

The program code embedded in the Arduino UNO board, which allows to acquire the measured data of PV panel from sensors and send it to a PLX-DAQ Spreadsheet, is presented as follows

Real-time data acquisition of solar panel using Arduino and Excel

arduino

The program code embedded in the Arduino UNO board, which allows to acquire the measured data of PV panel from sensors and send it to a PLX-DAQ Spreadsheet, is presented as follows

Downloadable files

Experimental setup of the virtual instrumentation system

The microcontroller of Arduino board gets the PV panel output voltage and current which are measured by sensors and then computes the output power. Once the Arduino board is connected to the computer through a USB cable, we launch the PLX-DAQ Excel Macro and by defining in the PLX-DAQ window after its display, the serial port where Arduino board is connected to the computer, and the Baud rate (9600 bit/sec). Note that the Baud rate defined in PLX-DAQ window must be the same as that used in the program code embedded in Arduino board. Thereafter, after clicking on "connect" the output data will be collected and displayed in real-time on the Excel Spreadsheet. The light intensity is driven by varying manually a variable resistance between 0 and 330 Ω (to trace the I-V and P-V characteristics). A pyranometer is also used to measure the light radiation (if needed!). The microcontroller is programmed to measure successively in each second the PV current, voltage and power.

Experimental setup of the virtual instrumentation system

Experimental setup of the virtual instrumentation system

The microcontroller of Arduino board gets the PV panel output voltage and current which are measured by sensors and then computes the output power. Once the Arduino board is connected to the computer through a USB cable, we launch the PLX-DAQ Excel Macro and by defining in the PLX-DAQ window after its display, the serial port where Arduino board is connected to the computer, and the Baud rate (9600 bit/sec). Note that the Baud rate defined in PLX-DAQ window must be the same as that used in the program code embedded in Arduino board. Thereafter, after clicking on "connect" the output data will be collected and displayed in real-time on the Excel Spreadsheet. The light intensity is driven by varying manually a variable resistance between 0 and 330 Ω (to trace the I-V and P-V characteristics). A pyranometer is also used to measure the light radiation (if needed!). The microcontroller is programmed to measure successively in each second the PV current, voltage and power.

Experimental setup of the virtual instrumentation system

Experimental Results (c)

The results of a monitoring test for current, voltage and power of PV panel are presented in the Figure below. From the experimental results, it can be seen that the PV panel produced a maximum power of 17.07 W at "15h14min02s" when a voltage of 14.15 V and a current of 1.20 A appear. Subsequently, the output power is tends to a minimum value 822.2 mW when there is a voltage of 18.23 V and a current of 45.1 mA. Hence, as the present system is used such as a virtual instrument to acquire the PV panel characteristics under the real operation conditions, it can also be used on field periodical monitoring activities for PV systems.

Experimental Results (c)

Experimental Results (b)

The results of a test similar to the previous one are shown in the Figure below, while the difference relates to the time step between each measurement, decreasing the step size from 1 s to only 100 ms. As shown in this Figure, oscillations have appeared on the I-V and P-V curves due to the inaccuracy of data obtained by the instrument system but with small extent. However, a small step size leads to obtain a big sample of measurements, and hence give us too many significant results. As a result, a compromise between small and large step size is needed. Generally, if you would like to note precise changes in the PV characteristics, then it is recommended to use a smaller step size. If you are not concerned about the precise changes and would like to run the instrument system faster, use a large step size.

Experimental Results (b)

Schematic view of the hardware components connected to the Arduino UNO

The voltage sensor is put in parallel with the load. While the current sensor module is put in series between the positive side of the PV panel and that of the load.

Schematic view of the hardware components connected to the Arduino UNO

PLX-DAQ Spreadsheet window

The PLX-DAQ Excel Macro is used for data acquisition from the Arduino microcontroller to an Excel Spreadsheet. We only need to download it. After installation, a folder named "PLX-DAQ" will automatically be created on the PC in which a shortcut named "PLX-DAQ Spreadsheet" is inside. Then, to establish the communication between the board and Excel, we just need to open the Spreadsheet and defining the connections settings (Baud rate and port) in the PLX-DAQ window.

PLX-DAQ Spreadsheet window

Experimental Results (b)

The results of a test similar to the previous one are shown in the Figure below, while the difference relates to the time step between each measurement, decreasing the step size from 1 s to only 100 ms. As shown in this Figure, oscillations have appeared on the I-V and P-V curves due to the inaccuracy of data obtained by the instrument system but with small extent. However, a small step size leads to obtain a big sample of measurements, and hence give us too many significant results. As a result, a compromise between small and large step size is needed. Generally, if you would like to note precise changes in the PV characteristics, then it is recommended to use a smaller step size. If you are not concerned about the precise changes and would like to run the instrument system faster, use a large step size.

Experimental Results (b)

Schematic view of the hardware components connected to the Arduino UNO

The voltage sensor is put in parallel with the load. While the current sensor module is put in series between the positive side of the PV panel and that of the load.

Schematic view of the hardware components connected to the Arduino UNO

Experimental Results (c)

The results of a monitoring test for current, voltage and power of PV panel are presented in the Figure below. From the experimental results, it can be seen that the PV panel produced a maximum power of 17.07 W at "15h14min02s" when a voltage of 14.15 V and a current of 1.20 A appear. Subsequently, the output power is tends to a minimum value 822.2 mW when there is a voltage of 18.23 V and a current of 45.1 mA. Hence, as the present system is used such as a virtual instrument to acquire the PV panel characteristics under the real operation conditions, it can also be used on field periodical monitoring activities for PV systems.

Experimental Results (c)

PLX-DAQ Spreadsheet window

The PLX-DAQ Excel Macro is used for data acquisition from the Arduino microcontroller to an Excel Spreadsheet. We only need to download it. After installation, a folder named "PLX-DAQ" will automatically be created on the PC in which a shortcut named "PLX-DAQ Spreadsheet" is inside. Then, to establish the communication between the board and Excel, we just need to open the Spreadsheet and defining the connections settings (Baud rate and port) in the PLX-DAQ window.

PLX-DAQ Spreadsheet window

Experimental Results (a)

The I-V and P-V characteristics of the PV panel obtained by our virtual instrumentation are presented in the Figure below.

Experimental Results (a)

Comments

Only logged in users can leave comments

amn_hassan

a year ago

That is great and quite useful. Can you kindly send me the electronic connections in details? I had a problem with the ground connection.

Anonymous user

2 years ago

Can you share the details about the rheostat you used?

Aboubakr_Elhammoumi

2 years ago

Please refer to this link: http://www.metrodis.fr/1129.4.24.0.Rheostat-33-Ohms---160-W# or this: https://www.leybold-shop.de/technik/technikkatalog-alt/leistungselektronik-und-antriebstechnik/gesteuerte-stromrichterschaltungen/selbstgefuehrte-stromrichterschaltungen/abschaltbare-stromrichterventile-und-gleichstromsteller/schiebewiderstand-330-ohm-53735.html

Anonymous user

2 years ago

Hallo Euch aus Deutschland, gefällt mir sehr gut dieses Projekt. Ich selbst bin absoluter Neuling im Bereich Arduino. MfG Torsten Hello you from Germany, I like this project very much. I am an absolute newcomer to the Arduino area. MfG Torsten

Anonymous user

2 years ago

Hello, I really like your project. But I am confused if the power output taken is the total Power at the time or is it just the power taken at that instance. Do I need to add up all the values of power to get the total?

Anonymous user

2 years ago

Hello Aboubakr. Can you provide me with the technical characteristics of the lamps used? Thank you I appreciate it.

Anonymous user

3 years ago

Hi from Thailand. So cool research! Could you please share the spec/how2buy of the light source?

Anonymous user

3 years ago

Hello, I really like your project. But I am confused if the power output taken is the total Power at the time or is it just the power taken at that instance. Do I need to add up all the values of power to get the total?

Anonymous user

4 years ago

Can you share the details about the rheostat you used?

Aboubakr_Elhammoumi

2 years ago

Please refer to this link: http://www.metrodis.fr/1129.4.24.0.Rheostat-33-Ohms---160-W# or this: https://www.leybold-shop.de/technik/technikkatalog-alt/leistungselektronik-und-antriebstechnik/gesteuerte-stromrichterschaltungen/selbstgefuehrte-stromrichterschaltungen/abschaltbare-stromrichterventile-und-gleichstromsteller/schiebewiderstand-330-ohm-53735.html

Anonymous user

4 years ago

Hallo Euch aus Deutschland, gefällt mir sehr gut dieses Projekt. Ich selbst bin absoluter Neuling im Bereich Arduino. MfG Torsten Hello you from Germany, I like this project very much. I am an absolute newcomer to the Arduino area. MfG Torsten