0% found this document useful (0 votes)
6 views59 pages

2

The document presents a project titled 'Simple Automatic Solar Tracker' as part of a diploma course in Electrical Engineering at Meru National Polytechnic. It outlines the design and construction of a solar tracking system using Light Dependent Resistors (LDRs) and an ATMega328P microcontroller to optimize solar panel efficiency. The project aims to demonstrate increased power output through effective sunlight tracking, addressing the limitations of stationary solar panels.

Uploaded by

tedidiama
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views59 pages

2

The document presents a project titled 'Simple Automatic Solar Tracker' as part of a diploma course in Electrical Engineering at Meru National Polytechnic. It outlines the design and construction of a solar tracking system using Light Dependent Resistors (LDRs) and an ATMega328P microcontroller to optimize solar panel efficiency. The project aims to demonstrate increased power output through effective sunlight tracking, addressing the limitations of stationary solar panels.

Uploaded by

tedidiama
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 59

MERU NATIONAL POLYTECHNIC

ELECTRICAL ENGINEERING DEPARTMENT

(Power option)

TRADE PROJECT

TITLE: SIMPLE AUTOMATIC SOLAR TRACKER

PRESENTER:

ADM NO:

INDEX NO :

COURSE: DIPLOMA IN ELECTRICAL ENGINEERING (POWER OPTION)

SUPERVISOR: MR. MEEME JOHN

SERIES: NOVEMBER 2023

PRESENTED TO: KENYA NATIONAL EXAMINATION COUNCIL FOR

AWARD OF DIPLOMA IN ELECTRICAL AND ELECTRONICS

ENGINEERING
DECLARATION
I declare this is my original work and has not been presented for any award of diploma in
Electrical Engineering for a certificate.

Name:

Signature……………………….

Date………………………….

DELARATION BY THE SUPERVISOR

This project has been presented for examination with my approval as the supervisor of
the candidate.

Name: MR. MEEME JOHN

Signature…………………………….

Date…………………………………

ii
DEDICATION
This whole project as has been dedicated to my whole family for the emotional and moral support you
given throughout my Engineering course. I take a special chance to dedicate it to several well-wishers
and for taking it upon your heart to fund the purchase of project’s components. They include, Miss
Nelly Nkirote and Mr. Mike Waweru.

iii
ACKNOWLEGDEMENT
Firstly I would like to thank God almighty for enabling me to reach this far of my life and in my study
too. Secondly, I would like to thank The Meru National Polytechnic fraternity, specifically, the
department of electrical and electronics engineering for the very good neutering. The institution has
offered limitless opportunities and exposure for me, pondering me with experience both in my field and
social life skill. The institution has allowed me to partake in the course of my dreams in one of the best
Engineering offering Colleges in the country and East Africa. I would like also to show my great
appreciation to the School for Electrical Electronics and Information Engineering for the unending
support and wide scope it has presented to me upon reaching this far in my achievements. The other
regards go to one Mr. Meeme who has taken it upon himself to guide us to this wonderful point of our
study through the step by step till accomplishment of our projects. My greatest regards go to my very
able and selfless supervisor, Mr. Meeme. He has given his all by guiding me step by step with little and
much he has in terms of knowledge, advice and even moral support, ensuring that I have completed the
project with least hickups. I could never be so grateful but say thank you, sir. Last but not least I thank
my dear parents, you have been with me all the way making sure I suffer not while pursuing my course.
May the Almighty God shower you with His unending blessings.

iv
Table of Contents
DECLARATION.............................................................................................................................ii
DEDICATION...............................................................................................................................iii
ACKNOWLEGDEMENT..............................................................................................................iv
ABSTRACT..................................................................................................................................vii
CHAPTER ONE..............................................................................................................................1
1.0 INTRODUCTION............................................................................................................................1
1.1: Background of the Study.................................................................................................................1
1.2 Objectives..........................................................................................................................................2
1.2.1 System Aims....................................................................................................................2
1.3: Problem statement............................................................................................................................2
1.4 Assumption.......................................................................................................................................3
1.5 Limitations........................................................................................................................................4
1.6 Significance and motivation of study................................................................................................4
1.6.1 Solution...........................................................................................................................5
1.6.2 Specifications:.................................................................................................................5
CHAPTER TWO.............................................................................................................................7
2.0 LITERATURE REVIEW.................................................................................................................7
2.1 The Earth’s Rotation and Revolution................................................................................................9
2.2 Sunlight and the Solar Constant......................................................................................................10
CHAPTER THREE.......................................................................................................................11
3.0 Methodology...................................................................................................................................11
3.1 Introduction.....................................................................................................................................11
3.2 Closed-loop Block Diagram for Solar Tracking System................................................................11
Process of operation.............................................................................................................11
Sensor....................................................................................................................................12
Actuator.................................................................................................................................12
CPU........................................................................................................................................12
3.2.1 Analysis of Sensors Used..............................................................................................13
3.2.2 Analysis of the Actuator..............................................................................................................13
3.2.3 Analysis of Microcontroller.........................................................................................................14
v
3.2.4 Hardware Design..........................................................................................................................16
Light sensor design...............................................................................................................16
Notion of two LDRs..............................................................................................................18
Components of the servo motor..........................................................................................18
3.2.5 Software Design............................................................................................................27
The code used in the micro-controller....................................................................................27
3.2.6 Design Flow Chart.........................................................................................................30
3.3 Design circuit..................................................................................................................................31
3.4 Complete Circuit Diagram..............................................................................................................31
3.4.1 Construction of Hardware Units....................................................................................33
3.4.2 Complete Hardware.......................................................................................................35
CHAPTER 4..................................................................................................................................38
4.0 DATA ANALYSIS, FINDINGS, CONCLUSION AND RECOMMENDATION.......................38
4.1: Results analysis..............................................................................................................................38
4.2 Conclusion......................................................................................................................................44
4.2.1 Recommendations.........................................................................................................44
REFERENCES..............................................................................................................................45
APPENDIXES...............................................................................................................................46
WORK PLAN AND BUDGET............................................................................................................46

LIST OF FIGURES
Figure 1.0: Grazing incidence..........................................................................................................4
Figure 2 Revolution and rotation.....................................................................................................9
Figure 3: Earth’s rotation...............................................................................................................10
Figure 4: Closed loop Block Diagram...........................................................................................13
Figure 5: LDR construction...........................................................................................................14
Figure 6: Inside features of the servo motor..............................................................................15
Figure 7: Microcontroller Architecture.........................................................................................16
Figure 8: The input circuit that employs a voltage divider............................................................18
Figure 9: use of two LDRs.............................................................................................................19
Figure 10: Servo Motor Specification...........................................................................................20
Figure 11: Variable pulse width control servo position.............................................................21
Figure 12: Atmega328P.................................................................................................................22
Figure 13: Arduino Uno Board......................................................................................................26
vi
Figure 14: A Simplified Flow Chart of the Assembly...................................................................31
Figure 15: Hardware schematic.....................................................................................................32
Figure 16: Pictorial diagram of schematic hardware.....................................................................33
Figure 17: Schematic Diagram for a solar Tracking System.........................................................34
Figure 18: LDRs mounted on a Solar Panel..................................................................................35
Figure 19: Soldered Circuit of Arduino and LDRs.......................................................................35
Figure 20: Fabricated Circuit Diagram..........................................................................................37
Figure 21: Graph of results obtained on 10th and 11th Nov.........................................................40
Figure 22: Graph for a bright sunny day of 17th July 2018............................................................41
Figure 23: Graph of LDR outputs for a cloudy day on 16th July 2018..........................................42

LIST OF TABLES
Table 1: Photocell Resistance Testing Data...............................................................................18
Table 2: Pins and their functions...............................................................................................24
Table 3: Technical Specifications................................................................................................26
Table 4: Results for cloudy Morning and Sunny Afternoon for 10th and 11th Nov 2018.......41
Table 5: LDR outputs for a bright sunny day on 17th Nov 2018...............................................42
Table 6: Results for LDR outputs for a cloudy day on 16th Nov 2018.....................................43
Table 7– Project Proposed Work Plan.......................................................................................48
Table 8 – Project Proposed Budget.............................................................................................49

ABBREVIATIONS AND ACRONYMS

ADC Analog to Digital Converter

EEPROM Electrical Erasable programmable Read Only Memory

DC Direct current

GND Ground

I Current

I/O Input/ Output

IDE Integrated Development Environment

LDR Light Dependent Resistor

vii
LED Light Emitting Diode

LUX Luminous Flux

MAX Maximum

MCU Microcontroller

MIN Minimum

VCC Supply voltage

UV Ultra Violet Light

PCB Printed Circuit Board

PV Photovoltaic panels

R Resistor

GaAs Gallium Arsenide

MPPT Maximum Power Point Tracking

CMOS Complementary Metal–Oxide–Semiconductor

RISC Reduced Instruction Set Computing

IDE Integrated Development Environment

PWM Pulse Width Modulation

viii
ABSTRACT
According to the modern world, solar energy is becoming a fast essential means of renewable energy
resource. Solar tracking will make it possible to generate more power since the solar panel will maintain
a vertical profile with the rays of the sun. The initial cost of setting up the tracking system is high
considerably, cheaper options that have been proposed over time. This proposal will highlight the
design and construction of a prototype for a solar tracking system that has a single axis of freedom. For
sunlight detection, Light Dependent Resistors (LDR) will be used. The control circuit will be based on
an ATMega328P microcontroller on an Arduino Uno. It will be programmed to detect sunlight through
the LDRs; then the servo will be actuated to position the solar panel in the direction of direct sunlight to
receive maximum sunlight. The servo motors can maintain their torque at high speed compared to other
motors. They have efficient ranging from 80-90% and can supply roughly twice their rated torque in
short periods of time. “They are said to be quiet and doing so they do not vibrate or suffer resonance
issues.”
Performance of solar panels will be analyzed experimentally. In 1985, Silicon solar cells
produced an efficiency of 20% for the first time. But even with a steady increment in the ability of solar
panels, the level is still not at its best. Because evidently most panels still operate at less than 40%. The
effect of low efficiency is that most people are forced to either purchase some panels to meet their
energy demands or buying single systems with large outputs whereas a single panel can guarantee the
very same energy required with a bit of modification in the technology. There are types of solar cells
with relatively higher efficiencies, but they tend to be very costly.
Solar tracking will ensure increased the efficiency of solar panels while reducing costs. The
trackers can either be single dual-axis or trackers. Dual trackers are more efficient since they track
sunlight from both axes. Through tracking, there will be increased exposure of the panel to the sun,
making it have increased power output. The single tracking system will be used. Considering the
following, it’s cheaper, less complicated and still achieves the required efficiency. Regarding costs and
whether or not the system is supposed to be implemented by those that use solar panels, the system is
viable. The power increase is considerable and therefore worth the small increase in cost. Maintenance
cost is not high.
A solar tracker is a device used for directing a photoelectric array solar panel or lens or for focusing
solar reflector toward the sun rays. The position of the sun in the sky varies both with a time of day
ix
(rotation) and season (Revolution) as the sun moves across the sky. Solar powered equipment work best
when they are pointed perpendicularly at the sun. It’s therefore accurate to say solar trackers increases
how efficient such equipment is comparing to any stagnant position at the cost of additional complexity
to the system. The tracker we will use in the project is the single-axis tracker.
Extraction of usable electricity from the sun was made possible with the discovery of the photovoltaic
aspect and subsequent development of the solar cell. The solar cell, a semiconductor material that
converts light into direct current DC. Using solar arrays, there is a series of solar cells electrically
formed and connected. Generation of a DC voltage and then it is applied to a load. As their efficiencies
become higher, (solar arrays), they raise their increased use. They are mainly popular in remote areas
where there are few or no connections to the grid system. Photoelectric power, harvested from the sun
and a photovoltaic cell, or solar cell, is the technology used to change direct solar into electrical energy.
The photovoltaic cell is a non-mechanical device made of silicon alloy.
The building block of the photovoltaic cell is a photoelectric system. Individual single cells can vary
from 0.5 inches to 4 inches across. However, one cell can, gives 1 to 2 watts that is insufficient for most
appliances. Good performance of a photovoltaic array depends on sunlight. Climatic conditions like
clouds and fog significantly affect the amount of solar energy that is received by the range and therefore
its performance. Most of the PV modules are between 20 to 30% efficient (AUTOMATIC SOLAR
TRACKING ROBOTIC SYSTEM BASED ON SOLAR INTENSITY, 2017). For our prototype, we
shall use a solar panel that is of a bit smaller in size but will be able to demonstrate this concept

x
CHAPTER ONE

1.0 INTRODUCTION

1.1: Background of the Study

Solar energy is clean and abundantly available. We depend on solar technologies for the provision of
heat, light, and electricity for both industrial and domestic applications. Conventional energy sources
like coal, petroleum together with natural gas alarmingly are being depleted, with environmental also.
The caused is the process of harnessing these energy sources is calling for the use of renewable energy,
solar energy for this case. The potential power of the sun is immense. Despite the unlimited resource,
however, harvesting it presents a challenge because of the limited efficiency of the array cells. The
ranges of the best efficiency of the majority of commercially available solar cells are less than 20%.
This indicates that there is still room for improvement. This proposal seeks to identify a way of
improving the efficiency of the solar panel by using solar tracking. Other methods include identifying
sources of losses and finding ways to mitigate them. But our tracking mechanism will move and
position the solar array such that it is always placed to harvest maximum power from the sun and so is
the output. Development of any nation depends on energy as the root factor. A large quantity of energy
gets extracted, distributed, converted and consumed every single day in the society globally. About 85%
of the energy that is produced accounts for fossil fuel. Fossil fuel resources are limited and using them
is known to cause global warming because of the emission of greenhouse gases (GHG). The need for
energy from sources such as solar, wind, ocean tidal waves and geothermal for the provision of
sustainable and power is, therefore, growing to cover the energy gap.

The photovoltaic cells, directly convert radiation from the sun into electrical energy. The panels
are manufactured mainly from semiconductor materials; silicon is the primary material. Ways of
increasing the efficiency of the solar panels include; increased cell efficiency, the use of a tracking
system for maximum power output. Maximum power point tracking (MPPT), the process of optimizing
the power output from the solar panel by keeping its operation on the quiescent point of P-V
characteristics. MPPT technology will only offer maximum power received from stationary arrays of

1
solar panels at any given time. The technology cannot, however, increase the generation of electricity
when the sun is not at an average angle of the network.
Solar tracking, a network mechanized to put track the position of the sun to increase power
output by over 30% more than systems that are stationary could achieve, which is a more cost-effective
solution than the purchase of solar panels. Various types of trackers used for an increase in the amount
of energy that can be obtained by solar panels. One is dual axis trackers are among the most efficient,
but with higher difficulty. They are the best option for areas where the position of the sun keeps
changing during the year at different seasons. Single axis trackers are a better option suiting areas in the
equator and its surroundings with a less vivid change in the apparent position of the sun.
The level at which the efficiency is improved will depend on the ability of the tracking system
and the weather. Very active trackers will offer more capacity because they can track the sun with more
precision. There will be a more significant increase in productivity in cases like the weather is sunny
there will be favorable conditions for the tracking system (Saxena and Dutta, 1990).

1.2 Objectives

The system objectives are:


 Designing and constructing a solar tracking system for a solar panel that observes
desired conditions i.e., best position of the sun UV.
 Uploading C++ software codes to an ATmega328P (CPU) and test their functionality.
 Test and prove that indeed the system on an open field and during the daytime, increases
the power efficiency.

1.2.1 System Aims


The projects aims are:
 Coming up with a solar tracking system that will track the solar UV light for solar panels
aiming at increasing efficiency of power obtained from the sun by a range of (30 -40)%.

1.3: Problem statement

2
Solar energy has been used over and over for decades now. The problem posed is the implementation of
a system which is capable of enhancing the production of power by over 30%. A solar tracker, used in
various methods for the improvement of harnessing of solar radiation. The microcontroller implements
the control circuit. The control circuit positions the motor that is used to direct the solar panel optimally.

1.4 Assumption

Concentrated solar panels have optics that capture sunlight directly, so the solar panel must be
positioned at the correct angle to capture the energy. The concentrated solar energy systems are
equipped with tracking systems, as the systems cannot generate energy if they are not correctly aligned
with the sun. The voltage of the solar panel may not be constant at all times since the light intensity of
the sun changes throughout day.
P = V ∗ I (3.2)
Where,
• P as power (W)
• V as voltage (V)
• I as current (A)
From the equation (3.2) we can say that the power depends on the voltage and current. In our work we
assume that a load is connected to the solar panel that requires the constant maximum current produced
by solar panel. Under that assumption since the current is constant the power of the solar panel changes
accordingto the changes in voltage.
According to Lambert’s cosine law, the radiant energy measurement on a Lambert reflecting surface is
directly proportional to the cosine of the angle formed by the measurement point and the surface
normal. Accordingly, the illuminance incident on a surface varies as the cosine of the angle of
incidence. At an oblique angle, the measurement area perpendicular to the incident light beam is much
smaller, so the energy is distributed over a larger area than when the incident radiation is perpendicular
to the surface. Assuming a fixed surface, the amount of exposed energy decreases significantly as the
source approaches the grazing incidence. Grazing incidence refers to situations where the irradiance or
illumination is almost parallel to the incident surface, i.e. the angle of incidence is very close to 90
degrees as shown in figure below.
3
Figure 1.0: Grazing incidence

1.5 Limitations

 Trackers require more maintenance than fixed systems. The type and quality of solar tracker
governs how much maintenance the system requires and how often.
 Solar trackers are slightly more expensive than their stationary counterparts as they are regarded
as complex systems with moving parts.
 It incurs very high initial cost for installation.
 Limited technological upgrade

1.6 Significance and motivation of study

Solar energy is a clean energy source which has a minimal impact on the environment than other forms
of energy. Solar energy is now widely used in a variety of applications. Although solar energy is widely
used, the efficiency of converting solar energy into electricity is insufficient since most solar panels are
installed at a fixed angle and the fixed solar panels do not aim directly towards the sun due to the
earth’s constant motion. Solar panels are very expensive for families or businesses that consume more
energy than usual, as they require several solar panels to generate enough power.

4
The main objective of this project is to build a working model so that to increase the efficiency of
power output taken from solar panel by continuously tracking the sun’s rays throughout the day and
aligns the solar panel orthogonal to the sun. To develop a model that benefits people by producing more
solar energy with fewer solar panels. In order to overcome this problem we come up with a solution
through Arduino Uno system which consists of four LDR sensors which are responsible for the
detection of the light intensity of the sun’s rays. Two micro servo motors are used for movement of the
solar panel in azimuth and elevation direction since it is a dual axis tracking system. A solar panel is the
core part we use in this model for the conversion of solar energy into electrical energy. The LCD
displays shows the power output of the solar panel. The proposed system is a dual axis tracking system
that actively tracks solar radiation and adjusts the panel so that the sun’s rays are perpendicular to it,
maximizing the solar panel’s power output. The LCD display shows the power output of the solar
panel. By this project, we can say that dual axis tracking system we built can track the sun’s rays and
increases the power output of solar panel. The manual effort for changing the solar panel according to
the sun position can be avoided.

1.6.1 Solution
The project will finally ensure the rays of the sun are falling on the solar panel giving it maximum solar
energy then it’s harnessed into electrical power. From research maximum solar energy mostly obtained
between 1200hrs and 1400hrs, making these the peak hours, when the sun is directly overhead. Least
power will be required to move the panel, something that will further increase the efficiency of the
system at the peak hours. The project will purposely be designed to address the challenge of low power,
accurate and economic microcontroller based tracking. A system which is implemented within the
allocated time and with the available resources will track the sun’s movement in the sky. There is the
implementation of an algorithm that solves the motor control written into C- program on Adriano IDE.
On saving power, it is supposed to sleep during the night by getting back into a horizontal position.

1.6.2 Specifications:
 (Arduino Uno 3.3V- 5V & 200mA-300mA)
 Microcontroller:ATmega328

5
 2 Light Dependent Resistors (LDRs)
 100K ohms
 10K Ohms resistors.
 Micro Servo motor SG90;
 Operating speed: 0.1 s/60 degree,
 operating voltage: 4.8 V (~5V),
 Temperature range: 0 ºC – 55 ºC.
 Source of power, Battery
 5V – 12V
 Mini Photovoltaic panel/Solar Panel
 6V & 85mA

6
CHAPTER TWO

2.0 LITERATURE REVIEW

Review on single axis solar tracker:


Mayank Kumar Lokhande [2] presented an automatic solar tracking system. He designed a solar
panel tracking system based on microcontroller and observed that single axis tracker increases
efficiency by 30% compared to the fixed module.
Guiha Li, Runsheng Tang, Hao Zhong [3] investigated horizontal single-axis tracked solar panels.
They obtained result as east-west axis tracking was poor to improve the energy while tracking the sun
about south-north was best. The efficiency increased for east-west axis was less than 8% whereas for
south-north axis increased by 10-24%.
Chaiko and Rizk [4] developed a tracking system using solar panels efficiently. They designed a
simple single axis tracking system using stepper motor and light sensor. They observed that this system
stretches the efficiency of power collection by keeping a solar panel perpendicular to the sun rays. And
they also found that the power gain was increased by 30% over static PV system.
Imam Abadi, Adi Soeprijanto and Ali Musyafa [5] designed fuzzy logic based single axis solar
tracker. They implement a fuzzy logic controller on ATMEGA 8353 microcontroller to improve the
power energy of PV panel. They found that the PV panel has maximized and it exceeded upto 47%
compared to the stationary system.
Ashwin R, Varun A.K et al. [6] presented a sensor based single axis solar tracker to achieve highest
degree of energy through solar panel. It keeps tracking continuously for the maximum strength of light.
This system spontaneously changes its direction when the sun moves from its position to get maximum
light energy. Therefore, the experimental result shows the robustness and productiveness of the
proposed method.

7
Gamal M DOSOUKY, Abou-Hashema et al. [7] presented an enhanced orientation design for energy-
productivity in PV panels. For maximum incident radiation, the panels are pitched with monthly-based
angle. They investigate the proposed strategy in two cities i.e. Japan (Fukuoka) and Egypt (AI-
Kharijah). The results showed that the proposed design attained a growth of energy building in both the
cities.
In 2013, Anusha, Chandra, and Reddy [8] designed solar tracking system based on real time clock.
They compared a static photovoltaic (PV) panel and single axis tracker based on real time clock using
ARM processor. The experiment demonstrated that the tracking system build up the efficiency about
40% and the energy achieved from the sun is enhanced from 9:00 am to 6:00 pm.
Tiberiu Tudorache and Liviu Kreindler [9] presented a tracking system devoted to the PV
conversion panels. The proposed design certifies the perfection of converting solar energy into
electricity by genuinely aligning the solar panel according to the actual posture of sun. The result
concluded as output energy is maximized by the PV panel through desirably locating implemented only
for adequate amount of light intensity.
Hussain S. Akbar [10] designed a single axis tracker using AVR microcontroller. The sun was tracked
in Azimuth axis. The result showed that the designed sun tracker improved the output power gain by
18-25% compared to static panel in Kirkuk city, Iraq. In order to get more efficiency, they modified the
tracker system using another solar panel which is placed parallel (in front side) and opposite to the first
panel (in front side). Therefore after the modification, result showed that output power in opposite solar
panel gives about 56.49% higher than single axis panel tracker and 64.60% compared with the fixed
panel.

Asmarashid Ponniran et al. [11] developed an automatic solar tracking system which tracks the
intensity of light by keeping the solar panel perpendicular to the sun in order to maximized power
energy. Besides, they also used DC geared motor with low speed for omitting parameter of motor speed
so that the panel focus only in following the sun’s intensity. Therefore, the result showed successful that
maximum output power was tracked regardless motor speed.
Review on Dual Axis Solar Tracker:
V sundara Siva Kumar and S Suryanarayana [12] proposed a dual axis tracking system to
implement and develop a simple and efficient control scheme with only single tracking motor. Their

8
main motive is to improve the power gain by accurate tracking of the sun. In this paper they
successfully designed, built and examined a dual axis sun tracking system and received best result.
They concluded saying that this tracking technology is very simple in design, precise in tracking and
inexpensive.

2.1 The Earth’s Rotation and Revolution

Planet earth revolves around the sun, but it also rotates around its axis. Thus there are two
motions of the earth; rotation, and revolution respectively. The earth rotates on its axis, west to
east. This axis of the earth is an ideal line passing via the northern and southern poles of the
Earth. The rotation of the earth takes 24 hours. This movement is responsible for day and night
occurrences. The solar day is 24 hours, and the duration of a sidereal is 23 hours and 56 minutes.
The difference of four minutes is because the earth’s position keeps changing concerning the
sun. Revolution the movement of the earth around the sun. It also happens from west to east
taking 365 days. The orbit of the earth is an elliptical sense, this distance between the earth and
the sun is dynamic. The annual track of the sun appears, as the fixed stars are a concern in the
celestial sphere is referred to as the ecliptic. The earth’s axis makes an angle of 66.5˚ to the
ecliptic plane. This, the earth attains four critical positions concerning the sun (Light
concentrator photovoltaic module and system, 2002)

Figure 2 Revolution and rotation

9
2.2 Sunlight and the Solar Constant

This is the way the sun irradiates. The Sun delivers energy using electromagnetic radiation.
There are the intense temperature and pressure at the core of the star due to solar fusion. The
rate of conversion of protons into helium atoms is 600 million tons per second. Due to the lower
output energy of the process compared to that of protons, fusion gives rise to lots of power of
gamma rays from and is re-emitted and contained by particles in the sun.
The power total of the sun, estimated by the law of Stefan and Boltzmann.
P=4πr2 σϵT²*² W (Saxena and Dutta, 1990).
σ, the Boltzmann constant which is 1.3806488 × 10ˉ²³ m2 kg sK-1.
T is the temperature that is about 5800K,
r is the radius of the sun which is 695800 km.
ϵ denotes the emissivity of the surface
Because of Einstein’s famous law, E=mc² about millions of tons of matter are converted into
energy each second. 5.10²³ Joules per year energy that is irradiated to the earth is the solar power
which is 10000 times the present worldwide energy consumption per year.
Solar radiation from the sun is received in three ways: direct, diffuse and reflected. Direct
radiation/beam radiation, is the solar radiation which travels in a straight line from the sun to the
surface of the earth. Diffuse radiation defined as the sunlight which has been scattered by
particles and molecules in the atmosphere but still manages to reach the earth’s surface.
Scattered radiation has no definite direction, unlike direct versions. Reflected radiation,
describes sunlight which has been reflected off from non-atmospheric surfaces like the ground
(Seme, & Štumberger, 2011).

10
CHAPTER THREE

3.0 Methodology

3.1 Introduction

11
The circuit of the solar tracker system has three sections. The input stage consists of potentiometers and
sensors, a program installed in the embedded software of the microcontroller, and the circuit drive
containing the servo motor. The input section has two
LDRs that are arranged forming a voltage divider circuit. The Atmega 328P built the embedded
software and loaded with a C program before the chip removed from the Arduino board. The coding
part we use Arduino Uno/IDE. The design is limited to Single Axis tracking because the use of a dual
axis tracking system would not add much value. There are a metallic frame and a wooden frame too
where the components are housed. The three stages/divisions each designed independently, then joined
into one complete system. The approach can relate to stepwise refinement in standard programming,
has been employed as it ensures an accurate and logical approach which is straightforward and easy to
understand. This also provides that if there are any errors, independently considered and corrected.

3.2 Closed-loop Block Diagram for Solar Tracking System

Process of operation
The block diagram of the developed closed-loop solar tracking system is illustrated in Figure 1
below, describes the composition in conjunction with the interconnection of the system. For the
closed-loop tracking approach, the solar tracking problem is how to cause the PV panel location
or the output following the direction of sunlight location or the input as tightly as possible
(Block diagram of the solar tracking system. | Open-I, 2017). The sensor-based feedback
controller has an LDR sensor, comparator (as per ATMega328 microcontroller code). In the
tracking operation, the LDR sensor measures the sunlight intensity as a reference input signal.
The coordinates of Meru are about 0.0515⁰N, 37.6456 ⁰E. Therefore the position of the sun
will vary not in a significant manner in the year. In the tropics, the sun position differs
considerably during certain seasons. There is the design of an input stage that facilitates the
conversion of light into a voltage by the light dependent resistors, LDRs. The LDR sensor
generates an unbalanced voltage creating a feedback from error voltage. The error voltage
difference between the sunlight location and the PV panel location is proportional. At the
juncture, the comparator compares the error voltage with a specified threshold (tolerance). If the
comparator output goes high state, the motor is activated to rotate the single-axis for our case or
dual-axis (azimuth and altitude) tracking motor and bring the PV panel to face the Sun. The
feedback controller performs the vital functions accordingly: PV panel and sunlight, monitored
continuously, and a differential control signal is sent to drive the PV panel till the voltage is less
than a pre-specified threshold value.
12
Figure 4: Closed loop Block Diagram

Sensor
The type of sensors that will be used in the main project is the LDR sensor; will be used to
measure the intensity of the sunlight as the references point.

Actuator
The actuator type that is used is a servo motor, it rotates 360 degrees, and it positions the solar
panel right at the desired position.

CPU
Our CPU in the main project will be the ATmega328P which is a low-power CMOS of 8-bit
microcontroller based on the AVR enabled RISC architecture. The ATmega328p will be
operating in an Arduino Uno It houses the comparator that compares the measured and the
expected outcomes and corrects the error.

3.2.1 Analysis of Sensors Used


A simple, suitable, inexpensive, and easy to interface photosensor is analog LDR which is the most
common in electronics. The other Light detecting sensor that may be used to build solar tracker include;
phototransistors, photodiodes, and LLS05. LDR is usually in the form of a photoresistor made of
cadmium sulfide (CdS) or gallium arsenide (GaAs) (2017).

13
Light Dependent Resistor
Since the best optic sensor is a photon and photocell which are light sensitive resistors and made of two
types; gallium arsenide (GaAs) and cadmium sulfide (CdS).
The sun tracker system designed in this project uses two cadmium sulfide (CdS) photocells for sensing
the light. The photocell is a passive component whose resistance is inversely proportional to the amount
of light intensity directed towards it and connected in series with the capacitor. The photocell to be used
for the tracker is based on its dark resistance and light saturation resistance. The term light saturation
has the meaning, further increase in the light intensity to the CdS cells, doesn’t decrease the resistance
intensity any further. Light intensity, measured in Lux, the illumination of sunlight is approximately
30,000 lux (2017).
The resistance of an LDR is normally very high, as high as 1000 000 ohms sometimes, but when
concentrated with light resistance drops dramatically. If the light level is low, the resistance of the LDR
becomes high preventing current from flowing to the base of the transistor. The LED does not light
consequently, however, when the light blinks onto the LDR, its resistance falls.

Figure 5: LDR construction

3.2.2 Analysis of the Actuator

An actuator is a device or a type of motor that changes or converts energy into motion. Our actuator for
this project is the servo motor. They are small in size with very good energy efficiency. They are used
for various applications. The circuitry of a servo motor is built inside the motor unit and comes with a
positional shaft that is fitted with a gear. Electric signals determine shaft movement and also controls
the motor. The figure below shows parts of the servo motor.

14
Figure 6: Inside features of the servo motor

Advantages and disadvantages of servo motors


Servo motors are used in applications where high speed and high torque are required, are the better
option. Servos are available at much faster speeds while stepper motors peak at around 2000 RPM,
Servo motors also maintain torque at high speed, up to 90% of the rated torque is available from servos
at high speeds. They have an efficiency of about 80-90% and supply almost twice their rated torque for
short periods. Furthermore, they do not vibrate or suffer from resonance issues.
A limitation, servo motors are more expensive than other types of engines. Servos require gearboxes,
especially for lower operating speeds. The requirement for a gearbox and position encoder makes the
designs more mechanically complicated. Maintenance requirements will also increase.

3.2.3 Analysis of Microcontroller

The microcontroller is a single chip micro-computer made through VLSI fabrication (K & Prasad.B,
2015). The microcontroller is also known as an embedded controller since the microcontroller, and its
support circuits are often built into or integrated into, the devices they control. A microcontroller is
available in different word lengths like microprocessors (4bit,8bit,16bit,32bit,64bit and 128-bit
microcontrollers are available today).
A microcontroller contains one or more of the following components:
 The central processing unit (CPU)
 Random Access Memory (RAM)
 Read Only Memory (ROM)
 Input/output ports
15
 Timers and Counters
 Interrupt controls
 Analog to digital converters
 Digital analog converters
 Serial interfacing ports
 Oscillatory circuits
Microcontrollers are programmed to perform anything useful. It then executes the program loaded in its
flash memory – the code comprised of a sequence of zeros and ones. It is organized in 12-, 14- or 16-bit
wide words, depending on the microcontroller’s architecture. Every word is considered as a command
being executed by the CPU during the operation of the microcontroller.

Figure 7: Microcontroller Architecture

Advantages of microcontrollers
1. They operate at a faster speed to execute instructions as compared to general purpose
microprocessors.
2. They are best substitutes for repetitive tasks.
Disadvantages of using microcontrollers.
16
1. They have more complex architecture than microprocessors thus understanding their functionality is
quite difficult
PIC Microcontroller
This is a family of microcontrollers made by Microchip Technology. This device was called
“programmable Intelligent Computer”. The PIC was designed to take over the input/output tasks for the
CPU, thus improving performance. PIC’s can be programmed in different programming languages.
Programming a PIC requires a hardware device called a programmer that connects to the computer
through serial and parallel lines. The PIC is inserted in the programmer and “blown” by downloading
the executable code generated by the development system. The hardware programmer usually includes
the support software.
Advantages of working with Atmega328p as compared to PIC controllers
1. Atmega328p is readily available.
2. The programming platform used when programming Atmega328p is easy to work with as
compared to the programmers used with PIC controllers.

3.2.4 Hardware Design

Light sensor design


The solar tracker makes use of a Cds photocell for detecting light. There was the use of a parallel
resistor with a value of 10k. With the resulting configuration, the output voltage will increase with an
increase in light intensity. The amount of the parallel resistor is chosen 19 such that the broadest output
range is achieved. The photocell resistance is measured under bright light, medium light, and dark light
conditions. The results are listed in the table below.

Table 1: Photocell Resistance Testing Data

Measured Resistance Comment


40 - 59 KΩ Dark light conditions (black vinyl tape placed
over cell)
4.0 KΩ Average light conditions (normal room
lighting

17
level)
200 Ω Bright light conditions (flashlight directly in
front of the cell)

The voltage divider circuit formed is shown below.

Figure 8: The input circuit that employs a voltage divider

From the given relationship, the input-output relationship for the voltage divider circuit is provided by:
The Vcc voltage for the microcontroller is 5volts, but the I/O lines 1 and 0, run at a different voltage

which is specified in the Microcontroller, in our case Vio is 3.3volts. Vi=Vcc { LDRLDR+ R 1 }
LDR = 20K Ohms
Vcc = +5volts
Vi=3.3Volts

3.3 v =5 v {20000 ohm+ R 1 }


20000 ohms

0.66 R 1+13200 ohms=20000 ohms


0.66 R 1=6800
R 1=10303.03 ohms
The value of resistor that is available in the market close to the value of R1 is 10k Ohm. Therefore it is
the value we used.
Where Vi =- input voltage into the microcontroller
18
R=Resistance of the [potentiometer which is10K
Vcc= Supply voltage to Microcontroller and LDRs
Vi = Input voltage to the Microcontroller
Notion of two LDRs
The idea of using two LDRs for sensing is explained in the figure below. The stable position
describes when the two LDRs have the same light intensity. When the light source moves in this
case, the sun moves from west to east, the level of energy falling on both the LDR changes and
this change is calibrated into a voltage using voltage dividers. The changes in power are
compared using a built-in comparator of microcontroller and motor is used to rotate the solar
panel in a way to track the light source.

Figure 9: use of two LDRs


Components of the servo motor
There are three main components inside the servo; a potentiometer, a small DC motor, and a
control circuit. While the motor rotates, the potentiometer’s resistance changes and the control
circuit can precisely monitor the movement, regulates it, and directs it in the required direction.
Gears are used to attach the motor to the control wheel.
When the shaft of the motor is at the desired position, power supply to the motor is stopped. If
the shaft is not at the right position, the motor is turned in the right direction. The desired

19
position is sent through electrical pulses via the signal wire. The speed of the motor is
proportional to the difference between the actual position and the position that is desired.
Therefore, if the motor is close to the desired position, it turns slowly. Otherwise, it turns fast
hence known as proportional control.

Figure 10: Servo Motor Specification


How the servo is controlled

20
Figure 11: Variable pulse width control servo position

Servos are set by sending electrical pulses of variable width or pulse width modulation
(PWM), via the control wire. A minimum pulse, repetition rate, and a maximum pulse are
experienced. Servo motors turn 90˚ only in either direction for a total of 180˚ movement. The
neutral position of the motor defined that, where the servo has an equal potential rotation in both
the direction, clockwise and counter-clockwise. Upon sending PWM to the engine, it determined
the position of the shaft and based on the duration of the pulse transmitted through the control
wire the rotor will turn to the area that is desired (Light concentrator photovoltaic module and
system, 2002).
The servo motor will receive a pulse after every 20 milliseconds, and the length of the pulse
determines how far the engine turns. For instance, a 1.5ms pulse makes the driver set in the 90
degrees position. If the pulse were shorter than 1.5ms, it would move to 0 degrees, and a more
extended pulse pushes it to 180 degrees. This is shown in the above figure. For applications
where there is a requirement of high torque, servos are preferable. They will also maintain the
torque at high speeds, up to 90% of the rated torque is available from servos at high speeds.
Their efficiencies are between 80 to 90%.
A servo can supply approximately twice their rated torque for short periods of time, offering
enough capacity to draw from when needed. Also, they are quiet, are available in
AC and DC, and do not suffer from vibrations.

ATmega328P

21
The ATmega328P is a low-power CMOS 8-bit microcontroller based on the AVR enhanced
RISC architecture. By executing powerful instructions in a single clock cycle, the ATmega328P
achieves throughputs approaching 1 MIPS per MHz allowing the system designer to optimize
power consumption versus processing speed. It has 28 pins. There are 14 digital I/O pins from
which 6 can be used as PWM outputs and 6 analog input pins. The I/O pins account for 20 of the
pins. The 20 pins can act as input to the circuit or as output. Whether they are input or output is
set in the software. Two of the pins are for the crystal oscillator and are supposed to provide a
clock pulse for the Atmega328 chip. The clock pulse is needed for synchronization so that
communication occurs in synchrony between the Atmega328 chip and a device connected to it.
Two of the pins, Vcc and GND are for powering the chip. The microcontroller requires between
1.8-5.5V of power to operate.
The pin-out for the microcontroller is shown below:

Figure 12: Atmega328P

The Atmega328 chip has an analog-to-digital converter (ADC) inside of it. This must be or else
the Atmega328 wouldn't be capable of interpreting analog signals. Because there is an ADC, the
22
chip can interpret analog input, which is why the chip has 6 pins for analog input. The ADC has
3 pins set aside for it to function- AVCC, AREF, and GND. AVCC is the power supply, a
positive voltage, that for the ADC. The ADC needs its own power supply in order to work.
GND is the power supply ground. AREF is the reference voltage that the ADC uses to convert
an analog signal to its corresponding digital value. Analog voltages higher than the reference
voltage will be assigned to a digital value of 1, while analog voltages below the reference
voltage will be assigned the digital value of 0. Since the ADC for the Atmega328 is a 10-bit
ADC, meaning it produces a 10-bit digital value, it converts an analog signal to its digital value,
with the AREF value being a reference for which digital values are high or low. Thus, a portrait
of an analog signal is shown by this digital value; thus, it is its digital correspondent value [7].
The last pin is the RESET pin. This allows a program to be rerun and start over. The
table below gives a description for each of the pins and their functions.

Table 2: Pins and their functions

Pin Number Description Function


1 PC6 Reset
2 PD0 Digital Pin (RX)
3 PD1 Digital Pin (TX)
4 PD2 Digital Pin
5 PD3 Digital Pin (PWM)
6 PD4 Digital Pin
7 Vcc Positive Voltage (power)
8 GND Ground
9 XTAL1 Crystal Oscillator
10 XTAL2 Crystal Oscillator
11 PD5 Digital Pin (PWM)
12 PD6 Digital pin (PWM)
13 PD7 Digital pin
14 PB0 Digital pin
15 PB1 Digital pin(PWM)
23
16 PB2 Digital pin(PWM)
17 PB3 Digital pin(PWM)
18 PB4 Digital pin
19 PB5 Digital pin
20 AVcc Positive voltage for ADC (power)
21 Aref Reference voltage
22 GND Ground
23 PC0 Analog input
24 PC1 Analog input
25 PC2 Analog input
26 PC3 Analog input
27 PC4 Analog input
28 PC5 Analog input

There are various features that make the ATmega328P a good choice for the project:
 Temperature Range:-40°C to 85°C
 Operating Voltage: 1.8 - 5.5V
 Low Power Consumption at 1 MHz, 1.8V, 25°C
 Active Mode: 0.2 mA
 Power-down Mode: 0.1 μA
 Power-save Mode: 0.75
 Special Microcontroller Features:
 Power-on Reset and Programmable Brown-out Detection
 Internal Calibrated Oscillator
 External and Internal Interrupt Sources
 Six Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down, Standby, and
Extended Standby
 High Endurance Non-volatile Memory Segments
 32K Bytes of In-System Self-Programmable Flash program memory

24
 1K Bytes EEPROM
 2K Bytes Internal SRAM
 Write/Erase Cycles: 10,000 Flash/100,000 EEPROM
 Data retention: 20 years at 85°C/100 years at 25°C
 Optional Boot Code Section with Independent Lock Bits
 Programming Lock for Software Security
Arduino Uno Circuit Design
In this project divided by two categories; hardware and software. The Arduino Uno is a
microcontroller board based on the ATmega328. The Arduino Uno is a microcontroller board
based on the ATmega328. It consumes 14 digital input/output pins (of which 6 can be used as
PWM outputs), and 6 analog inputs. The technical specification is as shown in table below
Table 3: Technical Specifications
Microcontroller ATmega328
Operating Voltage 5V
Input Voltage (recommended) 7-12V
Input Voltage (limits) 6-20V
Digital I/O Pins 14 (of which 6 provide PWM output)
Analog Input Pins 6
DC Current per I/O Pin 40 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 32 KB of which 0.5 KB used by bootloader
SRAM 2 KB
EEPROM 1 KB
Clock Speed 16 MHz

25
Arduino Uno Pinout

Figure 13: Arduino Uno Board

Input and Output

Each of the 14 digital pins on the Arduino Uno can be used as an input or output, using
pinMode(), digitalWrite(), and digitalRead() functions. They operate at 5 volts. Each pin can
provide or receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by
default) of 20-50 kOhms.
In addition, some pins have specialized functions:

Serial:

Pins 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. These pins are
connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial chip.

26
External Interrupts:

Pins 2 and 3. These pins can be configured to trigger an interrupt on a low value, a rising or
falling edge, or a change in value. See the attachInterrupt() function for details.

PWM:

3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite() function.

SPI:

10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication using the
SPI library.

LED:

There is a built-in LED connected to digital pin 13. When the pin is HIGH value, the LED is on,
when the pin is LOW, it’s off. The Uno has 6 analog inputs, labeled A0 through A5, each of
which provides 10 bits of resolution (i.e. 1024 different values). By default, they measure from
ground to 5 volts, though is it possible to change the upper end of their range using the AREF
pin and the analogReference() function. Additionally, some pins have specialized functionality:

TWI:

A4 or SDA pin and A5 or SCL pin. Support TWI communication using the Wire library. There
are a couple of other pins on the board:

AREF:

The reference voltage for the analog inputs. Used with analogReference().

27
Reset:

Bring this line LOW to reset the microcontroller. Typically used to add a reset button to shields
which block the one on the board.

3.2.5 Software Design


Software design is divided into two parts. First writing the Arduino program in Arduino software. Then
compile it to the Arduino hardware. This Arduino command is the control for the Arduino hardware and
other circuit connection.
The algorithm used in this project is given below. The algorithm gives the description of the general
steps undertaken for the project:
I. There is the input of the voltages from the two LDRs.
II. The inputs are analog. They are converted to digital values that range between 0-1023.
III. The two digital values are compared and the difference between them obtained.
IV. The difference between the values obtained is the error proportional angle for the rotation of the
servo motor.
V. If the LDR voltages are the same, the servo stops. Otherwise, the servo rotates until the
difference is the same.

The code used in the micro-controller


#include <Servo.h>

Servo myservo; // create servo object to control the servo


int pos = 90; // initialize the motor at an angle of 90
degrees void setup()
{
//initial setup
pinMode(11,OUTPUT);
myservo.attach(9); // attaches the servo on pin 9 to the servo object
myservo.write(pos); // tell servo to go to position in variable
'pos' delay(15); // waits 15ms for the servo to reach the
28
position
}

void loop()
{

// main code to run repeatedly


int LDR1=analogRead(A3); // Read the value from LDR1

int LDR2=analogRead(A4); // Read the value from LDR2

if (LDR1>LDR2 && LDR1-LDR2>30){


//compare the two LDR values
digitalWrite(11, LOW);
if(pos<135){
pos+=1;
//move the servo
myservo.write(pos); // tell servo to go to position in variable
'pos' delay(15); // waits 15ms for the servo to reach the
position
}
}
else if (LDR2>LDR1&& LDR2-LDR1>30){
//compare the two LDR
values digitalWrite(11,
LOW); if(pos>45){
pos-=1;
//move the servo
myservo.write(pos); // tell servo to go to position in variable
'pos' delay(15); // waits 15ms for the servo to reach the

29
position
}
}
else {

digitalWrite(11, HIGH);
}
}

30
3.2.6 Design Flow Chart
The software design was done using Arduino Uno which was used for the programming. The
program was written using the C language. The Proteus circuit editing software was used for
drawing the PCB circuit. The design of the circuit was done using Eagle software. The flow chart
of figure 3.6 below is an illustration of how the algorithm is implemented.

STAT
TRT

INITIALIZE THE
SYSTEM

READ
VALUES
FROM LDRs

CONVERT DATA FROM ANALOG TO


DIGITAL

CALCULATE THE ANGLE OF TILT


AND SEND TO MICROCONRTOLLER

COMPARE THE DATA

GENERATE
(S1-S2)>e DRIVE SIGNAL
FOR SERVO
MOTOR

(S2-S1)>e

STOP

Figure 14: A Simplified Flow Chart of the Assembly


31
3.3 Design circuit

Figure 15: Hardware schematic

3.4 Complete Circuit Diagram

In constructing the solar tracking system, LDRs are used to determine solar light intensity. The 2
LDRs are connected to pin A0 and A1 on the board. One servo motor is used for rotation part.
Usually, the servo has a yellow wire that is used to control the cycle and it must be associated on
pin 9 on the board. When light falls on the LDR, its resistance differs and a potential divider
circuit is used to obtain the corresponding voltage value from the resistance of LDR. The voltage
signal is sent to the microcontroller. Constructed on the voltage signal, a corresponding PWM
signal is sent to the servo motor which origins it to rotate and finally attains a position where the
intensity of light falls on the solar panel is maximum. The schematic diagram of the proposed
system as shown in figures below ("Arduino Solar Tracker Using LDR Sensor & Servo Motor -
Single Axis", 2018).

32
xd

Figure 16: Pictorial diagram of schematic hardware

Here is a list of the items which you need in order to complete this project. If you are looking to
make a dual axis tracking stand then you will need to double up on the servos, LDRs, and
resistors (Mishra, Thakur & Deep, 2017).

 An Arduino

 Single Axis Tracking Stand

 2 x 10K Resistors

 2 x LDR

33
 PWM Servo

 Connecting wires

Figure 17: Schematic Diagram for a solar Tracking System

3.4.1 Construction of Hardware Units


First, we needed to start by assembling the components onto your solar panel, or breadboard. The
LDRs (light dependent resistors) or PRs (photo-resistors) change resistance with changing light,
therefore they needed to be connected in such a way that the changing resistance is converted
into a changing voltage signal which the Arduino understands. The servo is controlled through
one of the Arduino's PWM outputs.

For installing the solar tracker permanently then you may want to solder the resistors and LDRs
together so that they cannot come loose. If you are simply trying this project for fun then a
breadboard is perfect. The basic circuit for the connection of the LDRs and servo to the Arduino
is shown in the attached image.

The resistors R1 and R2 are each 10K, the PR1 and PR2 are the two LDRs and the servo can be
any PWM servo.

34
Figure 18: LDRs mounted on a Solar Panel

Figure 19: Soldered Circuit of Arduino and LDRs

35
Calibrate the Sensor Error

Because of differences between the LDRs, resistors and the resistance of the wire used, there will
be a difference between the signals received from both sensors even when they are receiving the
same amount of light. This is taken into account by introducing a calibration offset into the
calculation, this number will need to be adjusted in your code according to your setup. Adjust
this calibration factor where it is declared in the code,

Line 6: int tolerance = 2.

The most accurate way to determine this factor is to shine a light equally between both sensors
and then use the Serial monitor on your computer to read the values output by the east and west
sensor. The difference between these two values will be the calibration offset. The LDRs are
very sensitive so the tracker only moves when the difference between them is greater than 2 in
the code otherwise it would be continuously tracking forwards and backward and wasting power.
If one is not familiar with the Serial interface then playing around with this value until the
tracker remains still when a light is shined equally onto both sensors.

This project is featured by self-calibration so it does not need any preset or variable resistor for
calibration; you just need to press a momentary switch. For calibration, press and hold the
switch, which is connected to pin 9 and rotate the solar plate in direction of the sun and release
after 2- 3 seconds. By using this simple process, Arduino reads the value of sensors and saves the
error state in EEPROM. This system needs one-time calibration

3.4.2 Complete Hardware


Complete hardware integration was the final step in the development of the prototype. All the
prototype units were merged into a single synchronous device. The circuit after soldering is as
shown in the figure below. This circuit was tested and the results noted.

For the device to function it needed to be powered. Various methods of powering exist the most
common ones being the use of batteries (rechargeable and un-rechargeable) and direct
connection to power sockets. This prototype was powered from a rechargeable battery.

36
Figure 20: Fabricated Circuit Diagram

Testing of the Prototype

The prototype was tested on a room with a touch flashlight. The test was based on the following
three conditions;

Condition 1:

Sun is in the left side – Light on sensor1 is high because the shadow of barrier falls on sensor 2
so solar plate moves clockwise.

Condition 2:

Sun is in right Side – Light on sensor2 is high because the shadow of barrier falls on sensor1 so
solar plate movie anticlockwise.

Condition 3:

Sun is in the middle – Light on both sensors are equal so, the plate will not rotate in any
direction.

37
The Output will be seen from the implemented and constructed hardware design/prototype. It
will be observed that the plate moves in the direction of light, but some fluctuation will visible in
the prototype because light might be coming from multiple sources. Fluctuation is automatically
removed when the system is placed in direct sunlight

38
CHAPTER 4

4.0 DATA ANALYSIS, FINDINGS, CONCLUSION AND RECOMMENDATION

4.1: Results analysis

The results for the project were obtained from LDRs for the solar tracking system and the panel
that has a fixed position. The results were recorded for four days, recorded and tabulated. The
outputs of the LDRs were dependent on the light intensity falling on their surfaces. Arduino has
a serial that communicates on digital pins 0 (RX) and 1 (TX) as well as with the computer
through a USB. If these functions are thus used, pins 0 and 1 can be used for digital input or
output. Arduino environment’s built-in the serial monitor can be used to communicate with the
Arduino board. To collect the results, a code was written that made it possible to collect data
from the LDRs after every one hour. The values from the two LDRs are to be read and recorded
at the given intervals.

The LDRs measure the intensity of light and therefore they are a valid indication of the power
that gets to the surface of the solar panel. As a result, by measuring the light intensity at a given
time, it will be possible to get the difference in efficiency between the tracking panel and the
fixed one. The light intensity is directly proportional to the power output of the solar panel.

A code was written that made it possible to obtain readings from the two LDRs at intervals of
one hour. The EEPROM came in handy in this. It is the memory whose values are kept when the
board is turned off. The ATmega 328P has 1024 bytes of EEPROM.

To get the values at the end of the day, the Arduino board was used to connect the
microcontroller to the computer. The RX and TX pins are used for the connection. The code for
reading the values that were recorded is loaded into the microcontroller. The various values are
obtained and converted into volts. The Vcc to the microcontroller and the LDRs is 5volts. The
Atmega 328P has 1024 voltage steps and 5volts. When they are converted into digital values, the
values will be in the range of 0-1023. The conversion is done using the relation below.

EquivalentDgitalOutput∗5
LDR Output ¿ Volts
1023

The results were obtained for different days. Getting results from different days was helpful in
that it made it possible to compare the various values gotten from different weather conditions.

The values obtained were recorded and used to draw graphs to show the relations.

39
Table 4: Results for cloudy Morning and Sunny Afternoon for 10th and 11th Nov 2018

LDR readings LDR readings


for Fixed for a Tracking
Panel(Volts) Panel (Volts)

Time LDR1 LDR2 LDR12 LDR22


0700Hrs 0.196 0.176 1.477 1.487
0800Hrs 0.249 0.210 1.804 1.839
0900Hrs 0.225 0.196 2.757 2.933
1000Hrs 0.723 0.567 3.631 3.783
1100Hrs 0.733 0.816 3.900 3.798
1200Hrs 3.211 2.297 3.910 3.969
1300Hrs 4.888 4.941 4.990 4.990
1400Hrs 3.803 3.910 4.985 4.990
1500Hrs 3.456 4.057 4.976 4.985
1600Hrs 3.930 3.846 4.941 4.892
1700Hrs 1.999 1.544 4.824 4.594
1800Hrs 1.090 1.144 3.128 2.981
1900Hrs 0.718 0.787 0.982 0.968

LDRs Output Voltage Against Time in


Hours

6
5
4
voltage (V)

3
2
1
0
rs rs rs rs rs rs rs rs rs rs rs rs rs
00H 00H 00H 00H 00H 00H 00H 00H 00H 00H 00H 00H 00H
07 08 09 10 11 12 13 14 15 16 17 18 19
Time in Hours

LDR1 LDR2 LDR12 LDR22

Figure 21: Graph of results obtained on 10th and 11th Nov

40
Table 5: LDR outputs for a bright sunny day on 17th Nov 2018
LDR readings LDR readings
for Fixed for a Tracking
Panel(Volts) Panel(Volts)
Time LDR1 LDR2 LDR12 LDR22
0700Hrs 0.679 0.489 1.477 1.487
0800Hrs 0.792 1.061 2.804 2.839
0900Hrs 1.779 1.672 3.203 3.990
1000Hrs 3.167 1.199 3.990 3.990
1100Hrs 3.421 3.226 4.130 4.149
1200Hrs 4.604 3.208 4.500 4.590
1300Hrs 4.990 4.980 4.990 4.990
1400Hrs 4.980 4.990 4.888 4.990
1500Hrs 4.888 4.941 4.976 4.985
1600Hrs 4.413 3.878 4.941 4.892
1700Hrs 3.935 3.824 4.873 4.790
1800Hrs 2.639 2.639 3.964 3.940
1900Hrs 1.569 1.031 2.708 2.815

LDRs Output Voltage Against Time in


Hours

3
voltage

0
e rs rs rs rs rs rs rs rs rs rs rs rs rs
Ti
m
00H 00H 00H 00H 00H 00H 00H 00H 00H 00H 00H 00H 00H
07 08 09 10 11 12 13 14 15 16 17 18 19
Time in Hours

Column1 Series 2 Series 3 Series 4

Figure 22: Graph for a bright sunny day of 17th July 2018

41
Table 6: Results for LDR outputs for a cloudy day on 16th Nov 2018

LDR Readings LDR Readings


for Fixed for a Tracking
Panel(Volts) Panel(Volts)
Time LDR1 LDR2 LDR12 LDR22
0700Hrs 0.147 0.117 0.274 0.244
0800Hrs 0.161 0.156 0.547 0.601
0900Hrs 0.274 0.205 1.090 1.075
1000Hrs 0.435 0.279 1.227 1.276
1100Hrs 0.572 0.547 1.271 1.305
1200Hrs 1.041 0.816 1.618 1.569
1300Hrs 2.175 1.965 2.165 2.151
1400Hrs 1.975 1.794 1.848 1.794
1500Hrs 1.119 1.623 1.090 1.075
1600Hrs 1.022 1.510 0.982 0.943
1700Hrs 0.543 1.017 0.762 0.728
1800Hrs 0.264 0.367 0.547 0.538
1900Hrs 0.064 0.103 0.327 0.220

LDRs Output Voltage Against Time in


2.5 Hours

1.5
Voltage

0.5

0
rs rs rs rs rs rs rs rs rs rs rs rs rs
00H 00H 00H 00H 00H 00H 00H 00H 00H 00H 00H 00H 00H
07 08 09 10 11 12 13 14 15 16 17 18 19
Tme in Hourly

LDR1 LDR2 LDR12 LDR22

Figure 23: Graph of LDR outputs for a cloudy day on 16th July 2018

42
Key points to note:

LDR1 is the photo resistor 1 reading for a solar panel that is fixed.

LDR2 indicates the 2nd photo resistor for a fixed solar panel.

LDR 12 indicates the 1st photo resistor reading in the tracking solar panel.

LDR 22 indicates the 2nd photo resistor for a tracking solar panel.

Analysis

From the curves, it can be seen that the maximum sunlight occurs at around midday, with
maximum values obtained between 1200 hours and 1400 hours. In the morning and late evening,
the intensity of sunlight diminishes and the values obtained are less than those obtained during
the day. After sunset, the tracking system is switched off to save energy. It is switched back on in
the morning.

For the panel fitted with the tracking system, the values of the LDRs are expected to be close.
This is because whenever they are in different positions there is an error generated that enables
its movement. The motion of the panel is stopped when the values are the same, meaning the
LDRs receive the same intensity of sunlight. For the fixed panel, the values vary because the
panel is at a fixed position. Therefore, at most times the LDRs are not facing the sun at the same
inclination. This is apart from midday when they are both almost perpendicular to the sun.

Days with the least cloud cover are the ones that have the lightest intensity and therefore the
outputs of the LDRs will be highest. For cloudy days, the values obtained for the tracking system
and the fixed system do not differ too much because the intensity of light is more or less
constant. Any differences are minimal. The tracking system is most efficient when it is sunny.

It will be able to harness most of the solar power which will be converted into energy.

In terms of the power output of the solar panels for tracking and fixed systems, it is evident that
the tracking system will have increased power output. This is because the power generated by
solar panels is dependent on the intensity of light. The more the light intensity the more the
power that will be generated by the solar panel.

The increase in efficiency can be calculated. However, it is important to note that there will be
moments when the increase in power output for the tracking system in comparison with the fixed
system is minimal, notably on cloudy days. This is expected because there will not be much
difference in the intensity of sunlight for the two systems. Similarly, on a very hot day at midday,
both systems have almost the same output because the sun is perpendicularly above. As such,
both systems receive almost the same amount of irradiation.

A few values can be used to illustrate the difference in efficiency between the two systems:

43
For a bright sunny day, we can take the averages for LDR22 and LDRS 2 for the entire day. We
then use 5 as the base because it is the maximum value of the LDR output. It is calculated as a
percentage and the two values compared. While this may not give the clearest indication of the
exact increase in efficiency, it shows that the tracking system has better efficiency.

Average value of LDR 22∨LDR 2


∗100
5 volts

For LDR 22

4.027
∗100=80.54 %
5

For LDR2

2.856
∗100=50.14 %
5

The difference between the two values is 23.4%. The percentage value means the LDR for the
tracking system has an increased efficiency of 23.4%.

Discussion

The objective of the project was to design a system that tracks the sun for a solar panel. This was
achieved by using light sensors that are able to detect the amount of sunlight that reaches the
solar panel. The values obtained by the LDRs are compared and if there is a significant
difference, there is actuation of the panel using a servo motor to the point where it is almost
perpendicular to the rays of the sun.

This was achieved using a system with three stages or subsystems. Each stage has its own role.

The stages were;

 An input stage that was responsible for converting sunlight to a voltage.


 A control stage that was responsible for controlling actuation and decision making.
 A driver stage with the servo motor. It was responsible for the actual movement of the
panel.

The input stage is designed with a voltage divider circuit so that it gives the desired range of
illumination for bright illumination conditions or when there is dim lighting. This made it
possible to get readings when there was the cloudy weather. The potentiometer was adjusted to
44
cater for such changes. The LDRs were found to be most suitable for this project because their
resistance varies with light. They are readily available and are cost effective. Temperature
sensors, for instance, would be costly.

The control stage has a microcontroller that receives voltages from the LDRs and determines the
action to be performed. The microcontroller is programmed to ensure it sends a signal to the
servo motor that moves in accordance with the generated error.

The final stage was the driving circuitry that consisted mainly of the servo motor. The servo
motor had enough torque to drive the panel. Servo motors are noise free and are affordable,
making them the best choice for the project.

4.2.1 Recommendations

With the accessible time and assets, the goal of the undertaking was met. The venture can be
actualized on a significantly bigger scale. For future undertakings, one may think about the
utilization of more proficient sensors, yet which are savvy and expend little power. This would
additionally improve proficiency while diminishing expenses. On the off chance that there is the
likelihood of further decreasing the cost of this venture, it would encourage an awesome
arrangement.

This is on the grounds that regardless of whether such activities are grasped is subject to how
modest they can be.

Shading effects affect the activity of sun oriented boards. Shading of a solitary cell will affect the
whole board in light of the fact that the cells are typically associated in the arrangement. With
shading, in this manner, the following framework won't have the capacity to enhance
effectiveness as is required.

4.2 Conclusion

A solar panel that tracks the sun was designed and implemented. The required program was
written that specified the various actions required for the project to work. As a result, tracking
was achieved. The system designed was a single axis tracker. While dual axis trackers are more
efficient in tracking the sun, the additional circuitry and complexity were not required in this
case.

This is because Kenya lies along the equator and therefore there are no significant changes in the
apparent position of the sun during the various seasons. Dual trackers are most suitable in
regions where there is a change in the position of the sun.

This project was implemented with minimum resources. The circuitry was kept simple while
ensuring efficiency is not affected.

45
WORK PLAN AND BUDGET

Work Plan

Table 7– Project Proposed Work Plan

Task/ Project Stages Date/ Period


1. Analysis (January 18th to April 1st) 2023

2. Design (June)2023

3. Construction (August)2023

4. Testing (September )2023

5. Documentation (September) 2023

Budget

Table 8 – Project Proposed Budget

Components Price per Unit in Ksh. Total Cost in Ksh.


1. Analysis - 500

2. Solar Panel @500 500

3. 4 LDRs (Light @100 400


Dependent Resistor)

4. 1 Servo Motor @400/= 1500

5. 2 ATmega328P @1500/= 600


Microcontroller

6. 1 Arduino Uno @1300 1,300

7. Capacitors, Resistors, - 600


Connectors, and PCB
board

46
8. Stand - 500

9. Testing - 200

10. Documentation - 1,000

Grand Total - 6,500

47
REFERENCES

[1]Block diagram of the solar tracking system. | Openi- (2017). Openi.nlm.nih.gov. Retrieved 30
December 2017, from https://openi.nlm.nih.gov/detailedresult.php?img=PMC3658738_sensors-
13-03157f1&req=4.

[2]A.K. Saxena and V. Dutta, (1990) “A versatile microprocessor-based controller for solar
tracking,” in Proc. IEEE, 1990, pp. 1105 – 1109.

[3](2017). Retrieved 30 December 2017, from. Papalias T.A and Wong, M. “Making sense of
light sensors,” http://www.embedded.com, 2006.

[4]R. Condit and D. W. Jones, (2004) “Simple DC motor fundamentals,” Texas


Instruments.Publication AN907, pp. 1 – 22.

[5]AUTOMATIC SOLAR TRACKING ROBOTIC SYSTEM BASED ON SOLAR


INTENSITY. (2017). International Journal of Recent Trends in Engineering and Research, 3(3),
179-181. http://dx.doi.org/10.23883/ijrter.conf.20170331.035.hglea.

[6]M. F. Khan and R. L. Ali, (2005) “Automatic sun tracking system,” presented at the All
Pakistan Engineering The conference, Islamabad, Pakistan.

[7]Barsoum, N. (2011). Fabrication of Dual-Axis Solar Tracking Controller Project. Intelligent


Control and Automation, 02(02), 57-68. http://dx.doi.org/10.4236/ica.2011.22007.

[8]Light concentrator photovoltaic module and system. (2002). Photovoltaics Bulletin, 2002(2),
13-14. http://dx.doi.org/10.1016/s1473-8325(02)80077-3

[9]Seme, S., & Štumberger, G. (2011). A novel prediction algorithm for solar angles using solar
radiation and Differential Evolution for dual-axis sun tracking purposes. Solar Energy, 85(11),
2757-2770. http://dx.doi.org/10.1016/j.solener.2011.08.031.

[10]Arduino Solar Tracker Using LDR Sensor & Servo Motor - Single Axis. (2018). Retrieved
from http://www.circuitstoday.com/arduino-solar-tracker.

[11]K, R., & Prasad.B, K. (2015). Hardware Realization of Single Axis Solar Tracking System
by Using a Cost Effective Microcontroller. International Journal of Engineering Trends and
Technology, 23(7), 326-328. doi: 10.14445/22315381/ijett-v23p261.

[12]Mishra, J., Thakur, R., & Deep, A. (2017). Arduino based Dual Axis Smart Solar
Tracker. International Journal of Advanced Engineering, Management, And Science, 3(5), 532-
535. doi: 10.24001/ijaems.3.5.20

48
49

You might also like