Implementation and Validation of Maximum Power Point Tracking
(MPPT) of the Photovoltaic System on Arduino Microcontroller
SALAHEDDINE ZOUIRECH1, ABDELGHANI EL OUGLI2, BELKASSEM TIDHAF1
1Embedded Systems, Renewable and Artificial Intelligence Team (SEERIA),
Mohammed First University, MOROCCO
2Computer Science, Signals, Automation and Cognitivism Laboratory (LISAC),
Faculty of Sciences, Sidi Mohamed Ben Abdellah University, Fez,
MOROCCO
Abstract: - In this research paper, we introduce real-time implementation, using Matlab and Simulink
environments. The purpose is to study our proposed system, consisting of a photovoltaic, boost converter, and
Arduino mega board. The latter communicates with the physical environment from the current and voltage
sensors and executes the proposed MPPT commands (perturb-and-observe, short circuit current, incremental
conductance, and open circuit voltage), varying the duty cycle of the signal PWM (Pulse Width Modulation)
static converter.
Key Words: Photovoltaic system, MPPT, 'P&Operturb and observe, ‘INC’ Incremental conductance, short-
circuit current (SCC), Open Circuit Voltage (OCV), Arduino Mega, Boost.
Received: August 22, 2021. Revised: August 18, 2022. Accepted: September 17, 2022. Published: October 13, 2022.
1 Introduction
Because of the decrease in fossil energy (oil, gas,
etc.) and the fear of growing and invasive pollution,
renewable energies (solar, marine, wind, etc.) have
become an updated domain, [1], [2].
Photovoltaic energy is a source of renewable
energy production based on the solar energy
photovoltaic system. In its operation, the
photovoltaic generator has non-linear
characteristics, which depend on irradiation, and
temperature. The adaptation stage is located
between the photovoltaic system and the load. The
adaptation makes it possible to obtain the
photovoltaic system’s maximum power, [3], [4].
The main outcome of this work is simulating and
practicing the implementation of Perturb and
Observe, INC, SCC, and Open Circuit Voltage
algorithm, using Arduino Mega board and Matlab /
Simulink environment. This framework aims at
getting the maximum power of the photovoltaic
system regardless of the meteorological conditions
vary, [5].
In the beginning, we describe the mathematical
model of the photovoltaic cell with more details on
the climatic influence conditions on the MPPT.
Then, we present how these commands perturb &
observe, short-circuit current, Incremental
conductance, and open circuit voltage function.
Afterward, the simulation and experimentation are
carried out to recover the maximum power from the
photovoltaic generator by the commands mentioned
above. Finally, the paper ends with a conclusion.
2 Photovoltaic Panel
The photovoltaic generator is made of a
semiconductor substance; it is formed by different
cells connected in parallel or series. These can be
schematized by an equivalent circuit that include a
single diode as presented in Figure 1, [1], [2], [6],
[16], [20], [21].
Fig. 1: The equivalent diagram of a photovoltaic cell
The following relation expresses the intensity of the
electric current Iph:
 󰇟󰇛󰇜󰇠
 (1)
Whereby KI is the temperature factor [%/K]; Isc is
the short intensity of the electric current [A]; Tc is
the panel temperature [K], G is the insolation effect
[W/m²]; Gref = 1000 W/m² and Tref = 298 K.
WSEAS TRANSACTIONS on SYSTEMS and CONTROL
DOI: 10.37394/23203.2022.17.46
Salaheddine Zouirech,
Abdelghani El Ougli, Belkassem Tidhaf
E-ISSN: 2224-2856
418
Volume 17, 2022
The relation expressing the electrical current I is:
  (2)
Whence:
.( ) (V R )
[ ( )] exp( 1
..
ss
sc I c ref s
ref sh
q V R I I
G
I I K T T I
G N K T R




(3)
With:
Isc the short electrical current intensity,
Is the electrical current intensity saturation of the
diode?
 󰇡
󰇢󰇟
󰇛

󰇜󰇠 (4)
Where Err is the reverse saturation current at the
reference temperature Tre, Vg is the bandgap voltage
of the semiconductor making up the cell
V the diode tension (V);
q The elementary charge of the electron (1.60.10-19
C);
K the Boltzmann’s universal constant (1.38.10-23
J/K);
N Ideality factor of the diode,
T the temperature,
Rash is the shunt resistance,
Rs the series resistance,
3 DC-DC Converter Analysis
The converters DC-DC are the main elements of the
conversion chain of the photovoltaic generator.
They provide interfacing that enables matching
between the photovoltaic system and the load to
recover the maximum power of the photovoltaic
generator, [7], [8], [9], [19], and [20].
The converters consist in most cases of an
inductor, a commanded interrupter (using a Metal
Oxide Semiconductor Field Effect transistor
controlled by a Pulse Width Modulation signal), a
capacitor, a diode, linked to a load, [11], [13], and
[14].
In this part, we only use the boost converter. The
converter boost allows raising the input voltage.
Fig. 2: Boost transformer
The input voltage and output voltage for the
converter boost are expressed by:
 (5)
With D: being the PWM signal duty cycle.
4 Maximum Power Point Tracking
(MPPT) Algorithms
The principle of the Maximum Power Point
Tracking command is to search the maximum
power point by varying the converter duty cycle D,
and then bring it to the targeted point. In this paper,
we are focused on the usage of four Maximum
Power Point Tracking controls: Perturb & observe,
short-circuit current (FCC), INC, short-circuit
current (FCC), and Open Circuit Voltage (VCO).
4.1 Algorithm Perturb and Observe ‘P&O’
The principle of the perturb & observe command is
to generate a low-value disturbance of the voltage,
which provides a power variation because an
increment of the tension electrical leads to an
increment of the power, the operating point is to the
left of the PPM. If on the opposite the power
diminishes, it is right. In the same manner, one can
reason for diminished tension. In short, for a
disturbance voltage, if the power increment, the
direction of the disturbance is maintained. If not, it
is reversed so that the operating point tends to the
PPM.
The Figure 3 illustrates the flowchart of the
perturb & observe control, [6], [8], [10], [11], [12],
[13], [15], [17], [18].
Fig. 3: Flowchart perturb and observe
4.2 Algorithm INC, Increment the
Conductance
The flow diagram of INC algorithm is illustrated in
Figure 4, [3], [13], [17], [18].
WSEAS TRANSACTIONS on SYSTEMS and CONTROL
DOI: 10.37394/23203.2022.17.46
Salaheddine Zouirech,
Abdelghani El Ougli, Belkassem Tidhaf
E-ISSN: 2224-2856
419
Volume 17, 2022
Fig. 4: Flow diagram of INC control
The incremental conductance command is based
on the power derivative of the photovoltaic panel
about the voltage. This derivative in the PPM point
equals zero. We can express this through the
following relation:

 󰇛󰇜
 
 (6)
Giving:

 (7)
We define the conductance and the increment of the
conductance of the source by:

et  
 (8)
If we place to the right of the maximum power
point, we can write:

 (9)
If we place it to the left of the maximum power
point, we can write:

 (10)
4.3 Algorithm OCV, Open Circuit Voltage
This control is based on the linear formula between
the open circuit voltage and the optimal voltage
determined by the following relationship:

 (11)
Where:
 is the photovoltaic generator’s
maximum output tension electrical and k1 that varies
between 0.73 and 0.8 is a tension electrical
coefficient depending on the curve of the
photovoltaic panel cell, [5], and [17].
The flow diagram of the OCV method is
illustrated in Figure 5
Fig. 5: Flow diagram of OCV control
To achieve the optimum tension electrical, the
tension of the open circuit
 must be determined.
As a result, the point of operation of the
photovoltaic generator is maintained close to the
optimum power point by adjusting the solar
generator’s tension electrical to the determined
optimal tension. The process allows for periodically
adjusting of the duty cycle to obtain the optimal
voltage electrical.
4.4 Algorithm Short-Circuit Current (SCC)
This control is based on the linear formula between
the short-circuit current and the optimal intensity
current determined by this equation:
  (12)
Where k2 that varies between 0.85 and 0.92 is an
intensity of the electric current coefficient
depending on the curve of the photovoltaic panel
cell, [5], [17].
The flow diagram of SCC control is illustrated in
Figure 6.
Fig. 6: Flow diagram of SCC control
In reality, the optimal point of operating is
reached by taking the intensity of the current
electrical of the photovoltaic panel to the optimal
current electrical. Thus, the duty cycle is varied until
WSEAS TRANSACTIONS on SYSTEMS and CONTROL
DOI: 10.37394/23203.2022.17.46
Salaheddine Zouirech,
Abdelghani El Ougli, Belkassem Tidhaf
E-ISSN: 2224-2856
420
Volume 17, 2022
the photovoltaic generator attains the optimal value,
[18].
5 The Simulation Results
The Simulation studies were realized with perturb &
observe algorithm, INC, FCC, and VCO, for
variable radiation solar and temperature data.
Simulation results are obtained in Matlab/Simulink.
We use the diagram below for simulation on
Matlab Simulink of the different Maximum Power
Point Tracking, methods (perturb & observe, FCC,
and VCO).
In the diagram, we present the equivalent diagram
of the Boost converter, the photovoltaic panel, and
the block that contains the tracking controls.
Fig. 7: Block schematic of the photovoltaic
generator with P & O, INC, FCC, and FCO
commands in Simulink
The figures below show the simulation results for
various Maximum Power Point Tracking
commands.
Figure 8 presents the power exploiting the
different Maximum Power Point Tracking
commands: Perturb and Observe, INC, FCC, and
FCO for variable irradiation at a constant
temperature.
Fig. 8: Power using the different MPPT commands
at a constant temperature.
Figure 9 presents the power exploiting the
different MPPT commands: Perturb and Observe,
INC, FCC, and FCO for a variable temperature at
constant irradiation.
Fig. 9: Power using the different MPPT commands
at constant irradiation.
From Figures 8 and 9, we can observe the extraction of
the power using the different commands.
6 Practical Part and Results
To validate the MPPT algorithms we propose the
following block diagram:
Fig. 10: Synoptic diagram of the realization
Figure 10 shows the block diagram used in this
practical part of the photovoltaic system consisting
of a 20W photovoltaic system linked to the resistive
load by a converter boost connected by a control
circuit based on an "Arduino Mega 2560" card
which is used. to control the MOSFET transistor of
the converter by varying the duty cycle to recover
the maximum power at the output of the generator,
the output quantities of the panel are measured from
two sensors, the first is a tension electrical divider
circuit for the measurement of voltage and the
second is a current sensor type ACS712 used to
determine the current intensity.
All parts have been made and tested separately
before assembly.
6.1 The Photovoltaic Panel
In the practical and simulation parts, we use the
following photovoltaic generator: TDC-P20-36 of
20W.
WSEAS TRANSACTIONS on SYSTEMS and CONTROL
DOI: 10.37394/23203.2022.17.46
Salaheddine Zouirech,
Abdelghani El Ougli, Belkassem Tidhaf
E-ISSN: 2224-2856
421
Volume 17, 2022
Table 1. TDC-P20-36
Open circuit voltage 
21,20 V
The voltage at maximum power
point

17,20 V
Short-circuit current 
1,28 A
Current at maximum power point

1,17 A
Maximum Power
20 W
temperature coefficient
-0.36099 %/deg.C
Temperature coefficient
0.065 \%/deg.C
6.2 The ARDUINO Board MEGA 2560 Card
The Arduino Mega board 2560 is an electronic
board using the ATmega2560 microcontroller. It
includes 54 numeric output/input pins (15 of them
have a PWM output), 16 analog inputs, one ceramic
(Quartz) resonator at 16 MHz, and one, [3], [8],
[12].
Fig. 11: Arduino Mega
6.3 Current Sensor
ACS712 is used which can detect DC and AC
currents. The sensor ACS712 can measure current
up to ± 5 A with an output sensitivity of 180 mV /
A, [9], [21].
The analog-to-analog-to-digital converter (ADC)
reads the values from 0 to 1023. To achieve the
value of the intensity of the electric current in a
range of 5 A, we use the following relationship:
I=󰇡
󰇢
 (13)
6.4 Sensor Voltage
The tension electrical measurement is carried out
from a tension electrical divider to have a voltage
between zero and 5V whatever the value delivered
by the photovoltaic panel, [3], [9].
The analog inputs of the Arduino MEGA board
can be used to display a DC tension electrical
between 0 and 5V.
We consider Ve as the tension electrical to be
displayed and Vs as the output voltage of the
divider, which will be linked to the entry pin of the
Arduino MEGA board. The tension electrical
divider lowers the display voltage in the range of the
analog inputs of the MEGA Arduino board.

(14)
The values of R_1 and R_2 of the sensor are
 and.
After the previous divisor relation, we must
divide the Vs by 1023 and multiply by 5 V to
express the real voltage raised by the Arduino
MEGA.
Finally, the value of the voltage delivered by the
panel is given by the following equation:
V=󰇡
 󰇢 (15)
6.5 Optocoupler
The control part must be isolated from the power
part. For this, we use the optocoupler. We,
therefore, have two very distinct masses on our map.
The first: is the mass B.GND, which is the power
mass. As well as the A.GND ground which is the
control ground and the 5V power supply, [3].
As the Arduino supplies a voltage of 5 volts and
the chopper needs a voltage of 15 V to attack the
latter, we used the photo coupler type HCPL-3120
to increase the voltage from 5 V to 15V.
The converter boost is placed between a
photovoltaic generator and a charge. For a good
functioning of the converter it must be controlled by
a high frequency (in our case the frequency chooses
the order of 7 kHz: to easily filter the output signal
and for the correct operation of the converter at 15
V). However, the frequency of the Maximum Power
Point Tracking signal delivered by the Arduino
MEGA board is limited to a maximum value of 1
kHz so it is necessary to modify the frequency of the
Mega Arduino board by the predefined S-function
Builder tool in MATLAB Simulink.
The Pulse Width Modulation output signal in the
Support Simulink Pack is capped at 490 Hz. This
frequency value is not suitable for controlling the
converter boost.
To overcome this problem, we use the S-
function of MATLAB and a command to raise the
Pulse Width Modulation frequency in the Simulink
Model.
The command for modifying the Pulse Width
Modulation frequency is realized with an S-function
WSEAS TRANSACTIONS on SYSTEMS and CONTROL
DOI: 10.37394/23203.2022.17.46
Salaheddine Zouirech,
Abdelghani El Ougli, Belkassem Tidhaf
E-ISSN: 2224-2856
422
Volume 17, 2022
under the Simulink model as illustrated in Figure 12
which presents the unmasking scheme of ‘S-
function block’, [3].
Fig. 12: S-Function block
6.6 Experimental Results
The first experimental approach is carried out to
determine the Maximum Power Point under the
experimental weather data at a given time. If we
make the converter’s duty cycle change from 0 to 1,
we surely get the maximum power point. To do
this, we implement a program on the Arduino Mega
board that increments the PWM signal converter
duty cycle from 0 to 1 for 30 s. The power supplied
by the photovoltaic system is given according to
voltage, current, or current according to voltage in
Figure 13 during this interval.
Block of test:
Fig. 13: Block of test
In figures 14, 15, and 16 we can see that the
maximum power point in these weather conditions
is about 17 W.
Fig. 14: The variation of the Power according to the
Voltage delivered during the first test
Fig. 15: The variation of the Power according to the
Current delivered during the first test
Fig. 16: Current as a function of Voltage delivered
during the first test
The second experimental step is to get the
maximum power PPM produced by the PV using
the different MPPT commands PO, FCC, INC, and
VCO under the same conditions as the first test.
The block to recover the power of the
photovoltaic system used with the real assembly:
Fig. 17: Block to extract power
Figures 18, 19, 20, and 21 show the power
generated by the photovoltaic system using the
P&O, INC, FCC, and FCO commands, respectively.
Assuming that the weather conditions are
unchanged in both experimental steps, the
experimental validation of Maximum Power Point
Tracking commands can be validated.
WSEAS TRANSACTIONS on SYSTEMS and CONTROL
DOI: 10.37394/23203.2022.17.46
Salaheddine Zouirech,
Abdelghani El Ougli, Belkassem Tidhaf
E-ISSN: 2224-2856
423
Volume 17, 2022
Fig. 18: Power delivered using the P&O algorithm
Fig. 19: Power delivered using INC algorithm
Fig. 20: Power delivered using the FCO algorithm
Fig. 21: Power delivered using FCC algorithm
Figures 22, 23, 24, and 25 show the duty cycle using
the P&O, INC, FCC, and FCO commands,
respectfully.
Fig. 22: The duty cycle using FCC
Fig. 23: The duty cycle using FCO
Fig.24: The duty cycle using INC
Fig. 25: The duty cycle using P&O
Figures 26, 27, 28, and 29 show the Voltage curves
generated by the photovoltaic system using the
P&O, INC, FCC, and FCO commands, respectively.
Fig. 26: Voltage delivered using FCC algorithm
WSEAS TRANSACTIONS on SYSTEMS and CONTROL
DOI: 10.37394/23203.2022.17.46
Salaheddine Zouirech,
Abdelghani El Ougli, Belkassem Tidhaf
E-ISSN: 2224-2856
424
Volume 17, 2022
Fig. 27: Voltage delivered using the FCO algorithm
Fig. 28: Voltage delivered using INC algorithm
Fig. 29: Voltage delivered using the P&O algorithm
Figures 30, 31, 32, and 33 show the Current curves
generated by the photovoltaic system using the
P&O, INC, FCC, and FCO commands, respectively.
Fig. 30: Current delivered using P&O algorithm
Fig. 31: Current delivered using FCO algorithm
Fig. 32: Current delivered using INC algorithm
Fig. 33: Current delivered using FCC algorithm
7 Conclusion
This research centers on the use of four MPPT
control P&O, INC, VCO, and FCC - to recover the
maximum power point from the photovoltaic
system. The system was analyzed and designed; the
performance was studied by the simulation and
experimental implementation. This experiment
proves the implementation ability of these
commands on the Arduino Mega board for real-time
applications.
Moreover, this article proposes a remedy to vary
the Pulse Width Modulation frequency of the Mega
Arduino board, which provides new perspectives of
use with non-dynamic converters. In sum, this
article has presented four commands to monitor the
MPP of a PV panel.
In future works, we will use the experimental
tests of the MPPT, and intelligent methods like
fuzzy logic (FL) and Artificial Neural Networks
(ANN).
WSEAS TRANSACTIONS on SYSTEMS and CONTROL
DOI: 10.37394/23203.2022.17.46
Salaheddine Zouirech,
Abdelghani El Ougli, Belkassem Tidhaf
E-ISSN: 2224-2856
425
Volume 17, 2022
References:
[1] W. I. Breesam, Realtime implementation of
MPPT for renewable energy systems based on
Artificial intelligence, International
Transactions on Electrical Energy Systems,
2021, p. e12864.
[2] F. Mhamed, E. Mohamed Larbi, and Z.
Smail, Hardware implementation of the fuzzy
logic MPPT in an Arduino card using a
Simulink support package for PV application,
IET Renewable Power Generation, vol. 13,
2019, p. 10-518.
[3] K. Roshan, N. Geetha, and A. Dalvi,
Comparative Study And Implementation Of
Incremental Conductance Method And
Perturb And Observe Method With Buck
Converter By Using Arduino, International
Journal of Research in Engineering and
Technology, vol. 3, 2014, p. 461- 469.
[4] J. L. Santos, F. Antunes, A. Chehab, and C.
Cruz, A maximum power point tracker for PV
systems using a high performance boost
converter, solar energy, vol. 80, 2006, p. 772-
778.
[5] S. Motahhir, A. El Hammoumi, and A. El
Ghzizal, The most used MPPT algorithms:
Review and the suitable low-cost embedded
board for each algorithm, Journal of cleaner
production, vol. 246, 2020, p. 118983.
[6] R. Norhasniza Md, N. A. RAHIM, DSP-
based maximum peak power tracker using P-
O algorithm, IEEE Conference on Clean
Energy and Technology (CET), 2011, p. 34-
39.
[7] N. Rouibah, L. Barazane, A. Mellit, A. Hajji,
and A. Rabhi, A low-cost monitoring system
for maximum power point of a photovoltaic
system using IOT technique, International
conference on wireless technologies,
embedded and intelligent systems (WITS)
IEEE, 2019, pp. 1-5.
[8] O. Nabil, B. Bachir, A. ALLAG ,
Implementation of a new MPPT Technique
for PV systems using a Boost Converter
driven by Arduino MEGA, International
Conference on Communications and
Electrical Engineering (ICCEE). IEEE, 2018,
pp. 1-5.
[9] Y. Ba-khuraisa, A. Al-Hasani, I. Elshafiey,
A. F. Sheta, and M. F. Aboud, Experimental
implementation of MPPT for PV systems,
IEEE 5th International Conference on
Electronic Devices, Systems and Applications
(ICEDSA), 2016, pp. 1-4.
[10] E. Mustapha, H. Safa, and F. Sadik,
Implementation in Arduino of MPPT using
variable step size P-O algorithm in PV
installations, International Journal of Power
Electronics and Drive Systems, vol. 8, 2017,
p. 434.
[11] R. Alik, and A. Jusoh, An enhanced P-O
checking algorithm MPPT for high tracking
efficiency of partially shaded PV module,
Solar Energy, vol. 163, 2018, pp. 570-580.
[12] N. C. Swanepoel, C. G. Richards, A. F.
Nnachi, and P. J. Ehlers, A comparative study
of maximum power point tracking algorithms
for PV arrays, IEEE International Energy
Conference (ENERGYCon), 2020, pp. 819-
823.
[13] K.Loukil, H. Abbes, H.Abid, M. Abid, and A.
Toumi, Design and implementation of
reconfigurable MPPT fuzzy controller for
photovoltaic systems, in Shams Engineering
Journal, vol. 11, 2020, pp. 319-328.
[14] S. ZOUIRECH, M. ZEROUALI, A. EL O
UGLI, and B.Tidhaf, the Impact of the Type
of Converter and the Algorithm of the Control
on the Production of Maximum Power by a
Photovoltaic System IEEE 7th International
Renewable and Sustainable Energy
Conference, 2019, pp. 1-5.
[15] W.Xiao, and W. G. Dunford, A modified
adaptive hill climbing MPPT method for
photovoltaic power systems, IEEE 35th
annual power electronics specialists
conference, Vol. 3, 2004, pp. 1957-1963.
[16] S. Zouirech, M. Zerouali, A. El O Ugli, and
B.Tidhaf, Application of Various Classical
and Intelligent MPPT Tracking Techniques
for the Production of Energy through a
Photovoltaic System, IEEE 7th International
Renewable and Sustainable Energy
Conference, 2019, pp. 1-6.
[17] M. Zerouali, S. Zouirech, A. El O Ugli, and
B.Tidhaf, Improvement of Conventional
MPPT Techniques P-O and INC by
Integration of Fuzzy Logic, IEEE 7th
International Renewable and Sustainable
Energy Conference, 2019, pp. 1-6.
[18] M.Boutouba, A.El.Ougli, S.Miqoi and
B.Tidhaf, Design and Experimentation of a
Control System Implemented on Raspberry Pi
3 Board for Photovoltaic Systems Using
SEPIC Converter, Journal of Electrical
Systems, vol. 13, 2017, pp. 661-677.
[19] S. Motahhir, A. El Hammoumi, and A. El
Ghzizal, The most used MPPT algorithms:
Review and the suitable low-cost embedded
WSEAS TRANSACTIONS on SYSTEMS and CONTROL
DOI: 10.37394/23203.2022.17.46
Salaheddine Zouirech,
Abdelghani El Ougli, Belkassem Tidhaf
E-ISSN: 2224-2856
426
Volume 17, 2022
board for each algorithm, Journal of cleaner
production, vol. 246, 2020, p. 118983.
[20] LI, Xingshuo, H. Wen, Y. Hu, Y. Du, and Y.
Yang, A comparative study on photovoltaic
MPPT algorithms under EN50530 dynamic
test procedure, IEEE Transactions on Power
Electronics, vol. 36, 2020, pp. 4153-4168.
[21] S. Gupta, and L. Mathew, Hardware
Implementation of Low Cost MPPT using
Arduino for PV application, IEEE
International Symposium on Sustainable
Energy, Signal Processing and Cyber
Security, 2020, pp. 1-5.
Creative Commons Attribution License 4.0
(Attribution 4.0 International, CC BY 4.0)
This article is published under the terms of the
Creative Commons Attribution License 4.0
https://creativecommons.org/licenses/by/4.0/deed.en
_US
WSEAS TRANSACTIONS on SYSTEMS and CONTROL
DOI: 10.37394/23203.2022.17.46
Salaheddine Zouirech,
Abdelghani El Ougli, Belkassem Tidhaf
E-ISSN: 2224-2856
427
Volume 17, 2022