IoT-Enabled High E ﬃ ciency Smart Solar Charge Controller with Maximum Power Point Tracking—Design, Hardware Implementation and Performance Testing

: Amid growing demand for solar photovoltaic (PV) energy, the output from PV panels / cells fails to deliver maximum power to the load, due to the intermittency of ambient conditions. Therefore, utilizing maximum power point tracking (MPPT) becomes essential for PV systems. In this paper, a novel internet of things (IoT)-equipped MPPT solar charge controller (SCC) is designed and implemented. The proposed circuit system utilizes IoT-based sensors to send vital data to the cloud for remote monitoring and controlling purposes. The IoT platform helps the system to be monitored remotely. The PIC16F877A is used as a main controller of the proposed MPPT-SCC besides implementing the perturb and observe (P&O) technique and a customized buck–boost converter. To validate the proposed system, both simulation and hardware implementation are carried out by the MATLAB / SIMULINK environment and laboratory set up, respectively. The proposed MPPT-SCC can handle the maximum current of 10 A at 12 V voltage. Results show that the e ﬃ ciency of the proposed system reaches up to 99.74% during a month of performance testing duration.


Introduction
Energy sources are facing rapid transitions around the world. This shifting trend between fossil fuels and renewable energy is mainly being steered by the growing energy demand, environmental concerns, and call for green technology. While fossil fuels could continue to offer nearly 80% of total energy demand until 2040, renewable generation envisages capturing more than 50% of the demand thereafter, with an existing annual growth rate of 2.5% [1]. This notion reveals an obvious interest in and potential of renewable energy for future energy demand. Among the potential renewable energy sources (RESs), including solar energy, wind energy, bioenergy, hydro energy, geothermal energy, marine energy etc., solar energy has risen as one of the top three most powerful forms of RESs.

Current Research Trends of MPPT Solar Charge Controller
Different techniques and algorithms are being used in developing the MPPT-SCC. Despite their variety in operating principles, a common objective of the previous and recent research works is to improve the MPPT efficiency at a low cost, without hampering daily energy consumption routines. Tawfik Radjai et al. [36] presented a fuzzy logic controller based on a newly modified P&O MPPT technique with an adaptive duty cycle, which showed 98% efficiency. The authors presented both the simulation and hardware design of the prototype by using a CUKDC-DC converter and a SunTech STP085B PV module. Similarly, Ankur Bhattacharjee et al. [12] developed and validated a MPPT battery charger to use in PV applications. The authors proposed a vanadium redox flow battery (VRFB) instead of lead-acid and Li-ion batteries, and used a three-stage constant current constant voltage (CC-CV) topology and found 94.5% efficiency to charge the VRFB. Anil S. Hiwale et al. [11] implemented a hardware prototype with 87% efficiency using the P&O algorithm. Here, the controller generates the pulse width modulation (PWM) signal and controls the buck converter to extract the power from the PV module. John Macaulay et al. [13] proposed a fuzzy logic controller-based variable step size P&O MPPT technique for the standalone PV system. An enclosed emulated PV system including DC power source, boost converter, and a DSPACE card is used to implement the presented system. The tracking efficiency is improved by 0.38% compared to the existing algorithm. Unal Yilmaz et al. [37] have recently presented a fuzzy logic and PI controller MPPT-SCC for the PV system to rapidly charge the battery, reduce the losses, and improve the battery life cycle. The complete system was established and examined in the MATLAB/SIMULINK environment and provided 94.8-99.4% efficiency. In an earlier work, Rahul Dubey [38] reported a 99% efficient simulation model of a neural network MPPT controller integrated with a hysteresis current controlled inverter (HCCI) for a PV system. Jubaer Ahmed et al. [10] also reported an improved P&O MPPT algorithm for higher efficiency. Using the MATLAB/SIMULINK environment, the authors reported an overall improvement of 2% for their 99.2% efficient MPPT.
In summary, available MPPT-SCCs in the market do not support any IoT-based smart features, neither are they cost-effective and user friendly for use by urban and non-technical people. Therefore, the requirements of these features and higher efficiency have been the key criteria of SCC development in a more efficient way of energy harvesting and distributing.

Modeling of the PV Array and MPPT Techniques
Some factors dominate the output of PV cells, such as solar irradiance, temperature, shadows, and dirt. The literature review shows some interesting models of solar cells [39,40]. The single diode model and the double diode model are very popular electrical models for the solar cell. Comparing with the double diode model, the single diode model is efficient as well as simple to design, including the low value of series resistance, and have an ideal diode factor that can provide improvement in the results of PV cells [36]. Hence, a single diode PV model is used in this research work. A simplified equivalent single diode electrical model of solar cells is illustrated in Figure 1. The respective I-V curve relation can be represented by Equation (1).
where I sc is the short circuit current, I o denotes the saturation current, the diode ideality constant is a, N s is the series-connected cell, T is the temperature of the PN junction, K = 1.38 × 10 −23 J/K is the Boltzman constant, q = 1.6 × 10 −19 C is the charge of an electron, and R S , and R sh are the series Electronics 2020, 9, 1267 4 of 16 and shunt resistance of the array, respectively. If the thermal voltage of the array, V t = N s KT q then, Equation (1) can be rewritten as: Electronics 2020, 9, x FOR PEER REVIEW 4 of 16 The most common and very popular MPPT techniques are perturb and observe (P&O) and incremental conductance (IC). To implement the MPPT in solar panels, the P&O algorithm is the simplest and cheap solution. This algorithm can easily adapt to both the software and hardware platform [16]. Therefore, the P&O algorithm (Algorithm 1) is chosen here to implement the proposed system. P&O works based on the disruption of panel array voltage. Figure 2a illustrates the P-V curve when the P&O algorithm is active. The output power of an MPP SCC is oscillating continuously around the MPP. By reducing the perturbation step rate, the oscillations of the P-V curve can be minimized.   The most common and very popular MPPT techniques are perturb and observe (P&O) and incremental conductance (IC). To implement the MPPT in solar panels, the P&O algorithm is the simplest and cheap solution. This algorithm can easily adapt to both the software and hardware platform [16]. Therefore, the P&O algorithm (Algorithm 1) is chosen here to implement the proposed system. P&O works based on the disruption of panel array voltage. Figure 2a illustrates the P-V curve when the P&O algorithm is active. The output power of an MPP SCC is oscillating continuously around the MPP. By reducing the perturbation step rate, the oscillations of the P-V curve can be minimized.  Figure 2b illustrates the proposed flowchart of the P&O algorithm. Following State 5, the dP represents a small change in power, while the variation of the voltage is denoted by dV. According to Figure 2a, when the voltage is decreased, then, the power of the MPP increases; similarly, the power of MPP increases when the voltage is increased. This is the core concept behind the P&O algorithm. The algorithm equates the current power reading, Pk, with the previous power reading, Pk−1, after the execution of each increase in the panel operating voltage. The voltage would increase if the power raised; otherwise, it shifts the direction or decreases the voltage through the switching duty cycle. Until the MPP is touched, this process will be repeated at each MPP monitoring phase [31].
Then step forward to State 7.
State 7: Return. Figure 2b illustrates the proposed flowchart of the P&O algorithm. Following State 5, the dP represents a small change in power, while the variation of the voltage is denoted by dV. According to Figure 2a, when the voltage is decreased, then, the power of the MPP increases; similarly, the power of MPP increases when the voltage is increased. This is the core concept behind the P&O algorithm. The algorithm equates the current power reading, P k , with the previous power reading, P k−1 , after the execution of each increase in the panel operating voltage. The voltage would increase if the power raised; otherwise, it shifts the direction or decreases the voltage through the switching duty cycle. Until the MPP is touched, this process will be repeated at each MPP monitoring phase [31].

Proposed System Architecture
The proposed system is divided into two sections. One is a simulation section, and another is an experimental setup. In the experimental setup, a modified buck-boost converter is developed and used. Similarly, in the simulation section, a mathematical model of the buck-boost converter is designed, and the complete system of the proposed design is simulated.
The principal structure of the prototype hardware is presented by a block diagram shown in Figure 3. To achieve the highest energy productivity, the solar PV panel must work at MPP. The complete prototype of the proposed charge controller is shown in Figure 4. The input power source is the 85 W PV module. The state of the input voltage and current is sent to the microcontroller through the corresponding interfaced sensors. A modified buck-boost converter is used as an MPPT controller between the PV panel and battery. The load is connected to the battery. To monitor the system activities, a liquid crystal display (LCD) is connected to the microcontroller. As mentioned before, an IoT communication module is used for the remote monitoring system. In this project, a Bluetooth device is used as an IoT interface communication module, while other modules, such as the global system for mobile (GSM) module or Wi-Fi module, can also be used for IoT connection.    The proposed buck-boost converter is selected and found from different configurations of the DC-DC converter reviewed to date [41]. A boost converter is a converter in which output must be equivalent to or larger than the input voltage.
According to Figure 5, when the switch is ON, the input voltage passes through the inductor. Therefore, the inductor voltage in this stage is = . When the switch is OFF, the diode becomes forward biased and the output voltage will be = + . In steady-state conditions, the total energy stored in the inductor will be equal to the released energy when the switch is closed. The boost converter output voltage, value of an inductor, and the capacitor can be measured by the following equations: The proposed buck-boost converter is selected and found from different configurations of the DC-DC converter reviewed to date [41]. A boost converter is a converter in which output must be equivalent to or larger than the input voltage.
According to Figure 5, when the switch is ON, the input voltage passes through the inductor. Therefore, the inductor voltage in this stage is V in = V L . When the switch is OFF, the diode becomes forward biased and the output voltage will be V out = V in + V L . In steady-state conditions, the total energy stored in the inductor will be equal to the released energy when the switch is closed. The boost converter output voltage, value of an inductor, and the capacitor can be measured by the following equations: A buck converter is a DC-DC converter where the voltage of output is always smaller than the voltage of input. The output of the buck converter, V 0ut , the value of an inductor, L, and value of the capacitor, C, can be measured by the following equations: Here, the duty cycle ratio is denoted by D, f is the frequency, ∆I L is the inductor current, and ∆V out is the peak to peak ripple voltage of the output.
Here, the duty cycle ratio is denoted by D, f is the frequency, ∆ is the inductor current, and ∆ is the peak to peak ripple voltage of the output. In this work, a modified buck-boost converter is proposed, which is shown in Figure 5. A metaloxide semiconductor field-effect transistor (MOSFET) is replaced instead of a traditional switch. MOSFET is a switching device that facilitated the reduction in the measurable amount of voltage drop in diodes. When the MOSFET is in ON mode, then, the current flows through the circuit and inductor stores the energy. When the MOSFET is in OFF mode, then, the diode is ON and the inductor releases the stored energy [42].

Simulation Setup and Results
Function block parameters are shown in Table 1     In this work, a modified buck-boost converter is proposed, which is shown in Figure 5. A metaloxide semiconductor field-effect transistor (MOSFET) is replaced instead of a traditional switch. MOSFET is a switching device that facilitated the reduction in the measurable amount of voltage drop in diodes. When the MOSFET is in ON mode, then, the current flows through the circuit and inductor stores the energy. When the MOSFET is in OFF mode, then, the diode is ON and the inductor releases the stored energy [42].

Simulation Setup and Results
Function block parameters are shown in Table 1 Figure 6a,b present the I-V and the P-V characteristics curve of the proposed PV module model, respectively, in different solar irradiances at 25 • C constant temperature. The lowest irradiance is 200 W/m 2 , and in this state, the PV panel produces the lowest power. The highest irradiance is 1000 W/m 2 , and in this state, PV panel generates the highest power. Figure 7 shows the proposed mathematical model for the buck-boost converter, which is simulated in MATLAB/SIMULINK. Repeating the sequence and duty cycle generates pulses and connected to the MOSFETs, gain as a switching signal.       The proposed SIMULINK model of the MPPT solar charge controller is shown in Figure 9. A PV module of SM-85KSM, the buck-boost converter, which is sub-masked of a 12 V, 100 Ah lead-acid battery, MPPT block, makes the complete system operable standalone PV system. The proposed SIMULINK model of the MPPT solar charge controller is shown in Figure 9. A PV module of SM-85KSM, the buck-boost converter, which is sub-masked of a 12 V, 100 Ah lead-acid battery, MPPT block, makes the complete system operable standalone PV system.
The maximum solar irradiance (G) of 1000 W/m 2 and temperature (T) of 298 K are used. Figure  10 presents the simulation results, where four scope blocks are connected to the output of them. The scope shows the converter input voltage (V_Input) in the first plot, input current (I_Input) in the second plot, output power (P_Output) in the third plot, and the output current (I_Output) in the fourth plot.   The proposed SIMULINK model of the MPPT solar charge controller is shown in Figure 9. A PV module of SM-85KSM, the buck-boost converter, which is sub-masked of a 12 V, 100 Ah lead-acid battery, MPPT block, makes the complete system operable standalone PV system.
The maximum solar irradiance (G) of 1000 W/m 2 and temperature (T) of 298 K are used. Figure  10 presents the simulation results, where four scope blocks are connected to the output of them. The scope shows the converter input voltage (V_Input) in the first plot, input current (I_Input) in the second plot, output power (P_Output) in the third plot, and the output current (I_Output) in the fourth plot.  The maximum solar irradiance (G) of 1000 W/m 2 and temperature (T) of 298 K are used. Figure 10 presents the simulation results, where four scope blocks are connected to the output of them. The scope shows the converter input voltage (V_Input) in the first plot, input current (I_Input) in the second plot, output power (P_Output) in the third plot, and the output current (I_Output) in the fourth plot.

Experimental Setup and Results
A real-time experiment is carried out to validate the simulation results. The experimental setup for the validation of the designed solar charge controller is shown in Figure 11a-b. Figure 11a shows the PV panel on the rooftop, model number SM-85KSM from KYOCERA, Japan. Figure 11b shows the complete laboratory setup with the battery and solar testbed. A 12 V, 100 Ah lead-acid battery from HAMKO is used for energy storage. The output power of the PV module is stored in the battery through the solar charge controller; the controller operation is tested by the digital oscilloscope-the brand name is GWINSTEK and the model number is GDS-2204A. The incoming voltage, current as well as the battery condition are directly displayed by the analog meter board.

Experimental Setup and Results
A real-time experiment is carried out to validate the simulation results. The experimental setup for the validation of the designed solar charge controller is shown in Figure 11a,b. Figure 11a shows the PV panel on the rooftop, model number SM-85KSM from KYOCERA, Japan. Figure 11b shows the complete laboratory setup with the battery and solar testbed. A 12 V, 100 Ah lead-acid battery from HAMKO is used for energy storage. The output power of the PV module is stored in the battery through the solar charge controller; the controller operation is tested by the digital oscilloscope-the brand name is GWINSTEK and the model number is GDS-2204A. The incoming voltage, current as well as the battery condition are directly displayed by the analog meter board. Figure 12a shows the PV output voltage (Channel 1, red color) and the converted voltage (Channel 2, blue color) of the buck-boost converter from the oscilloscope in a single plot with respect to 10 µs time. The PV voltage is almost 16 V, which is over the range to charge the battery, so the converter reduces the voltage to 13 V, as the highest required voltage to charge a lead-acid battery is 14.4 V without damaging the battery. The converter output voltage, duty cycle and the battery charging state is shown in Figure 12b, as the channel 1 (blue color), channel 2 (red color) and channel 3 (green color), respectively, in a single plot. The plot is taken in 10 µs timeframes and the zoomed portion observed at 2 µs timeframes. The converter voltage in blue color is shown in the first plot, the duty cycle is presented in the second plot in red color, and the third plot is the battery charging state in green color. The on-time of the duty cycle is 98% and the rest 2% of the duty cycle is shown on the right side of the second plot in the zoomed version. The effect of the rest 2% duty cycle on the battery charging state is also shown on the right side of the third plot as a zoomed version. Both the zoomed signal is in 2 µs time range. Electronics 2020, 9, x FOR PEER REVIEW 11 of 16  Figure 12a shows the PV output voltage (Channel 1, red color) and the converted voltage (Channel 2, blue color) of the buck-boost converter from the oscilloscope in a single plot with respect to 10 µs time. The PV voltage is almost 16 V, which is over the range to charge the battery, so the converter reduces the voltage to 13 V, as the highest required voltage to charge a lead-acid battery is 14.4 V without damaging the battery. The converter output voltage, duty cycle and the battery charging state is shown in Figure 12b, as the channel 1 (blue color), channel 2 (red color) and channel 3 (green color), respectively, in a single plot. The plot is taken in 10 µs timeframes and the zoomed portion observed at 2 µs timeframes. The converter voltage in blue color is shown in the first plot, the duty cycle is presented in the second plot in red color, and the third plot is the battery charging state in green color. The on-time of the duty cycle is 98% and the rest 2% of the duty cycle is shown on the right side of the second plot in the zoomed version. The effect of the rest 2% duty cycle on the battery charging state is also shown on the right side of the third plot as a zoomed version. Both the zoomed signal is in 2 µs time range. The crucial data, such as related PV panel and batteries system voltages, currents, temperatures, input and output power of the charge controller, state of charge of batteries, etc., are collected through IoT-enabled sensors of the charge controller and transferred to the webserver or other resources using the IoT concept. These data then will be available from a smartphone or webpage, as shown in Figure  13a. In this project, the logged data are transferred to an online service named "Byte stream mode". This enables the users to monitor the charge controller from the remote area. This device is also compatible with the GSM and Bluetooth modules to directly send warning messages during The crucial data, such as related PV panel and batteries system voltages, currents, temperatures, input and output power of the charge controller, state of charge of batteries, etc., are collected through IoT-enabled sensors of the charge controller and transferred to the webserver or other resources using the IoT concept. These data then will be available from a smartphone or webpage, as shown in Figure 13a. In this project, the logged data are transferred to an online service named "Byte stream mode". This enables the users to monitor the charge controller from the remote area. This device is also compatible with the GSM and Bluetooth modules to directly send warning messages during abnormal situations such as the high temperature of the batteries, etc., to the cellphone. Figure 13b shows the function of the external device charging unit through the universal serial bus (USB) port. A smartphone is charging through the USB port, while the charge state of the battery is 45%. Incoming PV voltage is 20.7 V, manually measured by the digital multimeter. This USB port is enabled to charge any electronic device without any charger. The crucial data, such as related PV panel and batteries system voltages, currents, temperatures, input and output power of the charge controller, state of charge of batteries, etc., are collected through IoT-enabled sensors of the charge controller and transferred to the webserver or other resources using the IoT concept. These data then will be available from a smartphone or webpage, as shown in Figure  13a. In this project, the logged data are transferred to an online service named "Byte stream mode". This enables the users to monitor the charge controller from the remote area. This device is also compatible with the GSM and Bluetooth modules to directly send warning messages during abnormal situations such as the high temperature of the batteries, etc., to the cellphone. Figure 13b shows the function of the external device charging unit through the universal serial bus (USB) port. A smartphone is charging through the USB port, while the charge state of the battery is 45%. Incoming PV voltage is 20.7 V, manually measured by the digital multimeter. This USB port is enabled to charge any electronic device without any charger. The experimental results of the proposed MPPT solar charge controller are shown in Table 2. The experimental values are taken at the times of 8.30 a.m. to 5.00 p.m. After 30 min average interval, the results are recorded manually as well as compared with the value of LCD. The highest efficiency, 99.73924381~99.74, is recorded at 1.30 p.m., where the PV power is 25.311 W and the extracted power by the system to the load is 25.245 W. This proves that the MPPT technique to extract the maximum power from the PV panel is working efficiently. Figure 14a-d depicts the value of (a) PV and load voltage, (b) PV and load current, (c) PV and load power, and (e) efficiency graphically. Equation (9) is used to determine the charge controller efficiency (η).
where, P out = output power and P in = input power. From the obtained results, the comparative analysis of different MPPT techniques efficiency is shown in Table 3. is used to determine the charge controller efficiency (η).
where, = and = . From the obtained results, the comparative analysis of different MPPT techniques efficiency is shown in Table 3.

Conclusions
An IoT-equipped MPPT-SCC is designed, implemented, and tested in this paper. The proposed MPPT-SCC consists of a common P&O algorithm with a modified buck-boost converter. To validate the results, the proposed hardware was first simulated in the MATLAB/SIMULINK platform and then, a prototype device was made and tested for one month. Then, the proposed design was validated through simulation and experimental results. The experimental results show that the proposed SCC has an acceptable performance and efficiency of around 99.74%. The proposed charge controller is equipped with an IoT platform that enables us to easily monitor the condition of the SCC remotely. To improve the performance further, thorough investigation and optimization are necessary. The collected data through the IoT platform can be used in smart home applications as training data for machine learning (ML) techniques. ML besides P&O can be incorporated in the future to increase the speed, reduce the fluctuation around the maximum power point, and increase the efficiency further of the device.