Intelligent Arduino Based Automatic Solar Tracking

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/354662321

Intelligent Arduino Based Automatic Solar Tracking System Using Light


Dependent Resistors (LDRs) and Servo Motor

Article in Optics · December 2020


DOI: 10.11648/j.optics.20200902.11

CITATIONS READS

5 236

2 authors, including:

Rufai Hassan
Ahmadu Bello University
2 PUBLICATIONS 9 CITATIONS

SEE PROFILE

All content following this page was uploaded by Rufai Hassan on 16 October 2023.

The user has requested enhancement of the downloaded file.


Optics
2020; 9(2): 13-18
http://www.sciencepublishinggroup.com/j/optics
doi: 10.11648/j.optics.20200902.11
ISSN: 2328-7780 (Print); ISSN: 2328-7810 (Online)

Intelligent Arduino Based Automatic Solar Tracking System


Using Light Dependent Resistors (LDRs) and Servo Motor
Rufai Hassan*, Bashir Abubakar
Department of Computer Engineering, School of Engineering Technology, Federal Polytechnic, Bali, Nigeria

Email address:
*
Corresponding author

To cite this article:


Rufai Hassan, Bashir Abubakar. Intelligent Arduino Based Automatic Solar Tracking System Using Light Dependent Resistors (LDRs) and
Servo Motor. Optics. Vol. 9, No. 2, 2020, pp. 13-18. doi: 10.11648/j.optics.20200902.11

Received: June 18, 2020; Accepted: July 14, 2020; Published: December 11, 2020

Abstract: 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.

Keywords: Microcontroller Arduino Board, Photovoltaic Panel, Proteus Program,


Sensors Light Dependent Resistors (LDRs), Servo Motor

Concepts related to the solar energy have constantly been


1. Introduction under heavy research and development. The basic objective is
These days electricity generation is typically provided by fossil to optimize the energy produced from photovoltaic cells, by
fuels such as coal, natural gas, and oil. Some of today’s most making the overall systems more efficient and cost effective.
serious environmental problems can be linked to world electricity Solar tracking system is the solution to this issue as it plays a
production based primarily on the use of non-renewable resources. major role in overall solar energy optimization [3, 21].
Currently one third of the world population does not have access In order to ensure maximum power output from PV cells,
to electricity and they are not connected to the national grid, one the sunlight’s angle of incidence needs to be constantly
solution to this problem is renewable energy in the form of perpendicular to the solar panel [27]. This requires constant
photovoltaic (PV) systems [1]. Despite high capital cost, PV tracking of the sun’s apparent daytime motion, and hence
systems are still a viable solution for rural areas [1, 14]. Studies develops an automated sun tracking system which carries the
suggest that the rate at which fossil fuels are consumed today, solar panel and positions it in such a way that direct sunlight
there are high chances that they will deplete by the end of 21st is always focused on the PV cells [6].
century [14]. For a long time, it has been thought that atomic This project presents a moving a solar panel along with the
energy would be a solution for the growing energy problem, but in direction of sunlight; it uses a Servo-motor to control the
recent times solar energy has proved to be an efficient, more position of the solar panel, which obtains its data from an
secure and safe way of providing energy [14]. Arduino Uno microcontroller. Two light dependent resistors
14 Rufai Hassan and Bashir Abubakar: Intelligent Arduino Based Automatic Solar Tracking System Using
Light Dependent Resistors (LDRs) and Servo Motor

(LDR) are used for each degree of freedom. LDRs are 2.1. Light Dependent Resistor
basically photocells that are sensitive to light.
Software has been developed which would allow the Arduino An LDR or light dependent resistor is also known as photo
to detect and obtain its data from the two LDRs and then resistor, photocell, photoconductor. It is a one type of resistor
compare their resistance [8, 11]. The two LDRs will be whose resistance varies depending on the amount of light
positioned in such a way, so that if one of the two comes under a falling on its surface. When the light falls on the resistor, then
shadow, the Microcontroller Unit (MCU) will detect the the resistance changes. These resistors are often used in many
difference in resistance and thus actuate the motor to move the circuits where it is required to sense the presence of light.
solar panel at a position where the light upon both LDRs is equal. These resistors have a variety of functions and resistance. For
Two separate but identical circuits will be utilized for both axes. instance, when the LDR is in darkness, then it can be used to
There are several factors that affect the efficiency of the turn ON a light or to turn OFF a light when it is in the light
collection process of the solar system. Major influences on [12]. A typical light dependent resistor has a resistance in the
overall efficiency include solar cell efficiency, intensity of darkness of 1MOhm, and in the brightness a resistance of a
source radiation and storage techniques [15]. The materials couple of KOhm. This resistor works on the principle of
used in solar cell manufacturing limit the efficiency of solar photo conductivity. It is nothing but, when the light falls on
cell. This makes it particularly difficult to make considerable its surface, then the material conductivity reduces and also
improvements in the performance of the cell, and hence the electrons in the valence band of the device are excited to
restricts the efficiency of the overall collection process. the conduction band. These photons in the incident light must
Therefore, the most attainable method of improving the have energy greater than the band gap of the semiconductor
performance of solar power collection is to increase the mean material. This makes the electrons to jump from the valence
intensity of radiation received from the source [26]. band to conduction [10].

2. 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
Figure 2. Light Dependent Resistor (LDRs) [12].
[8]. The Arduino software is supported by Windows, Macintosh
OSX and Linux operating systems despite the fact that most 2.2. Servo Motor
microcontrollers are limited to Windows operating system. The
software language is based on AVR C programming language A servo motor is a rotary actuator or a motor that allows for
and can be expanded through C++ libraries. There are various a precise control in terms of the angular position, acceleration,
types of Arduino microcontroller board available in the market and velocity. Basically, it has certain capabilities that a regular
including the Arduino kits and Arduino shields [8]. Uno" means motor does not have. Consequently, it makes use of a regular
"One" in Italian and is named to mark the upcoming release of motor and pairs it with a sensor for position feedback [12]. The
Arduino 1.0. The Uno and version 1.0 will be the reference servo motor is most commonly used for high technology
versions of Arduino, moving forward. The Uno is the latest in a devices in the industrial applications like automation
series of USB Arduino boards, and the reference model for the technology. It is a self contained electrical device, that rotates
Arduino platform; for a comparison with previous Versions [11]. parts of machine with high efficiency and great precision.
The typical Arduino board is shown in the figure below. 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].
Figure 1. Arduino Uno Board [8].
Optics 2020; 9(2): 13-18 15

structure of a relay switch.

Figure 3. DC Servo Motor [12]. Figure 4. The Relay [12].

COM/POLE: Common, NC and NO always connect to this; it is moving the


3. Relay part of the switch.
NC: COM is connected to NC when the relay is not magnetized.
Relay is an electromagnetic device which is used to isolate NO: COM is connected to NO when the relay coil is magnetized and vice
two circuits electrically and connect them magnetically. They versa.
are very useful devices and allow one circuit to switch
another one while they are completely separate. They are 4. Method
often used to interface an electronic circuit (working at a low
voltage) to an electrical circuit which works at very high In the design of an intelligent Arduino Based Automatic
voltage. For example, a relay can make a 5V DC battery solar tracking system using Light Dependent Resistors
circuit to switch a 230V AC mains circuit. Thus a small (LDRs) and Servo Motor, a modular approach was used to
sensor circuit can drive, say, a fan or an electric bulb. break the project into separate tasks. Considering the project
A relay switch can be divided into two parts: input and as a whole, it has a fixed vertical axis and a motor controlled
output. The input section has a coil which generates magnetic horizontal axis. The signal from the light sensor is used to
field when a small voltage from an electronic circuit is determine the direction of movement to align the array with
applied to it. This voltage is called the operating voltage. the sun. a motor circuit is used to perform this movement
Commonly used relays are available in different based on the signal received from the controller.
configuration of operating voltages like 6V, 9V, 12V, 24V The simulation circuit was designed using proteus
etc. The output section consists of contactors which connect professional software version 8.0. The components were
or disconnect mechanically. In a basic relay there are three picked from the library and connected appropriately as
contactors: normally open (NO), normally closed (NC) and represented in figure 5 Below. The switches represent the
common (COM). At no input state, the COM is connected to sensor with outputs connected to pins 3 and 4 of the
NC. When the operating voltage is applied the relay coil gets microcontroller. The outputs from pins 5 and 6 are connected
energized and the COM changes contact to NO. Different to motor driver which controls the direction of motor
relay configurations are available like SPST, SPDT, DPDT movements. The compiled program was transferred to the
etc., which have different number of changeover contacts. By microcontroller after the design completion by right clicking
using proper combination of contactors, the electrical circuit and selecting the program file. Closing and opening the
can be switched ON and OFF. Get inner details about switches cause the motor to change direction.

Figure 5. Circuit Diagram.


16 Rufai Hassan and Bashir Abubakar: Intelligent Arduino Based Automatic Solar Tracking System Using
Light Dependent Resistors (LDRs) and Servo Motor

The operation of an intelligent Arduino Based Automatic The system is a single-axis solar tracker in order words; it
solar tracking system is completely microcontroller based. is programmed to operate in unidirectional mode. Hence, it
This makes the operation simple because of the fact that starts operating only when sensor 1 is 0 and sensor 2 is 1.
microcontroller understands only two digits, 1 and 0. The The testing was done on each and every
signals from the two sensor pairs (s1 and s2) are always components/sections that make up the circuit to ensure
compared to detect any change in the value. Once the proper and satisfactory operation of an Intelligent Arduino
microcontroller detects 0 and 1 at its input ports (pin7 and Based Automatic Solar Tracking System using Light
pin8), it sends signal to the motor driver through pin5 and Dependent Resistor (LDRs) and Servo Motor. The debugging
pin6 to move the motor forward and equally send signal to was done using the Arduino IDE and the Proteus; Each and
stop the motor when the inputs are 1 and 1. Table 1. every section of the code was debugged properly to ensure
illustrates the operation of the microcontroller with respect to proper functionality, thus a step debugging was done. This is
the input signal from the sensors. a facility in the Proteus that enables you step into the
program and at the same time views the registers and flag
Table 1. Operation of the microcontroller with respect to the input signal setting. And also, all the hardware units of the system were
from the sensors.
tested and it was ensured that they were in a good working
S1 S2 Direction of motor condition. Then, each and every unit were interfaced and
0 0 Rest (Return of East) implemented individually with the microcontroller and drove
1 0 Anticlockwise
with the software according to the necessity of the
0 1 Clockwise (East>>west)
1 1 Stop application.

Figure 6. Screenshot of code compilation using Arduino Software IDE.

The Arduino integrated development environment (IDE) is


a cross-platform written in Java, whereas the programs are 5. Result and Discussion
written in C or C++, which is shown in figure 6. The
platform comes with a software library along with the code The figure below shows when the system was been tested
editor with features such as syntax highlighting, brace when a simple torch was used to show different light
matching and automatic indentation. The whole program is intensities on the two LDRs. The panel was initially put to
written in the platform in the C language code which can be face east. When the light source was concentrated on the
compiled using Arduino sketch. LDR at the top, the system panel moves toward west until
Optics 2020; 9(2): 13-18 17

when the light source was removed so that both LDRs 6. Conclusion
receives same light intensity. When the panel reaches its
maximum limit toward the west, and both LDRs receives no With advancement of technology things are becoming
light, the panel reverses itself to east to wait for the sun to Simpler and easier in every aspect of life. Automation is the
rise against tomorrow. The figure below shows when reaches use of control systems and information technologies to
its maximum limit in the direction of west. 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
Figure 7. Initial position of the panel.
effectiveness and the ability to use in buildings (plots, garden
Equally the system was tested in the other direction i.e. area, flat roofs, etc.).
from west to east. When the system reached maximum limit
in east direction it stopped until the LDR in the west 7. Recommendation
direction receives greater light.
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.

Acknowledgements
It is my pleasure to acknowledge Federal Polytechnic Bali,
Figure 8. Panel moving in east direction. Taraba State by providing me with extensive training in
research.
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.
References
[1] Chee-Yee Chong, Mori, S. Barker, W. H and Kuo-Chu Chang
Table 2. Solar Output of PV Panel in Fixed Mode. (2000) “Architectures and Algorithms for Track Association
and Fusion”, IEEE Transaction, Volume 15, Issue 1, Jan.
Time of the day Voltage (V) Current (A) Power (W)
2000, Page(s): 5-13.
9.00 13.87 0.88 12.21
10.00 15.29 0.97 14.83 [2] Cemil Sungur (2007) “Sun –Tracking System with PLC
11.00 15.09 0.95 14.34 Control for Photo-Voltaic Panels” International Journal of
12.00 16.17 1.07 16.33 Green Energy, Vol. 4, 2007, Page(s): 635–643.
13.00 18.08 1.17 21.15
14.00 16.25 1.06 17.23 [3] Antonio L. and Steven H. (2005) “Handbook of Photovoltaic
15.00 15.88 0.99 15.72 Science and Engineering”, Wiley.

Table 3. Solar Output of PV Panel in Tracking Mode. [4] Mohammed S., Mizanuel S., Rafe S. and Taufik S. (2011)
“Solar Tracking System” National Conference on Electronic
Time of the day Voltage (V) Current (A) Power (W) Technologies.
9 16.04 0.95 15.24
10 16.48 1.02 16.81 [5] Theraja B. L. and Theraja A. K. (2009): A Textbook of
11 16.4 0.98 16.07 Electrical Technology, 23rd Edition, S. Chand and Company
12 16.75 1.09 18.26 Ltd., New Delhi.
13 18.09 1.17 21.16
14 17.3 1.13 19.55 [6] Lee C., Chou P., Chiang C. and Lin C. (2009) “Sun Tracking
15 16.83 1.11 18.68 Systems: A Review”, Sensors.
18 Rufai Hassan and Bashir Abubakar: Intelligent Arduino Based Automatic Solar Tracking System Using
Light Dependent Resistors (LDRs) and Servo Motor

[7] Plesz B., Sagi P. and Timar-Howath V. (2009) “Enhancement [18] Amaize P, Adoghe A, Awosope C, Stanley U, Sanni T, Victor
of Solar Panels” Power Generation by the Usage of Solar I. Arduino Based Solar Tracking System For Energy
Tracking”, Proceedings of ECOpole, Vol. 3. Improvement Of Pv Solar Panel. International Conference on
Industrial Engineering and Operations Management.
[8] Arduino. Arduino board MEGA [Online]. Italy: Arduino URL: Washington DC. 2018: 2469-2478.
http://arduino.cc/en/Main/ArduinoBoard Accessed 17 July
(2017). [19] Zhang K, Si C, Zhu Z, Guo C, Shi Q. A Two-Dimensional
Solar Tracking Stationary Guidance Method Based on
[9] International Engineering consortium https://www.iec.org/ Feature-Based Time Series. Journal of Mathematical
Problems in Engineering. 2018; 2018: 1-12.
[10] https://components101.com/microcontrollers/arduino-uno https://doi.org/10.1155/2018/3420649.
[11] http://www.taitroncomponents.com/catalog/Datasheet/LDRs5. [20] Lo CK, Lim YS, Rahman FA. New integrated simulation tool
pdf for the optimum design of bifacial panel with reflectors panels
[12] Salem FA. Mechatronics Design of Solar Tracking System. on a specific site. Renew Energy. 2015; 81 (3): 293–307.
International Journal of Current Engineering and Technology. [21] Hong T, Jeong K, Ban C, Oh J, Koo C, Kim J, Lee M. A
2013; 3 (3): 750-762. preliminary study on the two-axis hybrid solar tracking
[13] Gustafsson M, Dipasquale C, Poppi S, Bellini A, Fedrizzi R, method for the smart photovoltaic blind. Energy Procedia.
Bales C, Ochs F, Sié M, Holmberg S. Economic and 2016; 88 (6): 484–490.
environmental analysis of energy renovation packages for [22] Batayneh W, Owais A, Nairoukh M. An intelligent fuzzy
European office buildings. Energy Build. 2017; 148 (2): 155– based tracking controller for a dual-axis solar PV system.
165. Automation in Construction. 2013; 29 (3): 100–106.
[14] Fathabadi H. Novel high efficient offline sensorless dual-axis [23] Duarte F, Gaspar P, Gonc L. Two axis solar tracker based on
solar tracker for using in photovoltaic systems and solar solar maps controlled by a low-power microcontroller.
concentrators. Renew Energy. 2016; 95 (4): 485–494. Renewable Energy & Power Quality Journal. 2010; 1 (8):
[15] Wu J, Chen X, Wang L. Design and Dynamics of a Novel 411–415.
Solar Tracker With Parallel Mechanism. IEEE/ASME [24] Yao Y, Hu Y, Gao S, Yang G, Du J. A multipurpose dual-axis
Transactions on Mechatronics. 2016; 21 (1): 88-97. solar tracker with two tracking strategies. Journal of
[16] Spertino F, Ahmad J, Ciocia A, Di Leo P. Techniques and Renewable Energy. 2014; 72 (5): 88–98.
Experimental Results for Performance Analysis of [25] Wang M, Lu C. Design and implementation of a sun tracker
Photovoltaic Modules Installed in Buildings. 8th International with a dual-axis single motor for an optical sensor-based
Conference on Sustainability in Energy and Buildings. Turin. photovoltaic system. Sensors. 2013; 13 (3): 3157–3168.
2017; 111: 944-953.
[26] Chhoton AC, Chakraborty NR. Dual Axis Solar Tracking
[17] Al-Rousan N, Nor A, Mohd K. Advances in solar photovoltaic System-A Comprehensive Study: Bangladesh Context. 4th
tracking systems: A review. Renewable and Sustainable International Conference on Advances in Electrical
Energy Reviews. 2018; 82 (1): 2548-2569. Engineering. Dhaka. 2017: 2378-2692.

View publication stats

You might also like