You are on page 1of 29

DE LA SALLE LIPA

COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING


ELECTRONICS ENGINEERING DEPATMENT

ARDUINO-POWERED SOLAR TRACKER


WITH PLANT WATERING SYSTEM

IN PARTIAL FULFILLMENT
OF THE FINAL REQUIREMENTS FOR THE COURSE
MICROCONTROLLER SYSTEMS (MICROSY)

T4B – GROUP NUMBER 1


ESPADA, VINCE ANGELO B.
GAJIRAN, KRIZZEL R.
MAGBOJOS, KRIZTELLE ANNE A., ECT
PASIA, MARK DANIEL A., ECT
TUMAMBING, JAN ALEXIS V., ECT

ENGR. JOSIELYN ASI


INSTRUCTOR

01 JUNE 2018
ii

TABLE OF CONTENTS

Page
TITLE PAGE i
TABLE OF CONTENTS ii
LIST OF FIGURES iii
LIST OF TABLES iii

CHAPTER 1
Introduction 1
Objectives of the Study 6
Scope and Limitations 6

CHAPTER 2
Wiring Diagram 7
Schematic Diagram 8
Flowchart 9
Algorithm 10

CHAPTER 3
Hardware and Software Requirements 11
Block Diagram 16

CHAPTER 4 17
Conclusion 18
Recommendations 18
The Prototype 19

BILL OF MATERIALS 19
APPENDIX A: Arduino IDE Codes 21
APPENDIX B: Data Sheets 26
iii

LIST OF FIGURES
Figure
Title Page
No.
1 Wiring Diagram of the System 7
2 Block Diagram of the System 8
3 Flowchart Diagram of the System 9
4 Arduino IDE Software 16
5 Block Diagram of the System 17

LIST OF TABLES
Table
Title Page
No.
1 List of Hardware Components Used 11
2 Bill of Materials 20
Page |1

CHAPTER 1

Introduction

Renewable energy solutions are becoming popular since Fossil fuels are
non-renewable, that is, they draw on finite resources that will eventually dwindle,
becoming too expensive or too environmentally damaging to retrieve. In contrast,
the many types of renewable energy resources-such as wind and solar energy-are
constantly replenished and will never run out.

According to Technology (n.d)., ”Renewable energy is energy which comes


from renewable natural resources such as sunlight, wind, rain, tides, and
geothermal heat. About 16% of global final energy consumption comes from
renewables, with 10% coming from traditional biomass, which is mainly used for
heating, and 3.4% from hydroelectricity. New renewables (small hydro, modern
biomass, wind, solar, geothermal, and biofuels) account for another 3% and are
growing very rapidly. The share of renewables in electricity generation is around
19%, with 16% of global electricity coming from hydroelectricity and 3% from new
renewables. The use of wind power is increasing at an annual rate of 20%, with a
worldwide installed capacity of 238,000 megawatts (MW) at the end of 2011. The
alternative form of energy is widely used in Europe, Asia, and the United States,
gaining popularity at a rapid rate. Since 2004, photovoltaics (solar power) passed
wind as the fastest growing energy source, and have more than doubled every two
years since 2007.”

As stated in eSchoolToday, “Solar power is energy from the sun. “Solar" is


the Latin word for "sun" and it's a powerful source of energy. Without it, there will
be no life. Solar energy is considered as a serious source of energy for many years
because of the vast amounts of energy that is made freely available, if harnessed
by modern technology. It is considered 'Renewable Energy' because the
technology used to convert the sun's power into electricity does not produce smoke
(carbon dioxide and other air pollutants).Furthermore, tapping the sun's energy
does not usually destroy the environment. Unfortunately, the sun does not
Page |2

available in the night, and in some days, clouds and rains and other natural
conditions prevent the sun's powerful rays from reaching us. This means that it is
not always available. This is a why we cannot rely on solar energy alone.

Solar cells are devices that convert light energy directly into electrical
energy. In these cells, there are semiconductors (silicon alloys and other
materials). You may have seen small solar cells on calculators or some mobile
phones. Larger arrays of solar cells are used to power road signs, and even larger
arrays are used to power satellites in orbit around Earth. Solar cells are also
called photovoltaic cells or PV devices.

Solar panels are different to solar cells. Solar panels do not generate
electricity directly. Instead they heat up water directly. A pump pushes cold water
from a storage tank through pipes in the solar panel. The water is heated by heat
energy from the Sun and returns to the tank. They are often located on the roofs
of buildings where they can receive the most sunlight.”

According to Conserve Energy Future (2016), there are advantages and


disadvantages in using solar energy.

The advantages in using solar energy are the following:

 Renewable and Sustainable: Solar power is renewable and sustainable.


Sun is going to shine till the end of this planet. It all depend on us how can
we make best use of resources and use this free source of energy to power
our homes and offices.
 Power Remote Areas: This clean and renewable source of power has
proved boon for people living in remote areas and not necessarily
connected to national grid.
 No Pollution: Solar energy is silent and produces no pollution at all. This is
one of the big reasons why it is favored by many people all around the world.
Page |3

 Surplus Electricity: The surplus electricity that is generated can be send


back to the power grid and you can get rebate in your monthly electricity
bill.
 Reduce Electricity Bills: The electricity that is generated can be used to
power fans, lights, charge mobiles and much more. It is free, renewable,
can be produced on demand and also helps you to bring down your monthly
electricity bill.
 Low Maintenance: Solar panels when installed, require little or no
maintenance. They require cleaning only few times a year.
 Job Creation: The solar energy sector has open tremendous opportunities
for people. Without doubt, it has slightly reduced the unemployment rate in
a country.

The disadvantages in line in using solar energy are the following:

 Initial Investment: An initial investment is what is required if you need to


harness energy from the sun. This cost can however pay itself in 10-15 year
time frame depending on the amount of energy harnessed and the money
saved in buying electricity from local grid.
 Available during Daytime: Solar energy can only be harnessed during
daytime. This simply means you can use this source of energy for half a
day only.
 Effective during Cloudy or Rainy Seasons: Cloudy and rainy seasons
reduce the effectiveness of solar panels. This is the reason why solar
energy is not successful in areas where it remains cloudy for most of the
time of the year.
 Large Setup Required: For a large business owner, a huge setup may be
required to harness solar energy as its demand for energy may be more
which may not get fulfilled by installing solar panels just at the rooftops.
Page |4

 Expensive Storage: The energy harnessed from the sun needs to be stored
in the batteries to make it available for use later at home or office. The cost
of these batteries may influence a buyer’s decision to go for solar power.

There are a number of things that solar power is used for, and as the technology
continues to move forward, even more of those things will come to light and it will
become a lot easier for us to snatch the power from the sun and use it to power
everything that we have. It is really smart and innovative to go out and invest in
these technologies as they continue to move forward and change the way that we
look at and embrace the world around us.

According to Marsh (2016), a solar tracking system maximizes your solar


system’s electricity production by moving your panels to follow the sun throughout
the day, which optimizes the angle at which your panels receive solar radiation.
Solar trackers are typically used for ground-mounted solar panels and large, free-
standing solar installations like solar trees.

When solar panels are exposed to sunlight, the angle at which the sun’s
rays meet the surface of the solar panel (known as the “angle of incidence”)
determines how well the panel can convert the incoming light into electricity. The
narrower the angle of incidence, the more energy a photovoltaic panel can
produce. Solar trackers help to minimize this angle by working to orient panels so
that light strikes them perpendicular to their surface.

There are two types of solar tracking systems: single-axis and dual-axis.

 A single-axis tracker moves your panels on one axis of movement, usually


aligned with north and south. These setups allow your panels to arc from
east to west and track the sun as it rises and sets.
 A dual-axis tracker allows your panels to move on two axes, aligned both
north-south and an east-west. This type of system is designed to maximize
your solar energy collection throughout the year. It can track seasonal
variations in the height of the sun in addition to normal daily motion.
Page |5

There are also benefits and drawbacks in using solar trackers:

 The biggest benefit of a solar tracking system is that it offers a boost in


electricity production. Generally, a solar panel system with a single-axis
solar tracker installed sees a performance gain of 25 to 35 percent. A dual-
axis tracker bumps performance up by another five to 10 percent.
 If you live in high latitude where the sun’s position in the sky varies
dramatically between summer and winter months, a dual-axis tracking
system may be a good way to maximize your solar production and collect
enough power for your home or property.
 However, there are some disadvantages of having a solar tracking system.
They tend to have higher installation and maintenance costs. A solar tracker
will cost more money up front than a fixed solar panel system, because it is
a more complex technology and has moving parts. This also leads to a
second area of increased cost for solar tracking systems: maintenance.
With a more complex system comes more maintenance, which can add up
in cost over time.
 Another disadvantage of a solar tracker is that they are typically too heavy
to be used in rooftop solar projects. If you want a solar panel system that
has tracking features, be prepared to install a ground mounted array.

Considering all the benefits that this amazing invention can offer, the
proponents proposed a study “Arduino Solar Tracker with Plant Watering
System”. The Arduino Solar Tracker with Plant Watering System is a system
wherein the sun’s location will be determined by the solar panel connected
to the microcontroller which is the Arduino UNO. The solar tracker powered
by the Arduino UNO will track the position of the sun wherein the solar
energy absorbed by the panel will be used in turning ON the plant watering
system connected to it. Since there is an energy collected by the solar
panel, the plant watering system will not need a power supply for it to work.
Page |6

Objectives of the Study

The main objective of this study is to design and implement a prototype of


a solar tracker interfaced in the Arduino UNO microcontroller, to save energy and
use it to trigger the plant watering system of the project. Specifically, it aims to
achieve the following:

1. To create an Arduino-powered solar tracker with a plant watering system


using different input and output hardware components
2. To apply and implement the different concepts and theories about
microcontrollers to be able to generate codes needed by the system using
Arduino UNO microcontroller
3. To test and assess the functionality of the solar tracker and its ability to
supply energy to the plant watering system attached to it

Scope and Limitations

This project was planned and designed only for small scale automatic
watering system and solar tracking system that can save energy efficiently by
harvesting energy from the sun. This project utilize a two 1 watt, 5 volts solar panel
in series. This system can detect sunlight and follows the direction of the light
depending on its intensity. After the system tracks the sunlight, servo motor will act
or move according to the presence of the light. It also used a 6V rechargeable lead
– acid battery that serves as the main power supply of the system. This system
also include a water pump that will pump out water from the reservoir to the plant.

Due to system’s limitation, it has its own restriction. First the angle of
operation is only limited to below 180 degrees. Light above the range of 180
degrees vertically, can detect by the LDR but due to servo motor’s angle of
operation, the movement of the solar tracking is only limited below 180 degrees.
The capacity of the rechargeable battery is limited to only to small current. The
system is designed only for small-scale plant that should be watered in small
amount only.
Page |7

CHAPTER 2

Wiring Diagram

The figure shown below shows the connections of the components of the
Solar Tracker with the Plant Watering System to the microcontroller which is the
Arduino UNO that allows the system to be linked with each other.

Figure No. 1. Wiring Diagram of the System


Page |8

Schematic Diagram

Figure 2 shows the schematic diagram of the system, wherein it shows


how the pins of each component are connected to the Arduino UNO.

Figure No. 2. Block Diagram of the System


Page |9

Flowchart

The figures shown below is the flowchart representation of the whole


system, to be able to fully understand how the system works and what may
happen if any of the conditions may occur.

Figure No. 3. Flowchart Diagram of the System


P a g e | 10

Algorithm

Part A (Solar Energy Conversion)

Step 1: Start

Step 2: LDR will try to detect the sunrays of the Sun to let the servo motor move
the Solar panel onto the direction of the sun’s rays.

Step 3: If there is sunlight, the Arduino Uno will compare the average amount of
light detected from the LDRs placed at the top with the ones at the bottom, and
the LDRs on the left side will be compared onto the LDRs on the right side.

Step 4: If avgtop<avgbot, then the servo motor moves in the vertical direction
(up). If avgleft>avgright, then the servo motor moves the solar panel to the
horizontal direction (left).

Step 5: While facing the direction of the sun’s rays, the solar panel will absorb
and convert the light energy collected into electrical energy to recharge the DC
battery.

Part B (Soil moisture sensing and water pump operation)

Step 1: Arduino UNO analyzes the data sent by the soil moisture sensor and
records it in the laptop

Step2: If the soil moisture sensor senses that the humidity>30, then the relay will
be turned on.

Step 3: If the battery can now supply a water pump, then the water pump will be
turned on and the plant will be watered.

Step 4: After consuming the set operating period for the water pump, the process
will now repeat itself from the start.
P a g e | 11

CHAPTER 3

Hardware and Software Requirements

Table No. 1. List of Hardware Components Used

COMPONENTS NAME SPECIFICATION

Voltage: 12V Motor


Horsepower: 1 - 3 HP
Soil Maximum Head: 15 to 50 m
Moisture Discharge Outlet Size: 1 - 2in
Sensor Motor Phase: Single Phase
Power Source: Pump Only
Type: Water Filled

Trigger Voltage (Voltage across


coil): 5V DC
Trigger Current (Nominal
current): 70mA
Maximum AC load current: 10A
@ 250/125V AC
Maximum DC load current: 10A
Relay @ 30/28V DC
Module
Compact 5-pin configuration with
plastic moulding

Operating time: 10msec


Release time: 5msec
Maximum switching: 300
operating/minute (mechanically)
P a g e | 12

Microcontrol ATmega328P
ler – 8 bit AVR
family
microcontroller

Operating 5V
Voltage

Recommend 7-12V
ed Input
Voltage

Input 6-20V
Voltage
Limits

Analog Input 6 (A0 – A5)


Arduino
Pins
Uno
Digital I/O 14 (Out of
Pins which 6
provide PWM
output)

DC Current 40 mA
on I/O Pins

DC Current 50 mA
on 3.3V Pin

Flash 32 KB (0.5 KB
Memory is used for
Bootloader)

SRAM 2 KB
P a g e | 13

EEPROM 1 KB

Frequency 16 MHz
(Clock
Speed)

Voltage: 12V Motor

Horsepower: 1 - 3 HP

Maximum Head: 15 to 50 m
Water
Discharge Outlet Size: 1 - 2in
Pump
Motor Phase: Single Phase

Power Source: Pump Only

Type: Water Filled


Max power 200mW
dissipation

Max voltage @ 0 lux 200V

Peak wavelength 600nm

Min. resistance @ 1.8kΩ


10lux
Light
Dependent Max. resistance @ 4.5kΩ
Resistor 10lux
(LDR)
Typ. resistance @ 0.7kΩ
100lux

Dark resistance 0.03MΩ


after 1 sec

Dark resistance 0.25MΩ


after 5 sec
P a g e | 14

Open Circuit 4.6V±8%


Voltage(Voc)

Short Circuit 105mA±8%


Current (Isc)

Maximum 4.0V±8%
Power
Solar Panel
Voltage(Vmp)

Maximum 100.0mA±8%
Power
Current(Imp)

Maximum 0.4W±8%
Power(Ppm)

Plastic
-
Tubing

Operating Voltage: +5V typically


Torque: 2.5kg/cm
Operating speed is 0.1s/60°
Servo
Gear Type: Plastic
Motor
Rotation: 0°-180°
Weight of motor: 9gm
P a g e | 15

Pan/Tilt
(with Servo -
Motor)

Resistor 100kΩ

Plant

The software used in this project is an Arduino IDE software wherein the
codes for both the solar tracker and the plant watering system was incorporated in
order to create the system as a whole.

Figure No. 4. Arduino IDE Software


P a g e | 16

Block Diagram

The figure below presents the system’s block diagram for further
understanding and analysis of how the system works.

Figure No. 5. Block Diagram of the System


P a g e | 17

CHAPTER 4

Conclusion

Based from the objectives and the data and results obtained from the
project itself, the proponents has concluded the following:

1. The Arduino-powered Solar Tracker with a Plant-Watering System is


composed of different components such as the Arduino UNO
microcontroller, Light Dependent Resistors, servo motors, Solar panels,
soil moisture sensor, relay, and a water pump. The microcontroller used in
this project is an Arduino UNO, wherein a microcontroller is a compact
integrated circuit designed to govern a specific operation in an embedded
system which includes a processor, memory and input/output (I/O)
peripherals on a single chip. The LDR or the Light Dependent Resistor was
used to indicate the presence and absence of light. An actuator to the LDR
sensor used is the solar panel, wherein whenever the LDR detects the
presence of light, the solar panel connected to the servo motor pan will
move according to the location to where the LDR sensed the solar rays or
light.
2. Microcontroller is a compact integrated circuit designed to govern a specific
operation in an embedded system which includes a processor, memory
and input-output peripherals on a single chip. In this project, the group was
able to create an Arduino UNO powered solar tracker wherein the light or
solar rays that will be detected by the LDR will be the source of input, which
will let the solar panel save off energy from its rays and was able to relay
the energy to the water pump which will give off water to the plant.
3. After further testing and troubleshooting, the proponents was able to check
that the solar tracker powered by Arduino UNO microcontroller is working
perfectly, since the sensor used was able to detect the presence of light
and followed it with the use of the servo motor attached to it. After storing
energy from the solar rays to the battery, the water pump was triggered
and the soil moisture sensor will check if the soil is dry or not. If the soil is
P a g e | 18

dry, the water pump will release water, and if the sensor detected that the
soil is still wet, it will not release any water.

Recommendation

After meeting the desired system’s output, the project design still has a lot
to improve at. It is suggested that, for further design improvements;

1. More solar panels should be used in order to perform more task


2. Larger capacity of battery should be used because larger battery can
accommodate larger devices and applications
3. More energy to the battery should be used and since it is a solar energy,
the energy will give strength to the devices to perform.

The Prototype

The output hardware of the solar tracker with the plant watering system is
shown below.
P a g e | 19

BILL OF MATERIALS

Table No. 2. Bill of Materials

Name of Material Quantity Price per unit (₱) Total (₱)

Servo Motor 2 150 300

Pan/Tilt Casing 1 100 100

Light Dependent
8 10 80
Resistor

Soil Moisture Sensor 1 100 100

Resistor (100 kΩ) 4 8 8

Water Pump 1 200 200

Plastic Tubing 1 167 167

Relay Module 1 80 80

Solar Panel 3 150 450

Connecting Wires 1 bundle 120 120


Total ₱ 1,605.00
P a g e | 20

APPENDIX
P a g e | 21

APPENDIX A
P a g e | 22

Arduino IDE Codes

#include <Servo.h>
//defining Servos
Servo servohori;
int servoh = 0;
int servohLimitHigh = 160;
int servohLimitLow = 20;

Servo servoverti;
int servov = 0;
int servovLimitHigh = 160;
int servovLimitLow = 20;

//Assigning LDRs
int ldrtopl = 2; //top left LDR green
int ldrtopr = 1; //top right LDR yellow
int ldrbotl = 3; // bottom left LDR blue
int ldrbotr = 0; // bottom right LDR orange

//define relay
int waterPump = 3;

void setup ()
{
servohori.attach(10);
servohori.write(0);
servoverti.attach(9);
P a g e | 23

servoverti.write(0);
pinMode(waterPump, OUTPUT);
delay(500);
}

void loop()
{
servoh = servohori.read();
servov = servoverti.read();
//capturing analog values of each LDR
int topl = analogRead(ldrtopl);
int topr = analogRead(ldrtopr);
int botl = analogRead(ldrbotl);
int botr = analogRead(ldrbotr);
// calculating average
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
int humidityRow = analogRead(A4);
int humidityReal = map(humidityRow, 1023, 0, 0, 100);

if (avgtop < avgbot)


{
servoverti.write(servov +1);
if (servov > servovLimitHigh)
{
servov = servovLimitHigh;
P a g e | 24

}
delay(8);
}
else if (avgbot < avgtop)
{
servoverti.write(servov -1);
if (servov < servovLimitLow)
{
servov = servovLimitLow;
}
delay(8);
}
else
{
servoverti.write(servov);
}

if (avgleft > avgright)


{
servohori.write(servoh +1);
if (servoh > servohLimitHigh)
{
servoh = servohLimitHigh;
}
delay(10);
}
else if (avgright > avgleft)
{
P a g e | 25

servohori.write(servoh -1);
if (servoh < servohLimitLow)
{
servoh = servohLimitLow;
}
delay(8);
}
else
{
servohori.write(servoh);
}
delay(50);

Serial.println(humidityReal);
delay(100);
if(humidityReal > 30)
{
digitalWrite(waterPump, HIGH);
Serial.println("off");

}
else {
digitalWrite(waterPump, LOW);
Serial.println("on");
}

}
P a g e | 26

APPENDIX B

You might also like