LF. Wong et al. /Future Technology August 2024| Volume 03 | Issue 03 | Pages 15-19 15 Article Design and implementation of a dual-axis sun tracker for an Arduino-based micro-controller photovoltaic system Lin Fung Wong, Hadi Nabipour Afrouzi*, Jalal Tavalaei Faculty of Engineering, Computing and Science, Swinburne University of Technology Sarawak 93350, Kuching, Malaysia A R T I C L E I N F O Article history: Received 04 March 2024 Received in revised form 06 April 2024 Accepted 16 May 2024 Keywords: Solar panel, Arduino uno, Tracking system, Dual axis, Fixed PV system *Corresponding author Email address: HAfrouzi@swinburne.edu.my DOI: 10.55670/fpll.futech.3.3.3 A B S T R A C T This research investigates the optimization of solar panel performance by designing and implementing a low-cost Dual-Axis Sun Tracker (DAST) for an Arduino-based Microcontroller Photovoltaic System. The primary aim is to enhance solar energy extraction by precisely aligning the panel perpendicular to the sun's position, maximizing output voltage and current efficiency compared to fixed systems. The DAST employs two micro servo motors, SG90, controlled by a specialized chronological algorithm in offline mode, ensuring strategic alignment and scheduled adjustments. A comprehensive evaluation of the DAST's performance is conducted, contrasting it with a Fixed System to underscore the advantages of solar tracking. As a result, a DAST produces higher output than a fixed system by 0.896W during sunny days and 0.206W during cloudy days. Besides, the efficiency of PV panels in the DAST is 71.65%, and fixed is 49.66% during sunny days, while DAST is 22.96% and fixed is 17.91% during cloudy days. 1. Introduction Malaysia consists of West Malaysia and East Malaysia, located on the island of Kalimantan. Due to its location in the equatorial zone, Malaysia experiences a constant high daily average temperature ranging from 21°C to 32°C. Additionally, it receives an average of 4000-5000 Wh/m2 of daily solar radiation and approximately 1643 kWh/m2 of energy on a yearly basis. The country also receives an average of 4 to 8 hours of sunshine per day. This implies that Malaysia receives a significant amount of solar radiation throughout the year, making solar energy a viable energy source. With the increasing population of Malaysia, it is estimated that electrical energy demand soar to 274 TWh in the year 2030. Recently, Malaysia has been producing its electricity primarily from five different sources: oil, coal, natural gas, hydropower, and other fuels like biomass, biogas, and solar. As of the end of 2010, the fuel mix used to generate power was as follows: 57% natural gas, 24.1% coal, 8.4% hydro, 6.4% oil/diesel, and 4.2% biomass/others [1]. Malaysia aims to achieve a target of obtaining 25% of its energy from renewable sources overall by 2050. Solar energy is one of the renewable energy sources in this situation, and it can be pragmatically fitted because it is an affordable, clean, and green energy source that is broadly used anywhere. Unlike fossil fuels, which significantly negatively influence the environment, climate, resources, and future generations, solar energy is a greenhouse gases free source. Solar photovoltaic (PV) energy is a type of renewable energy generated by a solar cell system that utilizes PV technology to convert solar irradiation into electrical energy. Currently, solar PV projects have become more affordable than the marginal costs of fossil fuels on a global scale [2]. In addition to exploring new materials for PV cells, researchers have proposed various alternative approaches. One such approach is the concentrated photovoltaic (CPV) system, which concentrates a large amount of sunlight onto PV cells. Another method involves using maximum power point trackers, which track and operate on the maximum power point of the PV arrays to draw maximum power. Solar tracking is also a useful approach, as it follows the sun's path to maximize the solar energy captured from the sun. Therefore, this research aims to design and develop an Arduino-based Dual Axis Solar Tracker (DAST) for energy improvement of solar PV panels to maximize the captured power. Despite the equatorial location having ample sunshine, the DAST still chases an accurate power grasp in order to prioritize and ascertain the DAST Future Technology Open Access Journal https://doi.org/10.55670/fpll.futech.3.3.3 August 2024| Volume 03 | Issue 03 | Pages 15-19 Journal homepage: https://fupubco.com/futech ISSN 2832-0379 mailto:HAfrouzi@swinburne.edu.my https://doi.org/10.55670/fpll.futech.3.3.3 https://fupubco.com/futech https://fupubco.com/ LF. Wong et al. /Future Technology August 2024| Volume 03 | Issue 03 | Pages 15-19 16 benefits over the region's Static Solar System (SSS). Precisely directing maximum light intensity toward solar modules as the sun moves is crucial for optimizing power output [3]. Previous efforts include tracking systems utilizing fuzzy logic, programmable logic controllers (PLCs), closed-loop servo systems, and stepper motors with light sensors [4]. Therefore, designing a DAST with a procedure for tracking the sun's position (sun path) using an offline approach is proposed. 2. Literature review 2.1 Solar energy in Malaysia With the decrease in the cost of solar panels, the accessibility and affordability of solar power have greatly improved. This has led to a significant rise in the number of solar PV installations across the country. As more individuals and businesses recognize the benefits of solar energy, there has been a notable surge in the adoption of solar power systems. This trend can be attributed to the favorable economic and environmental factors associated with solar energy, including reduced electricity costs and a cleaner, more sustainable energy source. However, Malaysia’s solar energy applications primarily consist of two types: solar thermal applications and PV technologies. Solar thermal energy (STE) involves harnessing solar energy to generate thermal or heat energy [5]. It is a technology that focuses on capturing and utilizing the heat from the sun. The types of PV panels often used in Malaysia are Mono-Crystalline Silicon, Poly-Crystalline Silicon, Copper-Indium-Diselenide (CIS), and Thin-film Silicon (using Amorphous Silicon). Our experiments also show that Mono-Crystalline Silicon and Poly-Crystalline Silicon are the best for under the hot sun. However, CIS and Thin-film silicon perform better during cloudy days. 2.2 Solar photovoltaic system The movement of the Earth gives rise to two important factors that affect the angle of the sun relative to the horizon. The first factor is the azimuth angle, which changes with the seasons as the Earth orbits the Sun. This causes variations in the sun's position in relation to the horizon. The second factor is the rotation of the Earth on its axis, resulting in the sun's daily journey from east to west, also called elevation angle. These movements of the Earth impact the density of sunlight falling on a stationary surface, leading to changes in the intensity of light throughout the day. 3. System design The solar tracking system comprises a solar panel, an Arduino microcontroller, and sensors. For this system to function, the sun must emit light. As sensors, the LDRs measure the amount of light that reaches the solar panels. The LDR then sends data to the Arduino microcontroller after that. The servo motor circuit is then constructed. The +5V supply of the Arduino microcontroller is linked to one of the servo's three pins. The ground is connected to the servo's negative. The analog point of the microcontroller is connected to the data point of the servo. Then, a potentiometer controls the servo motor's speed. Weather conditions or sensor obstructions may impact the performance of the LDR-sensor- based solar tracking system. Therefore, a closed-loop tracking system, along with an active and chronological algorithm, is required based on feedback control. The device pushes the solar panel towards the sun at predetermined intervals with specified azimuth and elevation angles while using mathematical techniques to track the sun's position. The elevation angle is the sun's angular height in the sky relative to the horizon, and it varies during the day depending on location latitude and the day of the year. Azimuth is the horizontal angle measured from true north to the sun's projection. 3.1 Declination-clock and Pseudo-azimuthal mounting This study describes a dual-axis solar tracker with several uses that employ sensing-based and astronomical tracking techniques. The system determines the sun's location and positions the solar panel according to a real-time clock and a combination of light-dependent resistors (LDRs). The tracking angle is adjusted depending on the time of day using the real-time clock and the LDRs to monitor solar irradiation. The device also includes a safety measure that positions the solar panel horizontally in the event of strong winds. 3.2 Methodology implementation The dual-axis solar tracker system utilizes two servo motors with motor shafts to rotate the x-axis and y-axis. The reason for choosing a servo motor is its precise control, high torque, low power consumption, and minimal maintenance. Arduino IDE is used to program the ATmega328P microcontroller – Arduino Uno. Besides, a Real Time Clock (RTC) IC Module is used to precisely schedule the movement of the solar panels to align with the sun's position. As the sun in East Malaysia (Sabah and Sarawak) rises in the east and sets in the west, with a more vertical path due to its proximity to the equator, an offline sun path tracking algorithm was developed in the Arduino IDE to enable the microcontroller to track the sun's position based on the latitude, longitude, and time of year. By utilizing the solar tracking system, the solar panel can receive sunlight at a 90-degree angle, ensuring that the PV panel will make a 90-degree angle with the sun, and the perpendicular drawn on the plane makes a 0-degree angle with the sun, in line with Lambert's cosine law for maximum illumination. The experiment involved fixing the PV panel at a 30o head South, and the procedure was repeated throughout the day. The output voltage and current produced by the PV panels were measured at specific intervals using a multimeter to compare the output efficiency of the dual-axis solar tracker system and the fixed system. A micro servo motor, a Real Time Clock I2C Module, an Arduino Maker UNO board, and a PV panel make up the Dual- Axis Sun Tracker Arduino-based Microcontroller Photovoltaic System. Two servo motors comprise this electromechanical system's two rotating angles, east-west and north-south, respectively. The RTC plays a critical role in precisely scheduling the movement of the solar panels to align with the sun’s position. By accurately keeping track of time, the microprocessor automatically rotates the rotation of two servo motors to the necessary angle for the greatest received solar intensity. The PV panel generates a voltage and current proportional to the intensity of sunlight. This Dual-Axis solar tracker uses a chronological algorithm to ensure that the solar tracking system will not be affected by cloudy weather. This is shown in Figure 1. The chronological algorithm uses the sun tracking mathematical models to determine the sun's location and control the solar panel's movement. The microprocessor LF. Wong et al. /Future Technology August 2024| Volume 03 | Issue 03 | Pages 15-19 17 will determine the sun's location and, using specified azimuth and elevation angles will command the servo motor to move the solar panel in the sun's direction at predetermined intervals. The elevation angle is the sun's angular height in the sky as measured from the object's horizon. In contrast, the azimuth angle is the angle in the horizontal plane measured from true north to the horizontal projection of the sun ray. The formula for the azimuth and elevation angle is below: 𝑎𝑛𝑔𝑙𝑒𝐴𝑧 = 𝑡𝑎𝑛−1 [ 𝑠𝑖𝑛𝜃 (𝑐𝑜𝑛𝜃𝑠𝑖𝑛𝜑)−(𝑡𝑎𝑛𝛿𝑐𝑜𝑠𝜑) ] (1) and, 𝑎𝑛𝑔𝑙𝑒𝐸𝑙𝑒 = 𝑠𝑖𝑛−1 [(𝑠𝑖𝑛𝛿𝑠𝑖𝑛𝜑) + (𝑐𝑜𝑠𝛿𝑐𝑜𝑠𝜑𝑐𝑜𝑠𝜃)] (2) Where: 𝜑 = 𝑙𝑎𝑡𝑖𝑡𝑢𝑑𝑒 𝑜𝑓 𝑡ℎ𝑒 𝑙𝑜𝑐𝑎𝑡𝑖𝑜𝑛 𝛿 = 𝑠𝑜𝑙𝑎𝑟 𝑑𝑒𝑐𝑙𝑖𝑛𝑎𝑡𝑖𝑜𝑛 𝑎𝑛𝑔𝑙𝑒 𝜃 = ℎ𝑜𝑢𝑟 𝑎𝑛𝑔𝑙𝑒 3.3 System schematic architecture The figure below shows the designed system's schematic diagram. It details the design of the dual-axis Arduino-based solar tracking system's architectural arrangement. The plan is for the microcontroller to direct the two servo motors to move the PV panel array to the appropriate angle using a chronological method (offline mode) with the RTC module. The programming code is running through the Arduino IDE. The microcontroller controls the servo motor, and the two reference axes function proportionally. 3.4 Control criteria and dynamics Figure 1 depicts the programming interface of Arduino IDE, which utilizes an offline mode algorithm to control two servo motors, adjusting them to specific angles based on the sun's azimuth and elevation angles determined by the precise time of the sun's path. The RTC is responsible for reading and storing computer time in the Arduino, ensuring accurate timekeeping even when the power is off. The system records and calculates the historical azimuth and elevation angles by referencing historical sun path data, particularly during the December solstice. This information is then used to position the servo motors accurately based on the current time, aligning the solar panels optimally with the sun's position. The setup comprises two 12V 250mA (3W) polycrystalline photovoltaic (PV) panels, SG90 Micro Servo motors, an RTC I2C module, an Arduino Maker Uno board, and a custom- designed 3D printed solar tracker bracket. Polycrystalline panels were chosen due to cost-effectiveness, high efficiency, and robustness. The RTC module ensures accurate timekeeping even without power and facilitates the offline mode algorithm. The Arduino Maker Uno board was selected for its ample IO ports and affordability. SG90 Micro Servos offers precise control and user-friendly operation. The 3D- printed solar tracker bracket, known for its cost-efficiency and quick production, complements the system. The system uses a chronological algorithm that leverages RTC-recorded time and historical sun path data to program the microcontroller. This algorithm controls two servo motors — one for the X-plane (azimuth) and the other for the Y-plane (elevation) — to align the solar panels optimally. The DAST Arduino Breadboard diagram is shown in Figure 2, and the system flowchart of the dual-axis solar tracking system is shown in Figure 3. 4. Results and discussion 4.1 Construction and testing of developed DAST After finalizing the paper design and analysis, the research project proceeded through three key stages. The initial phase of the research involved writing and debugging the software code using Arduino IDE to develop an offline mode algorithm. This algorithm enabled the Arduino microcontroller to control the servo motors based on historical sun path data preset inside the Arduino. The second stage focused on implementing the code onto the Arduino and assembling all the required wiring components on a solderless breadboard, ensuring connections for the two servos and the RTC module were appropriately set up. Finally, the experiment phase commenced with four days, comprising two sunny days Figure 4 (a) and two cloudy days Figure 4 (b). Figure 1. Dual-axis solar tracker system algorithm Figure 2. DAST Arduino breadboard diagram LF. Wong et al. /Future Technology August 2024| Volume 03 | Issue 03 | Pages 15-19 18 Figure 3. Flowchart of dual-axis solar tracking system Then, the power output efficiency of the Dual-Axis Solar Tracker (DAST) and a fixed system was compared. Table 1 classified the seek-out details. 4.2 Comparison of average power output for DAST and fixed on sunny and cloudy days On sunny days, the Dual-Axis Solar Tracker (DAST) exhibited an average power output surpassing that of the fixed system by approximately 0.896W. Moreover, the average efficiency of the PV panel in the DAST was approximately 22% higher than that of the fixed system. Conversely, on cloudy days, the DAST showcased an average power output higher than the fixed system by around 0.206W, with the average efficiency of the DAST's PV panel surpassing that of the fixed system by approximately 5.05%. 4.3 Average power output of DAST and fixed systems A practical comparison chart of the average power output between the DAST and fixed systems illustrates subtle differences during sunny days, particularly between 12 PM and 1 PM when the sun aligns perpendicularly to the PV panel. Notably, the fixed system shows unstable power output, mainly before 12 PM and after 1 PM. Conversely, the DAST consistently generates better power output due to its ability to continually face the sun with its two moving axes. This alignment ensures that the panel remains perpendicular to the sun's rays, optimizing power production throughout the day. Despite the efforts of both the DAST and the fixed system, the power output remained below 2W during the cloudy day, primarily due to the dense cloud cover. The graph indicates unstable power output from both systems. However, a comparative analysis highlights the DAST's relatively higher power output throughout the day, particularly noticeable before 11 AM and after 3 PM compared to the fixed system. 4.4 Average energy output of DAST and fixed systems During sunny days, the average energy output of DAST is 26.269Wh, whereas the fixed system outputs 18.206Wh. Consequently, the DAST generates approximately 44.29% more power than the fixed system. On cloudy days, the average energy output of DAST is 8.416Wh, whereas the fixed system outputs 6.564Wh. Therefore, the DAST generates approximately 28.21% more power than the fixed system. The difference in sky conditions significantly impacts efficiency, potentially halving or doubling the capable generated energy between sunny and cloudy days (Table 2). Table 1. Comparison of average output DAST and fixed Figure 4. Average Power Output of DAST and Fixed of Sunny and Cloudy Days (a) (b) LF. Wong et al. /Future Technology August 2024| Volume 03 | Issue 03 | Pages 15-19 19 Table 2. The average energy output of DAST and fixed systems 5. Conclusion In conclusion, the research project aimed to design and implement a dual-axis sun tracker for a photovoltaic system using an Arduino-based microcontroller. The study also aimed to deepen the understanding of solar energy in the Malaysian context, particularly Kuching city. It seeks practical applications by presenting a comprehensive performance analysis of the dual-axis solar tracking system, highlighting its potential in pursuing sustainable energy solutions. The dual- axis solar tracker demonstrated higher output than a fixed system, approximately 0.896W and 0.206W during sunny and cloudy days, respectively. It has been proven that the use of a dual-axis solar tracker can increase efficiency by approximately 71.65% and 22.96% compared to the fixed system during sunny and cloudy days, respectively. Ethical issue The authors are aware of and comply with best practices in publication ethics, specifically with regard to authorship (avoidance of guest authorship), dual submission, manipulation of figures, competing interests, and compliance with policies on research ethics. The authors adhere to publication requirements that the submitted work be original and not published elsewhere. Data availability statement The datasets analyzed during the current study are available and can be given upon reasonable request from the corresponding author. Conflict of interest The authors declare no potential conflict of interest. References [1] Ali, R, Daut, I & Taib, S 2012, 'A review on existing and future energy sources for electrical power generation in Malaysia', Renewable and Sustainable Energy Reviews, vol. 16, no. 6, 2012/08/01/, pp. 4047-4055. [2] Singh, AK & Singh, RR 2021, 'An Overview of Factors Influencing Solar Power Efficiency and Strategies for Enhancing,' 2021 Innovations in Power and Advanced Computing Technologies (i-PACT), 1-6. [3] Ayoade, IA, Adeyemi, OA, Adeaga, OA, Rufai, RO & Olalere, SB 2022, 'Development of Smart (Light Dependent Resistor, LDR) Automatic Solar Tracker,' IEEE, K. Elissa, “Title of paper if known,” unpublished. [4] Idoko, JA, Bamgbade, OB, Abubakar, IN, Onyechokwa, TI, Adegboye, BA & Mustapha, BM 2020, 'Design of Automatic Solar Tracking System Prototype to Maximize Solar Energy Extraction,' IEEE, [5] Bhatia, SC 2014, '4 - Solar thermal energy', in SC Bhatia (ed.) Advanced Renewable Energy Systems, Woodhead Publishing India, pp. 94-143. This article is an open-access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/). https://creativecommons.org/licenses/by/4.0/ https://creativecommons.org/licenses/by/4.0/