+ All Categories
Home > Documents > Watering Robot

Watering Robot

Date post: 14-Oct-2015
Category:
Upload: emmy-obasi
View: 33 times
Download: 1 times
Share this document with a friend
Description:
Microcontroller based garden watering robot

of 39

Transcript

CHAPTER 1PROJECT INTRODUCTIONBackground of studyNowadays 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 exhibit 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.Stories of artificial helpers and companions and attempts to create them have a long history but fully autonomous machines only appeared in the 20th century. The first digitally operated and programmable robot, the Unimate, was installed in 1961 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 exploration, surgery, weaponry, laboratory research, and mass production of consumer and industrial goods.

The International Organization for Standardization gives a definition of robot in ISO 8373: "an automatically controlled, reprogrammable, multipurpose, manipulator programmable in three or more axes, which may be either fixed in place or mobile for use in industrial automation applications." This definition is used by the International Federation of Robotics, the European Robotics Research Network (EURON), and many national standards committees. The Robotics Institute of America (RIA) uses a broader definition: a robot is a "re-programmable multi-functional manipulator designed to move materials, parts, tools, or specialized devices through variable programmed motions for the performance of a variety of tasks." The RIA subdivides robots into four classes: devices that manipulate objects with manual control, automated devices that manipulate objects with predetermined cycles, programmable and servo-controlled robots with continuous point-to-point trajectories, and robots of this last type which also acquire information from the environment and move intelligently in response. Aim and Objectives

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 proximity sensors.

To redirect motor movement when obstacles are detected. To display information on digital readout such as LCD.Justification If this prototype is fully developed will be very useful in many areas such as:

a. Prevent accident on the road

b. Find lost objects

c. Applied in the development of a full humanoid

d. Scientific and engineering research

Scope of the Project

Efforts towards achieving the above objectives will be limited to a robot that can detect only obstacle in its environment. The following materials will be exploited:AT89S52 Microconroller, Infrared Proximity sensor, DC motor driver units, LCD and c programming language.Constraints

Beyond obstacles and avoiding them, the robot may not be .

Project Report OrganizationThis thesis is organized into five chapters. Chapter one explains the introductory of the project including the objective and scope of this project. Chapter two surveys the literature review more about previous study on topics that related to the project. Chapter 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.

Chapter four illustrates the result, testing and implementation after the project is completed and finally chapter five will summarized the project in all field.

CHAPTER 2LITERATURE REVIEW

2.0 General overview

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 garden-watering robot, will take over the task of adequately watering a garden at pre-determined intervals. It 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. After watering, the robot returns to its home base and waits until it is time to water plants again.

A small, electrical water pump will deliver water from the on-robot reservoir to the pot. A tube will direct the water from the pump to inside the pot. Once the robot exhausts its water supply, it will return to its home base and wait refilling.2.1 Mobile robotMobile robots have the capability to move around in their environment and are not fixed to one physical location. . In contrast, industrial robots usually consist of a jointed arm (multi-linked manipulator) and gripper assembly (or end effector) that is attached to a fixed surface. An example of a mobile robot that is in common use today is the automated guided vehicle or automatic guided vehicle (AGV). An AGV is a mobile robot that follows markers or wires in the floor, or uses vision or lasers.Mobile 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. Mobile 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.2.1.1Classifications of mobile robot Mobile robots may be classified by:

1. The environment in which they travel:

Land or home robots. They are most commonly wheeled, but also include legged robots with two or more legs Aerial robots are usually referred to as unmanned aerial vehicles (UAVs)

Underwater robots are usually called autonomous underwater vehicles (AUVs)

Polar robots, designed to navigate icy, crevasse filled environments

2. The device they use to move, mainly:

Legged robot: human-like legs (i.e. an android) or animal-like legs.

Wheeled robot.

Tracks.

2.1.2Mobile robot navigation

There are many types of mobile robot navigation:

I. Manual remote or Tele-operatedA manually Tele-operated 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. A Tele-operated robot is typically used to keep the operator out of harm's way.II. Guarded Tele-opA guarded Tele-op robot has the ability to sense and avoid obstacles but will otherwise navigate as driven, like a robot under manual Tele-op. few if any mobile robots offer only guarded Tele-op.III. Line-following robot

Some of the earliest Automated Guided Vehicles (AGVs) 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. Most 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.

2.2Wheeled robotFor simplicity most mobile robots have four wheels or a number of continuous tracks. Some researchers have tried to create more complex 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.

Two-wheeled 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 counter-balance the fall at hundreds of times per second, based on the dynamics of an inverted pendulum. Many different balancing robots have been designed. Six-wheeled robots: Using six 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 six-wheeled 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. However, 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 Perception, Processing, and Action (robotic paradigms) Sensors give information about the environment or the robot itself (e.g. the position of its joints or its end effector). This information is then processed to calculate the appropriate signals to the actuators (motors) which move the mechanical.The processing phase can range in complexity. At a reactive level, it may translate raw sensor information directly into actuator commands. Sensor fusion may first be used to estimate parameters of interest (e.g. the position of the robot's gripper) from noisy sensor data. An immediate task (such as moving the gripper in a certain direction) is inferred from these estimates. Techniques from control theory convert the task into commands that drive the actuators.

At longer time scales or with more sophisticated tasks, the robot may need to build and reason with a "cognitive" model. Cognitive models try to represent the robot, the world, and how they interact. Pattern recognition and computer vision can be used to track objects. Mapping techniques can be used to build maps of the world. Finally, motion planning and other artificial intelligence techniques may be used to figure out how to act. For example, a planner may figure out how to achieve a task without hitting obstacles, falling over, etc.

2.3Motor

An electrical motor is defined as a motor that converts electrical energy to a mechanical energy to do work. It allows electric power to be used to run machinery. A 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: Direct Current motor (DC motor), Alternating Current Motor (AC motor) and Universal Motor (can operate AC and DC current) [6].

2.4Microcontroller

A microcontroller is an inexpensive single-chip computer. Single-chip means that the entire computer system lies within the confines of the integrated circuit. The microcontrollers existing on the encapsulated silver of silicon have features and similarities to our standard personal computers. Primarily, the microcontroller is capable of storing and running a program [9]. Microcontrollers are frequently used in automatically controlled products and devices, such as automobile engine control systems, office machines, appliances, power tools, and toys. By reducing the size, cost, and power consumption compared to a design using a separate microprocessor, memory, and input/output devices, microcontrollers make it economical to electronically control many more processes.A Microcontroller is a general-purpose 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 fixed program that is stored in ROM and that does not change over the lifetime of the system. A 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 one-chip solution.

2.4.1Advantages of Using Microcontroller over Microprocessor

A microcontroller (MCU) is a computer-on-a-chip. It is a type of microprocessor emphasizing self-sufficiency and cost-effectiveness, in contrast to a general-purpose microprocessor. The only difference between a microcontroller and a microprocessor is that a microprocessor has three parts - ALU, Control Unit and registers (like memory), while the microcontroller has additional elements like ROM, RAM etc. The advantage of using MCU is a microcontroller is an inexpensive single-chip computer. Single-chip means that the entire computer system lies within the confines of the integrated circuit. The microcontroller contains a central processing unit (CPU), random-access memory (RAM), read-only memory (ROM), electrical erasable programmable read-only memory (EEPROM), input/output (I/O) lines, serial and parallel ports, timer and other built-in peripherals, such as ADC (analog-digital converter) and DAC (digital analog converters. The most common microcontroller use is PIC (Microchip), MC68HC16 (Motorola), etc.

2.4.2Microcontroller AT89C51 Features4K Bytes of In-System Reprogrammable Flash Memory

Endurance: 1,000 Write/Erase Cycles

Fully Static Operation: 0 Hz to 24 MHz

Three-level Program Memory Lock

128 x 8-bit Internal RAM

32 Programmable I/O Lines

Two 16-bit Timer/Counters

Six Interrupt Sources

Programmable Serial Channel Low-power Idle and Power-down Modes

Description

The AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4K bytes of Flash programmable and erasable read only memory (PEROM). The device is manufactured using Atmels high-density nonvolatile memory technology and is compatible with the industry-standard MCS-51 instruction set and pin out. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C51 is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications.Power Window Motor This project will use two DC 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 DC power window motor is used to move the wheel to any direction. The mechanism of the motor will act differently to the corresponding IR sensors that detect the path of the line following. When none of the IR 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 PWM (Pulse Width Modulator).Water Pump

As stated in the previous chapters, the water pump that will be used for the watering process is a DC water pump. This water pump was hard to find and it was bought in Singapore. The water pump is control by a 12V SRD 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

ANALYSIS AND DESIGN OF A GARDEN WATERING ROBOT3.0Introduction

This chapter explains all the methodologies for development of waterbot. It gives review of all method that being used in designing and constructing this project. This chapter also explains in theory of how the circuit process as well as the components that will be use and the work flowchart.

3.1System Analysis and Description

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. Figure 3.1 shows the progress or the sequence of this project. From the flow chart, in order to complete this project, data collecting and gathering is needed. Collect 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. After literature review step there are 3 main steps are needed to complete this project. The three main steps are hardware development, circuit development and software development. The final Step is to integrate all the three main parts to complete the waterbot project and archive the objective of this project.

System/ hardware specifications Control method: fully autonomous

Power source: 5 and 9 volt dc power supply and 500 mA current.DC motor: 4Target environment: Outdoors Electronic and Circuit Part For the robot able to function properly, the electronic part must be perfectly installed to the robot. In this project there are several circuits that need to be design for the robot. First circuit is the main circuit that consist voltage regulator circuit to give the voltage to turn on the integrated circuit (IC) and to avoid the circuit burn. Second is the IR sensors that are used to detect the line. Next is the power window motor controller that acts as a driver to the motor in this robot.Circuit developmentThe 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.

ComponentExplanations / specificationCompany

AT89C51Microcontroller: To control the input and outputMicrochip Technology

inc.

Resistor K ohm

voltage regulatorGive exact value +5v to microcontroller7805CT

Capacitor100uF (4 quantities), 22uF (2 quantities)

Reset switchFor reset application

Crystal 20MhzGive the signal clock to

microcontroller

Switch Input switch for this waterbot project

Protection diodeProtects against eddy current from the coil to the water pump.

Bridge rectifier

Capacitive filterFiltering out any AC source.

Crystal oscillatorFrequency generator

Object Sensors

3.2The Input Interfaces

There are two input interfaces used in this design. One is the input interfaces is push button, while the second is LDR sensors.

3.2.1Switches:

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.

Port 1 (P1.0, P1.1, and P1.2) was used to interface the switches. As 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 pull-up resistor. The value of the pull-up resistor used was well above 1K ohms. The pull-up 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.1Push button switches

Principle of operation:

Before the key is pressed, the status of the port is logic 1 but when the key is pressed, the logic state changes to logic 0. The program in the microcontroller monitors the port for the presence of logic 0. Logic 0 at the port indicate the button was pressed and a corresponding call to s subroutine that performs a desired function will be done.

3.2.2Motion Sensor

The sensors were used to achieve an automation that determines when the moving parts should stop or start moving. The sensor is made of Light Dependent Resistor (LDR). Since there are eight cardinal directions to be measured, eight configurations of LDR were used.

The operational principle of the LDR was exploited in this design. The resistance of LDR decreases with the presence of light. If light is prevented from reaching the LDR the resistance increases. The design is shown below:

Fig3.2Input Interface DesignBy this design, when light reaches the LDR the base is at logic 1, which causes a biasing of the NPN transistor. The logic level of the collector at this instance is logic 0 (Collector voltage of a biased NPN transistor). On the other hand, when there is obscurity around the LDR, the base logic level is 0. Now, because of the pull up at the collector, the logic level at the collector remains high.

In the control program design, if the collector output is 1, the system does nothing, but if the logic level is at 0, then a direction would be detected and displayed.3.3Microcontroller system

P1

40

P3 P0

P2

Fig. 3.2the Microcontroller system

There are four parts, P0, P1, P2, and p3 in the microcontroller. Any part can be used as input and output part depending on how it was programmed.

Port 0

Port 0 is an 8-bit open drain bi-directional I/O port. As an output port, each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high-impedance inputs.

Port 0 can also be configured to be the multiplexed low-order address/data bus during accesses to external program and data memory. In this mode, P0 has internal pull-ups.

Port 0 also receives the code bytes during Flash programming and outputs the code bytes during program verification. External pullups are required during program verification.

Port 1

Port 1 is an 8-bit bi-directional I/O port with internal pullups. The Port 1 output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pull ups. In addition, P1.0 and P1.1 can be configured to be the timer/counter 2 external count input (P1.0/T2) and the timer/counter 2 trigger input (P1.1/T2EX), respectively, as shown in the following table.

Port 1 also receives the low-order address bytes during Flash programming and verification.

Port 2

Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 2 output buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 2 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that uses 16-bit addresses (MOVX @ DPTR). In this application, Port 2 uses strong internal pull-ups when emitting 1s. During accesses to external data memory that uses 8-bit addresses (MOVX @ RI), Port 2 emits the contents of the P2 Special Function Register.

Port 2 also receives the high-order address bits and some control signals during Flash programming and verification.

Port 3

Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 3 output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pull-ups. Port 3 also serves the functions of various special features of the AT89C51, as shown in the following table.

Port 3 also receives some control signals for Flash programming and verification.

Port

Pin Alternate Functions

P3.0

RXD (serial input port)

P3.1

TXD (serial output port)

P3.2

INT0 (external interrupt 0)

P3.3

INT1 (external interrupt 1)

P3.4

T0 (timer 0 external input)

P3.5

T1 (timer 1 external input)

P3.6

WR (external data memory write strobe)

P3.7

RD (external data memory read strobe)

EA/VPP (External Access Enable)

Pin 31 (EA/VPP) must be connected to Vcc only if the microcontroller will use its internal RAM and ROM, otherwise EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should be strapped to VCC for internal program executions.

This pin also receives the 12-volt programming enable voltage (VPP) during Flash programming when 12-volt programming is selected.

From the diagram shown above, pin 40 is connected to Vcc, while pin 20 is the ground pin. the pin is strapped to ground to enable access to external program memory starting from 0000h to ffffh. Pin 9 is the reset pin, which must be connected to Vcc through a 10F capacitor for CMOS version.

3.4.1System ResetRST

Reset is an input pin. A 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. Pin 9 of the microcontroller is used as the reset pin. In this design, the internal reset circuit was used; hence pin 9 was connected to Vcc through a capacitor as shown in the figure below: Fig. 3.3 System Reset Circuit3.4.2 System Clock

In this design, the microcontroller uses its internal clock. Pins 18 (XTAL1) and 19 (XTAL2), which serves as input and output pins respectively, connect a 16MHZ crystal through 30pf capacitor on each terminal to ground. This configuration is used if the internal oscillator must be used.

Fig. 3.4 Crystal connection to the microcontroller3.4.3 Memory

In this design work, the internal memory (RAM and ROM) of the microcontroller was used. This microcontroller, AT89C51 has 4K Byte Flash ROM and 128 x 8 bits internal RAM. To enable the internal memories, pin 31 (EA/VPP) was connected to Vcc.

3.4 POWER UNIT

The system has a step down transformer that steps 240 Vac to 12 Vac. The required voltage for the system is 5 V dc and 12 V dc. To obtain these voltage levels, the power supply was designed as follows. It is divided into 4 modules, namely

a. Transformer

b. Rectifier

c. Filter

d. Regulator

Fig.3.21 Output wave form of the complete power supply

The Transformer

The transformer used in this project work is rated at 240 Vac Primary and 12 Vca Secondary. The maximum current capacity was 500mA. It was centre tapped and full wave capacity.

Transformers convert AC electricity from one voltage to another with little loss of power. Transformers work only with AC and this is one of the reasons why mains electricity is AC.

Step-up transformers increase voltage, step-down transformers reduce voltage. Most power supplies use a step-down transformer to reduce the dangerously high mains voltage (230V) to a safer low voltage.

The input coil is called the primary and the output coil is called the secondary. There is no electrical connection between the two coils, instead they are linked by an alternating magnetic field created in the soft-iron 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 (almost) equal 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. A step-down transformer has a large number of turns on its primary (input) coil which is connected to the high voltage mains supply, and a small number of turns on its secondary (output) coil to give a low output voltage.

turnsratio=Vp=Npandpowerout=powerinVs

Ns

VsIs VpIp

Vp = primary (input) voltageNp = number of turns on primary coilIp = primary (input) current

Vs = secondary (output) voltageNs = number of turns on secondary coilIs = secondary (output) current

Fig.3.22

Wave form of the transformer output

The RectifierThe purpose of the rectifier is to convert the 12 Vac to dc. The rectifier type was full wave bridge rectifier, having 4 distinct diodes connected as shown below. The considerations for choosing the diodes were the following factors

a. Forward current rating in Ampere

b. Peak-Inverse voltage (PIV) in volt

The forward current is a short duration current that charges the filter capacitor. The value depends on the PIV.

PIV is the maximum voltage that occure across the rectifier diode in the reverse direction. It is usually equal to 4 x maximum secondary voltage (4Vsm) of the transformer for 4 diode full wave rectifiers. In order words, PIV = Vsm. Since the transformer was stepping down to 12 Vac, Vsm = PIV = 12 volt.

Total PIV = 12 x 4 = 48V

Hence searching through the data book, the part number of the diode that meet this condition was IN5391. This is a general purpose diode, with 600 PRV and 1A.

Fig.3.23a Output of full wave rectified Dc

Fig.3.23b Bridge rectifier

Smoothing

Smoothing is performed by a large value electrolytic capacitor (in this case 3300uF) connected across the DC supply to act as a reservoir, supplying current to the output when the varying DC voltage from the rectifier is falling. The diagram shows the unsmoothed varying DC (dotted line) and the smoothed DC (solid line). The capacitor charges quickly near the peak of the varying DC, and then discharges as it supplies current to the output.

Fig3.24Waveform of RectifiedNote that smoothing significantly increases the average DC voltage to almost the peak value (1.4 RMS value). For example 6V RMS AC is rectified to full wave DC of about 4.6V RMS (1.4V is lost in the bridge rectifier), with smoothing this increases to almost the peak value giving 1.44.6=6.4V smooth DC.

Smoothing is not perfect due to the capacitor voltage falling a little as it discharges, giving a small ripple voltage. For many circuits a ripple which is 10% of the supply voltage is satisfactory and the equation below gives the required value for the smoothing capacitor. A larger capacitor will give fewer ripples. The capacitor value must be doubled when smoothing half-wave DC.

Smoothing capacitor for 10% ripple, C = 5 Io Vs f

C= smoothing capacitance in farads (F)Io=output current from the supply in amps (A)Vs=supply voltage in volts (V), this is the peak value of the unsmoothed DCf=frequency of the AC supply in hertz (Hz), 50Hz in the UK

Regulator

Figure 3.12: Voltage RegulatorRegulator ICs are available with fixed (typically 5, 12 and 15V) or variable output voltages. They are also rated by the maximum current they can pass. Negative voltage regulators are available, mainly for use in dual supplies. Most regulators include some automatic protection from excessive current ('overload protection') and overheating ('thermal protection').

Many of the fixed voltage regulator ICs has 3 leads and look like power transistors, such as the 7805 +5V 1A regulator shown on the right. They include a hole for attaching a heatsink if necessary.

Fig. 3.25Voltage Regulator and output wave form of regulated voltage

CHAPTER FOURSYSTEM TESTING AND IMPLEMENTATION

The testing and implementation of this system were done simultaneously. The method adopted for this was the module by module implementation.

4.1Software Testing and ImplementationThe software was written in Basic programming language. All the hardware modules were considered during this stage. This is because the software was equally written in modules. During each module implementation, I tested by programming the chip and running the system to ensure that the expected action was effectively done. At each stage, especially where the code fails, debugging was carried out.

4.2Implementation of the Input InterfaceThe input interface constitutes the sensors. These sensors are used by the robot to detect sun light and motion. The sensor I used was the light Dependent Resistor (LDR). The layout of the circuit that implements it is shown below:

Figure 4.1Sensor Layout diagram

This diagram shows the various components used as they were layed out on the board before soldering. From that diagram, R4 is the LDR, R2 is base resistor for the transistor, R3 is control resistor and R1 is the pull resistor for the collector of the resistor. Now the complete wiring diagram of the output interface is shown below:

Figure 4.2Wiring 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 observed that the output was 0v at the collector of the transistor. When the light was removed, the output became 5v. This observation was then used during the programming to control the action of the robot based on the prevailing circumstance of light or darkness.

4.3Output Interface Testing and ImplementationThe 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 4.3.Figure 4.3Relay circuit for controlling the Pump

During the testing, it was observed that at power up, the relay will switch and the pump would be ON. When 0v is placed at the bas of the resistor, the relay switches again and the pump would go off. Putting 5 at the base makes the pump to come On again. This principle was then used during programming. To make the pump to spray water, logic 1 was place at the base of the transistor. To stop the pump, logi 0 was placed at the base of the transistor.

The motor were interfaced to the system via a dc motro driver chip (L293D). The circuit that implements that is shown in figure 4.4 below:

Figure 4.4Dc Motor Driver circuit

The testing carried out this circuit was to determine the log values that turn motor left or roght. In this circuit, there are two dc motor. On of them is used to move the robot. The second one is used to control the test probe. The test probe is used by the robot to test the soil for water. Absence of water make the robot to spray water. Now, the pin 2 and 7 serves as input to motor on pins 3 and 6. When 1 and 0 are placed at pins 2 and 7 respectively, the motor turns right. If 0 and 1, the motor turns left. This concept was used to write the program module that controls the motor. Other aspects of the testing and implementation of the robot were the mechanical contruction of the entire body parts. These were also tested for flexibility. The photograph of this robot is placed at the appendix.

CHAPTER FIVESUMMARY AND CONCLUSION5.1Summary of AchievementsThe achievements are divided into the following stages:

c.Object SensingSensing the line was not an easy task. Alas, it was achieved by mean of light color against background color.

d.Chip ProgrammingOne manjor mile stone achievement in this project was the prgramming of the chip and burning the code into the chip. This is exciting being the state of the art technology in electronics. With this level of achievement, it has become possible to learn how to design/develop mobile devices.

5.2Problems Encountered and SolutionsOne of the greatest challenges was that of decoding the keys.

Another aspect of the problems is that of getting the right component for the design work. Some of the components were not found and some do not have immediate replacement in the data books. In such cases, re-design was the only solution.

Lastly, getting the right code that worked took a lot of time. This so in the sense that you need to do several debugging and testing before you can succeed.

5.3Suggestions for Further Improvements In this design, I have been able to implement a robot that can move to the garden at the request of the user and probe the soil to know wheater the soil is moist or not. But the robot moves only linearly and cannot turn. I hereby recommend that anyone wishing to carryout this project again should attempt to implement a robot th can turn.5.4RecommendationsI will strongly suggest that more time should be allocated to school project. This will go a long way to helping the student involved to truly participate actively in developing his work.

Another important suggestion is financial support. Government and agencies should come to the aid of the student carrying out such project work as this financially. This can only be possible if the school will link the student to such agencies and governmental institutions.5.5ConclusionsAt the end of this project, I was able to implement a working model of a watering robot of which this documentation is a report containig the technical design issues.

P9

20

19

18

Port

_1231381216.unknown


Recommended