faarm report
TRANSCRIPT
-
7/28/2019 FAARM Report
1/54
1
CHAPTER 1
INTRODUCTION
1.1 INTRODUCTION TO ROBOTICSRobotics is the art, knowledge base, and the know- how of designing, applying,
and using robots in human endeavors. Robotic systems consist of not only robots, but also
other devices and systems used together with robots. Robots may be used in manufacturing
environments, in underwater and space exploration, for aiding the disabled, or even for fun.
In any capacity, robots can be useful, but they need to be programmed and controlled.
Robotics is an interdisciplinary subject that benefits from mechanical engineering,
electrical and electronic engineering, electronics and communication engineering,
computer science, cognitive science, biology and many other disciplines.
According to Robotics Institute of America (RIA) robots are classified as follows
1. Variable sequence Robot: performs predefined tasks and easy to modify.2. Playback Robot: a human operator performs the task manually by leading the
robot, which records the motion for later playback; the robot repeats the same
motions according to recorded information.
3. Numerical controlled Robot: the operator supplies the robot with a movementprogram rather than teaching it the task manually.
4. Intelligent Robot: a robot with means to understand its environment and theability to successfully complete a task despite changes in the surrounding
conditions under which it is to be performed.
1.2 NEED FOR ROBOTS IN AGRICULTURAL FIELDDue to modernization, more number of people are moving from rural area to urban
area. This causes high demand of man power in agricultural field which results in investing
more money for hiring man for field work like planting, harvesting, removing weeds, and
watering. In order to overcome this problem we are introducing machines to do all
agricultural tasks. These tasks can be performed with accuracy and in efficient manner.
This also increases the productivity with less supervision of farmer and saves time.
-
7/28/2019 FAARM Report
2/54
2
1.3 AUTONOMOUS ROBOTAutonomous robots are self supporting or in other words self
contained. In a way they rely on their own brains. Autonomous robots run a program that
gives them the opportunity to decide on the action to perform depending on theirsurroundings. At times these robots even learn new behavior. They start out with a short
routine and adapt this routine to be more successful at the task they perform. The most
successful routine will be repeated as such their behavior is shaped.
1.4 AGRICULURAL ROBOTThe idea of robotic agriculture (agricultural environments serviced by smart
machines) is not a new one. Many engineers have developed driverless tractors in the past
but they have not been successful as they did not have the ability to embrace the
complexity of the real world. Most of them assumed an industrial style of farming where
everything was known before hand and the machines could work entirely in predefined
waysmuch like a production line. The approach is now to develop smarter machines that
are intelligent enough to work in an unmodified or semi natural environment. These
machines do not have to be intelligent in the way we see people as intelligent but must
exhibit sensible behaviour in recognised contexts. In this way they should have enough
intelligence embedded within them to behave sensibly for long periods of time, unattended,
in a semi-natural environment, whilst carrying out a useful task. One way of understanding
the complexity has been to identify what people do in certain situations and decompose the
actions into machine control.
1.5 AUTONOMOUS AGRICULURAL ROBOTIntroduction of autonomous robotic vehicles in an agricultural operation
environment may potentially allow care and management of crops in ways that reduce the
environmental impact, while increasing precision and efficiency. Successful deployment of
such vehicles requires the traditional field operation management process to be revisited.
Managing autonomous field operations will require a planning framework detailing how
the vehicles should drive and act to attain the mission goals. As a result, the traditional job-
shop planning methodology must be supplemented with motion planning supported by
-
7/28/2019 FAARM Report
3/54
3
software tools that allow an automated planning. In general, a dedicated pre-planning of the
routes and tasks of the operation is shown to improve overall efficiency. The control
architectures for autonomous mobile vehicles include different layers of abstraction for
handling both deliberation and reactivity. In a hybrid architecture deliberation or mission
planning focus on the predictable or goal-directing behavior of autonomous vehicles (e.g.
route plan) while local reactive behavior deals with the uncertainty of the environment and
adaptation to local conditions. A number of approaches to operation planning for
agricultural machinery, ranging from manual planning systems to various degrees of
automated planning involving parameterization of the planned operation have been
attempted. Supplemental to that, more vehicle routing problems have been investigated.
1.6ORGANISATION:
In this report, the listed chapters cover following contents Chapter 2 deals
the existing systems and its demerits. Chapter3 gives the detailed description of the
proposed system. Chapter 4 gives the software details used in this project. Chapter 5
discusses the results of this project. Chapter 6 gives the conclusion and future
advancements that can be implemented in this system.
-
7/28/2019 FAARM Report
4/54
4
CHAPTER 2
LITERATURE SURVEY
2.1 EXSISTING SYSTEM
Basically many major robotic vehicles were developed for agricultural tasks. Among
them four important and notable modules are as follows
Jia Jianqiang, Chen Weidong and Xi Yugeng, Design and Control of an Open
Autonomous Mobile Robot System, Journal of Shanghai JiaoTong Universiy, 2005, vol.
39.
The design concept of open architecture was applied to the
agricultural robot described in this work, which includes open design on structure system
and control system. As for openness of structure system, it reflects open design on
hardware, which means that it should be taken into account by replacing the different
actuators to adapt to different tasks during the design and the number of sensors can be
appropriately increased or reduced. Meanwhile, the control system should retain sufficient
interfaces to control the actuator and receive sensors signals.
Chen Zhong; Xu Guoyu; Wang Guanjie adn Yan Wei, Hierarchical Control Theory
and Power System Automation, Electric Machines and Control, 2003, vol. 7.
A hierarchical structure was applied to the control system. The
organization level is the decision-making system of the robot with the highest level of
intelligence to accomplish task planning according to operation tasks. It can construct
model of the environment in the light of environmental information, maps knowledge and
-
7/28/2019 FAARM Report
5/54
5
planning knowledge and make a global path planning with other information such as
position and orientation of the robot
Zhengyou Zhang, A Flexible New Technique for Camera Calibration, IEEE
Transactions on Pattern Analysis and Machine Intelligence, 2000, vol. 22.
The calibration method and algorithm, proposed by Zhang
Zhengyou, were adopted in this work. Through the calibration, the position errors of
camera were reduced and the resolution was determined for future experiments. In order to
capture the image, the portable PC with AMD Turion 64 X2 TL-50 dual-core processor and
the portable plug-in USB2.0 type image acquisition box are equipped in the robot. And the
SONY CCD colorful camera with the 8mm- focus lens is used as the visual system.
G. Belforte, R. Deboli, P. Gay and D. Ricauda Aimonino, Robot Design and Testing
for Greenhouse Applications, Biosystems Engineering, 2006, vol. 95.
Based on above proposed concept all kinds of agricultural robots have
been researched and developed simple and cost effective robot to implement a number of
agricultural production in many countries, such as picking, harvesting, weeding, pruning,
planting, grafting, agricultural classification, etc.
2.2 DEMERITS OF EXSISTING SYSTEM
1. However, these intelligent devices are used only to solve the specific questions onautomation and intelligence of agricultural production, they only have specific
functions.
2. These machines adapt only to the specific environments so that it is not easy toexpand and improve them.
3. The production efficiency is low due to seasonal usage, which indirectly increasesthe cost of agricultural production.
4. In addition, the intelligence level of navigation must be improved further, especiallyfor crops planted in rows, it is necessary to further study in order to realize
navigation according to row crops by using machine vision.
-
7/28/2019 FAARM Report
6/54
6
CHAPTER 3
PROPOSED SYSTEM
3.1 ABOUT PROJECT
As one of the trends of development on automation and
intelligence of agricultural machinery in the 21st century, all kinds of agricultural robots
have been researched and developed to implement a number of agricultural production in
many countries, such as picking, harvesting, weeding, pruning, planting, grafting,
agricultural classification, etc. And they gradually appear advantages in agricultural
production to increase productivity, improve application accuracy and enhance handling
safety. In China, the study on agricultural robots is on the way and mainly reflects in two
aspects, one is based on the tractors and other agricultural machinery to develop intelligent
systems with navigation function; the other is to independently develop intelligent mobile
platform for agriculture. A vision-based row guidance method is presented to guide the
robot platform driven along crops planted in row. Vision-based row guidance is to use
camera to detect and identify crop plants and then to find accurate and stable navigation
information from the binary image. The captured image are then processed by using image
processing technique, the processed are then converted into voltage levels through MAX
232 level converter and given it to the microcontroller unit. In the microcontroller unit, c
language coding is predefined, according to this coding the robot which connected to it was
controlled. Robot which has several motors is activated by using the relays. Relays are
nothing but electromagnetic switch which ON/OFF according to the control given by the
microcontroller unit.
3.2 BLOCK DIAGRAM
PC with MATLAB
-
7/28/2019 FAARM Report
7/54
7
Figure 3.1 Block diagram
RELAY
Driver
8051
Micro
Controller
Power
Supply
RELAY
Driver
Web camera
R
O
B
O
T
MAX 232
PC with MATLAB
Processing
Authentication
Recognition
Plant
Healthy plant
for reference
stored in
MATLAB
-
7/28/2019 FAARM Report
8/54
8
3.3 FLOWCHART
Figure3.2 Flow chart of sequence of operation
START
ROBOT FORWARD
PLANT DETECTION &
HISTOGRAM
COMPARING WITH
REFERENCE PLANT
IS
PLANT
HEALTHY
PICKS THE PLANT & SEEDS
MOVES TO NEXT PLANT
STOP
YES
NO
-
7/28/2019 FAARM Report
9/54
9
3.4 HARDWARE REQUIREMENTS
1. 8051 Microcontroller2. PC3. MAX232 level converter4. Relay with ULN 2003A IC5. DC Motors6. Web camera7. Power supply
3.5 SOFTWARE REQUIREMENTS
1. Embedded C2. Keil C Compiler.
3.6 IMAGE PROCESSING MODULE:
From figure 3.1, the block consists of three steps namely, processing,
authentication and recognition. The sequence is shown in figure 3.2, where in first step,
a picture of a healthy plant is taken by CCD camera and stored in MATLAB of PC as
reference image. Here the CCD camera is fixed to snap mode which takes the picture of
the plant. In case if the picture taken is blurred, then that image is preprocessed for
enhancement by histogram equalization technique. In second step, the enhanced image
is evaluated in term of histogram and spatiogram using MATLAB. In third step, these
values that are calculated are compared with the reference image. If the difference
between the captured image and reference is near to or equal to the threshold value,
then the plant is considered to be healthy and left intact.If the value is very less than
the threshold value, then the plant under consideration is said to be unhealthy and it isremoved. According to the difference value and threshold value, the microcontroller
receives command 1, 2 and 3 from PC, where 1 is to leave the plant undisturbed and
move forward, 2 is to remove the plant and 3 is to drop new seed in the place of old
plant. The commands are passed through MAX232 that is connected between PC and
microcontroller.
-
7/28/2019 FAARM Report
10/54
10
3.7 HARDWARE MODULE
The various hardware modules are listed as follow
3.7.1 MICROCONTROLLER:
A microcontroller (also microcontroller unit, MCU or C) is a small computer on a
single integrated circuit consisting of a relatively simple CPU combined with support
functions such as a crystal oscillator, timers and etc. Microcontrollers are used in
automatically controlled products and devices, such as automobile engine control systems,
remote controls, office machines, appliances, power tools, and toys.
It is based on an 8 bit central processing unit with an 8 bit Accumulator and
another 8 bit B register as main processing blocks. Other portions of the architecture
include few 8 bit and 16 bit registers and 8 bit memory locations. Each 8031 device has
some amount of data RAM built in the device for internal processing. This area is used for
stack operations and temporary storage of data. This base architecture is supported with
onchip peripheral functions like I/O ports, timers/counters, versatile serial communication
port. So it is clear that this 8031 architecture was designed to cater many real time
embedded needs.
The following list gives the features of the 8051 architecture:
1. Optimized 8 bit CPU for control applications.2. Extensive Boolean processing capabilities.3. 64K Program Memory address space.4. 64K Data Memory address space.5. 128 bytes of onchip Data Memory.6. 32 Bi-directional and individually addressable I/O lines.7.
Two 16 bit timer/counters.
8. Full Duplex UART, On-chip clock oscillator.9. 6-source / 5-vector interrupt structure with priority levels.
3.7.1.1 8051 schematic
-
7/28/2019 FAARM Report
11/54
11
Figure3.3 Schematic diagram of 8051
In figure 3.3, the input and output device are connected to port pins of the
controller. Typical input and output devices include switches, relays, solenoids, LEDs,
small or custom LCD displays, radio frequency devices, and sensors for data such as
temperature, humidity, light level etc. The device, such as GSM, GPS and RFID are
interfaced to the controller via serial communication i.e. TX and RX pins.
3.7.1.2 8051 ARCHITECTURE
-
7/28/2019 FAARM Report
12/54
12
Figure3.4 8051 Architecture
Figure 3.4 show the architecture of 8051. The 8051 is an 8-bit machine. Its memory is
organized in bytes and practically all its instruction deal with byte quantities. It uses an
Accumulator as the primary register for instruction results. Other operands can be accessed
using one of the four different addressing modes available: register implicit, direct, indirect
or immediate. Operands reside in one of the five memory spaces of the 8051. The five
memory spaces of the 8051 are: Program Memory, External Data Memory, Internal Data
Memory, Special Function Registers and Bit Memory. The Program Memory space
contains all the instructions, immediate data and constant tables and strings. It is
principally addressed by the 16-bit Program Counter (PC), but it can also be accessed by a
few instructions using the 16-bit Data Pointer (DPTR). The maximum size of the Program
-
7/28/2019 FAARM Report
13/54
13
Memory space is 64K bytes. Several 8051 family members integrate on-chip some amount
of either masked programmed ROM or EPROM as part of this memory space.
The External Data Memory space contains all the variables, buffers and data
structures that can't fit on-chip. It is principally addressed by the 16-bit Data Pointer
(DPTR), although the first two general purpose register (R0, R1) of the currently selected
register bank can access a 256-byte bank of External Data Memory. The maximum size of
the External Data Memory space is 64Kbytes. External data memory can only be accessed
using the indirect addressing mode with the DPTR, R0 or R1.The Internal Data Memory
space is functionally the most important data memory space. In it resides up to four banks
of general purpose registers, the program stack, 128 bits of the 256-bit memory, and all the
variables and data structures that are operated on directly by the program. The maximum
size of the Internal Data Memory space is 256-bytes. However, different 8051 family
members integrate different amounts of this memory space on chip. The register implicit,
indirect and direct addressing modes can be used in different parts of the Internal Data
Memory space.
The Special Function Register space contains all the on-chip peripheral I/O registers
as well as particular registers that need program access. These registers include the Stack
Pointer, the PSW and the Accumulator. The maximum number of Special Function
Registers (SFRs) is 128, though the actual number on a particular 8051 family member
depends on the number and type of peripheral functions integrated on-chip. The SFRs all
have addresses greater than 127 and overlap the address space of the upper 128 bytes of the
Internal Data Memory space. The two memory spaces are differentiated by addressing
mode. The SFRs can only be accessed using the Direct addressing mode while the upper
128 bytes of the Internal Data Memory (if integrated on-chip) can only be accessed using
the Indirect addressing mode.
3.7.2. MAX 232
MAX 232 is primarily used for building electronics with an RS-232 interface. Serial
RS-232 communication works with voltages (-15V ... -3V for high and +3V ... +15V for
low) which are not compatible with normal computer logic voltages. To receive serial data
from an RS-232 interface the voltage has to be reduced, and the low and high voltage level
-
7/28/2019 FAARM Report
14/54
14
inverted. In the other direction (sending data from some logic over RS-232) the low logic
voltage has to be "bumped up", and a negative voltage has to be generated.
The Figure 3.5 shows the pin diagram Of MAX 232.
Figure3.5. Pin Diagram of MAX232
3.7.2.1 CIRCUIT DESCRIPTION
Here the MAX 232 IC is used as level logic converter. The MAX232 is a dual
driver/receiver that includes a capacitive voltage generator to supply EIA 232 voltage
levels from a single 5v supply. Each receiver converts EIA-232 to 5v TTL/CMOS levels.
Each driver converts TLL/CMOS input levels into EIA-232 levels. The logical function of
MAX 232 pins are shown in Table.3.1.
Table.3.1.Function table of MAX 232
-
7/28/2019 FAARM Report
15/54
15
In this Figure3.6, the microcontroller transmitter pin is connected in the MAX232 T2IN
pin which converts input 5v TTL/CMOS level to RS232 level. Then T2OUT pin is
connected to reviver pin of 9 pin D type serial connector which is directly connected to
GSM modem.
In GSM modem, the transmitting data is given to R2IN of MAX232 through
transmitting pin of 9 pin D type connector which converts the RS232 level to 5v
TTL/CMOS level. The R2OUT pin is connected to receiver pin of the microcontroller.
Likewise the data is transmitted and received between the microcontroller and GSM
modem.
3.7.2.2. SERIAL COMMUNICATION
Serial communication is basically the transmission or reception of data one bit at a
time. Today's computers generally address data in bytes or some multiple thereof. A byte
contains 8 bits. A bit is basically either a logical 1 or zero. Every character on this page is
actually expressed internally as one byte. The serial port is used to convert each byte to a
Figure3.6. MAX 232 circuit
-
7/28/2019 FAARM Report
16/54
16
stream of ones and zeroes as well as to convert a stream of ones and zeroes to bytes. The
serial port contains an electronic chip called a Universal Asynchronous
Receiver/Transmitter (UART) that actually does the conversion.
The serial port has many pins. Electrically speaking, whenever the serial port sends a
logical one (1) a negative voltage is effected on the transmit pin. Whenever the serial port
sends a logical zero (0) a positive voltage is effected. When no data is being sent, the serial
port's transmit pin's voltage is negative (1) and is said to be in a MARK state. The serial
port can also be forced to keep the transmit pin at a positive voltage (0) and is said to be the
SPACE or BREAK state. (The terms MARK and SPACE are also used to simply denote a
negative voltage (1) or a positive voltage (0) at the transmit pin respectively).
3.7.2.3. RS 232
On looking at the connector pin out of the RS232 port, we see two pins which are
certainly used for flow control. These two pins are RTS, request to send and CTS, clear to
send. With DTE/DCE communication (i.e. a computer communicating with a modem
device) RTS is an output on the DTE and input on the DCE. CTS is the answering signal
coming from the DCE.
Before sending a character, the DTE asks permission by setting its RTS output. No
information will be sent until the DCE grants permission by using the CTS line. If the DCE
cannot handle new requests, the CTS signal will go low. A simple but useful mechanism
allowing flow control in one direction. The assumption is that the DTE can always handle
incoming information faster than the DCE can send it. In the past, this was true. Modem
speeds of 300 baud were common and 1200 baud was seen as a high speed connection.
For further control of the information flow, both devices have the ability to signal
their status to the other side. For this purpose, the DTR data terminal ready and DSR data
set ready signals are present. The DTE uses the DTR signal to signal that it is ready toaccept information, whereas the DCE uses the DSR signal for the same purpose.
-
7/28/2019 FAARM Report
17/54
17
Pin diagram of RS 232 is shown in Figure3.7. The last flow control signal present in
DTE/DCE communication is the CD carrier detect. It is not used directly for flow control,
but mainly an indication of the ability of the modem device to communicate with its
counterpart. This signal indicates the existence of a communication link between two
modem devices.
3.7.3. RELAY:
A Relay is an electrically operated switch. Many relays use an
electromagnet to operate a switching mechanism mechanically, but other operating
principles are also used. Relays are used where it is necessary to control a circuit by a low-
power signal (with complete electrical isolation between control and controlled circuits), or
where several circuits must be controlled by one signal. The first relays were used in long
distance telegraph circuits, repeating the signal coming in from one circuit and re-
transmitting it to another. Relays were used extensively in telephone exchanges and early
computers to perform logical operations.
A type of relay that can handle the high power required to directly drive an electricmotor is called a contactor. Solid-state relays control power circuits with no moving parts,
instead using a semiconductor device to perform switching. Relays with calibrated
operating characteristics and sometimes multiple operating coils are used to protect
electrical circuits from overload or faults; in modern electric power systems these functions
are performed by digital instruments still called "protective relays".
Figure.3.7. Pin diagram of RS 232
http://en.wikipedia.org/wiki/Electrichttp://en.wikipedia.org/wiki/Switchhttp://en.wikipedia.org/wiki/Electromagnethttp://en.wikipedia.org/wiki/Contactorhttp://en.wikipedia.org/wiki/Solid-state_relayshttp://en.wikipedia.org/wiki/Moving_partshttp://en.wikipedia.org/wiki/Protective_relayhttp://en.wikipedia.org/wiki/Protective_relayhttp://en.wikipedia.org/wiki/Moving_partshttp://en.wikipedia.org/wiki/Solid-state_relayshttp://en.wikipedia.org/wiki/Contactorhttp://en.wikipedia.org/wiki/Electromagnethttp://en.wikipedia.org/wiki/Switchhttp://en.wikipedia.org/wiki/Electric -
7/28/2019 FAARM Report
18/54
18
Figure 3.8 Simple Relay
Figure 3.8 shows simple relay. A simple electromagnetic relay consists of a coil of
wire surrounding a soft iron core, an iron yoke which provides a low reluctancepath for
magnetic flux, a movable iron armature, and one or more sets of contacts (there are two in
the relay pictured). The armature is hinged to the yoke and mechanically linked to one or
more sets of moving contacts. It is held in place by a spring so that when the relay is de-
energized there is an air gap in the magnetic circuit. In this condition, one of the two sets of
contacts in the relay pictured is closed, and the other set is open. Other relays may have
more or fewer sets of contacts depending on their function. The relay in the picture also has
a wire connecting the armature to the yoke. This ensures continuity of the circuit between
the moving contacts on the armature, and the circuit track on the printed circuit board
(PCB) via the yoke, which is soldered to the PCB.
When an electric current is passed through the coil it generates a magnetic fieldthat attracts the armature, and the consequent movement of the movable contact(s) either
makes or breaks (depending upon construction) a connection with a fixed contact. If the set
of contacts was closed when the relay was de-energized, then the movement opens the
contacts and breaks the connection, and vice versa if the contacts were open. When the
current to the coil is switched off, the armature is returned by a force, approximately half as
http://en.wikipedia.org/wiki/Coilhttp://en.wikipedia.org/wiki/Magnetic_corehttp://en.wikipedia.org/wiki/Magnetic_reluctancehttp://en.wikipedia.org/wiki/Armature_%28electrical_engineering%29http://en.wikipedia.org/wiki/Spring_%28device%29http://en.wikipedia.org/wiki/Printed_circuit_boardhttp://en.wikipedia.org/wiki/Electric_currenthttp://en.wikipedia.org/wiki/Magnetic_fieldhttp://en.wikipedia.org/wiki/Magnetic_fieldhttp://en.wikipedia.org/wiki/Electric_currenthttp://en.wikipedia.org/wiki/Printed_circuit_boardhttp://en.wikipedia.org/wiki/Spring_%28device%29http://en.wikipedia.org/wiki/Armature_%28electrical_engineering%29http://en.wikipedia.org/wiki/Magnetic_reluctancehttp://en.wikipedia.org/wiki/Magnetic_corehttp://en.wikipedia.org/wiki/Coil -
7/28/2019 FAARM Report
19/54
19
strong as the magnetic force, to its relaxed position. Usually this force is provided by a
spring, but gravity is also used commonly in industrial motor starters. Most relays are
manufactured to operate quickly. In a low-voltage application this reduces noise; in a high
voltage or current application it reduces arcing.
When the coil is energized with direct current, a diode is often placed across the
coil to dissipate the energy from the collapsing magnetic field at deactivation, which would
otherwise generate a voltage spike dangerous to semiconductorcircuit components. Some
automotive relays include a diode inside the relay case. Alternatively, a contact protection
network consisting of a capacitor and resistor in series (snubber circuit) may absorb the
surge. If the coil is designed to be energized with alternating current (AC), a small copper
"shading ring" can be crimped to the end of the solenoid, creating a small out-of-phase
current which increases the minimum pull on the armature during the AC cycle.[1]
A solid-state relay uses a thyristor or other solid-state switching device,
activated by the control signal, to switch the controlled load, instead of a solenoid. An
optocoupler(a light-emitting diode (LED) coupled with a photo transistor) can be used to
isolate control and controlled circuits.
3.7.3.1. ULN 2003
The ULN2003 is a monolithic high voltage and high current Darlington transistor
arrays. It consists of seven NPN Darlington pairs that features high-voltage outputs with
common-cathode clamp diode for switching inductive loads. The collector-current rating of
a single Darlington pair is 500mA. The Darlington pairs may be paralleled for higher
current capability. Applications include relay drivers, hammer drivers, lampdrivers, displaydrivers (LED gas discharge), line drivers, and logic buffers. The ULN2003 has a 2.7kW
series base resistor for each Darlington pair for operation directly with TTL or 5V CMOS
devices. The figure 3.9 is shown below
http://en.wikipedia.org/wiki/Arcinghttp://en.wikipedia.org/wiki/Direct_currenthttp://en.wikipedia.org/wiki/Diodehttp://en.wikipedia.org/wiki/Voltage_spikehttp://en.wikipedia.org/wiki/Semiconductorhttp://en.wikipedia.org/wiki/Snubberhttp://en.wikipedia.org/wiki/Alternating_currenthttp://en.wikipedia.org/wiki/Relay#cite_note-0http://en.wikipedia.org/wiki/Relay#cite_note-0http://en.wikipedia.org/wiki/Relay#cite_note-0http://en.wikipedia.org/wiki/Thyristorhttp://en.wikipedia.org/wiki/Optocouplerhttp://en.wikipedia.org/wiki/Light-emitting_diodehttp://en.wikipedia.org/wiki/Photo_transistorhttp://en.wikipedia.org/wiki/Photo_transistorhttp://en.wikipedia.org/wiki/Light-emitting_diodehttp://en.wikipedia.org/wiki/Optocouplerhttp://en.wikipedia.org/wiki/Thyristorhttp://en.wikipedia.org/wiki/Relay#cite_note-0http://en.wikipedia.org/wiki/Alternating_currenthttp://en.wikipedia.org/wiki/Snubberhttp://en.wikipedia.org/wiki/Semiconductorhttp://en.wikipedia.org/wiki/Voltage_spikehttp://en.wikipedia.org/wiki/Diodehttp://en.wikipedia.org/wiki/Direct_currenthttp://en.wikipedia.org/wiki/Arcing -
7/28/2019 FAARM Report
20/54
20
Figure 3.9 ULN2003 circuit
Figure3.10. Relay circuit
-
7/28/2019 FAARM Report
21/54
21
In figure 3.10, one of the two sets of contacts in the relay pictured is closed, and the
other set is open. The P0_0, P0_1, P0_2 and P0_3 pin of controller is assumed as data
transmit pins to the relay through relay driver ULN 2003. ULN 2003 is just like a current
driver.
3.7.4. DC MOTOR:
A DC motor is an electric motorthat runs on direct current (DC) electricity. By far
the most common DC motor types are the brushed and brushless types, which use internal
and external commutation respectively to create an oscillating AC current from the DC
sourceso they are not purely DC machines in a strict sense. Figure 3.11 show the picture
of a DC motor.
Figure3.11 DC motor
We in our project are using brushed DC Motor, which will operate in the ratings of 12v DC
0.6A which will drive the flywheels in order to make the robot move.
3.7.4.1. PRINCIPLE OPERATION OF BRUSHED DC MOTOR
http://en.wikipedia.org/wiki/Electric_motorhttp://en.wikipedia.org/wiki/Direct_currenthttp://en.wikipedia.org/wiki/Direct_currenthttp://en.wikipedia.org/wiki/Electric_motor -
7/28/2019 FAARM Report
22/54
22
All DC motors are made of the same basic components: a stator, rotor, brushes and
a commutator.In any electric motor, operation is based on simple electromagnetism. A
current-carrying conductor generates a magnetic field; when this is then placed in an
external magnetic field, it will experience a force proportional to the current in the
conductor, and to the strength of the external magnetic field. As you are well aware of from
playing with magnets as a kid, opposite (North and South) polarities attract, while like
polarities (North and North, South and South) repel. The internal configuration of a DC
motor is designed to harness the magnetic interaction between a current-carrying conductor
and an external magnetic field to generate rotational motion.
Now let us look at a D.C motor shown in figure 3.12.
Figure3.12 Principle operation of DC motor
Excited stator coils are assumed to produce south and north poles as depicted.
Now if the armature is connected to a D.C source, current will be flowing through the
armature conductors. Let the conductors under the influence of the south pole carries
currents and the conductors under the influence of north pole carries currents. Applying
Fleming's left hand rule, we note torque will be produced in the counter clockwise
direction causing the rotor to move in the same direction. For steady speed operation, will
be balanced by the mechanical load torque imposed on the shaft. Load torque will be in the
opposite direction of rotation. It should be noted that when the armature conductors move
http://encyclobeamia.solarbotics.net/articles/current.htmlhttp://encyclobeamia.solarbotics.net/articles/current.htmlhttp://encyclobeamia.solarbotics.net/articles/dc.htmlhttp://encyclobeamia.solarbotics.net/articles/current.htmlhttp://encyclobeamia.solarbotics.net/articles/current.htmlhttp://encyclobeamia.solarbotics.net/articles/dc.htmlhttp://encyclobeamia.solarbotics.net/articles/current.htmlhttp://encyclobeamia.solarbotics.net/articles/current.html -
7/28/2019 FAARM Report
23/54
23
in presence of a field, voltage is bound to be induced in the conductor (as explained in the
previous section). The direction of this generated emf, ascertained by Fleming's right hand
rule is found to be in the opposite direction of the current flow. In other words, the
generated voltage in the armature acts in opposition to the source voltage. The generated
voltage in a D.C motor is usually called the back emf.
The brushed DC electric motor generates torque directly from DC power supplied to
the motor by using internal commutation, stationary permanent magnets, and rotating
electrical magnets. Like all electric motors or generators, torque is produced by the
principle ofLorentz force, which states that any current-carrying conductor placed within
an external magnetic field experiences a torque or force known as Lorentz force.
Advantages of a brushed DC motor include low initial cost, high reliability, and simple
control of motor speed. Disadvantages are high maintenance and low life-span for high
intensity uses. Maintenance involves regularly replacing the brushes and springs which
carry the electric current, as well as cleaning or replacing the commutator. These
components are necessary for transferring electrical power from outside the motor to the
spinning wire windings of the rotor inside the motor.
3.7.5 ROBOT MECHANISM
Robotic arms are used in assembly lines to pick the components of products to be
assembled and place and fit them at the right place. Such as in a production line of canned
food, lids are placed, cans are picked by robotic arms and placed in the container packets or
like in the assembly line of cars, the frames of cars move on the conveying system one by
one and robotic arms or manipulators working around the frame fit different components
on to it and finally completed cars come out of the assembly line.
i) ARM MECHANISM
1) Arm:
Robot arms come in all shapes and sizes. The arm is the part of the robot that
positions the end effectors and sensors to do their pre-programmed business. Many (but not
all) resemble human arms, and have shoulders, elbows, wrists, even fingers. This gives the
robot a lot of ways to position itself in its environment. Each joint is said to give the robot 1
http://en.wikipedia.org/wiki/Lorentz_forcehttp://en.wikipedia.org/wiki/Commutator_%28electric%29http://en.wikipedia.org/wiki/Commutator_%28electric%29http://en.wikipedia.org/wiki/Lorentz_force -
7/28/2019 FAARM Report
24/54
24
degree of freedom. So, a simple robot arm with 3 degrees of freedom could move in 3
ways: up and down, left and right, forward and backward. Most working robots today have
6 degrees of freedom.
2) Actuator
Actuator of the robot arm is the "engine" that drives the links (the sections between
the joints into their desired position. Without a drive, a robot would just sit there, which is
not often help. Most drives are powered by air, water pressure, or electricity. In this
project, the preferred actuator that is chose is electrical drive.
3) End - Effectors
The end effectors is the "hand" connected to the robot's arm. It is often different
from a human hand and it could be a tool such as a gripper, a vacuum pump, tweezers,
scalpel, and blowtorch or just about anything that helps it do its job. Some robots can
change end-effectors, and be reprogrammed for a different set of tasks. If the robot has
more than one arm, there canbe more than one end effectors on the same robot, each suited
for a specific task. The figure 3.13 shows the above operation
Figure3.13 Simple arm driven by DC motor
ii) WHEEL MECHANISM
1) Wheel diameterWhen buying (or making) your wheels you want to put your motor into
consideration. For a start, there is torque and velocity. Large diameter wheels give your
robot low torque but high velocity. So if you already have a very strong motor, then you
-
7/28/2019 FAARM Report
25/54
25
can use wheels with larger diameters. Servo's already have good torque, so you should use
larger diameter wheels. But if your motor is weak (such as if it does not have any gearing),
you want to use a much smaller diameter wheel. This will make your robot slower, but at
least it has enough torque to go up a hill! Another dumb mistake someone can make is
buying a wheel that has a diameter close to or less than the motor diameter. For example, if
you have a 1" diameter motor, and a 1.5" diameter wheel, you have a .25" ground
clearance ( (1.5"-1")/2=.25" ).
2) Wheel textureIn fig 3.16, the texture of your wheel is very terrain dependent. A common mistake
for beginners is to ignore the texture of the wheel. If your wheel is too smooth then it will
not have much friction. This is a serious issue with omni-wheels. An all plastic omni-wheel
works poorly compared to an omni-wheel that uses rubber for the side wheels. Overly
smooth robot wheels would likely skid while accelerating and braking. However a wheel
that is really rough, such as a foam wheel, has higher friction with the ground leading to
inefficiency. You also need to considerwear and tear on the wheel. Figure 3.14 shows the
picture of robot wheel.
Figure3.14 Robot Wheel
3) Wheel center hole diameterThis is where you would actually mount the output motor shaft to your motor. So
you must know the length and diameter of your motor output shaft so that you may put this
shaft into the hole of your motor.
http://www.societyofrobots.com/actuators_servos.shtmlhttp://www.societyofrobots.com/robot_omni_wheel.shtmlhttp://www.societyofrobots.com/schematics_dcmotorbraking.shtmlhttp://www.societyofrobots.com/schematics_dcmotorbraking.shtmlhttp://www.societyofrobots.com/robot_omni_wheel.shtmlhttp://www.societyofrobots.com/actuators_servos.shtml -
7/28/2019 FAARM Report
26/54
26
4) Mounting Robot Wheel TechniquesIf the wheel does not have a center hole, just drill one out slightly smaller than the
diameter of the shaft of your motor. Make sure the hole is perfectly centered. Then you can
fill the hole with a little superglue, and finally press fit (jam, if you will) the motor shaft
into the wheel. Perhaps use a little more superglue around the edges. The figure 3.15
depicts the above technique.
Figure3.15 Mounting Robot Wheel
3.7.6 WEB CAMERA
Figure.3.16.Webcam
-
7/28/2019 FAARM Report
27/54
27
Web camera, is the loosely used term for any camera that generates images that
can be accessed by and displayed on the World Wide Web through a server.
A webcam is essentially just a camera that is connected to a computer, either
directly or wirelessly, and gathers a series of images for remote display elsewhere. A
webcam is a video camera which feeds its images in real time to a computer or computer
network, often via USB, Ethernet or Wi-Fi.A model of webcam is shown in Figure.3.16.
3.7.8 POWER SUPPLY FOR 8051 MICROCONTROLLER
The power supply section is the important one. It should deliver constant
output regulated power supply for successful working of the project. A 0-12V/1 mA
transformer is used for this purpose. The primary of this transformer is connected in to
main supply through on/off switch& fuse for protecting from overload and short circuit
protection. The secondary is connected to the diodes to convert 12V AC to 12V DC
voltage. And filtered by the capacitors, which is further regulated to +5v, by using IC 7805.
The circuit below figure 3.17 illustrates the connection between power supply and
8051 microcontroller.
-
7/28/2019 FAARM Report
28/54
28
Figure3.17 Power supply for 8051
-
7/28/2019 FAARM Report
29/54
29
3.7.9 OVERALL CIRCUIT
The overall circuit is given in figure 3.18
Figure3.18 Overall circuit
PORT CONFIGURATION
PORT 0: Arm and claw control.
PORT 2: Tray and wheel movement.
PORT 3: PC
-
7/28/2019 FAARM Report
30/54
30
3.8 SOFTWARE MODULE DESCRIPTION
The various software modules are listed as follow
3.8.1 MATLAB
MATLAB (matrix laboratory) is a numerical computing environment and
programming language. Created by The MathWorks, MATLAB allows easy matrix
manipulation, plotting offunctions and data, implementation ofalgorithms, creation ofuser
interfaces, and interfacing with programs in other languages. Although it specializes in
numerical computing, an optional toolbox interfaces with the Maple symbolic engine,
allowing it to be part of a full computer algebra system.
MATLAB has excellent capacity to analyze images, access hardware devices, and
even support TCP/IP protocols which makes it the most optimum package for our
application. Just for reading and displaying an image, we may require to write about 300
lines of code in C, where in MATLAB it can easily achieved with the functions imread and
imshow. Moreover C is a DOS based language which cannot run windows dlls and the
driver programs written in advanced language like VC++. Moreover Web applications are
written in CGI-pearl or asp which does not have the power to control the comport
hardware.
But MATLAB, we can have all these with a single package. The only
disadvantage of MATLAB is its a scripting language. And it cannot create a standalone
application i.e., these scripts cannot run in a computer which does not have MATLAB
program.
3.8.2 ABOUT COMPILERS:
8051 C-Compiler & Assembler Kit
The CA51 Compiler Kit for the 8051 microcontroller family supports all 8051
derivatives including those from companies like Analog Devices, Atmel, Cypress
Semiconductor, Dallas Semiconductor, Goal, Hynix, Infineon, Intel, OKI, Philips, Silicon
http://en.wikipedia.org/wiki/Numerical_analysishttp://en.wikipedia.org/wiki/Programming_languagehttp://en.wikipedia.org/wiki/The_MathWorkshttp://en.wikipedia.org/wiki/Matrix_(mathematics)http://en.wikipedia.org/wiki/Function_(mathematics)http://en.wikipedia.org/wiki/Algorithmhttp://en.wikipedia.org/wiki/User_interfacehttp://en.wikipedia.org/wiki/User_interfacehttp://en.wikipedia.org/wiki/Maple_(software)http://en.wikipedia.org/wiki/Computer_algebra_systemhttp://en.wikipedia.org/wiki/Computer_algebra_systemhttp://en.wikipedia.org/wiki/Maple_(software)http://en.wikipedia.org/wiki/User_interfacehttp://en.wikipedia.org/wiki/User_interfacehttp://en.wikipedia.org/wiki/Algorithmhttp://en.wikipedia.org/wiki/Function_(mathematics)http://en.wikipedia.org/wiki/Matrix_(mathematics)http://en.wikipedia.org/wiki/The_MathWorkshttp://en.wikipedia.org/wiki/Programming_languagehttp://en.wikipedia.org/wiki/Numerical_analysis -
7/28/2019 FAARM Report
31/54
31
Labs, SMSC, STMicroelectronics, Synopsis, TDK, Temic, Texas Instruments, and
Winbond.
The following components are included in the CA51 8051 C-compiler & Assembler Kit:
C51 C Compiler
The Keil C51 C Compiler for the 8051 microcontroller is the most popular 8051 C
compiler in the world. It provides more features than any other 8051 C compiler available
today.
The C51 Compiler allows you to write 8051 microcontroller applications in C that have the
efficiency and speed of assembly language. Language extensions in the C51 Compiler give
you full access to all resources of the 8051.
C51 translates C source files into a relocatable object module. When the DEBUG control is
used, the object file contains full symbolic information for debugging with the Vision3
Debugger or an in-circuit emulator. In addition to the object file, the C51 Compiler
generates a listing file which optionally may include symbol table and cross-reference
information.
Features:
1. Nine basic data types, including 32-bit IEEE floating-point2. Flexible variable allocation with bit, data, bdata, idata, xdata, and pdata memory
types
3. Interrupt functions may be written in C4. Full use of the 8051 register banks5. Complete symbol and type information for source-level debugging6. Use of AJMP and ACALL instructions7. Bit-addressable data objects8. Built-in interface for the RTX51 real-time operating system9. Support for dual data pointers on Atmel, AMD, Cypress, Dallas Semiconductor,
Infineon, Philips, and Triscend microcontrollers
10. Support for the Philips 8xC750, 8xC751, and 8xC752 limited instruction sets11. Support for the Infineon 80C517 arithmetic unit
-
7/28/2019 FAARM Report
32/54
32
A51 Macro Assembler
The A51 Assembler is a macro assembler for the 8051 family of microcontrollers. It
supports all 8051 derivatives. It translates symbolic assembly language mnemonics into
relocatable object code where the utmost speed, small code size, and hardware control are
critical. The macro facility speeds development and conserves maintenance time since
common sequences need only be developed once. The A51 assembler supports symbolic
access to all features of the 8051 architecture.
The A51 assembler translates assembler source files into a relocatable object
modules. The DEBUG control adds full symbolic information to the object module and
supports debugging with the Vision3 Debugger or an in-circuit emulator. In addition to
object files, the A51 assembler generates list files which optionally may include symbol
table and cross reference information.
Vision3 IDE
The Vision3 IDE from Keil Software combines project management, make
facilities, source code editing, program debugging, and complete simulation in one
powerful environment. Vision3 helps you get programs working faster than ever while
providing an easy-to-use development platform. The editor and debugger are integrated
into a single application and provide a seamless embedded project development
environment.
Vision3 features include:
1. The Device Database which automatically sets the assembler, compiler, and linkeroptions for the chip you select. This prevents you from wasting your time
configuring the tools and helps you get started writing code faster.
2. A robust Project Manager which lets you create several different configurations ofyour target from a single project file. The Keil Vision3 IDE allows you to create
an output file for simulating, an output file for debugging with an emulator, and an
output file for programming an EPROM -- all from the same Project file.
-
7/28/2019 FAARM Report
33/54
33
3. An integrated Make facility with automatic dependency generation. You don't haveto figure out which header files and include files are used by which source files.
The Keil compilers and assemblers do that automatically.
4. Interactive Error Correction. As your project compiles, errors and warningsappear in an output window. You may make corrections to the files in your project
while Vision3 continues to compile in the background. Line numbers associated
with each error or warning are automatically resynchronized when you make
changes to the source.
3.8.3 QUICKCAM SOFTWARE
This is the software that must be installed in the system in which we are intended to
watch video. The webcam used here is wired camera. This quick cam gives video with
good clarity and vision.
-
7/28/2019 FAARM Report
34/54
34
CHAPTER 4
RESULTS AND DISCUSSIONS
4.1 ROBOT DESCRIPTIONS
The figure 4.1displays the description of FAARM. The results obtained in this robot
are explained as follows
Figure4.1 Robot part descriptions
Seed Box
Robotic Arm
Moving Tray
Wheels driven by
DC motor
-
7/28/2019 FAARM Report
35/54
35
Figure4.2 image capturing
A healthy plants image is captured by the webcam connected with the pc. The
captured image is stored in the database of the pc. The image in the database is processed
by the MATLAB software and essential parameters (colour histogram and spatiogram) are
extracted from the image and stored. This image serves as the reference image. This
process is shown in figure 4.2.
At start, the robot moves forward and starts detecting the plant crop via webcam.
The robot movement is driven by two DC motors connected to the wheels. When the robot
detects the plant, the image of the plant is captured and the image extraction is carried out
by MATLAB software.
Two possibilities of output can be acquired after the image comparison which
involves comparison of the extracted parameters of the reference and the detected plants
image is done by the MATLAB software in PC. They are as follow
Case 1: Plant match
The MATLAB software displays The plant matchesand sends a command 1 to
controller from PC through RS232. This command will drive the robot to move forward
and starts detecting the next plant. This is illustrated in figure 4.3
Healthy plantwebcam
-
7/28/2019 FAARM Report
36/54
36
Figure4.3Depicting robots forward motion
Case 2: Plant mismatch
The MATLAB software displays The plant do not matches and sends a command
2 to controller from PC through RS232. This command will drive the robots arm to
remove the unhealthy plant and dispose into movable tray. Three DC motors perform these
actions. After some delay, command 3 is given to controller to PC by MATLAB
software. This drive the robot to move backward and drop the seed by the punching device.
This is illustrated in Figure 4.4(a),Figure 4.4(b) and Figure 4.4(c) respectively.
Figure4.4(a) Robot arm removing the plant
-
7/28/2019 FAARM Report
37/54
37
Figure 4.4(b) Disposing unhealthy plant inside tray
-
7/28/2019 FAARM Report
38/54
38
Figure4.4(c) Seed box for Seeding
Then the robot moves forward in detecting next plant in the row and continues the samecycle of process.
-
7/28/2019 FAARM Report
39/54
39
CHAPTER 5
CONCLUSION AND FUTURE ENHANCEMENT
5.1 CONCLUSION
In this modern era, the invasion of Robot has brought an unprecedented change
in almost all the fields and change has been reflected in increased productivity. With the
same optimistic approach this project has designed a robot that aids in the field of
agriculture. In present situation, soil infertility is the vital problem which is caused due to
chemical pesticides. This FAARM (Facile Autonomous Agricultural Robot Machine) has
been designed in such a way that it provides the solution for the above mentioned problem.
In this project, the plants image was captured by webcam and processed in pc
using pc via MATLAB software. The unhealthy plant was removed by the robotic arm
which is driven by three DC motors. This process is followed by dropping of seed by
punching device. If the plant is healthy, the robot is driven normally forward by two DC
motors connected to the wheel.
5.2 FUTURE ENHANCEMENT
This project can be further upgraded by fixing solar panels to conserve the power
by effective usage of conventional source of energy. Also using RF transmission multiple
robots can be accessed by single PC.
REFERENCE:
1) G. Belforte, R. Deboli, P. Gay and D. Ricauda Aimonino, Robot Design and Testing
for Greenhouse Applications, Biosystems Engineering, 2006, vol. 95, no. 3, pp. 309-32
2) T. Chateau, C. Debain and F. Collange, Automatic Guidance of Agricultural
Vehicles Using a Laser Sensor, Computers and Electronics in Agriculture, 2000, vol.28,
no. 3, pp. 243-257.
-
7/28/2019 FAARM Report
40/54
40
3) Chen Zhong; Xu Guoyu; Wang Guanjie adn Yan Wei, Hierarchical Control Theory
and Power System Automation, Electric Machines and Control, 2003, vol. 7, no. 4, pp.
352-355.
4) John F. Reid, Qin Zhang, Noboru Noguchi and Monte Dickson. Agricultural
Automatic Guidance Research in North America, Computers and Electronics in
Agriculture, 2000, vol. 25, no. 1-2, pp. 155167.
5) Jia Jianqiang, Chen Weidong and Xi Yugeng, Design and Control of an Open
Autonomous Mobile Robot System, Journal of Shanghai JiaoTong Universiy, 2005, vol.
39, no. 6, pp. 905-909.
6) Keicher R. and Seufert H., Automatic Guidance for Agricultural Vehicles in
Europe, Computers and Electronics in Agriculture, 2000, vol. 25, no.. 1-2, pp. 169-194.
7) Zhengyou Zhang, A Flexible New Technique for Camera Calibration, IEEE
Transactions on Pattern Analysis and Machine Intelligence, 2000, vol. 22, no. 11, pp.1330-
1334
APPENDIX 1
PROGRAM CODING
#include sbit motor1_1 = P0^0;
sbit motor1_2 = P0^1;sbit motor2_1 = P0^2;sbit motor2_2 = P0^3;
sbit armback = P0^4;
sbit armfrent = P0^5;sbit down = P0^6;
sbit up = P0^7;
sbit pick = P2^0;
sbit place = P2^1;sbit trayclose = P2^2;
sbit trayopen = P2^3;
sbit seed = P2^4;
void delay(unsigned int value){
unsigned int i, j;
for(i=0;i
-
7/28/2019 FAARM Report
41/54
41
}
void serial_init(){TMOD=0x20;
TH1=0xFD;
SCON=0x50;TR1=1;}
void Transmit(unsigned char value){
SBUF=value;
while(TI==0);
TI=0;}
unsigned char Recieve(){unsigned char a;
while(RI==0);
a=SBUF;
RI=0;return a;
}
void serial_string(unsigned char *s){
while(*s){
Transmit(*s);
s++;}
}
void main(){
unsigned char a;
serial_init();serial_string("ITROB02\n\r");
P0=0x00;
P2=0x00;
while(1){
a=Recieve();
Transmit(a);
if(a=='1'){motor1_1 = 1;
motor2_1 = 1;
delay(300);motor1_1 = 0;
-
7/28/2019 FAARM Report
42/54
42
motor2_1 = 0;
}
else if(a=='2'){P0=0x00;
P2=0x00;
down = 1;delay(350);down = 0;
delay(10);
pick = 1;delay(50);
pick = 0;
delay(10);
up = 1;delay(500);
up = 0;
delay(10);armfrent = 1;
delay(220);
armfrent = 0;
delay(10);trayopen = 1;
delay(50);
trayopen = 0;delay(10);
place = 1;
delay(50);
place = 0;delay(50);
trayclose = 1;
delay(50);trayclose = 0;
delay(10);
armback = 1;delay(220);
armback = 0;
delay(10);
}else if(a=='3'){
motor1_2 = 1;
motor2_2 = 1;
delay(150);motor1_2 = 0;
motor2_2 = 0;
delay(20);seed = 1;
-
7/28/2019 FAARM Report
43/54
43
delay(500);
seed = 0;
delay(20);}
else if(a=='4'){
pick = 1;delay(50);pick = 0;
delay(10);
place = 1;delay(50);
place = 0;
}
else if(a=='5'){down = 1;
delay(350);
down = 0;delay(10);
up = 1;
delay(500);
up = 0;}
else if(a=='6'){
seed = 1;delay(500);
seed = 0;
}
else if(a=='7'){armfrent = 1;
delay(220);
armfrent = 0;delay(10);
armback = 1;
delay(220);
armback = 0;
}else if(a=='8'){
P0=0x00;
P2=0x00;
motor1_1 = 0;motor2_1 = 0;
}
else if(a=='a'){motor1_1 = 1;
-
7/28/2019 FAARM Report
44/54
44
motor2_1 = 1;
delay(100);
motor1_1 = 0;motor2_1 = 0;
}
else if(a=='s'){ //backwardmotor1_2 = 1;motor2_2 = 1;
delay(100);
motor1_2 = 0;motor2_2 = 0;
}
else if(a=='d'){ //rotate left
armback = 1;delay(50);
armback = 0;
}else if(a=='f'){ //rotate right
armfrent = 1;
delay(50);
armfrent = 0;}
else if(a=='g'){ //up
down = 1;delay(50);
down = 0;
}
else if(a=='h'){ //downup = 1;
delay(50);
up = 0;}
else if(a=='j'){ //pick
pick = 1;delay(10);
pick = 0;
}
else if(a=='k'){ //placeplace = 1;
delay(10);
place = 0;
}else if(a=='l'){
trayclose = 1;
delay(40);trayclose = 0;
-
7/28/2019 FAARM Report
45/54
45
}
else if(a=='z'){
trayopen = 1;delay(40);
trayopen = 0;
}else if(a=='x'){seed = 1;
delay(300);
seed = 0;}
else{
P0=0x00;
P2=0x00;}
}
}
APPENDIX 2
ARCHITECTURE OF 8051
The 8051 is an 8-bit machine. Its memory is organized in bytes and practically all its
instruction deal with byte quantities. It uses an Accumulator as the primary register for
instruction results. Other operands can be accessed using one of the four different
addressing modes available: register implicit, direct, indirect or immediate. Operands
reside in one of the five memory spaces of the 8051.The five memory spaces of the 8051
-
7/28/2019 FAARM Report
46/54
46
are: Program Memory, External Data Memory, Internal Data Memory, Special Function
Registers and Bit Memory. The Program Memory space contains all the instructions,
immediate data and constant tables and strings. It is principally addressed by the 16-bit
Program Counter (PC), but it can also be accessed by a few instructions using the 16-bit
Data Pointer (DPTR). The maximum size of the Program Memory space is 64K bytes.
Several 8051 family members integrate on-chip some amount of either masked
programmed ROM or EPROM as part of this memory space. The architecture of 8051 is
shown in figure .1.
The External Data Memory space contains all the variables, buffers and data
structures that can't fit on-chip. It is principally addressed by the 16-bit Data Pointer
(DPTR), although the first two general purpose register (R0, R1) of the currently selected
register bank can access a 256-byte bank of External Data Memory. The maximum size of
the External Data Memory space is 64Kbytes. External data memory can only be accessed
using the indirect addressing mode with the DPTR, R0 or R1.The Internal Data Memory
space is functionally the most important data memory space. In it resides up to four banks
of general purpose registers, the program stack, 128 bits of the 256-bit memory, and all the
variables and data structures that are operated on directly by the program. The maximum
size of the Internal Data Memory space is 256-bytes. However, different 8051 family
members integrate different amounts of this memory space on chip. The register implicit,
indirect and direct addressing modes can be used indifferent parts of the Internal Data
Memory space.
-
7/28/2019 FAARM Report
47/54
47
Fig.1. 8051 Architecture
APPENDIX 2
MAX 232
1. Meet or Exceed TIA/EIA-232-F and ITU Recommendation V.282. Operate With Single 5-V Power Supply3. Operate Up to 120 kbit/s4. Two Drivers and Two Receivers5. 30-V Input Levels6. Low Supply Current -8 mA Typical7. Designed to be Interchangeable With
-
7/28/2019 FAARM Report
48/54
48
Maxim MAX232
8. ESD Protection Exceeds JESD 22 2000-V Human-Body Model (A114-A)
Applications
1. TIA/EIA-232-F2. Battery-Powered Systems3. Terminals4. Modems5. Computers
Pin diagram of MAX 232 is shown in figure.2.
Fig.2.Pin diagram of MAX 232
APPENDIX 3
ROBOT MECHANISM
Every time wheel rotates an entire revolution, robot travels the distance equal to the
circumference of the wheel. So on multiplying the circumference by the number of
rotations per minute, we get the distance robot travels in a minute.
Fig.3.Robot with wheel
-
7/28/2019 FAARM Report
49/54
49
Velocity = circumference * rpm
Velocity = diameter * pi * rpm OR Velocity = 2 * radius * pi * rpm
For example, if motor has a rotation speed (under load) of 100rpm and we want to travel at
3 feet per second, calculate:
3 ft/s = diameter * pi * 100rpm
3 ft/s = diameter * pi * 1.67rps (rotations per second)
diameter = 3 ft/s / (3.14 * 1.67 rps)
diameter = 0.57 ft, or 6.89"
Robot Wheel Diameter vs Torque
The larger the diameter of the wheel, or higher the rpm, the faster robot will go. But
this isn't entirely true in that there is another factor involved. If robot requires more torque
than it can give, it will go slower than calculated. Heavier robots will go slower. The motor
torque, robot acceleration, and wheel diameter, these three attributes will have to be
balanced to achieve proper torque.
Motor Torque and Force
High force is required to push other robots around, or to go up hills and rough
terrain, or have high acceleration. As calculatable with statics, just by knowing wheel
diameter and motor torque, we can determine the force robot is capable of.
Torque = Distance * Force
Distance = Wheel Radius
Force = Torque / Wheel Radius
BRAKE SYSTEM
There are three ways to brake DC motors. Each way has its own benefits and draw
backs.
Fig.4. Force and torque of robot
http://www.societyofrobots.com/mechanics_statics.shtmlhttp://www.societyofrobots.com/actuators_dcmotors.shtmlhttp://www.societyofrobots.com/actuators_dcmotors.shtmlhttp://www.societyofrobots.com/mechanics_statics.shtml -
7/28/2019 FAARM Report
50/54
50
Controls Method
This method requires an encoderplaced onto a rotating part of DC motor. An
algorithm has to be written that determines the current velocity of motor, and sends a
reverse command to H-bridge until the final velocity equals zero. This method can let robot
balance motionless on a steep hill just by applying a reverse current to motors.
Mechanical Method
The mechanical method is what is used on cars today. Basically we need something
with very high friction and wear resistance, and then push it as strongly as possible to
wheel or axle. A servo actuated brake works well.
Electronic Method
This method is the least reliable, but the easiest to implement. The basic concept of
this is that if we short the power and ground leads of motor, the inductance created by
motor in one direction will power motor in the opposite direction. Although motor will still
rotate, it will greatly resist the rotation. No controls or sensors or any circuits overheating.
The disadvantage is that the effect of braking is determined by the motor using. Some
motors brake better than others.
The H-Bridge circuit is shown in figure 5. The MOSFET turns on the relay, which
creates a short between the motor leads. Basically motor will still an H-bridge for normal
Fig.5. H-Bridge circuit
http://www.societyofrobots.com/sensors_encoder.shtmlhttp://www.societyofrobots.com/schematics_h-bridgedes.shtmlhttp://www.societyofrobots.com/actuators_servos.shtmlhttp://www.societyofrobots.com/schematics_h-bridgedes.shtmlhttp://www.societyofrobots.com/schematics_h-bridgedes.shtmlhttp://www.societyofrobots.com/actuators_servos.shtmlhttp://www.societyofrobots.com/schematics_h-bridgedes.shtmlhttp://www.societyofrobots.com/sensors_encoder.shtml -
7/28/2019 FAARM Report
51/54
51
control, but when brake is applied the H-bridge should be off and braking circuit should be
used.
APPENDIX 4
RELAY WITH ULN 2003A
A relay is an electrical hardware device having an input and output gate. The output
gate consists in one or more electrical contacts that switch when the input gate is
electrically excited. A relay is an electrical switch that opens and closes under the control
of another electrical circuit. In the original form, the switch is operated by an electromagnet
to open or close one or many sets of contacts.
GENERAL PURPOSE RELAY
This relay consists of a coil of wire with a ferrous metal in the center. A small hinged
and spring loaded piece of ferrous metal floats slightly above one end of the metal in the
center of the coil. When energized the metal in the center
of the coil becomes magnetic and draws the floating metal towards it. This in turn causes
multiple contacts to make and break.Circuit for larger relay is shown in Fig.6.
There are two major advantages to these larger relays:
1. They can control multiple contacts
2. They can handle very large loads
Fig.6 Circuit for larger relay
ULN 2003A
-
7/28/2019 FAARM Report
52/54
52
The coil current can be on or off so relays have two switch positions and there are
double-throw (changeover) switches. It consists of a coil of wire surrounding a soft iron
core, an iron yoke, which provides a low reluctancepath for magnetic flux, a movable iron
armature, and a set, or sets, of contacts. In this condition, one of the two sets of contacts in
the relay pictured is closed, and the other set is open. The P0_0, P0_1, P0_2 and P0_3 pin
of controller is assumed as data transmit pins to the relay through relay driver ULN 2003.
ULN 2003 is just like a current driver.
Fig.7.Relay circuit
The circuit connection for relay is shown in Fig.7.
The ULN2003 is a monolithic high voltage and high current Darlington transistor
arrays. It consists of seven NPN Darlington pairs that feature high-voltage outputs with
common-cathode clamp diode for switching inductive loads. The collector-current rating of
a single Darlington pair is 500mA. The Darlington pairs may be paralleled for higher
current capability. Applications include relay drivers, hammer drivers, lamp drivers,
display drivers (LED gas Discharge), line drivers and logic buffers.
http://en.wikipedia.org/wiki/Coilhttp://en.wikipedia.org/wiki/Magnetic_corehttp://en.wikipedia.org/wiki/Magnetic_corehttp://en.wikipedia.org/wiki/Magnetic_reluctancehttp://en.wikipedia.org/wiki/Armature_(electrical_engineering)http://en.wikipedia.org/wiki/Armature_(electrical_engineering)http://en.wikipedia.org/wiki/Magnetic_reluctancehttp://en.wikipedia.org/wiki/Magnetic_corehttp://en.wikipedia.org/wiki/Magnetic_corehttp://en.wikipedia.org/wiki/Coil -
7/28/2019 FAARM Report
53/54
53
The ULN2003 has a 2.7kW series base resistor for each Darlington pair for operation
directly with TTL or 5V CMOS devices.
FEATURES
1. 500mA rated collector current (Single output)2. High-voltage outputs: 50V3. Inputs compatible with various types of logic.4. Relay driver application
Fig.8. Logic diagram of ULN and Schematic of Darlington pair
Each channel rated at 500 mA and can withstand peak currents of 600 mA.
Suppression diodes are included for inductive load driving and the inputs are pinned
opposite the outputs to simplify board layout. These versatile devices are useful for driving
a wide range of loads including solenoids, relays DC motors; LED displays filament lamps,
thermal print heads and high power buffers. Fig.8. shows the logic diagram of ULN 2003A
with 7 Darlington pairs and schematic diagram of each Darlington pair.
WEB CAMERA
-
7/28/2019 FAARM Report
54/54
Web camera, is the loosely used term for any camera that generates images that can be
accessed by and displayed on the World Wide Web through a server.
A webcam is essentially just a camera that is connected to a computer, either directly or
wirelessly, and gathers a series of images for remote display elsewhere. A webcam is a
video camera which feeds its images in real time to a computer or computer network, often
via USB, Ethernet or Wi-Fi.A model of webcam is shown in Fig.3.9.
Fi .9.Webcam