You are on page 1of 39

CHAPTER 1

PROJECT INTRODUCTION
Background of study
Nowadays robot has been widely used in various fields like industries,
academic, research and development, agriculture and others. This chapter
defines the robot, the project on a watering garden robot. The main objective of
this project is to build an autonomous watering garden robot that has the
capability to move using line following, check the humidity of the atmosphere,
sense for moisture in the soil. WaterBot is a short form for garden watering
robot.
The word robot can refer to both physical robots and virtual software
agents, but the latter are usually referred to as bots. Robots tend to do some or
all of the following move around, operate a mechanical limb, sense and
manipulate their environment, and e!hibit intelligent behavior, especially
behavior which mimics humans or other animals.
Robots are needed to help monitor the human environment to prevent
such incidences as crash or collision. The robot that can understand the
environment and adjust to an unstructured environment is a very imperative
asset of this generation.
"tories of artificial helpers and companions and attempts to create them
have a long history but fully autonomous machines only appeared in the #$th
century. The first digitally operated and programmable robot, the Unimate, was
installed in %&'% to lift hot pieces of metal from a die casting machine and stack
them. Today, commercial and industrial robots are in widespread use
performing jobs more cheaply or with greater accuracy and reliability than
humans. They are also employed for jobs which are too dirty, dangerous or dull
to be suitable for humans. Robots are widely used in manufacturing, assembly
and packing, transport, earth and space e!ploration, surgery, weaponry,
laboratory research, and mass production of consumer and industrial goods.
The (nternational )rgani*ation for "tandardi*ation gives a definition of
robot in (") +,-, .an automatically controlled, reprogrammable,
multipurpose, manipulator programmable in three or more a!es, which may be
either fi!ed in place or mobile for use in industrial automation applications..
This definition is used by the (nternational /ederation of Robotics, the 0uropean
Robotics Research Network 102R)N3, and many national standards
committees. The Robotics (nstitute of 4merica 1R(43 uses a broader definition
a robot is a .re5programmable multi5functional manipulator designed to move
materials, parts, tools, or speciali*ed devices through variable programmed
motions for the performance of a variety of tasks.. The R(4 subdivides robots
into four classes devices that manipulate objects with manual control,
automated devices that manipulate objects with predetermined cycles,
programmable and servo5controlled robots with continuous point5to5point
trajectories, and robots of this last type which also ac6uire information from the
environment and move intelligently in response.
Aim and O!"cti#"s
The aim of this project is to develop a robot system that understands the
environment and adjust to it. The following specific objectives will be
achieved.
To detect obstacles using pro!imity sensors.
To redirect motor movement when obstacles are detected.
To display information on digital readout such as 789.
Justification
(f this prototype is fully developed will be very useful in many areas such as
a. :revent accident on the road
b. /ind lost objects
c. 4pplied in the development of a full humanoid
d. "cientific and engineering research
$co%" of t&" Pro!"ct
0fforts towards achieving the above objectives will be limited to a robot that
can detect only obstacle in its environment. The following materials will be
e!ploited
4T+&";# <icroconroller, (nfrared :ro!imity sensor, 98 motor driver units,
789 and c programming language.
Constraints
Beyond obstacles and avoiding them, the robot may not be .
Pro!"ct R"%ort Organi'ation
This thesis is organi*ed into five chapters. 8hapter one e!plains the introductory
of the project including the objective and scope of this project. 8hapter two
surveys the literature review more about previous study on topics that related to
the project. 8hapter three will cover the methodology of the project. The main
topic of this chapter will describe the three most important subjects which are
hardware designing, electronic and circuit designing and programming using
suitable microcontroller software.
8hapter four illustrates the result, testing and implementation after the project is
completed and finally chapter five will summari*ed the project in all field.
CHAPTER (
)ITERATURE RE*IE+
(,- ."n"ra/ o#"r#i"0
To build this project successful, some studies and information gathering has
been done. This project work is geared towards the development of a robot that
can water plants in a garden after sensing the moisture content of the soil. The
garden5watering robot, will take over the task of ade6uately watering a garden
at pre5determined intervals. (t will navigate around common obstacles found at
a normal home until it reaches a thirsty plant. The robot dispenses a certain
amount of water into the garden. 4fter watering, the robot returns to its home
base and waits until it is time to water plants again.
4 small, electrical water pump will deliver water from the on5robot
reservoir to the pot. 4 tube will direct the water from the pump to inside the pot.
)nce the robot e!hausts its water supply, it will return to its home base and wait
refilling.
(,1 1oi/" root
<obile robots have the capability to move around in their environment and are
not fi!ed to one physical location. . (n contrast, industrial robots usually consist
of a jointed arm 1multi5linked manipulator3 and gripper assembly 1or end
effector3 that is attached to a fi!ed surface. 4n e!ample of a mobile robot that is
in common use today is the automated guided vehicle or automatic guided
vehicle 14=>3. 4n 4=> is a mobile robot that follows markers or wires in the
floor, or uses vision or lasers.
<obile robots are also found in industry, military and security environments.
They also appear as consumer products, for entertainment or to perform certain
tasks like vacuum cleaning. <obile robots are the focus of a great deal of
current research and almost every major university has one or more labs that
focus on mobile robot research.
(,1,1 C/assifications of moi/" root
<obile robots may be classified by
%. The environment in which they travel
7and or home robots. They are most commonly wheeled, but also
include legged robots with two or more legs
4erial robots are usually referred to as unmanned aerial vehicles
124>s3
2nderwater robots are usually called autonomous underwater
vehicles 142>s3
:olar robots, designed to navigate icy, crevasse filled environments
#. The device they use to move, mainly
7egged robot human5like legs 1i.e. an android3 or animal5like legs.
Wheeled robot.
Tracks .
(,1,( 1oi/" root na#igation
There are many types of mobile robot navigation
I, 1anua/ r"mot" or T"/"2o%"rat"d
4 manually Tele5operated robot is totally under control of a driver with a
joystick or other control device. The device may be plugged directly into
the robot, may be a wireless joystick, or may be an accessory to a
wireless computer or other controller. 4 Tele5operated robot is typically
used to keep the operator out of harm?s way.
II, .uard"d T"/"2o%
4 guarded Tele5op robot has the ability to sense and avoid obstacles but
will otherwise navigate as driven, like a robot under manual Tele5op. few
if any mobile robots offer only guarded Tele5op.
III, )in"2fo//o0ing root
"ome of the earliest 4utomated =uided >ehicles 14=>s3 were line
following mobile robots. They might follow a visual line painted or
embedded in the floor or ceiling or an electrical wire in the floor. <ost of
these robots operated a simple .keep the line in the center sensor.
algorithm. They could not circumnavigate obstacles@ they just stopped
and waited when something blocked their path.
(,( +&""/"d root
/or simplicity most mobile robots have four wheels or a number of continuous
tracks. "ome researchers have tried to create more comple! wheeled robots with
only one or two wheels. These can have certain advantages such as greater
efficiency and reduced parts, as well as allowing a robot to navigate in confined
places that a four wheeled robot would not be able to.
Two5wheeled balancing Balancing robots generally use a gyroscope to
detect how much a robot is falling and then drive the wheels proportionally
in the opposite direction, to counter5balance the fall at hundreds of times per
second, based on the dynamics of an inverted pendulum. <any different
balancing robots have been designed.
"i!5wheeled robots 2sing si! wheels instead of four wheels can give better
traction or grip in outdoor terrain such as on rocky dirt or grass.
Tracked robots Tank tracks provide even more traction than a si!5wheeled
robot. Tracked wheels behave as if they were made of hundreds of wheels,
therefore are very common for outdoor and military robots, where the robot
must drive on very rough terrain. Aowever, they are difficult to use indoors
such as on carpets and smooth floors.
The mechanical structure of a robot must be controlled to perform tasks. The
control of a robot involves three distinct phases B
:erception,
:rocessing, and
4ction 1robotic paradigms3
"ensors give information about the environment or the robot itself 1e.g. the
position of its joints or its end effector3. This information is then processed to
calculate the appropriate signals to the actuators 1motors3 which move the
mechanical.
The processing phase can range in comple!ity. 4t a reactive level, it may
translate raw sensor information directly into actuator commands. "ensor fusion
may first be used to estimate parameters of interest 1e.g. the position of the
robot?s gripper3 from noisy sensor data. 4n immediate task 1such as moving the
gripper in a certain direction3 is inferred from these estimates. Techni6ues from
control theory convert the task into commands that drive the actuators.
4t longer time scales or with more sophisticated tasks, the robot may need to
build and reason with a .cognitive. model. 8ognitive models try to represent the
robot, the world, and how they interact. :attern recognition and computer vision
can be used to track objects. <apping techni6ues can be used to build maps of
the world. /inally, motion planning and other artificial intelligence techni6ues
may be used to figure out how to act. /or e!ample, a planner may figure out
how to achieve a task without hitting obstacles, falling over, etc.
(,3 1otor
4n electrical motor is defined as a motor that converts electrical energy to a
mechanical energy to do work. (t allows electric power to be used to run
machinery. 4 motor basically, connected to a source of electrical power
develops a twisting effort, that usually rotates the shaft of the motor. When this
shaft connected, belted, or geared to a machine, it drives the machine to do a
work. There are two types an electrical motor 9irect 8urrent motor 198
motor3, 4lternating 8urrent <otor 148 motor3 and 2niversal <otor 1can
operate 48 and 98 current3 C'D.
(,4 1icrocontro//"r
4 microcontroller is an ine!pensive single5chip computer. "ingle5chip means
that the entire computer system lies within the confines of the integrated circuit.
The microcontrollers e!isting on the encapsulated silver of silicon have features
and similarities to our standard personal computers. :rimarily, the
microcontroller is capable of storing and running a program C&D.
<icrocontrollers are fre6uently used in automatically controlled products and
devices, such as automobile engine control systems, office machines,
appliances, power tools, and toys. By reducing the si*e, cost, and power
consumption compared to a design using a separate microprocessor, memory,
and inputEoutput devices, microcontrollers make it economical to electronically
control many more processes.
4 <icrocontroller is a general5purpose device that is meant to read data,
perform limited calculations on that data and control its environment based on
those calculations. The prime use of a microcontroller is to control the operation
of a machine using a fi!ed program that is stored in R)< and that does not
change over the lifetime of the system. 4 microcontroller is a highly integrated
chip that includes all or most of the parts needed for a controller in a single chip.
The microcontroller could be rightly called a one5chip solution.
(,4,1 Ad#antag"s of Using 1icrocontro//"r o#"r 1icro%roc"ssor
4 microcontroller 1<823 is a computer5on5a5chip. (t is a type of
microprocessor emphasi*ing self5sufficiency and cost5effectiveness, in contrast
to a general5purpose microprocessor. The only difference between a
microcontroller and a microprocessor is that a microprocessor has three parts 5
472, 8ontrol 2nit and registers 1like memory3, while the microcontroller has
additional elements like R)<, R4< etc. The advantage of using <82 is a
microcontroller is an ine!pensive single5chip computer. "ingle5chip means that
the entire computer system lies within the confines of the integrated circuit. The
microcontroller contains a central processing unit 18:23, random5access
memory 1R4<3, read5only memory 1R)<3, electrical erasable programmable
read5only memory 100:R)<3, inputEoutput 1(E)3 lines, serial and parallel
ports, timer and other built5in peripherals, such as 498 1analog5digital
converter3 and 948 1digital analog converters. The most common
microcontroller use is :(8 1<icrochip3, <8'+A8%' 1<otorola3, etc.
(,4,( 1icrocontro//"r AT56C71 8"atur"s
FGH Bytes of (n5"ystem Reprogrammable /lash <emory
B 0ndurance %,$$$ WriteE0rase 8ycles
F /ully "tatic )peration $ A* to #G <A*
F Three5level :rogram <emory 7ock
F %#+ ! +5bit (nternal R4<
F ,# :rogrammable (E) 7ines
F Two %'5bit TimerE8ounters
F "i! (nterrupt "ources
F :rogrammable "erial 8hannel
F 7ow5power (dle and :ower5down <odes
D"scri%tion
The 4T+&8;% is a low5power, high5performance 8<)" +5bit microcomputer
with GH bytes of /lash programmable and erasable read only memory
1:0R)<3. The device is manufactured using 4tmelIs high5density nonvolatile
memory technology and is compatible with the industry5standard <8"5;%
instruction set and pin out. The on5chip /lash allows the program memory to be
reprogrammed in5system or by a conventional nonvolatile memory
programmer. By combining a versatile +5bit 8:2 with /lash on a monolithic
chip, the 4tmel 4T+&8;% is a powerful microcomputer which provides a
highly5fle!ible and cost5effective solution to many embedded control
applications.
Po0"r +indo0 1otor
This project will use two 98 power window motors that are use for the wheel
movement. The first motor is position at the right side of the robot and the other
one is position at the left side of the robot.
The 98 power window motor is used to move the wheel to any direction. The
mechanism of the motor will act differently to the corresponding (R sensors that
detect the path of the line following. When none of the (R sensors detect the
path, this means that the robot is out of track, so it will start the search mode to
find the path so that it can be on track again. The speed of motor will be
controlled by using :W< 1:ulse Width <odulator3.
+at"r Pum%
4s stated in the previous chapters, the water pump that will be used for the
watering process is a 98 water pump. This water pump was hard to find and it
was bought in "ingapore. The water pump is control by a %#> "R9 relay that
was specially design for the watering purpose. The amount of water that will be
watered is depends on the delay that is use to switch on the water pump. The
delay is set in the programming. The longer the delay, the more water will be
pumped to the plants.
CHAPTER THREE
ANA)9$I$ AND DE$I.N O8 A .ARDEN +ATERIN. ROBOT
3,- Introduction
This chapter e!plains all the methodologies for development of waterbot. (t
gives review of all method that being used in designing and constructing this
project. This chapter also e!plains in theory of how the circuit process as well
as the components that will be use and the work flowchart.
3,1 $yst"m Ana/ysis and D"scri%tion
There are some methods that have been applied to make this project run
smoothly and make this project work systematic. The flow chart will be used as
a guide line to develop this waterbot. /igure ,.% shows the progress or the
se6uence of this project. /rom the flow chart, in order to complete this project,
data collecting and gathering is needed. 8ollect the data and research mean
collect the source from the books, journals, internet, website and so on which
are related with the project as a reference. 4fter literature review step there are
, main steps are needed to complete this project. The three main steps are
hardware development, circuit development and software development. The
final "tep is to integrate all the three main parts to complete the waterbot project
and archive the objective of this project.
$yst"m: &ard0ar" s%"cifications
8ontrol method fully autonomous
:ower source ; and & volt dc power supply and ;$$ m4 current.
98 motor G
Target environment )utdoors
E/"ctronic and Circuit Part
/or the robot able to function properly, the electronic part must be perfectly
installed to the robot. (n this project there are several circuits that need to be
design for the robot. /irst circuit is the main circuit that consist voltage
regulator circuit to give the voltage to turn on the integrated circuit 1(83 and to
avoid the circuit burn. "econd is the (R sensors that are used to detect the line.
Ne!t is the power window motor controller that acts as a driver to the motor in
this robot.
Circuit d"#"/o%m"nt
The important thing for circuit development is need to chose the component that
will be used to build the main circuit. The component is chosen because of
specification that will suitable for the project. This research is doing by
literature review in previous chapter. The table below shows the list component
that will be used to develop this project.
3,( T&" In%ut Int"rfac"s
There are two input interfaces used in this design. )ne is the input interfaces is
push button, while the second is 79R sensors.
3,(,1 $0itc&"s;
The switches are used in this project as control for the robot arm. The user
presses the button in other to achieve a desired action. There are three switches
on the whole.
Com%on"nt E<%/anations : s%"cification Com%any
4T+&8;%
<icrocontroller To control the input
and output
<icrochip Technology
inc.
Resistor H ohm
voltage regulator =ive e!act value J;v to
microcontroller
-+$;8T
8apacitor %$$u/ 1G 6uantities3, ##u/ 1#
6uantities3
Reset switch /or reset application
8rystal #$<h* =ive the signal clock to
microcontroller
"witch (nput switch for this waterbot project
:rotection diode :rotects against eddy current from the
coil to the water pump.
Bridge rectifier
8apacitive filter /iltering out any 48 source.
8rystal oscillator /re6uency generator
)bject "ensors
:ort % 1:%.$, :%.%, and :%.#3 was used to interface the switches. 4s shown from
the circuit diagram below, one terminal of the switch is connected to the
ground, while the other end connects to the microcontroller through a pull5up
resistor. The value of the pull5up resistor used was well above %H ohms. The
pull5up was necessary to enable the signal at that point on the microcontroller to
toggle and allow the button to change the state only when it is pressed.
Fig. 3.1 Push button switches
Princi%/" of o%"ration;
Before the key is pressed, the status of the port is logic % but when the key is
pressed, the logic state changes to logic $. The program in the microcontroller
monitors the port for the presence of logic $. 7ogic $ at the port indicate the
button was pressed and a corresponding call to s subroutine that performs a
desired function will be done.
3,(,( 1otion $"nsor
The sensors were used to achieve an automation that determines when the
moving parts should stop or start moving. The sensor is made of 7ight
9ependent Resistor 179R3. "ince there are eight cardinal directions to be
measured, eight configurations of 79R were used.
The operational principle of the 79R was e!ploited in this design. The
resistance of 79R decreases with the presence of light. (f light is prevented
from reaching the 79R the resistance increases. The design is shown below
Fig 3.2 Input Interface Design
By this design, when light reaches the 79R the base is at logic %, which causes
a biasing of the N:N transistor. The logic level of the collector at this instance
is logic $ 18ollector voltage of a biased N:N transistor3. )n the other hand,
when there is obscurity around the 79R, the base logic level is $. Now,
because of the pull up at the collector, the logic level at the collector remains
high.
Port
(n the control program design, if the collector output is %, the system does
nothing, but if the logic level is at $, then a direction would be detected and
displayed.
3,3 1icrocontro//"r syst"m
P1 4-
P3
P-
P(
Fig. 3.2 the Microcontroller system
There are four parts, :
$
, :
%
, :
#,
and p
,
in the microcontroller. 4ny part can be
used as input and output part depending on how it was programmed.
Port -
18
19
20
:ort $ is an +5bit open drain bi5directional (E) port. 4s an output port, each pin
can sink eight TT7 inputs. When %s are written to port $ pins, the pins can be
used as high5impedance inputs.
:ort $ can also be configured to be the multiple!ed low5order addressEdata bus
during accesses to e!ternal program and data memory. (n this mode, :$ has
internal pull5ups.
:ort $ also receives the code bytes during /lash programming and outputs the
code bytes during program verification. 0!ternal pullups are re6uired during
program verification.
Port 1
:ort % is an +5bit bi5directional (E) port with internal pullups. The :ort % output
buffers can sinkEsource four TT7 inputs. When %s are written to :ort % pins,
they are pulled high by the internal pull5ups and can be used as inputs. 4s
inputs, :ort % pins that are e!ternally being pulled low will source current 1((73
because of the internal pull ups. (n addition, :%.$ and :%.% can be configured to
be the timerEcounter # e!ternal count input 1:%.$ET#3 and the timerEcounter #
trigger input 1:%.%ET#0K3, respectively, as shown in the following table.
:ort % also receives the low5order address bytes during /lash programming and
verification.
Port (
:ort # is an +5bit bi5directional (E) port with internal pull5ups. The :ort #
output buffers can sinkEsource four TT7 inputs. When %s are written to :ort #
pins, they are pulled high by the internal pull5ups and can be used as inputs. 4s
inputs, :ort # pins that are e!ternally being pulled low will source current 1((73
because of the internal pull5ups. :ort # emits the high5order address byte during
fetches from e!ternal program memory and during accesses to e!ternal data
memory that uses %'5bit addresses 1<)>K L 9:TR3. (n this application, :ort
# uses strong internal pull5ups when emitting %s. 9uring accesses to e!ternal
data memory that uses +5bit addresses 1<)>K L R(3, :ort # emits the contents
of the :# "pecial /unction Register.
:ort # also receives the high5order address bits and some control signals during
/lash programming and verification.
Port 3
:ort , is an +5bit bi5directional (E) port with internal pull5ups. The :ort ,
output buffers can sinkEsource four TT7 inputs. When %s are written to :ort ,
pins, they are pulled high by the internal pull5ups and can be used as inputs. 4s
inputs, :ort , pins that are e!ternally being pulled low will source current 1((73
because of the pull5ups. :ort , also serves the functions of various special
features of the 4T+&8;%, as shown in the following table.
:ort , also receives some control signals for /lash programming and
verification.
Port Pin A/t"rnat" 8unctions
:,.$ RK9 1serial input port3
:,.% TK9 1serial output port3
:,.# (NT$ 1e!ternal interrupt $3
:,., (NT% 1e!ternal interrupt %3
:,.G T$ 1timer $ e!ternal input3
:,.; T% 1timer % e!ternal input3
:,.' WR 1e!ternal data memory write strobe3
:,.- R9 1e!ternal data memory read strobe3
EA:*PP 10!ternal 4ccess 0nable3
:in ,% 104E>::3 must be connected to >cc only if the microcontroller will use
its internal R4< and R)<, otherwise 04 must be strapped to =N9 in order to
enable the device to fetch code from e!ternal program memory locations
starting at $$$$A up to ////A. Note, however, that if lock bit % is
programmed, 04 will be internally latched on reset.
04 should be strapped to >88 for internal program e!ecutions.
This pin also receives the %#5volt programming enable voltage 1>::3 during
/lash programming when %#5volt programming is selected.
/rom the diagram shown above, pin G$ is connected to >cc, while pin #$ is the
ground pin. the pin is strapped to ground to enable access to e!ternal program
memory starting from $$$$h to ffffh. :in & is the reset pin, which must be
connected to >cc through a %$M/ capacitor for 8<)" version.
3,4,1 $yst"m R"s"t
R$T
Reset is an input pin. 4 high on this pin for two machine cycles while the
oscillator is running resets the device. The reset enables the system to always
return to a default state. :in & of the microcontroller is used as the reset pin. (n
this design, the internal reset circuit was used@ hence pin & was connected to
>cc through a capacitor as shown in the figure below
Fig. 3.3 System Reset ircuit
3,4,( $yst"m C/ock
P9
(n this design, the microcontroller uses its internal clock. :ins %+ 1KT47%3 and
%& 1KT47#3, which serves as input and output pins respectively, connect a
%'<AN crystal through ,$pf capacitor on each terminal to ground. This
configuration is used if the internal oscillator must be used.
Fig. 3.! rystal connection to the microcontroller
3,4,3 1"mory
(n this design work, the internal memory 1R4< and R)<3 of the
microcontroller was used. This microcontroller, 4T+&8;% has GH Byte /lash
R)< and %#+ ! + bits internal R4<. To enable the internal memories, pin ,%
104E>::3 was connected to >cc.
3,4 PO+ER UNIT
The system has a step down transformer that steps #G$ >ac to %# >ac. The
re6uired voltage for the system is ; > dc and %# > dc. To obtain these voltage
levels, the power supply was designed as follows. (t is divided into G modules,
namely
a. Transformer
b. Rectifier
c. /ilter
d. Regulator
Fig.3.21 "utput wa#e form of the complete power supply
T&" Transform"r
The transformer used in this project work is rated at #G$ >ac :rimary and %#
>ca "econdary. The ma!imum current capacity was ;$$m4. (t was centre
tapped and full wave capacity.
Transformers convert 48 electricity from one voltage to another with little loss
of power. Transformers work only with 48 and this is one of the reasons why
mains electricity is 48.
"tep5up transformers increase voltage, step5down transformers reduce voltage.
<ost power supplies use a step5down transformer to reduce the dangerously
high mains voltage 1#,$>3 to a safer low voltage.
The input coil is called the %rimary and the output coil is called the s"condary.
There is no electrical connection between the two coils, instead they are linked
by an alternating magnetic field created in the soft5iron core of the transformer.
The two lines in the middle of the circuit symbol represent the core.
Transformers waste very little power so the power out is 1almost3 e6ual to the
power in. Note that as voltage is stepped down current is stepped up.
The ratio of the number of turns on each coil, called the turns ratio, determines
the ratio of the voltages. 4 step5down transformer has a large number of turns
on its primary 1input3 coil which is connected to the high voltage mains supply,
and a small number of turns on its secondary 1output3 coil to give a low output
voltage.
turns ratio O >p O Np and power out O power in
>s Ns >s P (s >p P (p
>p O primary 1input3 voltage
Np O number of turns on primary coil
(p O primary 1input3 current
>s O secondary 1output3 voltage
Ns O number of turns on secondary coil
(s O secondary 1output3 current
Fig.3.22 $a#e form of the transformer output
T&" R"ctifi"r
The purpose of the rectifier is to convert the %# >ac to dc. The rectifier type
was full wave bridge rectifier, having G distinct diodes connected as shown
below. The considerations for choosing the diodes were the following factors
a. /orward current rating in 4mpere
b. :eak5(nverse voltage 1:(>3 in volt
The forward current is a short duration current that charges the filter capacitor.
The value depends on the :(>.
:(> is the ma!imum voltage that occure across the rectifier diode in the reverse
direction. (t is usually e6ual to G ! ma!imum secondary voltage 1G>
sm
3 of the
transformer for G diode full wave rectifiers. (n order words, :(> O >
sm
. "ince
the transformer was stepping down to %# >ac, >
sm
O :(> O %# volt.
Total :(> O %# ! G O G+>
Aence searching through the data book, the part number of the diode that meet
this condition was (N;,&%. This is a general purpose diode, with '$$ :R> and
%4.

Fig.3.23a "utput of full wa#e rectifie% Dc Fig.3.23b &ri%ge rectifier
$moot&ing
"moothing is performed by a large value electrolytic capacitor 1in this case
,,$$u/3 connected across the 98 supply to act as a reservoir, supplying current
to the output when the varying 98 voltage from the rectifier is falling. The
diagram shows the unsmoothed varying 98 1dotted line3 and the smoothed 98
1solid line3. The capacitor charges 6uickly near the peak of the varying 98, and
then discharges as it supplies current to the output.
Fig3.2! $a#eform of Rectifie%
Note that smoothing significantly increases the average 98 voltage to almost
the peak value 1%.G P R<" value3. /or e!ample '> R<" 48 is rectified to full
wave 98 of about G.'> R<" 1%.G> is lost in the bridge rectifier3, with
smoothing this increases to almost the peak value giving %.G P G.' O '.G>
smooth 98.
"moothing is not perfect due to the capacitor voltage falling a little as it
discharges, giving a small ri%%/" #o/tag". /or many circuits a ripple which is
%$Q of the supply voltage is satisfactory and the e6uation below gives the
re6uired value for the smoothing capacitor. 4 larger capacitor will give fewer
ripples. The capacitor value must be doubled when smoothing half5wave 98.

"moothing capacitor for %$Q ripple, 8 O ; P (o
>s P f
8 O smoothing capacitance in farads 1/3
(o O output current from the supply in amps 143
>s O supply voltage in volts 1>3, this is the peak value of the
unsmoothed 98
f O fre6uency of the 48 supply in hert* 1A*3, ;$A* in the 2H
R"gu/ator
8igur" 3,1(; >oltage Regulator
Regulator (8s are available with fi!ed 1typically ;, %# and %;>3 or variable
output voltages. They are also rated by the ma!imum current they can pass.
Negative voltage regulators are available, mainly for use in dual supplies. <ost
regulators include some automatic protection from e!cessive current 1?overload
protection?3 and overheating 1?thermal protection?3.
<any of the fi!ed voltage regulator (8s has , leads and look like power
transistors, such as the -+$; J;> %4 regulator shown on the right. They include
a hole for attaching a heatsink if necessary.

Fig. 3.2' (oltage Regulator an% output wa#e form of regulate% #oltage
CHAPTER 8OUR
$9$TE1 TE$TIN. AND I1P)E1ENTATION
The testing and implementation of this system were done simultaneously. The
method adopted for this was the module by module implementation.
4,1 $oft0ar" T"sting and Im%/"m"ntation
The software was written in Basic programming language. 4ll the hardware
modules were considered during this stage. This is because the software was
e6ually written in modules. 9uring each module implementation, ( tested by
programming the chip and running the system to ensure that the e!pected action
was effectively done. 4t each stage, especially where the code fails, debugging
was carried out.
4,( Im%/"m"ntation of t&" In%ut Int"rfac"
The input interface constitutes the sensors. These sensors are used by the robot
to detect sun light and motion. The sensor ( used was the light 9ependent
Resistor 179R3. The layout of the circuit that implements it is shown below
Figure 4.1 Sensor Layout diagram
This diagram shows the various components used as they were layed out on the
board before soldering. /rom that diagram, RG is the 79R, R# is base resistor
for the transistor, R, is control resistor and R% is the pull resistor for the
collector of the resistor. Now the complete wiring diagram of the output
interface is shown below
Figure 4.2 Wiring diagram of the Input interface
In figure 4.2, the input interface is wired up. With the power supplied,
the circuit was tested by allowing light to cast on the surface of the
sensor. It was obsered that the output was ! at the collector of the
transistor. When the light was remoed, the output became ". #his
obseration was then used during the programming to control the action
of the robot based on the preailing circumstance of light or dar$ness.
4.3 Output Interface Testing and Implementation
The output interface of the watering robot is made up of the water pump and the
motor control. The water pump was controlled by means of a relay circuit,
which is switched by a transistor. The circuit that implements the pump control
is shown in figure G.,.
Figure 4.% &elay circuit for
controlling the 'ump
(uring the testing, it was obsered that at power up, the relay will switch
and the pump would be )*. When ! is placed at the bas of the
resistor, the relay switches again and the pump would go off. 'utting "
at the base ma$es the pump to come )n again. #his principle was then
used during programming. #o ma$e the pump to spray water, logic 1
was place at the base of the transistor. #o stop the pump, logi ! was
placed at the base of the transistor.
#he motor were interfaced to the system ia a dc motro drier chip
+L2,%(-. #he circuit that implements that is shown in figure 4.4 below.
Figure 4.4 (c /otor (rier circuit
#he testing carried out this circuit was to determine the log alues that
turn motor left or roght. In this circuit, there are two dc motor. )n of
them is used to moe the robot. #he second one is used to control the
test probe. #he test probe is used by the robot to test the soil for water.
0bsence of water ma$e the robot to spray water. *ow, the pin 2 and 1
seres as input to motor on pins % and 2. When 1 and ! are placed at
pins 2 and 1 respectiely, the motor turns right. If ! and 1, the motor
turns left. #his concept was used to write the program module that
controls the motor.
)ther aspects of the testing and implementation of the robot were the
mechanical contruction of the entire body parts. #hese were also tested
for fle3ibility. #he photograph of this robot is placed at the appendi3.
CHAPTER FIVE
!""AR# A$% CO$C&!IO$
'.( ummar) of Ac*ie+ements
#he achieements are diided into the following stages.
c. Object Sensing
Sensing the line was not an easy tas$. 0las, it was achieed by mean of
light color against bac$ground color.
d. Chip Programming
)ne man4or mile stone achieement in this pro4ect was the prgramming
of the chip and burning the code into the chip. #his is e3citing being the
state of the art technology in electronics. With this leel of achieement,
it has become possible to learn how to design5deelop mobile deices.
'., Pro-lems Encountered and olutions
)ne of the greatest challenges was that of decoding the $eys.
0nother aspect of the problems is that of getting the right component for
the design wor$. Some of the components were not found and some do
not hae immediate replacement in the data boo$s. In such cases, re6
design was the only solution.
Lastly, getting the right code that wor$ed too$ a lot of time. #his so in
the sense that you need to do seeral debugging and testing before you
can succeed.
'.3 uggestions for Furt*er Impro+ements
In this design, I hae been able to implement a robot that can moe to
the garden at the re7uest of the user and probe the soil to $now wheater
the soil is moist or not. 8ut the robot moes only linearly and cannot
turn. I hereby recommend that anyone wishing to carryout this pro4ect
again should attempt to implement a robot th can turn.
'.4 Recommendations
I will strongly suggest that more time should be allocated to school
pro4ect. #his will go a long way to helping the student inoled to truly
participate actiely in deeloping his wor$.
0nother important suggestion is financial support. 9oernment and
agencies should come to the aid of the student carrying out such pro4ect
wor$ as this financially. #his can only be possible if the school will lin$
the student to such agencies and goernmental institutions.
'.' Conclusions
0t the end of this pro4ect, I was able to implement a wor$ing model of a
watering robot of which this documentation is a report containig the
technical design issues.

You might also like