Design and implementation of an automatically aligned solar tracking system

Received Mar 22, 2019 Revised Apr 20, 2019 Accepted Jun 19, 2019 This paper presents the design and implementation of a closed-loop solar tracker system. The demand for clean energy sources has increased along with the rising demand for electrical energy and the increasing amount of environment pollution triggered by fuel consumption. Among these sources, solar energy is considered the most feasible given its wide availability and easy operation in different environments. The main purpose of this study is to maximize the generated photovoltaic power and reduce CO2 emissions by designing an efficient and low-cost solar tracking system. An aligned closedloop solar tracker is designed and constructed to achieve the best accuracy. The proposed system shows more freedom in its movement to overcome the problems associated with the tilt of the frame-holder. A PIC microcontroller based on the Flowcode programming language is used, the position feedback is detected by using a photo-sensor, and the H-Bridge driver is used to control two DC motors. According to the experimental results, the proposed system shows significant improvements in efficiency compared with stationary solar tracking systems.


INTRODUCTION
Among the most pressing issues being faced in the world today are the rising consumption of energy and the increasing degree of environmental pollution, both of which result from the increasing demand for electrical energy and fuel. One potential solution to these problems is to find renewable sources of energy, including solar energy, which is being widely used across the world today [1].
Given its increasing application, generating solar energy requires improved materials and methods [2]. Several factors affect the efficiency of the solar energy collection process, including solar photovoltaic (PV) efficiency, source radiation intensity, and storage techniques. The PV output power can be improved if the radiation is properly received from its source. Different methods can be used to achieve such goal, the most common of which include large-scale systems, sun tracking systems [3][4][5][6], maximum power point tracking systems (MPPT) [7], or a system that combines all these technologies. The inconsistency of solar radiation falling onto the PV panel can be ascribed to the daily movement of the sun from east to west. Therefore, a tracking system that allows the PV panel to automatically face the sun during daytime is designed in this work to generate a larger amount of solar power. The proposed automated system has been implemented by using two motors. The solar panel is mounted on a frame that is moved by these motors to keep this panel facing the direction of the sun as it moves across the sky. The main principle of this PV system is to convert the collected solar radiation into electrical energy. Given that the amount of radiation varies along with the daily movement and position of the sun at different seasons, the solar tracking system orients the PV solar panels toward the sun to maximize the amount of solar radiation directed at these panels.
Many types of solar trackers with varying costs, development stages, and performance are being used today. The accuracy requirements of these trackers greatly depend on their application. For instance, concentrators require a high degree of accuracy especially in PV applications to ensure that the concentrated sunlight is precisely directed toward the powered device that is located at the focal point (or near) of the reflector. Given that concentrators typically do not work without tracking, using at least a single-axis tracking is mandatory.
A solar electric panel comprises many PV cells that are wired together in a series to achieve the desired voltage as shown in Figure 1. The thin wires in front of the PV panel pick up the free electrons.

Figure 1. Multi-crystalline PV panel
A PV cell generates electric energy from solar energy. The absorbed light is made of photons with frequency-dependent energies. The energy of these photons excites the electrons in a p-n semiconductor material to higher energy levels and to transform them into free-electrons. This behavior is known as the photoelectric effect, in which an electric current is produced when the p-n junction is exposed to light as shown in Figure 2. The intensity of the generated current reaches its maximum at midday when the solar radiation level is at its peak. However, given that only a minimum level of solar radiation is observed at both extremes of a day, the produced current is not always constant and greatly depends on the radiation level. As the intensity of the sunlight falling on the PV cell increases, a higher electrical current is produced [8].

SOLAR TRACKER FUNDAMENTALS
A solar tracker is a device that aligns a single PV panel or an array of panels with the sun. The implementation of solar trackers can dramatically improve the power output of a system by keeping the sun in focus throughout the day. A well-designed tracker needs less PV panels due to its increased efficiency, thereby reducing the initial implementation costs. Solar drive trackers can be divided into three types depending on the type of drive and sensing or positioning system: 1. Passive trackers use solar radiation to heat gases that move the tracker across the sky [9]. 2. Active trackers use electric or hydraulic drives and some types of gearings or actuators to move the tracker [10]. 3. Open loop trackers determine the position of the sun by using computer-controlled algorithms or simple timing systems [11]. Many types of solar trackers can also be grouped into single-and double-axes trackers. On the one hand, single-axis solar trackers follow the sun automatically from east to west by using horizontal or vertical axles [12]. A horizontal axle is used in areas with short periods of daytime and high temperatures at noon, such as in tropical regions, while a vertical axle is used in areas with long periods of daytime (especially during summer) but with not too high temperatures, such as in high latitude regions. Meanwhile, Double-axis solar trackers, also known as dual-axis trackers, follow the sun from east to west and from north to south by using horizontal and vertical axles [13][14][15]. This tracker produces an output power of 40% greater than that produced by single-axis solar trackers [5].

MECHANICAL SYSTEM
A frame-holder for the tracking system with a special alignment was designed to position the array and motors of the PV as shown in Figure 3, thereby allowing to increase accuracy by increasing sun radiation that reach normally to the PV and providing the system with some freedom in its movement to overcome the problems associated with the tilt of the frame-holder. This mechanical system comprises two DC motors, a warm gear, four photo-sensors, and two limit switches.
The first motor controls the azimuth of the PV's array in one plane, while the second motor is the DC linear actuator motor as shown in Figure 4. This motor was selected because of its simple control, high reliability, and its gear box, which converts rotational motion into linear motion by using an arm that lifts the frame up and down as appropriate to change the location of the sun from north to south throughout the year. Linear actuators can have a static loading capacity, which means that when the motor stops, these actuators are locked in place and can support either pulling or pushing load. The braking force of the linear actuator varies along with the angular pitch of the screw threads and the specific design of the threads.  The motors need to rotate less than 5° in order for the system to face the sun and receive the maximum amount of sunlight. To achieve this goal, a worm gear was used to ensure a proper movement and location for the frame as shown in Figure 5.
The final design of the gearing system is shown in Figure 6. A small cog was attached to the shaft of the DC motor, which in turn was linked as an arc to a larger cog that is attached to the sensor plane of movement. This gearing system effectively reduced the speed of frame, thereby accurately positioning the PV's array. Given that the system is tracking the sun, an effective sensor design was developed while considering the position and type of sensors. The sensor design of the tilted mount can effectively locate the position of the sun. This design incorporates a triangle structure with a photo-sensor mounted on each side as shown in Figure 7. Photo-sensors have a variable resistance that changes along with the intensity of light that falls upon them, thereby allowing these equipment to be used in light-sensing circuits. The photosensors are positioned orthogonally to the opposing sensor to ensure that they will have the same voltage readings when the triangle points directly at the sun. The sensors are set at 45° as shown in Figure 7, where θ is the angle of incidence and β is the tilted angle. When the triangle is not pointing directly at the sun, the voltage increases on the side (s) that is the most exposed to the sun. This approach allows us to compare these opposing sets of sensors and control the movement direction of the solar tracker. Light sensors are among the most common types of sensors. The simplest type of photo-sensor may be a cadmium sulfide (CdS)-type photoresistor. CdS photo-sensors are passive components which resistance is inversely proportional to the amount of light intensity directed toward them.
To further guarantee the safety of the system, two limit switches were used as shown in Figure 8. When one of these switches is actuated, the motor stops working and moves back to the position the switch is not actuated again. This mean the round is finished, and the frame holder should moves in different direction.

CONTROLLER AND ELECTRONIC SYSTEM
The proposed tracking system was implemented by using a PIC 16F877A microcontroller. The main functions of this controller are to convert the analog voltages from the photo-sensors into digital values that can be compared and to control the DC motors through the H-Bridge [16]. The code for the PIC microcontroller system was developed by using the Flowcode language given its high flexibility and small code size, which can shorten the development and debugging times as well as improve the efficiency.
The H-Bridge used for the motor driver is L298 [17], an integrated circuit that has a dual full-bridge driver designed to drive inductive loads, such as relays, solenoids, and DC motors. By using this solar tracker, a closed-loop solar tracking system that comprises electrical and mechanical systems was developed. The overall block diagram of the proposed system is shown in Figure 9. As can be seen in this block diagram, the power supply provides voltages of 12V and 5V, the system has four photo-sensors that provide feedback to the microcontroller, the microcontroller processes the sensor input and provides output to the H-Bridges, the H-bridges controls the rotation directions of the DC motors or linear actuators whether forward or reverse, and the motor moves the gear as an arc. This motion along with the movement of linear actuators adjusts the position of the frame-holder of a PV panel. The PV panel faces the sun and collects the maximum amount of sunrays to ensure a highly efficient power collection.
A prototype of the closed-loop solar tracking system was then designed and implemented for testing and experimental validation as shown in Figure 10. The system was tested on a real site throughout a single day to check its operation.

SOLAR TRACKING IMPLEMENTATION AND EXPERIMENTS
To improve the efficiency of the solar tracking system [18,19], a feedback for the PV panel's position was designed. Four LDR photo-sensors were chosen as feedback elements, and their output shows the changes in the incidence angles of the sunrays. Two pairs of LDR sensors were used in different tilt angles to identify the way that gives the most efficient response. The first pair was mounted to face the sun perpendicularly, while the second pair was mounted as shown in Figure 11. The tilt angle can be adjusted to let the maximum amount of sunray to reach these LDR sensors. The first pair reported a worse accuracy than the second pair. Figure 11. Tilt-angle-mounted LDR photo-sensors The best accuracy and response to a change in angle can be obtained by using the 45° tilt angle and by fixing the LDR sensors on the panel surface. Each sensor connects with series resistance equal 122Ω, and a voltmeter was connected in parallel to each resistance as shown in Figure 12. The PV panel surface was then moved by hand toward the sun, and the voltage was observed from each voltmeter until an equal reading was obtained, that is, when each LDR photo-sensor almost has the same sun light intensity reading. Figure 12. Photo-sensor circuit A photo-sensor was used to orient the PV panel toward the position of the sun. If this photo-sensor is shaded, then the comparator in the microcontroller shows some differences in the readings of the two photo-sensors. In this case, the controller turns the motor toward the direction of the shaded photo-sensor until it faces the sun again. Doing so may keep the PV panel facing the sun as it moves across the sky. The output voltage of this circuit increases along with light intensity and a decreasing photo-sensor resistance. Table 1 presents some readings of photo-sensor resistance and output voltage when the light intensity changes.  The differences between the two photo-sensors ranged around 2V to 3V when the sensors were not vertically arranged toward the sun, while these differences are only around 0.2V when these sensors were placed vertical toward the sun. The DC motors were connected through the drive circuit to the output port of the microcontroller. These motors can rotate in forward or reverse directions by using the L298 dual H-bridge driver circuit as shown in Figure 13. When Q1 and Q4 are on while Q2 and Q3 are off, the current flows through the motor to make it rotate forward as shown in Figure 13. If Q1 and Q4 are turned off while Q2 and Q3 are turned on, then the motor rotates in reverse. After the individual circuit boards were built and tested, a Flowcode software for the microcontroller was developed by using Proteus 7 Professional to draw the schematic diagram of the circuitry. Figure 15 shows the system flowchart and outlines the steps of the program during the operation of the tracking system. The gains of the amplifiers were adjusted in order for the sensors to produce almost 5V and 1.3V when the photo-sensor directly faces the sun and when they receive no light (thereby providing high and low references to pin VRH of the microcontroller), respectively.
Comparisons in microcontroller could be made between opposite sensors reading, and the movement of the motors can be controlled. For example, if sensor LDR1 has a greater voltage than LDR4, then the DC motor rotates clockwise until both sensors have the same readings. However, if sensor LDR4 has a smaller voltage than LDR1, then the DC motor rotates counterclockwise. The same technique applies for sensors LDR2 and LDR3 with a linear actuator.
If all sensors read less than 0.5V, then the system returns to its initial (set) position and enters the standby mode, which signifies that the sun has set (night) and that the system returns to the east. The initial position of the PV's array is the position when the panel actuated limit switch A. For protection, if an error occurs by some shade light on one of LDR sensor, then the system will move the PV panel towards the lightest area nearby. As an alternative, when one of the limit switches is actuated, then the motor stops working and moves back to the previous point where the switch is not actuated again.
The proposed solar tracking system was tested simultaneously with a stationary PV, and records for both systems were obtained to check for their differences. The experimental results based on the captured data are presented in Figure 16.

CONCLUSIONS
The main aim of this study is to maximize PV power and reduce CO2 emission by implementing a highly efficient and low-cost solar tracking system. A special-alignment closed-loop solar tracker was designed in this work as an economical, flexible, and efficient frame-holder. A low-cost and flexible PIC 16F microcontroller was used as the control unit for the proposed system, and the sun position was detected by using photo-sensors. The developed sun-tracking system captured the maximum possible amount of solar energy throughout the entire day compared with the stationary system, which only collected maximum solar energy when the sun was facing the PV panel. The experimental results prove that the efficiency of this system is especially high in morning and afternoon hours and that using a stationary panel will be ineffective due to the low radiations received from the sun during these periods. The comparison of the designed solar trackers reveal a 40% improvement in the efficiency of the proposed system compared with stationary panels.