Intelligent Arduino Based Automatic Solar Tracking System Using Light Dependent Resistors (LDRs) and Servo Motor

: With the advancement of technology things are becoming Simpler and easier in every aspect of life. Automation is the use of control systems and information technologies to reduce the need for human work. Sun is an abundant source of energy and this solar energy can be harnessed successfully using solar photovoltaic cells and photovoltaic effect to convert solar energy into electrical energy. But the conversion efficiency of a normal Photovoltaic (PV) cell is low. One of the main reason for this is that the output of Photovoltaic (PV) cell is dependent directly on the light intensity and with the position of the sun in the sky changing continuously from time to time; the absorption efficiency of an immobile solar panel would be significantly less at certain time of the day and year; for the solar photovoltaic cells are maximum productive when they are perpendicular to the sun and less productive otherwise. So to maximize the energy generation and improve the efficiency; intelligent solar trackers come into play. This paper presents the design and construction of an intelligent Arduino Based solar tracking system using Light Dependent Resistors (LDRs) and Servo-motor for tracking the movement of the sun so as to get maximum power from the solar panels as they follow the sun. It uses Light Dependent Resistors (LDRs) to sense the position of the sun which is communicated to a Arduino Uno microcontroller which then commands a set of two servo-motors to re-orient the panel in order to stay perpendicular to the sun rays. The design was constructed successfully and tested. Uno microcontroller. resistors


Introduction
These days electricity generation is typically provided by fossil fuels such as coal, natural gas, and oil. Some of today's most serious environmental problems can be linked to world electricity production based primarily on the use of non-renewable resources. Currently one third of the world population does not have access to electricity and they are not connected to the national grid, one solution to this problem is renewable energy in the form of photovoltaic (PV) systems [1]. Despite high capital cost, PV systems are still a viable solution for rural areas [1,14]. Studies suggest that the rate at which fossil fuels are consumed today, there are high chances that they will deplete by the end of 21 st century [14]. For a long time, it has been thought that atomic energy would be a solution for the growing energy problem, but in recent times solar energy has proved to be an efficient, more secure and safe way of providing energy [14].
Concepts related to the solar energy have constantly been under heavy research and development. The basic objective is to optimize the energy produced from photovoltaic cells, by making the overall systems more efficient and cost effective. Solar tracking system is the solution to this issue as it plays a major role in overall solar energy optimization [3,21].
In order to ensure maximum power output from PV cells, the sunlight's angle of incidence needs to be constantly perpendicular to the solar panel [27]. This requires constant tracking of the sun's apparent daytime motion, and hence develops an automated sun tracking system which carries the solar panel and positions it in such a way that direct sunlight is always focused on the PV cells [6].
This project presents a moving a solar panel along with the direction of sunlight; it uses a Servo-motor to control the position of the solar panel, which obtains its data from an Arduino Uno microcontroller. Two light dependent resistors (LDR) are used for each degree of freedom. LDRs are basically photocells that are sensitive to light.
Software has been developed which would allow the Arduino to detect and obtain its data from the two LDRs and then compare their resistance [8,11]. The two LDRs will be positioned in such a way, so that if one of the two comes under a shadow, the Microcontroller Unit (MCU) will detect the difference in resistance and thus actuate the motor to move the solar panel at a position where the light upon both LDRs is equal. Two separate but identical circuits will be utilized for both axes.
There are several factors that affect the efficiency of the collection process of the solar system. Major influences on overall efficiency include solar cell efficiency, intensity of source radiation and storage techniques [15]. The materials used in solar cell manufacturing limit the efficiency of solar cell. This makes it particularly difficult to make considerable improvements in the performance of the cell, and hence restricts the efficiency of the overall collection process. Therefore, the most attainable method of improving the performance of solar power collection is to increase the mean intensity of radiation received from the source [26].

Arduino UNO Board
Arduino UNO is a board based on AT mega328 microcontroller. It consists of 14 digital input/output pins, six analogue inputs, a USB link for programming the onboard microcontroller, power jack, an ICSP header & a reset button [8,11]. The software for Arduino works with many operating systems, such as Windows and Linux operating system. Therefore, the Arduino is better than many types of Microcontroller. The Arduino software language is based on C programming language. Arduino is an open source electronics prototyping platform based on flexible hardware and software [8]. The Arduino software is supported by Windows, Macintosh OSX and Linux operating systems despite the fact that most microcontrollers are limited to Windows operating system. The software language is based on AVR C programming language and can be expanded through C++ libraries. There are various types of Arduino microcontroller board available in the market including the Arduino kits and Arduino shields [8]. Uno" means "One" in Italian and is named to mark the upcoming release of

Light Dependent Resistor
An LDR or light dependent resistor is also known as photo resistor, photocell, photoconductor. It is a one type of resistor whose resistance varies depending on the amount of light falling on its surface. When the light falls on the resistor, then the resistance changes. These resistors are often used in many circuits where it is required to sense the presence of light. These resistors have a variety of functions and resistance. For instance, when the LDR is in darkness, then it can be used to turn ON a light or to turn OFF a light when it is in the light [12]. A typical light dependent resistor has a resistance in the darkness of 1MOhm, and in the brightness a resistance of a couple of KOhm. This resistor works on the principle of photo conductivity. It is nothing but, when the light falls on its surface, then the material conductivity reduces and also the electrons in the valence band of the device are excited to the conduction band. These photons in the incident light must have energy greater than the band gap of the semiconductor material. This makes the electrons to jump from the valence band to conduction [10].

Servo Motor
A servo motor is a rotary actuator or a motor that allows for a precise control in terms of the angular position, acceleration, and velocity. Basically, it has certain capabilities that a regular motor does not have. Consequently, it makes use of a regular motor and pairs it with a sensor for position feedback [12]. The servo motor is most commonly used for high technology devices in the industrial applications like automation technology. It is a self contained electrical device, that rotates parts of machine with high efficiency and great precision. Moreover, the output shaft of this motor can be moved to a particular angle. Servo motors are mainly used in home electronics, toys, cars, airplanes and many more devices.
The basic operating principle of DC motor is the same as other electromagnetic motors. The design, construction, and the modes of operation are different. The rotors of this kind of motor are designed with long rotor length and smaller diameters. Their size is larger than that of conventional motors of same power ratings [10].

Relay
Relay is an electromagnetic device which is used to isolate two circuits electrically and connect them magnetically. They are very useful devices and allow one circuit to switch another one while they are completely separate. They are often used to interface an electronic circuit (working at a low voltage) to an electrical circuit which works at very high voltage. For example, a relay can make a 5V DC battery circuit to switch a 230V AC mains circuit. Thus a small sensor circuit can drive, say, a fan or an electric bulb.
A relay switch can be divided into two parts: input and output. The input section has a coil which generates magnetic field when a small voltage from an electronic circuit is applied to it. This voltage is called the operating voltage. Commonly used relays are available in different configuration of operating voltages like 6V, 9V, 12V, 24V etc. The output section consists of contactors which connect or disconnect mechanically. In a basic relay there are three contactors: normally open (NO), normally closed (NC) and common (COM). At no input state, the COM is connected to NC. When the operating voltage is applied the relay coil gets energized and the COM changes contact to NO. Different relay configurations are available like SPST, SPDT, DPDT etc., which have different number of changeover contacts. By using proper combination of contactors, the electrical circuit can be switched ON and OFF. Get inner details about structure of a relay switch.  [12].
COM/POLE: Common, NC and NO always connect to this; it is moving the part of the switch. NC: COM is connected to NC when the relay is not magnetized. NO: COM is connected to NO when the relay coil is magnetized and vice versa.

Method
In the design of an intelligent Arduino Based Automatic solar tracking system using Light Dependent Resistors (LDRs) and Servo Motor, a modular approach was used to break the project into separate tasks. Considering the project as a whole, it has a fixed vertical axis and a motor controlled horizontal axis. The signal from the light sensor is used to determine the direction of movement to align the array with the sun. a motor circuit is used to perform this movement based on the signal received from the controller.
The simulation circuit was designed using proteus professional software version 8.0. The components were picked from the library and connected appropriately as represented in figure 5 Below. The switches represent the sensor with outputs connected to pins 3 and 4 of the microcontroller. The outputs from pins 5 and 6 are connected to motor driver which controls the direction of motor movements. The compiled program was transferred to the microcontroller after the design completion by right clicking and selecting the program file. Closing and opening the switches cause the motor to change direction. The operation of an intelligent Arduino Based Automatic solar tracking system is completely microcontroller based. This makes the operation simple because of the fact that microcontroller understands only two digits, 1 and 0. The signals from the two sensor pairs (s1 and s2) are always compared to detect any change in the value. Once the microcontroller detects 0 and 1 at its input ports (pin7 and pin8), it sends signal to the motor driver through pin5 and pin6 to move the motor forward and equally send signal to stop the motor when the inputs are 1 and 1. Table 1. illustrates the operation of the microcontroller with respect to the input signal from the sensors. The system is a single-axis solar tracker in order words; it is programmed to operate in unidirectional mode. Hence, it starts operating only when sensor 1 is 0 and sensor 2 is 1.
The testing was done on each and every components/sections that make up the circuit to ensure proper and satisfactory operation of an Intelligent Arduino Based Automatic Solar Tracking System using Light Dependent Resistor (LDRs) and Servo Motor. The debugging was done using the Arduino IDE and the Proteus; Each and every section of the code was debugged properly to ensure proper functionality, thus a step debugging was done. This is a facility in the Proteus that enables you step into the program and at the same time views the registers and flag setting. And also, all the hardware units of the system were tested and it was ensured that they were in a good working condition. Then, each and every unit were interfaced and implemented individually with the microcontroller and drove with the software according to the necessity of the application. The Arduino integrated development environment (IDE) is a cross-platform written in Java, whereas the programs are written in C or C++, which is shown in figure 6. The platform comes with a software library along with the code editor with features such as syntax highlighting, brace matching and automatic indentation. The whole program is written in the platform in the C language code which can be compiled using Arduino sketch.

Result and Discussion
The figure below shows when the system was been tested when a simple torch was used to show different light intensities on the two LDRs. The panel was initially put to face east. When the light source was concentrated on the LDR at the top, the system panel moves toward west until when the light source was removed so that both LDRs receives same light intensity. When the panel reaches its maximum limit toward the west, and both LDRs receives no light, the panel reverses itself to east to wait for the sun to rise against tomorrow. The figure below shows when reaches its maximum limit in the direction of west. Equally the system was tested in the other direction i.e. from west to east. When the system reached maximum limit in east direction it stopped until the LDR in the west direction receives greater light.

Data collection
The value from PV panel in fixed mode and in tracking mode were measured and obtained at different hours of the day. The readings are as shown below.

Conclusion
With advancement of technology things are becoming Simpler and easier in every aspect of life. Automation is the use of control systems and information technologies to reduce the need for human work. This paper presents modern prototype and effective photovoltaic solar tracker based on platform of Arduino. The following control effective logic can be moved regularly independent for different situations of radiation. The proposed system hardware design, simulated using Proteus program and recorder is employed in this work to register values of voltage and current that produced by PV panel along the day. The practical results collected by installing proposed hardware system in Federal Polytechnic Bali, Nigeria. The comparison of results obtained shows that energy about 26.83% gains by applying the prototype of solar tracking development module over fixed module. These results are presenting the device effectiveness and the ability to use in buildings (plots, garden area, flat roofs, etc.).

Recommendation
It is recommended that the solar panel be mounted in an open environment where the intensity of sun rays will hit the Photovoltaic Cells at all time. The project can be used in street lights and be implemented large in scale to be as source electricity in homes and industries. Also, it is recommended that subsequent research and improvements on the System should consider the motor torque and the load the motor will drive.