Modeling, Design and Experimental Validation of an MPPT Charge Controller Based on SEPIC Converter and ATMEGA 2560 ()
1. Introduction
The transition to renewable energy sources is one of the major challenges of the 21st century [1]-[3]. Among them, solar photovoltaic energy is emerging as a promising, clean and accessible solution, particularly in isolated regions or those poorly served by the electricity grid [4]-[6]. In stand-alone photovoltaic systems, energy storage plays a central role in ensuring continuous power supply in the absence of sunlight [7]-[9]. Batteries, often lead-acid or lithium-ion, are commonly used for this purpose. However, their operation and service life are highly dependent on charging and discharging conditions [10] [11]. Recent studies highlight the exceptional growth in photovoltaic deployment worldwide, driven by technological advances, falling costs, and incentive policies [12] [13]. In addition, innovations in high-efficiency PV cells and power electronics have significantly improved the performance of stand-alone systems [14]. Batteries are sensitive to overcharging, deep discharging and excessive cycling, making it essential to integrate a charge controller between the solar panels and the storage system [15]. This regulator controls energy flow, protects the battery and optimizes overall system efficiency [15] [16]. Recent research highlights the integration of advanced battery management systems (BMS) combined with MPPT controllers to maximize battery life and safety [17].
Among the various technologies available, charge controllers featuring Maximum Power Point Tracking (MPPT) have established themselves as a high-performance solution [18]-[20]. Unlike conventional PWM controllers, MPPT can extract the maximum power available from photovoltaic panels in real time, even when climatic conditions change. The latest generation of MPPT solar regulators now use adaptive algorithms such as conductance incrementation or approaches based on artificial intelligence, combined with high-efficiency DC/DC converters (buck, boost, SEPIC), to improve the dynamic response and overall efficiency of the system [14] [20] [21]. The aim of this project is to propose a reliable, economical and efficient solution while protecting the battery and optimizing energy production
2. Methodology
The work begins with a synoptic diagram of the charging system, representing the overall architecture of the installation. This comprises three main blocks: the photovoltaic generator, a buck-boost DC-DC converter with SEPIC configuration, controlled by an MPPT algorithm, and a battery whose charge is managed according to different phases (bulk, absorption, float). On the basis of this functional diagram, technical specifications were defined in order to size the electronic components and select the MPPT tracking algorithm. The Perturb and Observe (P&O) algorithm was chosen for its ease of implementation. The management of the charging steps was integrated into an ATMEGA 2560 microcontroller, which also regulates the converter. A physical prototype was then produced, followed by experimental tests to validate the system’s performance in real-life conditions.
3. Synoptic
The PV module is of the CS-SP140 type, with a maximum power point voltage of 17V. The MPPT regulator draws maximum power from the GPV and measures the most suitable voltage for charging the battery and supplying the DC load.
The MPPT regulator contains an ATMEGA 2560 microcontroller-based electronic board that controls. Figure 1 shows an overview of our control system.
Figure 1. System diagram.
3.1. Design of SEPIC Converter
In this work, a SEPIC converter has been designed with capacity. SEPIC converter can produce an output voltage that can be higher or lower than the input, but without changing polarity. The inductor current and capacitor voltage limits are removed to investigate current and voltage fluctuations. The inductor current is assumed to work continuously in this analysis. The average inductor voltage is zero and the average capacitor current is zero for steady-state operation.
According to the law of meshes, we have:
(1)
If it follows the assumption of the average voltage of the inductor, then the voltage on capacitor
is: The transverse voltage
, for the DT interval is:
(2)
When the switch is closed, the diode will be off and the circuit is shown in Figure 2(b).
The transverse voltage
for the DT interval is:
(3)
When the switch is open, the diode will be on and the circuit is shown in Figure 2(c). On the outer path is:
(4)
The assumption of capacitor voltage
remains constant at the mean voltage
(5)
Figure 2(a) illustrates the basic diagram of a SEPIC-type DC/DC converter. Figure 2(b) shows how the converter operates when the switch is conducting (on state). Finally, Figure 2(c) shows the circuit corresponding to the phase when the diode is in the blocking state.
For intervals
.
Since the average inductor voltage is zero for periodic operation steady state operation), the equation becomes:
(6)
where D is the duty cycle ratio of the switch, i.e.:
(7)
The result of this equation is similar to buck-boost converter, with the important difference that there is no polarity reversal between the input and output voltages. The ability to have a voltage output greater or less than the input without reversing polarity.
The average current inductor, which is also the current source, can be searched by the equation:
(8)
(a)
(b)
(c)
Figure 2. (a) SEPIC circuit; (b) SEPIC circuit when switch is closed and diode off; (c) SEPIC circuit when switch is off and diode closed.
The variation in
when the closed switch can be searched from the equation,
(9)
where
is:
(10)
The average current in each capacitor is zero, so the mean current in
is:
(11)
The variation in
is determined from the circuit when the switch is closed
, and L2 with the voltage C assumed Ve is constant, giving
(12)
where
is:
(13)
The current waveform is shown in Figure 2. Kirchhoff’s Law is applied to the drawings Figure 2(c), assuming no ripple voltage on the capacitor, indicating that the voltage going through the switch when open is Ve + Vs. From Figure 2(b), the maximum reverse voltage of the diode bias when the diode is off is also Ve + Vs.
The output part consisting of diodes, Cs, and load resistors is the same as in the boost converter, so the output of ripple voltage is,
(14)
Then
is,
(15)
The voltage variation in C is determined from the shape of the circuit with the closed switch. The current capacitor iC is the reciprocal of iL2, which has previously been determined to have an average value of Is.
From the definition of capacitance and considering the magnitude of charge.
(16)
Change
with
(17)
Then C is:
(18)
The inductances L1 and L2 were chosen at 175 μH to limit current ripple in the SEPIC converter and ensure continuous mode operation of the inductor, in accordance with Equations (10) and (11), where Ve is the value 17 V, output voltage Vout equal to 12 V and the load resistance 1.92 Ω. The switching frequency of the transistors is set at 40 kHz. This value keeps the current ripple within acceptable limits for component sizing and system stability.
The output capacitor Cs and filter capacitor C were sized to reduce voltage ripple according to Equations (15) and (18):
The values of the components are given in Table 1:
Table 1. Values of the components of the buck-boost converter.
Parameters |
Values |
Input voltage
|
17 V |
Output voltage
|
12 V |
Cycle ratio
|
41% |
Inductance
|
175 μH |
Inductance
|
175 μH |
Capacitor
|
320 μF |
Capacitor
|
3200 μF |
Switching frequency |
40 kHz |
Load |
1.92 Ω |
We have chosen 470 μF, which allows us to minimize output voltage ripples under all operating conditions. As for the diode used, it must be fast; in fact, losses by reverse overlaps are generated by its diodes, so the faster they are, the less losses there will be. We chose the Schottky B60L45G, which can handle 60 A current and 45 V. The switch we chose must be able to withstand the voltage that will be imposed on it at its terminals, and must also operate at the desired frequency with a low drain-source resistance. One of the reasons for choosing a MOSFET is its operating frequency, which exceeds 100 kHz. The chosen MOSFET is the RFB4110. The maximum drain current is 8.5 A, its maximum voltage is 500 V and finally its on-state resistance (RDSon) is 4.5 mΩ typical.
The IR2110 is a high-frequency, high-speed power MOSFET driver with high-side and low-side referenced output channels. The logic inputs are compatible with standard CMOS output up to 3.3 V logic. The output drivers feature a high-pulse-current buffer stage designed for minimal cross-conduction of the IR2110. Propagation delays are optimized for high-frequency applications.
The floating channel can be used to drive an N-channel power MOSFET whose high-side configuration can operate up to 500 V. To measure the current, we used the ACS712 Hall effect current sensor, which provides us with a usable voltage. This voltage will power pin A1 of the microcontroller. ACS712 current sensors have different measurement ranges of ±5 A, ±20 A, and ±30 A. The only difference between these measurement ranges is their sensitivity. In our case, we used two ACS712-30A current sensors to measure the currents from the battery panel and the load. This sensor measures currents ranging from −30 A to +30 A.
3.2. Results and Discussion
In this section, we present the battery charge curve, i.e., the evolution of current and voltage during battery charging.
3.3. Experimental Setup
The diagram shown in Figure 3 represents the printed circuit board with component implementation.
Figure 3. Prototype used.
The charging system consists of three main components: a stabilizing power supply, a buck-boost DC-DC converter with a SEPIC configuration controlled by an ATMEGA 2560 microcontroller, and a 12 V lead-acid battery. The MPPT regulator, based on the Perturb and Observe (P&O) algorithm, continuously adjusts the panel’s operating point to extract maximum power. Current measurements are taken using ACS712-30A Hall effect sensors for the generator and load, and voltages are measured using a voltage divider placed on the battery and generator terminals. The entire prototype is powered by the simulated solar panel with a stabilizing generator capable of delivering a voltage between 0 A and 24 V and a current between 0 A and 20 A at an average ambient temperature of 25˚C. The LCD display shows the voltage and current of the generator and battery. The following device represents the experimental part of the system under test.
Figure 4 shows the association between the obtained electronic board with an ATMEGA 2560 microcontroller, a 12V lead-acid battery, and a CS-SP140 type PV generator, forming the complete charging system. The LCD display is used to potentially show the regulator parameters, namely the panel voltage, the current delivered by the panel, the battery terminal voltage, the current actually supplied to the battery, and the system’s state of charge.
The system is represented as follows:
Figure 4. Control system diagram.
3.4. Switch Control Signal
In this section, we present the signals obtained from our device (power transistor control) to visualize the power transistor control signal at the SEPIC converter.
We first supplied the driver with power via pin 9 (VDD), a value between 4 and 5 V; it drives a dedicated control circuit to drive the power transistor.
The PWM signal from the ATMEGA 2560 microcontroller-based electronic board is connected to the IN input (pin 10 of the IR2110), the microcontroller’s stop control signal is connected to the SD input (pin 11), so the IR2110 can be activated or deactivated via this signal. At the output, the PWM signal is generated at pin HO.
Figure 5 and Figure 6 show the waveforms of the IR2110 input and output signals respectively.
Figure 5. IR2110 input signal waveforms.
Figure 6. Signal waveform at the output of the IR2110.
These results show the existence of a signal from the microcontroller with an amplitude of almost 5 V and one from the IR2110 with an amplitude of almost 9V, output by the IR2110.
4. Charging Process Algorithm Flowchart
The battery charging process in a photovoltaic system is based on three phases: bulk charging, absorption charging and floating charging. These different charging stages regulate the currents and voltages circulating in the battery. These different charging phases protect the battery against overcharging and deep discharging, helping to extend its life. Before each cyclic ratio correction period, the
Figure 7. Flowchart of the battery charging process algorithm.
ATMEGA 2560 microcontroller-based electronic board must execute the measurement algorithm, taking into account various set thresholds.
Figure 7 shows the three-phase charging diagram for a lead-acid battery.
The process begins with an acquisition phase, during which essential parameters such as battery voltage (VBAT) and battery current (IBAT) are measured. This initial step provides the data needed to control battery charging. During day mode, when solar energy is available, the Maximum Power Point Tracking (MPPT) algorithm is activated. MPPT plays a crucial role in continuously adjusting the operating point of the solar panel to maximize the power it delivers to the battery. Charging phases are determined by a series of decisions based on battery voltage and current. Thresholds and limits for these parameters are predefined: the maximum battery voltage (VBATTmax) is set at 14.4 V, the minimum voltage (VBATTmin) at 10.6 V, and the floating voltage (VBATTFLT) at 13.6 V. The maximum charging current (IBATTmax) is between 1.8 and 2 A, while the minimum current (IBATTmin) is 0.1 A. If, after the MPPT phase, the battery voltage exceeds the maximum voltage (VBATTmax) and the charging current exceeds the minimum current (IBATTmin), the system enters the absorption phase. In this phase, the voltage is kept constant at the maximum value in order to fully charge the battery. If these conditions are not met, the battery voltage is compared with the floating Voltage (VBATTFLT). If the battery voltage is below the floating voltage, the system evaluates the charging current. If the charge current exceeds a defined threshold (C/100, where C represents the battery capacity), the system enters the bulk phase. The bulk phase is characterized by a constant charge current, enabling rapid recharging. If, on the other hand, the charge current falls below this threshold, the system switches to the floating phase, a constant-voltage maintenance phase that compensates for the battery’s self-discharge. Finally, during night mode, when solar energy is absent, the system switches to night mode, minimizing energy consumption.
![]()
Figure 8. Battery charge curve.
Figure 8 shows part of the battery charging curve, that is, the evolution of the current and voltage over time during the charging of a solar battery.
5. Battery Charge Curve
In this section, we present the battery charge curve, i.e., the evolution of current and voltage as a function of time when charging a solar battery.
Initially, a constant current limited to 1/10 of the rated capacity is applied to the battery, during which time the voltage increases until it reaches the regulation voltage of 14.4 V (bulk stage). The voltage is maintained at this regulation value as the current decreases (absorption stage), and at the end of the charge, the voltage is lowered to around 13.6 V, while the current has become very low and almost constant (floating stage).
6. General Conclusion
This work is part of an approach aimed at designing and building an MPPT-type solar charge controller, capable of optimizing the energy production of a photovoltaic generator while ensuring efficient battery charging.
The methodological approach adopted initially enabled the system to be modeled using a functional synoptic, facilitating the identification of technical requirements and the definition of specifications. The Perturb and Observe (P&O) algorithm was chosen for the MPPT function because of its simplicity and effectiveness under moderate climatic conditions. A SEPIC-configured step-down/step-up converter was designed and controlled by an ATMEGA 2560 microcontroller, which also integrates management of the various charging phases (bulk, absorption, float), thus guaranteeing battery protection against overcharging and deep discharge. The development of an experimental prototype and testing under real-life conditions validated the system’s performance. The results showed good tracking of the maximum power point, charge voltage stability, and efficient battery management, while meeting the constraints of cost, simplicity and reliability. In the future, this controller could be improved by integrating more advanced control techniques, such as adaptive or intelligent algorithms, as well as adding remote monitoring or wireless communication functionalities, to make it an even more efficient and connected system.