A simple and low‐cost active dual‐axis solar tracker

This paper presents the design and practical implementation of a simple active dual‐axis solar tracker (DAST) to track the sun's movement by using fewer components and low‐cost as well. A dual‐axis mechanism is developed in order to tilt the PV panel by two servo motors facing the highest intensity of sunlight captured by LDR sensors, which are placed in the four corners of PV panel. The DAST prototype was constructed practically and tested using a real‐time virtual instrument based on Excel to determine its efficiency. Moreover, a comparison based on experimental results between the energy produced by the proposed smart DAST and a fixed panel shows that the smart DAST produces 36.26% more energy compared to the fixed panel. The proposed active DAST can be easily implemented without possessing deep knowledge about solar tracking technologies and electronic engineering.

In this context, solar tracking systems are the best devices for maximizing the collected energy by the PV panel whose purpose is to keep the PV panel perpendicular to the incident solar radiation. The maximum power can be extracted from the PV panel when the tilt angle of the panel is synchronized with the daily and seasonal changes of the sun's motions. 24 Many researchers have proven that solar trackers maximize the PV energy generation (10%-50%). [25][26][27][28][29] However, equipping the PV panel with a solar tracker will surely increase the system cost. In this sense, a compromise between efficiency and cost is necessary for solar tracking systems to become competitive. Solar trackers can be classified, according to tracking mechanisms, into two main types: passive trackers (mechanical mechanism) and active trackers (electrical mechanism). Both can be implemented using a single-axis or double-axis tracking structures. In general, the single-axis solar tracker (SAST) that has one degree of freedom follows the sun's movement in one direction; it can be a horizontal single-axis tracker (HSAT), 30 or vertical single-axis tracker (VSAT). 31 The HSAT is used to track the sun toward south and north, which is the sun's seasonal path, while VSAT is used to track the sun toward east and west, which is the sun's daily path. For additional power gain, DAST that has both vertical and horizontal axis is used. 32 Passive trackers (PTs) use compressed gas to move the panel. Depending on the difference in the falling sunlight on gas containers mounted on the eastern and western sides of the PV panel, a difference in gas pressure is created and then the tracker is moved until it reaches an equilibrium position. 33 This tracking type is simple because it works without any electronic controls and motors. However, its accuracy is limited and it cannot operate at low temperature. 34 On the other hand, active trackers (ATs) use electrical components to direct PV panels toward the sun. The advantage of these compared to PTs is that they have better tracking accuracy. 35 ATs can be classified into two main categories according to their principle working: astronomical and sensor-based solar trackers. Astronomical solar trackers work based on approaches that calculate the sun's position from predefined geometric and astronomical equations. 36,37 For instance, Syafii et al 38 designed and implemented a DAST system that depends on a database created from the calculation of solar elevation and azimuth based on the TDT system. As was indicated in, 38 this approach has increased the output power by 26% compared to the fixed PV panel. However, this tracking approach requires manual intervention to change the site's latitude, local date, and timezone.
Sidek et al 39 designed and implemented a DAST open-loop system that can automatically position itself by using a GPS sensor and a sun's trajectory algorithm; it was obtained 26.9% more energy production. The proposed system can work without user intervention and it can be deployed in any location. However, this system is very expensive due to the use of many components, including two DC motors, encoder, GPS, two actuators and three microcontrollers. Generally, the implementation of such systems is more complex due to the complex algorithms used that requiring extensive calculations. On the other side, sensor-based solar trackers widely use light sensors such as photoresistors (LDRs), 40 photodiodes, 41 solar cells, 42 pyrometers 43 to follow instantaneously sun's movement. The most commonly used sensors are LDRs in view of their simple circuit and very low price. 34 For these reasons, many researchers have used this type of sensors in their systems. 30,44,45 These tracking systems use two or four LDR sensors, depending on the tracking structure (SAST or DAST), which detect the sunbeam and provide return signals to a controller (microcontrollers, PLCs or others), which in turn aligns the panel via one or two motors perpendicularly with the high sunbeams. However, most of the previous works do not take into account the influence of LDR sensor circuit in the improvement of tracking accuracy. Since the LDR sensor circuit is designed as a voltage divider, 46 LDR in series with a fixed resistor, the latter must be well-chosen so that it can provide an output voltage that covers the sunny, clear and cloud conditions. Moreover, new methods for solar tracking have recently been introduced, using Artificial Intelligence (AI) such as fuzzy logic (FL), neural networks (NN), and neuro-fuzzy (NF). [47][48][49] For instance, Hamed in 50 designed and implemented a solar tracker system based on an FL controller. This system can collect about 24% more energy than a fixed panel. Two LDR sensors were used to sense the sunlight and were connected to an FPGA board in which the FL controller is implemented. Then, a stepper motor, controlled by FPGA, rotates the PV panel until it is perpendicular to the sunbeam. However, the realization of solar tracking systems based on IA methods such as FL, NN, or NF is not easy because of the use of complex algorithms requiring extensive calculations, and it needs to be implemented in embedded boards demanding flexibility (higherlevel languages), large memory and high-speed computing, like FPGA or DSP. This makes the solar tracker system more expensive.
In this paper, a simple and low-cost smart active DAST system, using fewer components and inexpensive as well, is proposed. This system is mainly based on following a light source by orienting the PV panel, through two servo motors, optimally in the direction of sun's light rays. The motors are controlled based on the solar incidence measured by four LDRs, which were placed at the four PV panel's corners. In order to minimize the system cost, the developed smart DAST controller is implemented on a low-cost ATMega328 microcontroller which is integrated into a low-cost board, Arduino Uno. To achieve the objectives of this paper, design a simple, low-cost and efficient solar tracker, we have set up a set of actions. Firstly, after the selection of system components, an overview of the most used positions for LDRs in DASTs is presented to compare them with the used one in this work. Next, a simple methodology to improve the LDR sensors sensitivity in the solar tracking system is also done in this work. Subsequently, design a simple algorithm without convoluted calculations so that a low-cost microcontroller can implement it. Finally, the effectiveness of the proposed smart DAST is confirmed by comparing the power productivity between a fixed panel and the DAST based on practical results. The power data acquisition from PV panels is done in real-time using an Excel and Arduino based monitoring system to ensure the measurements accuracy.
This paper presents a simplified small-scale DAST prototype that can be easily implemented without having extensive knowledge of electronic engineering. It can be exploited by anyone interested in the solar tracking technology to test its own tracking algorithms before implementing a large DAST.
The rest of this paper is organized as follows: firstly, the DAST system description is presented in detail in Section 2. Next, the power data acquisition system is done in Section 3. Then, the experiments and testing are presented in Section 4. Finally, conclusions and future works are presented in Section 5.

| 3D prototype design
The 3D design aims to represent all the prototype elements of the active DAST and to visualize its final form before the fabrication. The 3D design of the smart DAST, as shown in Figure 1, was modeled using mechanical design software CATIA. The main components of the prototype are: The smart DAST is designed to have two degrees of freedom, from east to west by the horizontal servo motor and from south to north by the vertical one. The solar tracker chassis has been manufactured using wooden plates, but it can be made from aluminum or other materials. A bearing is aligned in parallel with the vertical servo motor on the center of the end of the PV panel to ensure better flexibility when the solar tracker is rotated on the horizontal axis. The LDR sensors are placed in the four corners of the PV panel and put in dark tubes with a hole on the top to detect the illumination of the sun. These dark tubes are considered such as radiation limiters because the LDR is very sensitive and we may need to limit the light received from the sun. Thus, the exposed shadow of the cylinder tubes on the four LDRs is used to provide the feedback signals from LDR sensors. The actual fabrication of the proposed smart DAST is presented in Figure 2.

| System configuration
The objective of the smart DAST system is to obtain the maximum perpendicularity between the incident rays of the sun and the PV panel surface, so that to obtain maximum power from the PV panel. The descriptive diagram of blocks of smart DAST is shown in Figure 3. The function of the tracking system is based on the program embedded in the ATMega328 microcontroller of the Arduino UNO board. The ATMega328 microcontroller, the brain of the entire system, converts the analog values from LDR sensors into digitals and provides two output channels to control the rotation of PV panel through two servo motors. Then, the rotation movements occur in two axes: vertical and horizontal, from east to west (azimuth tracking) during the day and from south to north (elevation tracking) during the seasons. Figure 4 shows the circuit diagram of the proposed smart DAST system in ISIS Proteus. This Figure illustrates the connections between the Arduino UNO board and sensors/ actuators of the system. As an embedded system, the controller of the smart DAST is divided into two parts: hardware and software.

| Hardware system
As shown in Figure 3, the smart DAST consists of the PV panel, four LDR sensors acting as irradiance sensors, two servo motors, and the Arduino UNO board in which the ATMega328 microcontroller is integrated.

PV panel
PV panels are equipments that converts the solar energy into DC electrical energy. 51 The PV panel used in this work is capable of generating 1.6 W of power, it weights 47 g with a dimension of 150 mm × 86 mm, and it generates a voltage of 5.5 V.

Arduino UNO
As a goal to reduce the cost of the solar tracker system, the low-cost board based on the low-cost ATMega328 microcontroller is used to realize the smart controller of the proposed DAST. The Arduino UNO board shown in Figure 5 can be powered via a USB connection or with an external DC power supply. It has 14 digital input/output pins (of which 6 can be used as PWM outputs ) and 6 analog inputs. As shown in Figure 4, the four LDR sensors are connected to Arduino analog pins A 0 to A 3 that act as inputs of the system and the two servo motors are connected to two PWM pins that act as outputs of the system.

Servo motors
DC motors, stepper motors or servo motors are highly used in the solar tracking systems to motorize the PV panel. In this work, two 180° servo motors are used and presents their characteristics. A servo motor (SG90) for the solar tracker's vertical movement and a micro servo motor (MG996R) for the horizontal movement. A servo motor is able to wait for predetermined positions in the instructions given to it and then to maintain them, so it works in a closed loop. It consumes power when it turns to the desired position, otherwise, no energy is consumed. Whereas, stepper motors continue to consume energy to maintain the commanded position. 52 The advantage of the servo motor is that we can control its stop, run, the direction of rotation, and speed using a single low current wire connected directly to a PWM output of the microcontroller, there is no need of interface circuit. The used servo motors are controlled by the ATMega328 microcontroller via three-wire electrical cable as shown in Figure 4, two wires for supply, and a PWM input for transmitting position commands.

LDR sensors
As the specialty of the proposed smart DAST is active, that is, the movement of the solar tracker is determined instantaneously according to the position of the sun; four photo resistors LDRs (Cds GL5528) are used to sense the position of the sun, which are very low-cost. LDR or photoresistor is a resistor whose resistance decreases with increasing light intensity incident onto its surface. The LDR sensor circuitry is designed as a voltage divider circuit as shown in Figure 6 in order to provide an output voltage. So, as the LDR resistor varies with light, the analog voltage at series resistance (Vout) also varies. Then the ADC of the microcontroller converts the analog to digital value between 0 and 1023, because it is coded in 10 bits, and according to this value, it is possible to know the level of light.

LDR sensors position in DAST system
Different positions of LDRs have been employed to track the sun's movement in two directions. Figure 7 presents the most used configurations. For instance, as shown in Figure 7A, a solar sensing device, which comprises a four-quadrant LDR sensor and a cylindrical shade, has been used in Ref. 46 This device is designed based on the use of the shadow. If the PV panel is not perpendicular to the sunlight, the shadow of the cylinder will cover one or two LDRs resulting in a differential of light intensity. The best orientation of the PV panel is achieved when intensity on the east LDR is equal to that on the west LDR, and the intensity on the north LDR is equal to that on the south LDR. In Ref 53 a solar sensing device, which includes a four-quadrant LDR sensor separated by two barriers as shown in Figure 7B, has been used. Here, the best orientation of the PV panel is achieved when intensity on LDR1 and LDR2 is equal to that on LDR3 and LDR4, and the intensity on LDR1 and LDR3 is equal to that on LDR2 and LDR4.
Both of sensing devices presented in Figure 7A,B can be placed at the top, left, or right of the PV panel. When using either of these devices, the length of the cylinder (or barrier) and the distance between LDR sensors and the cylinder (or barrier) should be well-dimensioned. In Figure 7C, the LDRs are positioned on the center of each sides. The top and bottom LDR are used to track the sun's movement south/north direction and the right and left LDRs are used to track the sun's movement in east/ west direction. 44 Figure 8 shows the configuration used for LDRs in this work. This configuration is similar to that presented in Figure 7B but without the use of barriers so that LDRs are placed in the four corners of the PV panel. LDRs are positioned as follow: one in the top, one at the bottom, one in the left and one in the right. The advantage of this configuration compared to others is in the four positions of the sensors, as they cover the entire area of the PV panel. Hence, we will ensure that the PV panel is perpendicular to the sunbeam when the sunlight intensity on the top LDRs is equal to that on the bottom LDRs and the intensity on the right LDRs is equal to that on the left LDRs.
LDR sensor sensitivity Since the LDR sensor circuitry is a voltage divider, the analog reading from the series resistance will increase as the light intensity increases and vice versa. However, if the total resistance of the LDR and the series resistance are too small or too large, the electrical potential variation will be small and therefore not usable if we want to detect small variations so that our solar tracker follows any possible variation of the irradiated light by the sun. Therefore, it is necessary to dimension the series resistance to improve the sensitivity of the measurement output so that it can provide a voltage that covers the sunny, clear and cloudy conditions. From the measurements shown in Table 2 based on an experimental test as shown in Figure 9, it can be seen that the LDR2 can reach a value of 114 Ω in a clear day, this means that this value will surely decrease more on a very sunny day. Thus, the LDR at sunset is worth about 6 KΩ and more than 20 MΩ in the dark. For this, different resistance values from 50 Ω to 100 KΩ were examined to choose the optimum series resistance as shown in Table 3.
For values greater than 500 Ω, the LDR sensor will be quickly saturated in a sunny day, it means it will hit quickly the 5 V ceiling, and hence the microcontroller cannot be able to differentiate between a bright and very bright. Therefore, we can lose a large amount of energy because of a limitation of the solar tracker operation. A series resistance of 330 Ω is very useful for detecting better luminosity differences because Vout is 3.837 V at noon in a clear day, so it remains 1.163 V for arrival at 5 V and this corresponds to 238 different values which can be measured by the microcontroller. In addition, this resistance is suitable to differentiate between brightness and darkness with high precision, because DVout is 3.783 V and it remains 1.217 V for arrival at 5 V and this corresponds to 249 different values which can be measured by the microcontroller.

| Software implementation
The software implementation consists of coding the algorithm of tracking system in the Arduino IDE environment and uploaded it in the microcontroller. The flowchart describing the microcontroller operation is presented in Figure 10.
The algorithm is based on the analog values returned by the left LDR and the right LDR, as well as the top LDR and bottom LDR. For azimuth tracking, the average values from two right LDRs and two left LDRs are compared and if the left set of LDRs receive more light, the horizontal servo motor will move in that direction (Rotates Clockwise (CW)). The servo motor will continue to rotate until the F I G U R E 8 LDRs  difference result is between a positive threshold value (10) and a negative threshold value (-10), which means that the solar tracker is approximately perpendicular to the light source. If the right set of LDRs receive more light, the horizontal servo motor moves in that direction (Rotates Counterclockwise (CCW)) and will continue to rotate until the difference result is between 10 and -10. The same way is used for elevation tracking. We also determined the average radiation between the four LDRs, the idea being that at the end of the day, when the solar projection is null, the solar tracker returns to its initial position, waiting for a new day. At noon, when the sunlight is at maximum, the servo motors must be stopped. However, according to Table 2, we found that the resistance values of the LDRs are not the same, even if they have the same reference (Cds GL5528) and have been placed at the same right at noon in front of the sun. This means that the readings of the LDR voltages are not equal. Therefore, the difference result between the average value of the left set of LDRs and the average value of the right set of LDRs will be unstable around zero, in which case the servo motor will constantly turn. This explains the use of the threshold value as a hysteresis band in the algorithm, which aims to reduce the power consummation and assuring smoothly moves of the servo motor. That is mean if the difference result is in the hysteresis band, the horizontal servo motor always stops. And if the difference result is outside the hysteresis band ([-10, 10]), the servo motor will start to rotate CCW or CW. In Figure 11, a timing diagram describing the principle of the horizontal servo motor operation is shown. The same principle is used for vertical servo motor operation. The use of the average values and the threshold in the algorithm make the solar tracker robust, work with high precision and does not consume too much energy. The used algorithm is based on simple instructions that do not require extensive calculations. Hence, low-cost microcontrollers can easily implement this algorithm in order to reduce the system cost.

| Power data acquisition system
The used PV panel generates a voltage of 5.5 V. Therefore, a voltage divider circuit, which also acts as a load, is realized to adapt this voltage to the Arduino analog input which is limited to 5 V. Figure 12 shows the schematic of experimental test for output power acquisition from the PV panel. The algorithm used to calculate the output power is presented in Figure 13. The microcontroller calculates the output power and transmits it to the computer. Then, the data are displayed in Excel format, which can then be processed and plotted in real-time in graphical form. The PLX-DAQ Excel macro allows communication between the microcontroller and an Excel spreadsheet using UART bus. 54

AND DISCUSSION
The experimental results of the fixed PV panel and the PV panel with smart DAST were compared to determine the eligibility of the proposed smart active DAST. An artificial lamp of 60 W acting as a solar simulation has been placed successively in twelve different points while respecting a circular axis for the purpose to test the solar tracker's horizontal operation. The placement of the lamp is 30 seconds in each point. The measurements data of output power are recorded in real-time in Excel. The same experiment was repeated three times with varying the height of the lamp after each experiment to test the solar tracker's vertical operation. The experimental results of the fixed PV panel and the proposed smart DAST are presented in Figures 14 and 15 where P 1 is the output power of the fixed PV panel, and P 2 is the output power of the PV panel with smart DAST. From the experimental results, it can be seen that the PV panel with smart DAST generates a maximum power of 1.54 W between "3h34min47s" and "3h37min18s" and the fixed PV panel generated a maximum power of 1.42 W between "3h34 min51" and "3h36h49s". Generally, as shown in Figure 14, the fixed PV panel produced 230.65 W in totality, The list and price of the main components used for the proposed smart active DAST system are given in Table 4.
In Table 5, the proposed DAST system is compared with some solar tracking systems published recently, based on tracking technology, efficiency, and especially the controller price. If we compare our proposal with low-cost microcontrollers implementation [ 39,55 ], the proposed DAST presents a high efficiency by using fewer components. Whereas, Ammar et al 49 who have designed a DAST system based on NF Controller and obtained an efficiency of 50.6%, the implementation of such a system is not easy due to the use of complex algorithms that requiring an expensive controller (as FPGA), making the system more expensive. Moreover, we used servo motors for the motorization of the PV panel instead of stepper motors or DC motors as in 50,55,56 that need an interface circuit to control the speed and the position, which increases the materials and the consumption of the energy. In contrast, the direction of rotation and speed of servo motor is controlled using a single wire connected directly to an output of the microcontroller. It is clear that the proposed tracking technology is simpler compared to the others because it depends on a simple algorithm and a low-cost controller (2 $), it makes the proposed DAST system simpler and less expensive. In addition, the efficiency obtained with DAST system is rather comparable to existing systems. The main condition for using a DAST system is that the demanded energy should be lower than the increase of energy generated by a PV panel equipped with DAST, when compared with a fixed panel. An issue with active DASTs is that part of the power gained from tracking the sun is used in actuating the tracking mechanism. In this work, tiny servo motors controlled directly by the microcontroller are used to moving the PV panel with very low energy consumption. On the other part, in a large solar PV system, the required structure will be much heavier and will require powerful motors and the power requirements will be higher. But, there are powerful servo motors existing in the market which are known for its low demand for energy and the easy control, such as the servos HITEC brushless, 57,58 compared to DC motors or stepper motors. With using this type of motors despite their high cost, the energy requirements for DAST system will be much lower and then the net gain in efficiency will be interesting.
To make a large DAST, we can use the same approaches and components (controller, LDR sensors) that we used in this work except for the servo motors where stronger ones should be used.