Solar Panel Data Monitoring using Arduino and LabView

This project presents a simple virtual instrument system based on LabVIEW and Arduino to characterize and monitor a PV panel.

Mar 28, 2020

35746 views

11 respects

Components and supplies

1

INA169 Analog DC Current Sensor

1

Small Mono TDC-M20-25-36

1

B25 0 to 25V Voltage Sensor Module

1

Arduino UNO

Tools and machines

1

Arduino IDE

1

NI LabVIEW 2015

Project description

Code

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

scheme

Block diagram and the interface of the developed system under LabVIEW

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

scheme

Block diagram and the interface of the developed system under LabVIEW

Downloadable files

Experimental setup:

In the Figure below, the experimental setup of the real-time virtual instrumentation system is shown. Apart PV panel, Arduino UNO board, voltage and current sensor, different components are used in the experimental setup such us lamps of 100 W that act as a solar simulator, a variable resistance between 0 and 300 Ω as a load and acting as a light intensity driving. The microcontroller's operation is programmed in the block diagram to measure the values relative to the current and the voltage captured by the sensors successively every 100 ms. Once the Arduino board is connected to the computer through USB cable, we launch the software interface of our system under LabVIEW. Then, we defined in the visa block the serial port where the Arduino board is connected to the computer. Thereafter, after the execution of the program, the output data will be plotted in real-time on the monitoring interface under LabVIEW.

Experimental setup:

LabVIEW- block diagram and interface:

The overview of the block diagram and the front panel of the virtual instrumentation system is shown in the Figure below. For enriching understanding, the block diagram is separated into four parts. The first one illustrates the blocks of initialization and configuration of the serial connection between the hardware (Arduino UNO) and software (LabVIEW), that by defining the type of used Arduino (Arduino UNO), type of serial communication (USB) and the Baud Rate (9600 bits per second). In the second part, the voltage and current readings will be obtained from the microcontroller by using the analog read function in LIFA's palette in which the initialization of the selected Arduino pins as inputs was made, A0 pin for voltage reading and A1 pin for current reading. The third part shows that the current, voltage and output power readings are carried out and will be plotted directly according to time by using scrolling graphs in the LabVIEW palette. Note that the reading of the voltage is multiplied by 5 because as it is demonstrated in the hardware part that the voltage reading by the microcontroller varies between 0 and 5 V, it is necessary to multiply it by 5 to obtain the PV panel's output voltage. The PV panel's output power reading is done out by the product of the current and voltage reading. Finally, in the last part, the I-V and P-V curves of PV panel characteristics will be plotted in the monitoring interface of the system by using x/y graphs in the LabVIEW palette.

LabVIEW- block diagram and interface:

Voltage sensor:

For measuring the PV panel's output voltage, the B25 voltage sensor module is used (Figure (a)). The B25 voltage sensor uses the principle of the voltage divider, it is essentially a voltage divider using a resistance of 30 kΩ and a resistance of 7.5 kΩ as shown in Figure (b). It is used to reduce the input voltage up to 5 times compared to the original voltage because the maximum analog input voltage of the Arduino microcontroller is 5 V. The voltage sensor module will be installed in parallel with the PV panel load as shown in Figure (c). The sensor reading is a digital value ( Vout) which varies between 0 and 1023. Since the ADC of the microcontroller is coded in 10 bits, the resolution of the PV panel module voltage is 0.00489 V (5/1023) and the input voltage of this module must be more than 0.02445 V (0.00489 V× 5). Hence, the output voltage of the PV panel can be formulated as the following equation: V=5*Vout*(5/1023)

Voltage sensor:

LabVIEW Interface For Arduino (LIFA):

To send data from Arduino to LabVIEW, the LIFA is necessary to make the connection between the Arduino microcontroller and the computer. For this, you just need to follow the following steps: + Install the LabVIEW software (LabVIEW 2011 or later); + Download the NI-VISA drivers and install it. Since the Arduino appears as a serial instrument device for LabVIEW, the NI-VISA drivers must be downloaded and installed to communicate with Arduino board in LabVIEW; + Download the JKI VI Package Manager (VIPM) and install it, it allows to install and update LabVIEW libraries; + Install the LIFA by following the next steps: Lunch LabVIEW → click on tool → go to VIPM → browse to LIFA in the list of packages → click on the Install Upgrade Packages button; + Download the open source Arduino IDE software and install it; + The LIFA provides a sketch program that must be uploaded to the Arduino before you can use the virtual instruments to communicate with it. For this, Open the Arduino IDE application and following the next steps to uploading LIFA firmware to the Arduino board: => Go to File → Click on Open → go to the sketch which is located at: C:\ProgramFiles(x86)\National Instruments\LabVIEW 2015\vi.lib\LabVIEW Interface for Arduino\Firmware\LIFA_Bas; => Select the type of used Board (Arduino UNO); => Connect the board to computer via USB cable and select the used serial port; => Verify and Upload the sketch program LIFA to the Arduino microcontroller; + After that, you can start building your code in Arduino with LIFA Block Diagram.

LabVIEW Interface For Arduino (LIFA):

Current sensor:

The current sensor used to sense the PV panel output current is the INA169 module (Figure (a)), it can measure a continuous current up to 5 A. Figure (b) shows the INA169 current sensor circuit (from INA169 Datasheet). The INA169 is a high-side current monitor that measures the voltage drop across a sense resistor (Rs). Then, a voltage level (Vo) is generated at the output resistor (RL). Therefore, as shown in Figure (b), the output current of the sensor module can be obtained by the following equation: Is = (Vo*1K) / (Rs*Rl) Where: - Vo: is the voltage we measured at the output of the INA169. - 1kΩ is a constant resistance value we need to include due to the internals of the INA169. - Rs: is the value of the shunt resistor, this is set at 0.1 Ω. - RL: is the value of the output resistor, this is set at 10 KΩ. Hence, the output current of the PV panel can be formulated as the following equation: I =( Vo*5) / 1023 The output voltage of the INA169 module (Vo) is the input voltage at an Arduino analog pin (A1), which varies between 0 and 1023. The current sensor module must be connected in series to the positive side of the PV panel and that of the load as shown in Figure (c).

Current sensor:

Voltage sensor:

For measuring the PV panel's output voltage, the B25 voltage sensor module is used (Figure (a)). The B25 voltage sensor uses the principle of the voltage divider, it is essentially a voltage divider using a resistance of 30 kΩ and a resistance of 7.5 kΩ as shown in Figure (b). It is used to reduce the input voltage up to 5 times compared to the original voltage because the maximum analog input voltage of the Arduino microcontroller is 5 V. The voltage sensor module will be installed in parallel with the PV panel load as shown in Figure (c). The sensor reading is a digital value ( Vout) which varies between 0 and 1023. Since the ADC of the microcontroller is coded in 10 bits, the resolution of the PV panel module voltage is 0.00489 V (5/1023) and the input voltage of this module must be more than 0.02445 V (0.00489 V× 5). Hence, the output voltage of the PV panel can be formulated as the following equation: V=5*Vout*(5/1023)

Voltage sensor:

LabVIEW- block diagram and interface:

The overview of the block diagram and the front panel of the virtual instrumentation system is shown in the Figure below. For enriching understanding, the block diagram is separated into four parts. The first one illustrates the blocks of initialization and configuration of the serial connection between the hardware (Arduino UNO) and software (LabVIEW), that by defining the type of used Arduino (Arduino UNO), type of serial communication (USB) and the Baud Rate (9600 bits per second). In the second part, the voltage and current readings will be obtained from the microcontroller by using the analog read function in LIFA's palette in which the initialization of the selected Arduino pins as inputs was made, A0 pin for voltage reading and A1 pin for current reading. The third part shows that the current, voltage and output power readings are carried out and will be plotted directly according to time by using scrolling graphs in the LabVIEW palette. Note that the reading of the voltage is multiplied by 5 because as it is demonstrated in the hardware part that the voltage reading by the microcontroller varies between 0 and 5 V, it is necessary to multiply it by 5 to obtain the PV panel's output voltage. The PV panel's output power reading is done out by the product of the current and voltage reading. Finally, in the last part, the I-V and P-V curves of PV panel characteristics will be plotted in the monitoring interface of the system by using x/y graphs in the LabVIEW palette.

LabVIEW- block diagram and interface:

LabVIEW Interface For Arduino (LIFA):

To send data from Arduino to LabVIEW, the LIFA is necessary to make the connection between the Arduino microcontroller and the computer. For this, you just need to follow the following steps: + Install the LabVIEW software (LabVIEW 2011 or later); + Download the NI-VISA drivers and install it. Since the Arduino appears as a serial instrument device for LabVIEW, the NI-VISA drivers must be downloaded and installed to communicate with Arduino board in LabVIEW; + Download the JKI VI Package Manager (VIPM) and install it, it allows to install and update LabVIEW libraries; + Install the LIFA by following the next steps: Lunch LabVIEW → click on tool → go to VIPM → browse to LIFA in the list of packages → click on the Install Upgrade Packages button; + Download the open source Arduino IDE software and install it; + The LIFA provides a sketch program that must be uploaded to the Arduino before you can use the virtual instruments to communicate with it. For this, Open the Arduino IDE application and following the next steps to uploading LIFA firmware to the Arduino board: => Go to File → Click on Open → go to the sketch which is located at: C:\ProgramFiles(x86)\National Instruments\LabVIEW 2015\vi.lib\LabVIEW Interface for Arduino\Firmware\LIFA_Bas; => Select the type of used Board (Arduino UNO); => Connect the board to computer via USB cable and select the used serial port; => Verify and Upload the sketch program LIFA to the Arduino microcontroller; + After that, you can start building your code in Arduino with LIFA Block Diagram.

LabVIEW Interface For Arduino (LIFA):

Experimental setup:

In the Figure below, the experimental setup of the real-time virtual instrumentation system is shown. Apart PV panel, Arduino UNO board, voltage and current sensor, different components are used in the experimental setup such us lamps of 100 W that act as a solar simulator, a variable resistance between 0 and 300 Ω as a load and acting as a light intensity driving. The microcontroller's operation is programmed in the block diagram to measure the values relative to the current and the voltage captured by the sensors successively every 100 ms. Once the Arduino board is connected to the computer through USB cable, we launch the software interface of our system under LabVIEW. Then, we defined in the visa block the serial port where the Arduino board is connected to the computer. Thereafter, after the execution of the program, the output data will be plotted in real-time on the monitoring interface under LabVIEW.

Experimental setup:

Current sensor:

The current sensor used to sense the PV panel output current is the INA169 module (Figure (a)), it can measure a continuous current up to 5 A. Figure (b) shows the INA169 current sensor circuit (from INA169 Datasheet). The INA169 is a high-side current monitor that measures the voltage drop across a sense resistor (Rs). Then, a voltage level (Vo) is generated at the output resistor (RL). Therefore, as shown in Figure (b), the output current of the sensor module can be obtained by the following equation: Is = (Vo*1K) / (Rs*Rl) Where: - Vo: is the voltage we measured at the output of the INA169. - 1kΩ is a constant resistance value we need to include due to the internals of the INA169. - Rs: is the value of the shunt resistor, this is set at 0.1 Ω. - RL: is the value of the output resistor, this is set at 10 KΩ. Hence, the output current of the PV panel can be formulated as the following equation: I =( Vo*5) / 1023 The output voltage of the INA169 module (Vo) is the input voltage at an Arduino analog pin (A1), which varies between 0 and 1023. The current sensor module must be connected in series to the positive side of the PV panel and that of the load as shown in Figure (c).

Current sensor:

Experimental results:

The results of the direct monitoring of PV panel output data and the I-V/ P-V curves of the PV panel are shown in the Figure below.

Experimental results:

Comments

Only logged in users can leave comments

shara1709

a year ago

Hello, could you possible share the arduino code for this project? Would be a big help. Thanks in advance.

lussac

3 years ago

Hello good morning, I want a special favor, if someone can help me send me the arduino code of this project. I liked the project and as I am a cadet in the area I want to practice. my whatsapp: 244 995 870 459

taghreed_28

3 years ago

Could you share the Arduino code?

Anonymous user

3 years ago

hi i would like to know what was your Arduino code and the labview in mine is showing error. can u help?

aashutoshjodh

4 years ago

How much is estimated costing of project??