Document PDF
Document PDF
Abstract
This paper presents a low-cost solution of virtual instrumentation to provide a new technique for real-time instrumen-
tation of the PV panel characteristics such as voltage, current and power. The system design is based on a low-cost
Arduino acquisition board. The acquisition is made through a low-cost current and voltage sensors, and data are
presented in Excel by using the PLX-DAQ data acquisition Excel Macro, which allows communication between the
ATMega328 microcontroller of an Arduino UNO board and the computer by UART bus. Hence, the I–V and P–V char-
acteristics, which processed under real-time conditions, can be obtained directly and plotted on an Excel spreadsheet
without needing to reprogram the microcontroller. A comparison between this low-cost virtual instrumentation and
the traditional instrumentation is drawn in this work. It is found that our solution presents several benefits compared
to the traditional solution such as the data can be presented in graphical form in real time. Thus, several experimental
tests to confirm the effectiveness of the developed virtual instrumentation system are presented in this study.
Keywords: Real-time, PV panel, Arduino, PLX-DAQ, Excel, Instrumentation
© The Author(s) 2018. This article is distributed under the terms of the Creative Commons Attribution 4.0 International License
(http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium,
provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license,
and indicate if changes were made.
El Hammoumi et al. Renewables (2018) 5:3 Page 2 of 16
Hardware
In order to acquire the PV panel characteristics, differ-
ent components are required such as a data acquisition
board, current sensor and voltage sensor.
Fig. 6 F031-06 voltage sensor module The voltage sensor is put in parallel with the load as
shown in Fig. 10; then, the output of this sensor is trans-
mitted to the analog–digital converter (ADC) of the
Table 2 Specifications of the F031-06 voltage sensor mod- Arduino microcontroller. The ADC provides a digital
ule value (Vout1) which varies between 0 and 1023, because
the latter is encoded in 10 bits. Therefore, the analog volt-
Specifications FO31-06 voltage sensor module
age resolution of the voltage sensor module is 0.00489 V
Input voltage range DC 0–25 V (5 V/1023), and the minimum input voltage detected by
Voltage detection range DC 0.02445–25 V this module is 0.02445 V (0.00489 V × 5). Since the volt-
Analog voltage resolution 0.00489 V age range of the sensor module is [0, 25 V], the divider’s
voltage ratio as shown in Eq. (2) is equal to 0.2. Therefore,
Table 2 presents its specifications, and Table 3 presents the real output voltage of PV panel can be obtained by
its connectors with Arduino board (Voltage Sensor Mod- the equation presented in (3).
ule 2018). According to the manufacturer, this is basically R2
a voltage divider using two series resistors as shown in Vd = ×V (2)
(R1 + R2 )
Fig. 7 (Voltage Sensor Module 2018).
El Hammoumi et al. Renewables (2018) 5:3 Page 6 of 16
(R1 + R2 ) 5
V = × Vout1 × (3)
R1 1023
Current sensor
A current sensor (INA169) is used in order to measure
the image of the PV panel’s current (INA169 Datasheet
2017). Figure 8 shows the selected current sensor, Table 4
presents its specifications, and Table 5 presents its con-
nectors with Arduino board.
The INA169 current sensor circuit is shown in Fig. 9.
The INA169 is a “high-side, unipolar, current shunt Fig. 9 INA169 current sensor circuit (INA169 Datasheet 2017)
El Hammoumi et al. Renewables (2018) 5:3 Page 7 of 16
Fig. 10 Schematic view of the hardware components connected to the Arduino UNO
monitor,” meaning that it measures the voltage drop sensor module is put in series between the positive side
across a shunt resistor (Rs) which is placed on the positive of the PV panel and that of the load as shown in Fig. 10.
power side (INA169 Datasheet 2017). The operational
Vout2 × 5
amplifier inside the INA169 module outputs a voltage I= (5)
based on the difference between the measured voltages 1023
VIN+ and VIN−. Then, the output voltage of the amplifier Software
is converted to a current by the internal transistor, and In the software part, we present the Arduino code and all
this current is converted back to a voltage (Vo) when it software requested (PLX-DAQ Excel Macro and Arduino
passes through the load resistor (RL) to the ground. Note IDE) for the real-time virtual instrumentation system
that the Vo range depends on the voltage supplied by design and the guide to achieve this. Note that Arduino
VCC (5 V in our case). Therefore, and according to Fig. 9, IDE and PLX-DAQ Excel Macro are both open source.
the measured current is obtained by the following equa-
tion (INA169 Datasheet 2017): Arduino IDE
The Arduino IDE software makes it possible to write,
Vo × 1000
IS = (4) modify a program and convert it into a series of instruc-
Rs × RL tions that are understandable for the microcontroller of
where Vo is the voltage at the output of the INA169; Rs an Arduino board. The IDE can run on Windows, Linux
is the value of the shunt resistor, and it defaults to 0.1 Ω; or Mac (Arduino-Software 2018). The used Arduino
and RL is the value of the output resistor, and it defaults board in this work is programmed by the IDE that serves
to 10 KΩ. as a code editor and compiler and can transfer the pro-
However, the amplifier measures the voltage across gram code to the microcontroller through USB cable.
the 0.1 Ω, 1%/2 W, shunt resistor (Rs). Since the ampli- In order to achieve that, you will need to follow the next
fier maximum input difference is 500 mV, this means that steps:
the INA169 can measure up to 5 A continuous. The out-
put is a current that is drawn through the integrated 10 K •• Get the Arduino board and a USB cable.
resistor (RL) so that the output voltage is 1 V per current. •• Download the Arduino IDE software from here
The output voltage Vo of the INA169 is the input voltage (Arduino-Software 2018) (version: ARDUINO 1.8.5
of an analog pin Arduino; then, this input is transmit- for Windows) and install it.
ted to the ADC of the microcontroller which provides a •• Launch the Arduino IDE application.
digital value (Vout2) that varies between 0 and 1023. As a •• Write the code of the program in the code box as
result, the image of the PV panel’s output current can be shown in Fig. 11.
obtained by the equation presented in (5). Since the ADC •• Select the type of used board (Arduino UNO).
of the microcontroller is encoded in 10 bits, the reading •• Connect the board.
resolution of sensing current is 0.00489 A. The current •• Select the used serial port.
•• Verify and upload the program to the Arduino
microcontroller.
Fig. 12 PLX-DAQ Spreadsheet window Fig. 13 Experimental setup of the virtual instrumentation system
El Hammoumi et al. Renewables (2018) 5:3 Page 9 of 16
Fig. 14 A sample of experimentally measured data with real-time virtual instrumentation system
Table 6 Accuracy specifications of MU58A digital multim- Table 7 Accuracy specifications of ADM01 digital multim-
eter eter
Measurement MU58A digital multimeter Measurement ADM01 digital multim-
Accuracy specifications eter
Accuracy specifications
Range Resolution Accuracy
Range Accuracy
DC voltage (input imped- 20 V 10 mV ±(0.5%+1)
ance ≥ 10 MΩ) 200 V 100 mV DC voltage (input impedance: 10 MΩ) 20 V ± (0.5% + 2)
DC current 200 mA 0.1 mA ±(1.5%+1) 200 V
20 A 10 mA ±(2%+5) DC current 200 mA ± (1% + 3)
10 A ± (3% + 3)
Accuracy: ± (a % reading + b digits)
Operating temperature: 18–28 °C Accuracy: ± (a % reading + b digits)
El Hammoumi et al. Renewables (2018) 5:3 Page 10 of 16
PLX‑DAQ
The PLX-DAQ Excel Macro has been used for data
acquisition from the Arduino microcontroller to an
Excel Spreadsheet. We only need to download it from
here (PLX-DAQ 2017). 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 as shown in Fig. 12, to establish the com-
munication between the board and Excel, we just need to
open the Spreadsheet and define the connections settings
(baud rate and port) in PLX-DAQ window.
[code]
/*initialization function*/
void setup() {
//serial connection setup Fig. 15 I–V and P–V characteristics for PV panel by using virtual
//opens serial port, sets data rate to 9600 bps instrumentation (at T = 72 °C and G = 1100 W/m2)
Serial.begin(9600);
//clear all data that’s been place in already
Serial.println("CLEARDATA");
//define the column headings (PLX-DAQ command) Results and discussion
Serial.println("LABEL,t,voltage,current,power"); Figure 13 shows the experimental setup of the virtual
}
/*the main code*/ instrumentation system. The microcontroller of Arduino
void loop() { board gets the PV panel output voltage and current
//measuring voltage using F031-06 voltage sensor which are measured by sensors and then computes the
//measuring current using INA169 current sensor
//reading of the current and voltage from sensors
output power. Once the Arduino board is connected to
//calculate the output power the computer through a USB cable, we launch the PLX-
float voltage = analogRead(A0)*5.0*5/1023; DAQ Excel Macro and define the serial port, where
float current = analogRead(A1)*5.0/1023;
Arduino board is connected to the computer, and the
float power = voltage*current;
//allows the serial port to send data to Excel in real-time baud rate (9600 bit/s) in the PLX-DAQ window after the
Serial.print("DATA,TIME,"); // PLX-DAQ command latter is displayed as shown in Fig. 12. Note that the baud
Serial.print(voltage); //send the voltage to serial port rate defined in PLX-DAQ window must be the same as
Serial.print(",");
Serial.print(current); //send the current to serial port that used in the program code embedded in Arduino
Serial.print(","); board. Therefore, after clicking on “connect” the output
Serial.println(power); //send the power to serial port data will be collected and displayed in real time on the
delay(100); //wait 100 ms before repeating
} Excel Spreadsheet as shown in Fig. 14.
[/code] As shown in Fig. 13, the data measured by the sensors
are transmitted to the Excel in real time, and then, the
El Hammoumi et al. Renewables (2018) 5:3 Page 11 of 16
Fig. 16 I–V and P–V characteristics for PV panel by using multimeters As was described previously in PV panel model sec-
(at T = 72 °C and G = 1100 W/m2) tion, the PV panel model under PSIM is used as a refer-
ence for validating the effectiveness and the accuracy
of the proposed virtual instrument. Therefore, the PV
characteristics of the PV panel can be presented graphi- characteristics which are obtained by the proposed solu-
cally. Two artificial lamps of 100 watts acting as a solar tion and those obtained through the multimeters will
simulator are used. The light intensity is driven by vary- be compared with the PV characteristics obtained by
ing manually a variable resistance between 0 and 330 Ω. the PV panel model under PSIM. Figure 17 shows the
A pyranometer is also used to measure the light radia- I–V and P–V characteristics acquired by PSIM model (at
tion. The microcontroller is programmed to measure T = 72 °C and G = 1100 W/m2). In Fig. 18, comparisons
successively in each second the PV current, voltage and of PV panel PSIM model data with those of the experi-
power. Concerning the traditional instrumentation, two ment test by our virtual instrumentation and multim-
multimeters are used for current and voltage measure- eters (at T = 72 °C and G = 1100 W/m2) are presented.
ment. Tables 6 and 7 present their accuracy specifica- As shown in Fig. 18, the P–V and I–V characteristics for
tions. The results of direct monitoring of the PV panel PV panel acquired by our virtual instrumentation are in
are shown in Fig. 14. I–V and P–V characteristics of the accordance with the simulated data in both the current
PV panel obtained by our virtual instrumentation sys- and the power curves with a good level of accuracy. Nev-
tem and those obtained by multimeters are presented in ertheless, the curves obtained based on multimeters pre-
Figs. 15 and 16. sent small errors of accuracy due to peaks shown in both
El Hammoumi et al. Renewables (2018) 5:3 Page 12 of 16
Fig. 18 I–V and P–V model curves and experimental data of PV panel
curves. This can be explained by the low accuracy of the have appeared on the I–V and P–V curves. As a result,
multimeters used on the one hand, and the inability of obtaining good PV characteristics requires a compromise
the human to read all data on multimeters screen in real between using small or large sample time. In our case,
time at each moment during fast measurement variation and as shown in Fig. 15, a sample time of 1 s is very use-
on the other hand. Additionally, the error can be more ful for acquiring the characteristics of the used PV panel
significant for smaller measured samples than for larger without oscillations.
ones. However, a real-time virtual instrumentation allows In Fig. 20, the results of a monitoring test for current,
us to read each variation of measurements since they voltage and power of the PV panel are presented. From
have recorded automatically thanks to real-time acquisi- the experimental results presented in Fig. 20, it can be
tion system. seen that the PV panel produced a maximum power of
The results of a test similar to the previous one for the 17.07 W at “15 h 14 min 02 s” when a voltage of 14.15 V
virtual instrumentation are shown in Fig. 19, while the and a current of 1.20 A appear. Subsequently, the output
difference relates to decreasing the sample time from power tends to a minimum value 822.2 mW when there
1 s to only 100 ms. As shown in Fig. 19, oscillations is a voltage of 18.23 V and a current of 45.1 mA. Hence,
El Hammoumi et al. Renewables (2018) 5:3 Page 13 of 16
Fig. 20 Monitoring of PV panel output characteristics: a current monitoring curve, b voltage monitoring curve, c output power monitoring curve
(at T = 75 °C and G = 1100 W/m2)
El Hammoumi et al. Renewables (2018) 5:3 Page 15 of 16
Table 8 Price of the proposed virtual instrumentation system in comparison with that of traditional instruments
Price ($)
Conclusions series; q: electron charge; Rs: series resistance; Rsh: shunt resistance; T: junction
temperature; V: panel output voltage; Vd: output of voltage divider circuit.
This paper describes a low-cost virtual instrumentation
of PV panel characteristics based on Arduino and Excel. Abbreviations
The proposed instrumentation system is able to make PV: photovoltaic; UART: universal asynchronous receiver transmitter; DC: direct
current; STC: standard test condition; ADC: analog digital converter; USB:
acquiring, monitoring and storing the data of the PV sys- universal serial bus.
tem in real time. Moreover, this instrument is validated in
this work by comparing its experimental data with those Authors’ contributions
AELH and SM proposed the idea and the structure of the paper. AELH
obtained by a PSIM model of PV panel which has been designed the overall hardware and software for the real-time virtual instru-
verified by various researchers in their studies. The com- mentation system and implemented it. SM and AELG modeled the PV panel
parison results show that the PV characteristics acquired under PSIM. AELH and AC performed the experimental tests. AELH and SM
wrote the paper. AELG, AC, and AD contributed to reviewing the paper. All
by our virtual instrument are in accordance with those authors of this research paper have directly participated in the planning,
obtained under PSIM with high accuracy. Also, a com- execution, or analysis of this study. All authors read and approved the final
parison between the proposed virtual instrumentation manuscript.
and traditional instrumentation using multimeters is
made, and it has been found that our solution presents Competing interests
several benefits compared to the traditional solution The authors declare that they have no competing interests.
such as the data can be presented in graphical form in Ethics approval and consent to participate
real time. Thus, it can replace the human intervention to Not applicable.
avoid possible errors related to data readings from mul-
Funding
timeter as it is cheaper and saves a great deal of time. The authors declare that they have no funding for the research.
Therefore, the proposed system can facilitate the assimi-
lation and recording of data as well as the creation and Publisher’s Note
customization of reports that can be analyzed to improve Springer Nature remains neutral with regard to jurisdictional claims in pub-
the performance of PV systems. lished maps and institutional affiliations.
References Motahhir, S., EL Ghzizal, A., Sebti, S., & Derouich, A. (2015). Modélisation et
Arduino-Software. (2018). www.arduino.cc/en/Main/Software. Accessed 05 commande d’un panneau photovoltaïque dans l’environnement PSIM.
Jan 2018. In Congrès International de Génie Industriel et Management des Systèmes,
Banu, E. I. V., & Istrate, M. (2012). Modeling and simulation of photovoltaic CIGIMS.
arrays. In World Energy Systems Conference (Vol. 14, no. 3, pp. 1–6). Motahhir, S., El Ghzizal, A., Sebti, S., & Derouich, A. (2016). Shading effect to
Chouder, A., Silvestre, S., Sadaoui, N., & Rahmani, L. (2012). Modeling and energy withdrawn from the photovoltaic panel and implementation of
simulation of a grid connected PV system based on the evaluation of DMPPT using C language. International Review of Automatic Control, 9(2),
main PV module parameters. Simulation Modelling Practice and Theory, 88–94.
20(1), 46–58. Motahhir, S., El Ghzizal, A., Sebti, S., Derouich, A. (2017). Modeling of photovol-
Eltawil, M. A., & Zhao, Z. (2010). Grid-connected photovoltaic power systems: taic system with modified incremental conductance algorithm for fast
Technical and potential problems—A review. Renewable and Sustainable changes of irradiance. International Journal of Photoenergy (in press).
Energy Reviews, 14(1), 112–129. Ozdemir, S., Altin, N., & Sefa, I. (2014). Single stage three level grid interactive
Fuentes, M., Vivar, M., Burgos, J., Aguilera, J., & Vacas, J. (2014). Design of an MPPT inverter for PV systems. Energy Conversion and Management, 80,
using Arduino™ that complies with IEC standards. Solar Energy Materials
accurate, low-cost autonomous data logger for PV system monitoring 561–572.
PLX-DAQ. (2017). https://www.parallax.com/downloads/plx-daq. Accessed 15
and Solar Cells, 130, 529–543. Dec 2017.
Alonsogarcia, M., Ruiz, J., & Ghenlo, F. (2006). Experimental study of mismatch Santos, D., & Setiaji, F. D. (2013). Data Logger Parameter Panel Surya. Thèse de
and shading effects in the I–V characteristic of a photovoltaic module. doctorat, Program Studi Teknik Elektro FTEK-UKSW.
Solar Energy Materials and Solar Cells, 90(3), 329–340. Silvestre, S. (2003). Review of system design and sizing tools. Practical handbook of
Hemza, A., Abdeslam, H., Rachid, C., Pasquinelli, M., & Barakel, D. (2015). Tracing photovoltaics: fundamentals and applications. Oxford: Elseviers.
current–voltage curve of solar panel based on LabVIEW Arduino Interfac- Singh, G. (2013). Solar power generation by PV (photovoltaic) technology: A
ing. Bilişim Teknolojileri Dergisi, 8(3), 117–123. review. Energy, 53, 1–13.
Hohm, D. P., & Ropp, M. E. (2003). Comparative study of maximum power point TDC-M20-36 solar panel. (2018). https://tdcsolar.en.alibaba.com/
tracking algorithms. Progress in Photovoltaics: Research and Applications, product/60018196685-220763581/20w_mono_small_solar_panel_from_
11(1), 47–62. chinese_factory.html?spm=a2700.8304367.rect38f22d.16.47185198OcA
INA169 Datasheet. (2017). http://www.ti.com/lit/ds/symlink/ina169. XoD. Accessed 10 Jan 2018.
pdf?HQS=TI-null-null-alldatasheets-df-pf-SEP-wwe.pdf. Accessed 25 Nov Ulieru, V. D., Cepisca, C., & Ivanovici, T. R. (2010). Measurement and analysis in
2017. PV systems. In Proceedings of the international conference on circuits, ICC
Jean, J., Brown, P. R., Jaffe, R. L., Buonassisi, T., & Bulović, V. (2015). Pathways for (pp. 22–24).
solar photovoltaics. Energy & Environmental Science, 8(4), 1200–1219. Velleman Instruments. (2017). https://www.velleman.eu/products/
Koutroulis, E., & Kalaitzakis, K. (2003). Development of an integrated data- view/?id=362986. Accessed 23 Dec 2017.
acquisition system for renewable energy sources systems monitoring. Villalva, M., Gazoli, J., & Filho, E. (2009). Comprehensive approach to modeling
Renewable Energy, 28(1), 139–152. and simulation of photovoltaic arrays. IEEE Transactions on Power Electron-
Mahrane, A., Guenounou, A., Smara, Z., Chikh, M., & Lakehal, M. (2010). Test ics, 24(5), 1198–1208.
bench for photovoltaic modules. In International Symposium on Environ- Voltage Sensor Module. (2018). http://www.emartee.com/product/42082/
ment Friendly Energies in Electrical Applications. Voltage%20Sensor%20. Accessed 01 Jan 2018.
Motahhir, S., Chalh, A., El Ghzizal, A., Sebti, S., & Derouich, A. (2017a). Modeling
of photovoltaic panel by using proteus. Journal of Engineering Science and
Technology Review, 10(2), 8–13.
Motahhir, S., El Ghzizal, A., Sebti, S., & Derouich, A. (2015). Proposal and Imple-
mentation of a novel perturb and observe algorithm using embedded
software. In IEEE international renewable and sustainable energy conference
(pp. 1–5).