Two-Axis Solar Tracker using Arduino
Two-Axis Solar Tracker using Arduino
College of Engineering
Electrical and Computer Department
2022-2023
٢٧٢٣-٢٧٢٢
Project Supervisor:
Student names:
II | P a g e
Acknowledgement
We express our heartfelt gratitude to our project supervisor, Mrs. Ruaa Rafat,
for her unwavering guidance and support throughout the duration of this
project. Her expertise and constructive feedback were invaluable in shaping the
outcome of this work. Her willingness to give her time so generously has been
very much appreciated.
Furthermore, we extend our appreciation to the authors of the research papers
and information sources used in this project. Without their contributions, this
project would not have been possible.
* a prominent Kurdish philosopher and writer, is known for his significant contributions to
philosophy and literature.
III | P a g e
Table of Contents
Abstract....................................................................................................................................... II
Acknowledgement ..................................................................................................................... III
List of figures .............................................................................................................................. 1
Chapter 1 Introduction ............................................................................................................... 2
Chapter 2 Component Description ............................................................................................. 3
2.1 Solar Panels ....................................................................................................................... 3
2.2 Arduino Uno ...................................................................................................................... 3
2.2.1 Fundamental and primary component of the Arduino Uno board ........................... 4
2.2.2 specification of Arduino Uno microcontroller:.......................................................... 5
2.3 LDR .................................................................................................................................... 6
2.4 Resistor.............................................................................................................................. 6
2.5 Servo Motor SG90 ............................................................................................................. 7
2.6 Breadboard ....................................................................................................................... 8
2.7 Jumper Wire ...................................................................................................................... 8
2.8 Structure Material ............................................................................................................. 8
Chapter 3 Construction .............................................................................................................. 9
Chapter 4 Working Principle..................................................................................................... 13
4.1 Working principle of main components ......................................................................... 13
4.1.1 LDR ........................................................................................................................... 13
4.1.2 Arduino Uno ............................................................................................................ 15
4.1.3 Servo Motor SG90 ................................................................................................... 16
4.2 Working principle of mini project ................................................................................... 18
Chapter 5 Design and Implementation .................................................................................... 19
5.1 Hardware Design ............................................................................................................. 19
5.1.1 Important Considerations in Hardware Design ....................................................... 20
5.2 Arduino Uno Programming Overview............................................................................. 23
5.3 Code ................................................................................................................................ 23
5.4 The Flowchart ................................................................................................................. 24
5.5 Testing and Verification .................................................................................................. 25
Chapter 6 Results and Conclusion ............................................................................................ 27
6.1 Experimental Results and Discussion.............................................................................. 27
6.2 Conclusion ....................................................................................................................... 29
Cost of the project .................................................................................................................... 30
Time duration of the project................................................................................................. 30
Appendix I: The Code used in this project ................................................................................ 31
IV | P a g e
References ................................................................................................................................ 34
V|Page
List of figures
Figure 2.1 (Solar Panel) .............................................................................................................. 3
Figure 2.2 (Arduino Uno) ........................................................................................................... 3
Figure 2.3 (Arduino Uno board)................................................................................................. 4
Figure2.4 ..................................................................................................................................... 6
Figure 2.5 (resistors) .................................................................................................................. 6
Figure 4.1 .................................................................................................................................. 13
Figure 4.2 .................................................................................................................................. 13
Figure 4.3 .................................................................................................................................. 14
Figure 4.4 .................................................................................................................................. 15
Figure 4.5 .................................................................................................................................. 16
Figure 4.6 .................................................................................................................................. 16
Figure 4.7 .................................................................................................................................. 17
Figure 4.8 .................................................................................................................................. 18
Figure 5.1 .................................................................................................................................. 19
Figure 5.2 .................................................................................................................................. 19
Figure 5.3 .................................................................................................................................. 23
Figure 5.4 (The Flowchart of the Dual Axis Solar Tracker) ..................................................... 24
Figure 6.1 (when the solar is fixed and the lamp is at position 8 and as shown the voltage is
about 2.8V) ............................................................................................................................... 27
Figure 6.2 (when solar is fixed and the lamp is at position 2 and as shown the current is
about 0.04mA) ......................................................................................................................... 27
Figure 6.3 (when solar is in smart mode and the lamp is at position 6 and as shown the
current is about 0.31mA) ......................................................................................................... 27
Figure 6.4 (when solar is in smart mode and the lamp is at position 6 and as shown the
voltage is about 3V) ................................................................................................................. 27
Figure 6.5 (the power vs position graph) ................................................................................ 28
1|Page
Chapter 1 Introduction
"Look deep into nature, and then you will understand everything better." - Albert Einstein
The Dual Axis Solar Trucker project is a revolutionary solution that aims to address the energy
needs of truckers on the go. This innovative project utilizes the power of the sun to generate
clean and renewable energy that can be used to power a variety of devices and appliances
inside a truck.
The heart of the project is an Arduino microcontroller that controls the movement of the solar
panels to ensure optimal energy generation throughout the day. With its dual-axis tracking
system, the solar panels can follow the movement of the sun to maximize energy generation,
even when the truck is moving.
The project's unique design and functionality make it an ideal solution for truckers who need
a reliable source of power on the road. The solar-powered system is not only eco-friendly, but
it can also help reduce fuel costs and increase efficiency.
In this report, we will delve deeper into the details of the Dual Axis Solar Trucker project,
including its design, implementation, and results. We will also explore the potential benefits
and applications of this innovative solution in the transportation industry.
2|Page
Chapter 2 Component Description
"In every piece of technology, there is a reflection of human ingenuity and our desire to
understand and harness the world around us." - Unknown
With so many different components used in our mini project, we felt it was important to
provide a detailed description of each component, including its purpose, specifications. and
it’s a valuable resource for understanding the function and characteristics of each component
used in the system. This is the basic description for each component we have used in our mini
project:
Solar panels are amazing inventions that can harness the power of the sun and convert it into
usable energy. These panels are made up of photovoltaic (PV) cells, which are responsible for
converting sunlight into electricity. The PV cells are made up of layers of silicon that absorb
the sun's energy, causing electrons to become excited and flow through the panel. This flow
of electrons creates a direct current (DC) that is then converted into alternating current (AC)
by an inverter. The AC current can then be used to power electrical devices and homes. In this
project we have used the (11x6) cm, 7.2Vdc small solar panel.
3|Page
2.2.1 Fundamental and primary component of the Arduino Uno board
o ATmega328 Microcontroller- It is a single chip Microcontroller of the ATmel family.
The processor code inside it is of 8-bit. It combines Memory (SRAM, EEPROM, and
Flash), Analog to Digital Converter, SPI serial ports, I/O lines, registers, timer,
external and internal interrupts, and oscillator.
o ICSP pin - The In-Circuit Serial Programming pin allows the user to program using the
firmware of the Arduino board.
o Power LED Indicator- The ON status of LED shows the power is activated. When the
power is OFF, the LED will not light up.
o Digital I/O pins- The digital pins have the value HIGH or LOW. The pins numbered from
D0 to D13 are digital pins.
o TX and RX LED's- The successful flow of data is represented by the lighting of these
LED's.
o AREF- The Analog Reference (AREF) pin is used to feed a reference voltage to the
Arduino UNO board from the external power supply.
o Reset button- It is used to add a Reset button to the connection.
o USB- It allows the board to connect to the computer. It is essential for the
programming of the Arduino UNO board.
o Crystal Oscillator- The Crystal oscillator has a frequency of 16MHz, which makes the
Arduino UNO a powerful board.
o Voltage Regulator- The voltage regulator converts the input voltage to 5V.
o GND- Ground pins. The ground pin acts as a pin with zero voltage.
o Vin- It is the input voltage.
o Analog Pins- The pins numbered from A0 to A5 are analog pins. The function of Analog
pins is to read the analog sensor used in the connection. It can also act as GPIO
(General Purpose Input Output) pins.
4|Page
2.2.2 specification of Arduino Uno microcontroller:
Microcontroller ATmega328P
Operating Voltage 5V
Input Voltage (recommended) 7-12V
Input Voltage (limit) 6-20V
Digital I/O Pins 14 (of which 6 provide PWM output)
PWM Digital I/O Pins 6
Analog Input Pins 6
DC Current per I/O Pin 20 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 32 KB (ATmega328P) of which 0.5 KB used
by bootloader
SRAM 2 KB (ATmega328P)
EEPROM 1 KB (ATmega328P)
Clock Speed 16 MHz
LED_BUILTIN 13
Length 68.6 mm
Width 53.4 mm
5|Page
2.3 LDR
LDR, or Light Dependent Resistor, is a type of electronic component that is used to detect light.
It is a passive component that changes its resistance in response to changes in the intensity of
light falling on it. LDRs are commonly used in a variety of applications, including security
systems, outdoor lighting, and automation systems.
The basic principle of an LDR is that it works by changing its resistance in response to changes
in the intensity of light. When the LDR is exposed to light, its resistance decreases, and when
it is in the dark, its resistance increases. This property makes it an ideal component for light
sensing applications. A physical example of LDR is shown in Error! Reference source not f
ound..
The use of LDRs in electronic circuits has become increasingly popular due to their simplicity,
low cost, and ease of use. They are available in a wide range of shapes and sizes, making them
suitable for a variety of applications. In addition, LDRs are compatible with a wide range of
electronic components, making them a versatile and flexible component in electronic circuits.
Figure2.4
2.4 Resistor
6|Page
2.5 Servo Motor SG90
A micro servo 9G SG90 which shown in Error! Reference source not found. is a small, l
ightweight servo motor commonly used in hobbyist and educational electronics projects. It is
a type of rotary actuator that provides precise control of angular position and velocity.
The SG90 is a 9-gram servo motor that is small in size but has a lot of torque for its weight. It
is compatible with many microcontroller platforms, such as Arduino and Raspberry Pi, and can
be easily controlled using pulse width modulation (PWM) signals.
The SG90 micro servo typically has a rotational range of 180 degrees and can operate at
voltages between 4.8V to 6V. It also has a built-in potentiometer that provides feedback on
the position of the motor shaft, allowing for accurate control of the motor's position.
The SG90 micro servo is commonly used in robotics, RC planes and cars, and other small-scale
projects that require precise control of motion. It is also commonly used in educational
settings to teach students about electronics, control systems, and robotics.
Figure 2.5.1
Some basic information and specification about Servo Motor SG90 shown in figure 2.5.2:
Figure 2.5.2
7|Page
2.6 Breadboard
A jumper wire, also known as a jump wire or simply a jumper, is a wire that is used to
connect two points on a circuit board or electronic component. Jumper wires are typically
used in electronic prototyping and experimentation to make temporary connections
between components or to modify circuits.
In this project We have used 4mm strong foam paper for main structure. The strong foam
paper we used to make the project structure is a commonly used material in architecture
and design for creating physical models and prototypes. Foam core, also known as foam
board or foam panel, is a lightweight, rigid material made from a foam core sandwiched
between two outer layers of paper or plastic.
8|Page
Chapter 3 Construction
"The art of construction is not merely about creating structures, but about shaping the world
we inhabit." - Unknown
In this chapter, we will provide detailed instructions on how to construct the solar tracker
project using Arduino. We will guide you through the step-by-step process of assembling the
necessary components and wiring them together to build a functional dual-axis solar tracker.
Materials:
• Arduino Uno R3.
• Two SG90 micro servos.
• Four light-dependent resistors (LDRs).
1- Cut the foam paper sheet to the desired size and shape, ensuring it's strong enough to
hold the components. (the size is dependent on the desired project so it can be any
size which the creator want).
9|Page
2- Place the two servos on the foam paper sheet in a perpendicular position, with the
bottom part of the servos facing down. Use screws and nuts to secure them onto the
foam paper.
3- Connect four LDRs to the designed part in step one. Use jumper wires to connect each
LDR to a 10kΩ resistor, and connect the other end of the resistor to the ground of the
breadboard.
10 | P a g e
4- Connect the signal pins of each LDR to a different digital pin on the Arduino.
5- Attach the servo arms to the servo motors, making sure they are perpendicular to each
other.
6- Connect one of the servos to pin 9 on the Arduino, and the other to pin 10.
11 | P a g e
7- Connect the power supply to the Arduino.
8- Upload the code to the Arduino using the Arduino IDE. The code can be found in
chapter for under the name: Error! Reference source not found..
9- Once the code is uploaded, place the solar panel on top of the servos and position it
to face the sun.
10- Turn on the power supply and the servos will start to move, positioning the solar panel
to face the sun at all times.
12 | P a g e
Chapter 4 Working Principle
"True understanding comes not just from knowing how something works, but from grasping
the profound interconnectedness of all things." - Fritjof Capra
In this chapter, we will explain the working principle of main components also the working
principle of our mini project in detail. We will describe how each component interacts with
the others to achieve the desired outcome. Understanding the working principle is essential
for troubleshooting and making modifications to the project. The chapter will provide readers
with a comprehensive overview of the processes and technologies that make the project
possible.
4.1 Working principle of main components
In this section we will explain the working principle of main parts of project which include
LDR, Arduino and Servo Motor.
4.1.1 LDR
As we mentioned in chapter 2, A Light-Dependent Resistor (also called LDR or photoresistor
or photocell or photo conductive cell) is a passive circuit element whose resistance changes
with change in the intensity of light. But how is actually work?
An LDR or Light Dependent Resistor is a type of electronic component that is made from a
semiconductor material. The construction of an LDR is relatively simple, consisting of a thin
layer of semiconductor material that is sandwiched between two metal electrodes as shown
in Figure 4.2. The semiconductor material used in LDRs is usually cadmium sulfide (CdS) or
cadmium selenide (CdSe), which is deposited onto a substrate such as glass or plastic. The
electrodes are then deposited onto the semiconductor material, usually at opposite ends of
the material.
The working principle of an LDR is based on the photoconductive effect as shown in Figure
4.1. When light falls on the surface of the LDR, it excites the electrons in the semiconductor
material of the LDR, which increases the number of free electrons and decreases the
resistance of the material. Conversely, when the light is reduced or blocked, the number of
free electrons decreases, and the resistance of the LDR increases.
13 | P a g e
And as we can see from the Figure 4.3 that as light intensity increases, the resistance of an
LDR decreases.
Figure 4.3
14 | P a g e
4.1.2 Arduino Uno
To understand the working concept of Arduino in general, Think of the Arduino as a tiny
computer that you can program to do various tasks. It consists of both hardware and software
components that work together to make it work.
The hardware component includes the Arduino board itself, which contains a microcontroller,
various pins and connectors, and other components like resistors and capacitors. These
components allow the board to interact with other devices, such as sensors and actuators.
The software component includes the Arduino IDE (Integrated Development Environment),
which is a program you install on your computer. Using the IDE, you can write code in a
programming language called C++ and upload it to the Arduino board. The code tells the board
what to do and how to do it.
Here's an example: Let's say you want to build a simple device that measures the temperature
in your room and displays it on an LCD screen and turn on the Fun or Air-condition at specific
temperature degree. You can use an Arduino board, a temperature sensor, a Fun, and an LCD
screen to build this device.
First, you would connect the temperature sensor and LCD screen to the appropriate pins on
the Arduino board. Then, you would write code in the Arduino IDE that tells the board to read
the temperature sensor and display the temperature on the LCD screen and then make the
fun to work by output pins.
Once you've written the code, you would upload it to the Arduino board using a USB cable.
The board would then execute the code and perform the desired actions, which in this case
would be to measure the temperature and display it on the screen and turning the desired
device as shown in Figure 4.4 .
Figure 4.4
15 | P a g e
4.1.3 Servo Motor SG90
In general Servo motor is part of a motion control system that produces motion in response
to a command. To do the job, there should be a closed loop control system. This simple closed
loop control system consists of an actuator which here is an electric motor, a sensor to
measure controlling parameters, and a controller to generate suitable commands to achieve
the desired output. So, in order to understand servos better, let’s take a look at a simple
diagram of a closed loop control system in Figure 4.5.
Figure 4.5
Negative feedback closed loop control system receives an input signal as the command. If the
actual value of the system output differs from the value declared by the command, it means
the system has an error. This command in a servo mechanism can be a specific angle that must
be obtained. The amount of the error is calculated and then fed to the controller which is
often a sophisticated PID. Then the system starts reacting to the command which is generated
by the PID. Here we can say the motor’s shaft starts rotating. Meanwhile, the output of the
system is measured and the change in motor shaft angle is continuously measured by a sensor.
A servo motor is made up of several parts, including a motor, a potentiometer, a gear
assembly, and a control circuit as shown in Figure 4.6. The gear assembly helps to reduce the
motor's speed and increase its torque. The potentiometer detects the position of the servo
motor's shaft. When an electrical signal is sent to the servo motor, it goes to an error detector
amplifier, which compares the incoming signal to the feedback signal from the potentiometer.
If there is a difference between the two signals, an error signal is generated. This error signal
is used as the input for the motor, which starts rotating. As the motor turns, it moves the
potentiometer, generating a feedback signal that changes as the potentiometer's position
changes.
Figure 4.6
16 | P a g e
Eventually, the potentiometer will reach a position where its output feedback signal matches
the external signal provided. At this point, the amplifier will stop sending signals to the motor,
and it will stop rotating.
The Servo Motor SG90 is a type of position control hobby servo that is widely used in
beginner-level projects due to its simplicity and ease of use. And it is too easy to control with
just three wires: +5V, GND, and Pulse.
The Pulse wire is connected to an output pin on an Arduino board, which sends a Pulse Width
Modulation (PWM) signal to the servo to control its position. The PWM signal has a period of
20ms and a high value between 1ms and 2ms, which determines the amount of angular
position change. When a 1ms duration pulse is sent to the servo, it moves to a position 90
degrees counterclockwise from its previous position. When a 2ms duration pulse is sent, it
moves 90 degrees clockwise from its previous position. A pulse duration of 1.5ms results in no
movement of the motor look at Figure 4.7.
The feedback sensor inside the servo constantly monitors its position and sends signals back
to the driver circuit to adjust the motor's position accordingly. This feedback loop allows the
servo to precisely control its position and hold it steady even under external forces.
Figure 4.7
17 | P a g e
4.2 Working principle of mini project
The dual axis sun detector is a device that can accurately track the position of the sun in the
sky using two axis of motion: vertical and horizontal. It consists of several key components,
including four light-dependent resistors (LDRs), two servo motors, an Arduino Uno
microcontroller, and a power supply.
The LDRs are used to measure the intensity of sunlight in four directions: top right, top left,
bottom right, and bottom left. The Arduino Uno reads the sensor values and calculates the
average intensity, which is used to determine the position of the sun in the sky.
The working principle of the dual axis sun detector is based on the fact that the intensity of
sunlight varies depending on the position of the sun in the sky. By measuring the intensity of
sunlight in four perpendicular directions, the detector can determine the azimuth and altitude
angles of the sun, which are used to calculate its precise position. The servo motors are then
used to adjust the position of the solar panel or other device to track the sun's movement.
The Arduino Uno is the brain of the system, responsible for processing the sensor data and
controlling the motors. It runs a program that takes readings from the four LDRs, calculates
the position of the sun based on the readings, and sends signals to the motors to adjust the
position of the solar panel or other device accordingly.
To calculate the position of the sun, the Arduino Uno first determines the difference in
intensity between the top right and top left LDRs, and between the bottom right and bottom
left LDRs. These differences are then used to calculate the azimuth and altitude angles of the
sun. The servo motors are then controlled based on these angles to adjust the position of the
solar panel or other device look at Figure 4.8.
Figure 4.8
18 | P a g e
Chapter 5 Design and Implementation
"The secret of change is to focus all of your energy, not on fighting the old, but on building
the new." - Socrates
In this chapter, we will discuss the design and implementation of the dual axis sun detector
using an Arduino Uno. We will cover the hardware and software components used in the
project, and provide detailed explanations of their roles in the overall system.
In the hardware design section, we have included a circuit simulation of our dual axis sun
detector which shown in the Figure 5.1.
Figure 5.1
And also, this is a sample of our actual circuit which shown in Figure 5.2.
Figure 5.2
19 | P a g e
The numbers in Figure 5.2 refers to:
20 | P a g e
develop and test the solar tracking system's control mechanism and evaluate its
effectiveness in improving the efficiency of a solar panel. However, it should be noted that
creating a power bank or using the collected voltage to power the project can be
considered an improvement to the project's design and can be implemented in further
development to increase the system's autonomy and practicality.
- why specific pins were chosen in the circuit design for this project? For example, why
were pins 9 and 10 used for the servo motors instead of pin 3 of digital output?
Would changing these pins cause any damage to the project? Additionally, why were
analog pins used for input instead of digital pins? If we were to change the pins 0, 1,
2, and 3 with each other, would it cause any problems?
In this project, pins 9 and 10 were used for the servo motors because they are capable of
generating pulse-width modulation (PWM) signals which are necessary for controlling the
position of the servo motors. Pin 3 of digital output cannot generate PWM signals, so it
was not suitable for this purpose. Changing the pins for the servo motors could cause
issues with the control of the motors, and could potentially damage the project if the
wrong pins were used.
Analog pins were used for input because they allow for a higher resolution of voltage
readings compared to digital pins. LDRs (light-dependent resistors) require analog inputs
because they change their resistance based on the amount of light they are exposed to.
Digital pins can only read either a HIGH or LOW state, which is not suitable for measuring
the analog signal from the LDRs.
If pins 0, 1, 2, and 3 were switched with each other, it could cause issues with the control
of the project. The code for the project is written with specific pins in mind, and switching
the pins could result in incorrect readings from the sensors or incorrect control signals to
the servo motors. It is important to follow the specified pin assignments in order to ensure
proper functioning of the project.
- What was the reason for using a servo motor to control the dual-axis solar detector,
and why was a general DC motor or stepper motor not used instead?
The reason for using a servo motor in this project is because it provides precise and
accurate control of the position of the solar detector. Servo motors are designed to rotate
to a specific angle, making them suitable for controlling the position of the solar detector
along the X and Y axes. On the other hand, general DC motors or stepper motors would
not be as accurate as servo motors, and they would require additional hardware, such as
motor controllers and encoders, to achieve the same level of precision. Additionally, servo
motors consume less power and are more efficient than DC motors or stepper motors,
making them a better choice for this project.
- What was the reason for choosing Arduino Uno as the main controller in the project
instead of other ICs like timer 555 or microcontrollers from other manufacturers? In
other words, what are the advantages of using Arduino Uno in this particular project
over other options?
21 | P a g e
As second-year ECE students, we have not yet taken microcontroller-specific courses, so it
would have been a challenge for us to use other control ICs such as the timer 555 without fully
understanding their concepts. However, we have learned the C++ programming language in
our previous courses, which made the Arduino Uno a suitable option for us as a logic controller
in this project. Additionally, the Arduino Uno has a large community and many online
resources, making it easier to troubleshoot any issues that we may encounter during the
project development.
Overall, we believe that using the Arduino Uno was a good choice for our project considering
our current level of expertise and resources available. We will continue to learn more about
microcontrollers and their applications in the future, which will help us make more informed
decisions in similar projects.
22 | P a g e
5.2 Arduino Uno Programming Overview
The programming process for the Arduino Uno involves writing code in the Arduino IDE, which
consists of two main functions: setup () and loop (). The setup () function is used to set up any
necessary initialization for the board and peripherals, while the loop () function is used to
define the main program logic that will run continuously while the board is powered up.
The setup () function is typically used to initialize the board's input and output pins, as well as
any peripherals that will be used by the program, such as sensors, actuators, or displays. For
example, if the program is going to read data from an analog sensor connected to pin A0, the
setup () function would include a line of code that specifies that pin A0 should be set up as an
analog input.
The loop () function is where the main program logic is defined. The code within the loop ()
function will execute continuously as long as the board is powered up. This function is typically
used to read data from sensors, perform calculations, and control actuators based on the
input data.
Once the code has been written in the Arduino IDE, it can be verified for syntax errors and
uploaded to the Arduino Uno board. The Arduino IDE includes a built-in Serial Monitor tool,
which can be used to view data being sent from the board and to send data to the board for
testing and debugging purposes.
An example of two main Arduino function is shown in Figure 5.2
Figure 5.2
5.3 Code
To maintain the readability and flow of the code used in our project, we have opted to move
the complete code to the [Appendix: I].
23 | P a g e
5.4 The Flowchart
24 | P a g e
5.5 Testing and Verification
The purpose of this sub-section is to demonstrate that the project functions as expected and
meets the design requirements.
To demonstrate the successful implementation of the project and verify its functionality, we
have captured some practical photos of the project in action. These photos serve as visual
evidence of the project's working principle and can be used to further validate its
performance.
• The project is currently turned off, and the LDR detectors are in their initial position
waiting for the sun light.
• After uploading the code to the Arduino Uno, we turned on the power supply and the
lamp, which acted like sunlight. The LDR started detecting the light, and the project started
functioning accordingly. triggering the project to function in accordance with the morning
position.
25 | P a g e
• When the light is directly above the LDR.
• When the light is in the sunset position, the LDR detects the change in light intensity
and the servo motor moves the solar panel to align it with the direction of the sunlight,
ensuring maximum efficiency of the solar panel.
26 | P a g e
Chapter 6 Results and Conclusion
"Action may not always bring happiness, but there is no happiness without action." -
Aristotle.
In this chapter, we delve into the heart of our study, presenting the comprehensive results
and thought-provoking conclusions derived from our exploration of the dual-axis solar
detector.
In order to assess the effectiveness of the proposed smart active DAST (Dual-Axis Solar
Tracker), experimental results were compared between a fixed PV panel and a PV panel
equipped with the smart DAST. A 5 W artificial lamp was used as a solar simulation, and it was
placed in thirteen different points along a circular axis to test the horizontal operation of the
solar tracker. The lamp was positioned at each position about 10-cm far from other point and
each point about 30-cm far from the solar panel as shown in Figure 6.2, and the output power
measurements were recorded for each position as shown in Table 1. The experiment has done
where the lamp 25-cm high from the base of the solar panel and the fixed solar panel was
stated at 45 degrees...
Figure 6.2 (when solar is fixed and the lamp is at Figure 6.1 (when the solar is fixed and the lamp is at
position 2 and as shown the current is about 0.04mA) position 8 and as shown the voltage is about 2.8V)
Figure 6.4 (when solar is in smart mode and the lamp Figure 6.3 (when solar is in smart mode and the lamp is
is at position 6 and as shown the voltage is about 3V) at position 6 and as shown the current is about 0.31mA)
27 | P a g e
To determine the average increase in efficiency of the PV panel, Equation (1) can be used.
∑(𝑃2 −𝑃1 )
𝑛avg = × 100% …... (1).
∑𝑃1
where P1 is the output power of the fixed PV panel, and P2 is the output power of the PV
panel with smart DAST.
From the experimental results, it can be seen that the PV panel with smart DAST generates a
maximum power of (0.001208) W at position 7 and the fixed PV panel generated a maximum
power of (0.000784) W between position 5 and position 9. Generally, as shown in Table 1,
the fixed PV panel produced (0.004267) W in totality, whereas solar tracker system produced
(0.012718) W in totality. Therefore, by the use of Equation 1, the efficiency of the DAST can
be calculated as:
(𝟎.𝟎𝟏𝟐𝟕𝟏𝟖−𝟎.𝟎𝟎𝟒𝟐𝟔𝟕)
𝑛avg = × 100% = 197%.
𝟎.𝟎𝟎𝟒𝟐𝟔𝟕
And as we see When using a PV (photovoltaic) panel with a smart DAST (dual-axis solar
tracker) system, the generated power output is twice that of a fixed PV panel.
Table 1
power
0.0014
0.0012
0.001
power
0.0008
0.0006
0.0004
0.0002
0
1 2 3 4 5 6 7 8 9 10 11 12 13
postion
Smart Tracker Fixed
28 | P a g e
6.2 Conclusion
In this paper, the design, implementation, and test of the active DAST (dual-axis solar tracker)
were made. The proposed DAST has been developed using fewer and low-cost components
to minimize the cost of the system. For this, Arduino UNO board, four LDR sensors, and two
servo motors have been used as hardware components and the C code flashed in the
ATMega328 microcontroller as the embedded software. It found that choosing an appropriate
value of the series resistance in the LDR sensor circuitry ameliorate the output sensitivity,
resulting in the improvement of tracking sensitivity. On the other hand, a simple algorithm is
designed in this work, which is based on simple instructions which does not require extensive
calculations and makes the solar tracker robust and works with high precision. Hence, low-
cost microcontrollers can easily implement the algorithm in order to reduce the system cost.
In addition, experimental results show that the proposed smart DAST provides maximum
energy. A good efficiency of 197% was obtained compared to the fixed PV panel.
It is true that solar trackers are commonly used for large PV panels. But that does not mean
that we cannot implement them for small panels to power small devices such as a mini pump,
a mini water fountain pump, a lamp, a road sign system, and any other device that works with
low power. The implementation of a DAST system for a small PV panel can be also considered
as a test bench that allows users (researchers, students, engineers, etc.) to test and apply their
algorithms in a simple way before proceeding with the implementation of a large DAST
system. The present DAST prototype in this work was made for a very small PV panel using
tiny servo motors, and the results show that it was highly efficient compared to the fixed PV
panel. This proves that using DAST for a small PV panel will be interesting and profitable.
29 | P a g e
Cost of the project
Component Quantity Price (IQD)
Arduino Uno Rev 3 1 15000
Solar Panel 1 5000
Servo Motor SG90 2 6000
LDR 4 2000
Resistor 4 500
Bread Board 1 5000
Jump Wire 15 1000
Foam 2 5000
screw 8 2000
Glue 1 2500
cutting blade 1 500
Others 10000
Overall cost 54500
Week Activity
1 During the Newroz break, we utilized our time to prepare the
necessary components and began researching information and
concepts related to each component. Additionally, we created a
comprehensive to-do list to keep track of our progress.
2 Once we had prepared the components and understood the
underlying concept of the project, we sought approval from Mrs.
Ruaa to proceed with constructing the physical parts and
developing the design. Subsequently, during the second week, we
successfully completed the construction of the project.
3 In the third week, our focus shifted towards preparing the project
report, which encompassed outlining our testing methodology to
achieve the desired outcome. With a clear plan in mind, we made
significant progress on the report, completing the first three
chapters.
4 During the final week, we completed the report and submitted a
copy to Mrs. Ruaa for evaluation. While Mrs. Ruaa was reviewing
the report, we took the opportunity to thoroughly double-check
the design, readings, and the report itself to ensure accuracy and
consistency.
Note: Although the project may have taken more or less time, as students, we were
concurrently managing our midterms, quizzes, and attending college while working on the
project.
30 | P a g e
Appendix I: The Code used in this project
In this appendix, we will find the complete code implementation for the dual-axis detector
project.
#include <Servo.h>
void setup ()
{
servohori.attach(10); // horizontal servo connected to Arduino pin 10
servohori.write(0);
void loop ()
{
servoh = servohori.read();
servov = servoverti.read();
int topl = analogRead (2); // read analog values from top left LDR
int topr = analogRead (1); // read analog values from top right LDR
int botl = analogRead (3); // read analog values from bottom left LDR
int botr = analogRead (0); // read analog values from bottom right LDR
31 | P a g e
// Calculate the average values of LDRs for different directions
int avgtop = (topl + topr) / 2; // average of top LDRs
int avgbot = (botl + botr) / 2; // average of bottom LDRs
int avgleft = (topl + botl) / 2; // average of left LDRs
int avgright = (topr + botr) / 2; // average of right LDRs
// Check the difference between the average values of top and bottom LDRs
if (avgbot > avgtop)
{
servoverti.write(servov - step size);
if (servov < servovLimitLow)
{
servov = servovLimitLow;
}
delay(num);
}
else if ( avgtop > avgbot)
{
servoverti.write(servov + step size);
if (servov > servovLimitHigh)
{
servov = servovLimitHigh;
}
delay(num);
}
else
{
servoverti.write(servov);
}
// Check the difference between the average values of left and right LDRs
if (avgleft > avgright)
{
servohori.write(servoh - step size);
if (servoh < servohLimitLeft)
{
servoh = servohLimitLeft;
}
delay(num);
}
else if (avgright > avgleft)
{
32 | P a g e
servohori.write(servoh + step size);
if (servoh > servohLimitRight)
{
servoh = servohLimitRight;
}
delay(num);
}
else
{
servohori.write(servoh); // write means run servo
}
delay (50);
}
33 | P a g e
References
1. Hindawi. Energy Efficient Hybrid Dual Axis Solar Tracking System. [Online]
https://www.hindawi.com/journals/jre/2014/629717/.
2. Akbar, Hussain Salih. Microcontroller Based Dual Axis Sun Tracking System for Maximum
Solar Energy Generation. [Online]
https://www.researchgate.net/publication/315706268_Microcontroller_Based_Dual_Axis_S
un_Tracking_System_for_Maximum_Solar_Energy_Generation.
3. Arduino . [Online] https://www.arduino.cc/en/software/.
4. TinkerCard. [Online] https://www.tinkercad.com/circuits.
5. Digest, Circuit. What is a Servo Motor? [Online] https://circuitdigest.com/article/servo-
motor-working-and-basics.
6. Figma. [Online] https://www.figma.com/.
7. Peppe8o. SG90 Servo Motor Interfacing with Arduino Uno. [Online]
https://peppe8o.com/sg90-servo-motor-interfacing-with-arduino-uno/amp/.
8. Kalogirou, Soteris. Solar Energy Engineering. 2013.
9. Solar Tracker. Wikipedia. [Online] https://en.wikipedia.org/wiki/Solar_tracker.
34 | P a g e