1
MAHATMA GANDHI UNIVERSITY COLLEGE OF ENGINEERING THODUPUZHA , KERALA-685587
A MINI PROJECT REPORT ON
AUTOMATED GUIDED VEHICLE VEHICLE
Submitted by PONNILA RAJAN PRATHEESH P R
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING 2011
2
MAHATMA GANDHI UNIVERSITY COLLEGE OF ENGINEERING THODUPUZHA , KERALA-685587
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING
CERTIFICATE Certified that this mini project titled AUTOMATED GUIDED VEHICLE is the bona-fide record of the work done by PONNILA RAJAN with Reg No:62612 of B.Tech in Electronics and Communication, towards the partial fulfilment of the requirement for the award of the degree of Bachelor of Technology, by Mahatma Gandhi University. Lecturer-in-charge
Head of the Department Electronics and Communication
External Examiner
Engineering
3
MAHATMA GANDHI UNIVERSITY COLLEGE OF ENGINEERING THODUPUZHA , KERALA-685587
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING
CERTIFICATE Certified that this mini project titled AUTOMATED GUIDED VEHICLE is VEHICLE is the bona-fide record of the work done by PRATHEESH by PRATHEESH P R with Reg No:15508 of B.Tech in Electronics and Communication, towards the partial fulfilment of the requirement for the award of the degree of Bachelor of Technology, by Mahatma Gandhi University.
Lecturer-in-charge
Head of the Department Electronics and Communication
External Examiner
Engineering
4
A K
W
D
First and foremost foremost I express our sincere sincere thanks to, to, our honoured honoured Princ Principa ipall PROF. PROF. K
SUBR M NI N for provid providing ing exce excelle llent nt lab lab faci facili litie tiess and
the permission permission to use the same. same. I am extremely extremely gratefu gratefull to Dr.LE H KUM RI.B (Head (Head of Electroni Electronics cs and ommunicat ommunication ion Departm Department) ent) for for her continuo continuous us support support in the process process of completing the project. I also also conv convey ey than thanks ks to Ms M RY ME ILD ,Mr ,Mr R JEESH JEESH B BU & Ms VRIND P for their their endeavour endeavourss in providin providing g constant constant guidance guidance and encoura encourageme gement nt through through out out the project. project. I wish wish to expres expresss my deep sense sense of gratitude to all staff members of Electronics and ommunication ommunication department department for their their keen keen interest interest in this project project and valid valid support support.. I am also also grateful to my my classmates for their concern and and interest in the project. I thank all who who have shown interest interest and helping helping us with ideas and opinions opinions to complete this project. project. bove bove all all I than thank k LMIGH LMIGH Y GOD and and our our P REN S for for givi giving ng me the the blessing to take over this this venture.
5
CONTENTS
SL . O.
CO
¢
¡
¡
S
P A
¢
£
N O. O.
1
INTROD CTION
6
2
BLOC K D K DI A R A
7
3
K DI A R A BLOC K D
4
CIRCUIT
DI A
5
CIRCUIT
DI A
6
PCB FA BRIC ATION
7
IMPLEMENT ATION OF CIRCUITS AND L A OUT
25
8
COST ESTIM ATE
28
8
SOFTWA RE S ECTION
29
¤
¥
¥
¥
¥
¦
DESCRI PTION
¦
R A R A
8
12
¦
¦
DESCRI PTION
13
19
§
APPLIC ATIONS
39
AD ANT A
ES
40
11
LIMIT ATIONS
41
12
CONCLUSION
42
13
REF ERENCE
43
14
DAT AS
44
9
10
¨
©
¥
EETS
6
INTRODUCTION
The American Society of Safety of Safety Engineers (ASSE) defined AGVs as:
a. Machines without drivers without drivers that can that can move along pre-programmed routes, or use sensory and navigation devices to find their own way around. b. Vehicles that are that are equipped with automatic guidance systems and are capable of following of following prescribed paths. c. Driverless vehicles that are that are programmed to follow a guide path.
robot described here is a PI microcontroller The AGV robot described based, and is developed with three degrees of freedom. of freedom. (Light following, (Light following, wall following & pit avoidance pit avoidance capability).The robot contains robot contains the USB 2.0 compliant PI compliant PI 18F4550 microcontroller, motors, sensors, wheels, battery, etc. The robot uses robot uses four IR sensor modules and two LDR circuits. ALL the sensors
of the of the robot are robot are precise and sensitivity can be varied.
7
K D DI A R AM BLOCK
POWER SUPPLY
ONTROL CONT SWITC SWITCHES HES
ALARM
IR TRANS EIVER EIVER (WA (WALL & PIT PIT )
PI 18F4550
MOT MO TOR DRIVER
LDR CIRC IRCUIT UIT (LIGHT (LIGH T FOLLOWER)
DIFFERENTA DIFFEREN TAL L DRIVE
USB INT INTERFAC ERFACE E FOR LIVE PROGRA PROGR AMING
8
K D DI A R AM DESCRIPTION BLOCK
Micr
c
r ll r-P IC 18F4550
The heart of the Robot is a PI C 18F4550 microcontroller. This is an industrial grade microcontroller manufactured by Microchip
technologies Inc. The PIC 18F4550 microcontroller has been specifically designed for embedded C programming. The PI C 18F4550 microcontroller also has an integrated full speed USB 2.0 transreceiver, which has been configured for high speed USB programming o f the f the Robot.
Cor
F
ur
9
Universal Serial Bus Power-Managed Modes Flexible Oscillator Structure C Compiler Optimized Architecture with optional Extended Instruction Set 100,000 Erase/Write Cycle Enhanced Flash Program Memory typical 1,000,000 Erase/Write Cycle Data EEPROM Memory typical Flash/Data EEPROM Retention: > 40 years Self-Programmable under Software Control Priority Levels for Interrupts 8 x 8 Single-Cycle Hardware Multiplier Extended Watchdog Timer (WD T): Programmable period from 41 ms to 131 s Programmable Code Protection Single-Supply 5V In- Circuit Serial ircuit Serial Programming (I CSP) via two pins In-Circuit Debug ircuit Debug (ICD) via two pins Wide Operating Voltage Range (2.0V to 5.5V) High-Current Sink/Source: urrent Sink/Source: 25 mA/25 mA Three External Interrupts Four Timer modules (Timer0 to Timer3) Up to 2 Capture/Compare/PWM (CCP) modules: Capture is 16-bit, max. resolution 5.2 ns (TCY/16) Compare is 16-bit, max. resolution 83.3 ns (TCY) PWM output: PWM resolution is 1 to 10-bit Enhanced Capture/Compare/PWM (E CCP) module: Multiple output modes output modes Selectable polarity Programmable dead time Auto-shutdown and auto-restart Enhanced USART module: LIN bus support Master Synchronous Serial Port (MSSP) Port (MSSP) module Supporting 3-wire SPI (all 4 modes) and I2C Master and Slave modes 10-bit, up to 13 -channel Analog-to-Digital Converter Module (A/D) with Programmable Acquisition Time etc.
10
Motor and Motor
Driv r
Robot comes with two geared dc motors of 500 rpm. The The Robot comes motors have helical gears for higher efficiency and lower noise. A single L293D motor driver I C drives the motors. The motor driver IC has a current rating of up to 600m A per channel. The purpose of the motor driver I C is to convert the convert the five or 0-volt signal 0-volt signal generated by the microcontroller to a level of 12 or 0 volt so that it can power the motor. Had the motors been directly
connected to the microcontroller, the voltage and current produce current produce by it will be very low to dive the motor.
Buzz
r The Robot has an on board buzzer which is driven by a
Darlington pair. When a voltage of 5 of 5 volts, 25mA is given at the at the base terminal using the microcontroller, the Darlington pair amplifies the current to drive the buzzer making it sound. it sound. This buzzer can be used to sound an alarm for a particular purpose or during debugging of program of program code.
IR sensor module
The Robot comes with four IR sensors. These sensors can be
configured as line sensors or obstacle sensors. The sensors have a tuning screw to vary the range of sensing. The sensors require a 5-volt supply voltage and can generate digital output of 5 or 0 volts when functioning properly.
11
LD R
circui t The LDR circuit is used to detect the presence of light. Two
LDRs are used for this purpose and they have separate intensity control mechanisms also. This enables easy calibration of light of light sensitivity. sensitivity.
Power Supply consist of an 8* 1.5 V AA cell bundle. This pack can The Robot consist of provide a supply voltage of 12 volts for the Robot. This battery pack can be easily mounted on the underbody of the chassis. The 7805 voltage regulator onboard the Robot takes Robot takes the 12volt as volt as input and input and generates a regulated 5-volt supply required for the electronic components onboard o Robot. The Robot can also be powered by drawing power from the USB port during programming and testing of sensor of sensor modules. However, this is not suitable not suitable for driving the motors.
12
CIRCUIT DI A R AM
VCC
U2
+12V
C5
VCC
ONOFFSWITCH
7805 1
VI
CONN-SIL2
150R
GND
R1
2
C3
VCC_SENSORS 4 3 2 1
0.1uF
R6
3
D N G
POWER 2 1
VO
C4
220u
CONN-SIL4
1k
0.1Uf
D2
D3
1N4148
LED
D1
GND_SENSORS
R14
LED
4 3 2 1
10R
VCC
CONN-SIL4
RP1
GND
R15
1 2 3 4 5 6 7 8 9
16 15 14 13 12 11 10 9
150R +12V
1 2 3 4 5 6 7 8
16
10k
2 7 1
150R
U1
GND
4 3 2 1
SENSORI/P C1
2 3 4 5 6 7 14 13
CONN-SIL4 22pF
X1 CRYSTAL
C2 22pF
R5 150R
R8
R9
SW-DIP8
GND
J2 1 2 CONN-SIL2
VCC
RESPACK-8
SW1
GND
33 34 35 36 37 38 39 40
VCC
BUZ1
RA0/AN0 RC0/T1OSO/T1CKI RA1/AN1 RC1/T1OSI/CCP2/UOE RA2/AN2/VREF-/CVREF RC2/CCP1/P1A RA3/AN3/VREF+ RC4/D-/VM RA4/T0CKI/C1OUT/RCV RC5/D+/VP RA5/AN4/SS/LVDIN/C2OUT RC6/TX/CK RA6/OSC2/CLKO RC7/RX/DT/SDO OSC1/CLKI RB0/AN12/INT0/FLT0/SDI/SDA RB1/AN10/INT1/SCK/SCL RB2/AN8/INT2/VMO RB3/AN9/CCP2/VPO RB4/AN11/KBI0/CSSPP RB5/KBI1/PGM RB6/KBI2/PGC RB7/KBI3/PGD
RD0/SPP0 RD1/SPP1 RD2/SPP2 RD3/SPP3 RD4/SPP4 RD5/SPP5/P1B RD6/SPP6/P1C RD7/SPP7/P1D
GND BUZZER
Q1 18
R10
VUSB
R12 JUMPER
100R
R13
VCC
100R
GND
J1
1 2
R11
1 3 2 4
100R
VCC D+ DGND USBCONN
GND
VSS
EN2 IN3 IN4 G ND
U3
8
3 6
VS OUT1 OUT2
11 14
OUT3 G ND OUT4
L293D GND
R7 GND 150R
R2 10k
R3
GND
GND 1 2 3
MOTOR1 CONN-SIL3
150R
19 20 21 22 27 28 29 30 8 9 10 1
9 10 15
R4
10k
PIC18F4550
10k BC547BP
RE0/AN5/CK1SPP RE1/AN6/CK2SPP RE2/AN7/OESPP RE3/MCLR/VPP
15 16 17 23 24 25 26
IN1 IN2 EN1
1 2 3
MOTOR2 CONN-SIL3
13
CIRCUIT DI A R AM DESCRIPTION
The microcontroller used in this project Automated
Guided Vehicle is microchip PI C18 f4550(40PIN DIP). It is It is powerful yet easyyet easyto-program. It has It has an operating frequency of D of DC-48 MHz. It has It has a 32K memory program. The data memory is about 2Kbytes. There are
5 ports in this microcontroller, Ports A, B,C,D and E. The PI C18f4550 features 10-bit, up to 13-channel Analog-to-Digital Converter module (A/D) with
Programmable Acquisition Time with 4 timers, 2 capture/compare/PWM functions Capture is 16 -bit, max. resolution 5.2 ns (TCY/16) - Compare is 16bit, max. resolution 83.3 ns (TCY). The device also have Enhanced of these features make it ideal it ideal for Capture/Compare/PWM (E CCP) module. All of these more advanced level A/D applications in automotive, industrial, appliances and consumer applications. Another important feature important feature of the of the device is the On-Chip USB Transceiver with On- Chip Voltage Regulator, which makes the devise capable
of full of full speed usb 2.0 communication (2Mb/s). 1-Kbyte Dual Access RAM is also dedicated for USB which ensures bulk data bulk data transfer. The circuit here described have 3 degrees of freedom of freedom and can be
selected by Mode Selection switches. The microcontroller checks the mode and then analysing signal from corresponding sensors. It will automatically respond the signals present at present at its its input. The response is a pwm signal, sent to the IC L293D which controls the speed and direction of the motor. Since differential drive mechanism is used, the motors are capable of rotate independently, which makes it to it to turn even 90 degree easier.
14
LIGHT FOLLOWING
When operate the Robot in Light Following mode the Robot will follow a light beam. light beam. However, this time the user has to do some hands on work for work for achieving this.
The Light follower makes use of Light Dependent Resister(LDR). For
example, the user can keep two LDR circuits for detecting light coming light coming from front, right and left sides. LDR has a property of varying its resistance according to the intensity of the light falling on it. So if we connect the connect the LDR circuit as shown in Figure to the power supply, the output voltage (Vout) of the circuit will circuit will vary according to the amount of amount of light light falling falling on the LDR. REFERRENCE VOL TA GE
15
Vout must be connected to one of the analog input pins of the microcontroller, say RB0. Hence, the voltage coming to pin RB0 will vary according to light falling light falling on the LDR. Now the microcontroller can control the motor, upon comparing the Vout connected to RB0 with a constant threshold voltage (which can be adjusted to detect the light to be followed) arriving on another analog pin, say RB1. This way the user can assemble two circuits one for another LDR and one for its threshold setting, which have to be connected to RB 2 and RB3 respectively.
16
LDR
irc irc it ssem ssembl bly y
U1 2 3 4 5 6 7 14 13 33 34 35 36 37 38 39
VCC
40
RA0/AN0 RA1/AN1
RC0/T1OSO/T1CKI RC1/T1OSI/CCP2/UOE
RA2/AN2/VREF-/CVREF RA3/AN3/VREF+
RC2/CCP1/P1A RC4/D-/VM
RA4/T0CKI/C1OUT/RCV
RC5/D+/VP
RA5/AN4/SS/LVDIN/C2OUT
RC6/TX/CK
RA6/OSC2/CLKO
RC7/RX/DT/SDO
16 17 23 24 25 26
OSC1/CLKI RB0/AN12/INT0/FLT0/SDI/SDA
RD0/SPP0
RB1/AN10/INT1/SCK/SCL
RD1/SPP1
RB2/AN8/INT2/VMO
RD2/SPP2
RB3/AN9/CCP2/VPO
RD3/SPP3
RB4/AN11/KBI0/CSSPP
RD4/SPP4
RB5/KBI1/PGM
RD5/SPP5/P1B
RB6/KBI2/PGC
RD6/SPP6/P1C
RB7/KBI3/PGD
RD7/SPP7/P1D RE0/AN5/CK1SPP RE1/AN6/CK2SPP
18
15
RE2/AN7/OESPP VUSB
RE3/MCLR/VPP
19 20 21 22 27 28 29 30 8 9 10 1
PIC18F4550
RV1
RV2
RES-VAR
RES-VAR
R1
R2
150k
150k GND
LDR1
LDR2
1 . 0
LDR
1 . 0
LDR
WALL FOLLOWING
In Wall following mode, the Robot will move along the length of a wall. Before we can use Robot as Robot as a wall follower, the sensors range should be set as described in the program. The wall following mode works using two IR sensors. One of the sensors is pointed towards the wall so that when it detects the wall it moves away from it and when it does not detect the wall, it moves towards it. The other sensor faces towards the front and front and is used to avoid obstacles while performing wall following. T his sensor also helps in navigating 90-degree bends in the wall. Hence, the robot moves robot moves parallel to the wall maintaining a constant distance constant distance from it.
17
START A
NO
YES If Sensor pointing towards towa rds Wall detects Wall
B
Turn away If Sensor pointing towards Wall detects no Wall
YES
Move towards NO
The wall
YES If Sensor pointing front Doesn·t detect obstacle
Do nothing
NO
If Sensor pointing
YES
front detects obstacle
Turn sharply
NO
A
B
18
PIT AVOIDANCE Herre we He
e use us e
the the tw IR sens en s rs ept ept under nder the the h ssis
The The IR emitt emitt er present ent in the the sens en s r modu modu e
eep on emitti emitting ng 38KHz 38K Hz
modu modu t ed ed IR signal, signal, so long as th t he reflect eflec t ed ed eam, f rom the the surface surface whe where the the Robot obo t is travell travelliing, falls fall s on the the IR det det ect ec t or the the Robot obot conti con tin nues its tion. moti mo on.
henever way, the the emitt enever a pit comes comes on its way, emitt ed ed IR rays ays never never are
reflect eflect ed ed back t o the the IR det det ect ect or. Then Then the the IR det det ect ec t or out put c ut changes anges and mic rocontr ocontrolle ollerr gives ves the the contr con trol ol signal signal t o the the mo mot t o r accor according t o this. this.
19
PCB FABRIC ATION
Nowadays the Printed Circuit Board here after mentioned as PCBs makes the electronic circuit manufacturing circuit manufacturing as easy one. In olden days vast area vast area was required to implement a implement a small circuit to circuit to connect the connect the leads of the components and separate connectors were needed. But PCBs connects the two by copper coated lines. In the single sided PCBs the copper layer is on both sides. Some cases middle layer is also possible than the two sides. In our project we project we have done the P CB design with the help of ORof ORCAD software. The different steps different steps in the PCB design and how the same was
done by us are explained below.
BO AR D TY PES
The most popular most popular board types are: 1. Single-sided boards: They are mainly used in entertainment
electronics where manufacturing costs have to be kept minimized. kept minimized. 2. Double-sided boards: Double sided PCBs can be with or without
plated through holes. The product of boards with plated through holes is fairly expensive.
20
M ANU FACTURING PROCESS
The different steps different steps involved in the design and fabrication of P of P CB
are explained below. We, observing the necessary precaution during the entire fabrication period have been carefully followed these steps.
L AYOUT APP RO ACHES
first rule is to prepare each and every P CB layout as layout as viewed The first rule from the component side. Another important rule is not to start the designing of a of a layout unless layout unless an absolutely clear circuit diagram circuit diagram is available, if necessary if necessary with components list. Among the components the larger ones are placed first and the space between is filled with smaller ones. Components
requiring
input/output connections
come
near
the
connectors. All components are placed in such a manner that de-soldering that de-soldering of other of other components is not necessary not necessary if they if they have to be replaced. The layout for layout for our circuit was circuit was obtained with the help of OR of OR--CA D
software. For this, as the first step first step we drew our circuit with circuit with the help of the of the software obtaining the required components from the library files. These components have been properly placed avoiding a large number of interconnections and crossovers. To develop the layout at first the schematic of the circuit is done which is then converted into a single layered board design to obtain the layout.
BO AR D CLE ANING
The cleaning of the of the copper surface prior to resist applications resist applications is
an essential step for any types of PCB process using etch or plating resist. Insufficient cleaning is one of the reasons most often encountered for
21
difficulties in PCB fabrication although it might it might not not always always be recognized as this. But it But it is is quite often the reasons of poor of poor resist adhesion, resist adhesion, uneven photoresist films, resist films, pinholes, poor plating adhesion etc. The cleaning of the of the board was done with just a just a sink with sink with running
water, pumice powder, scrubbing brushes and suitable tanks.
SCREEN PRINTING The screen-printing process is very simple. For this reason
fabric with uniform meshes and opening is stretched and fixed on a solid frame of metal or wood. The circuit pattern is then photographically transferred onto the screen, leaving the meshes in the pattern open, while the meshes in the rest of rest of the the area are closed. In the actual printing step, ink is forced by moving squeegee through the open meshes onto the surface of the material to be printed.
PL ATING The plating was done expecting the circuit board to retain its
solder ability for long periods of several months so that reliable solder joints can be produced during assembly. Plating of a metal can be accomplished on a copper pattern by three methods. They are: 1. Immersion plating. 2. Electrolysis plating. 3. Electroplating.
We have gone for electroplating method.
22
ETCHING
This was done manually by immersing the board into a solution
of ferric chloride and hydrochloric acid and finally cleaning the board y soap. The copper pattern was formed by selective removal of all of all unwanted copper which is not protected not protected by an etch resist. Factors like under etching and overhang which complicate the matter especially in the production of fine and highly precise PCBs have been carefully dealt with. This can also be done using a spray type etching machine.
DRILLING Drilling was done by mechanical machining operation in PCB production processes. Holes were made by drilling wherever a superior hole finish for plated through hole processes is required and where the tooling costs for a punching tool cannot be justified. Therefore drilling is applied by all the professional grade P CB manufacturers and generally i n smaller P CB production laboratories.
COMPONENT PL ACING
In the circuit, components having considerably more connecting points than the others have been placed first and remaining ones were grouped around them. This will result in a minimum overall conductor length. This was done aiming to get shortest get shortest possible possible interconnections. The bending of the axial component leads component leads was done to guarantee an optimum retention of the component of the P CB while a minimum of stress is introduced on the solder joint. Horizontally mounted resistors have to touch the board surface to avoid lifting of solder joints along with the
23
copper pattern under pressure on the resistor body. Vertically mounted resistors should not be flush to the board surface to avoid strain on the solder joints as well as on the component lead junction due to different thermal expansion coefficients of lead and board materials, where necessary resilient spaces resilient spaces have to be provided.
SOLDERING Soldering is a process for the joining of metal of metal parts with the aid of a molten metal (solder),where the melting temperature is suited below that of that of the the material joined and whereby the surface of the of the parts are wetted, without then without then becoming molten. Soldering
generally
implies
that the process
occurs at
temperature below 450 degree centigrade. Solder wets and alloys with the base metals and get drawn, get drawn, by capillary action into the gap between them. This process forms a metallurgical bond between the parts of the joint.
Soldering was done by placing the components at the right position, wetting these surfaces with molten solder and allowing the solder to cool down until it has been solidified. During this soldering operation, an auxiliary medium, flux, was used to increase the flow properties of molten of molten solder and to improve the degree of wetting. of wetting. Following characteristics are required in the flux:
It should It should provide a liquid cover over the materials and exclusive air up to the soldering temperature.
It should dissolve any oxide on the metal surface or on the solder and carry such unwanted elements away.
24
It should be readily displaced from the metal by the molten soldering operation.
Residues should be removable after completion of the of the soldering. Generally applied soldering methods are iron soldering, torch
soldering, electrical soldering, furnace soldering etc. of which of which we have gone for iron soldering. Components are mounted on only one side of the of the board. In double sided PCBs, the component side is usually opposite to the major conductor pattern side, unless otherwise dictated by special design requirements. The performance and reliability of solder joints give best result best result
covered with solder and herewith contributing to the actual solder connections. However, lead cutting after soldering is still common in particular in smaller industries where hand soldering is used. With the soldered PCB, many contaminants can be found which may produce difficulties with the functioning of the circuit. The problems usually arise at a at a much later than during the final functioning testing of the of the board in the factory. Among the contaminants, we can typically find flux, chips of plastics, of plastics, metals and other constructional materials, plating salts, oil greases, environmental soils and other processing materials. At the end, a cleaning procedure with an appropriate cleaning
medium was done. The following performances are expected from the cleaning procedure:
Dissolution or dissolving of organic liquids and solids, e.g., oils, greases, resin, flux.
Removal of plating of plating salts and silicone oils.
Displacing of particulate and other insoluble matters, e.g., chips, dust and dust and lint.
25
IMPLEMENT ATION CIRCUITS AND L AYOUTS
We have decided to implement the project as two units; one with PI C microcontroller and its circuits and another with LCD and its circuits. The two units are connected using connecting cables. This gives more flexibility in the arrangement of arrangement of project project because because of two of two separate units rather than a single unit. Consider the case of using it in a motorcycle. By using two boards we can place LCD at a at a suitable position to display speed while the microcontroller can be made hidden from the view. Four 5 V power outputs are also given Another important advantage important advantage of using of using two separate units is that
we can ensure the possibility of expansion of the project in future. By providing pins for all the ports in PI C, the whole project can project can be taken to a next level next level by additional circuits and suitable software modification.
26
CIRCUIT BO ARD
VCC
U2
+12V
C5
VCC
ON OFF SW ITCH
7805 1
VI
VO
POWER 2 1 CONN-S IL2
VCC _ SENSORS SENSORS
150R
D N G
4 3 2 1
0.1u F
R6
3
GND
R1
CONN-SIL4
1 '
2
C3
C4
220u
D2
0.1Uf
D3
1N4148
R14
LED
D1
_ SENSORS GND SENSORS
LED
4 3 2 1
10R
VCC
CONN-SIL4
RP1
GND
(
R15
1 2 3 4 5 6 7 8 9
16 15 14 13 12 11 10 9
150R +12V
1 2 3 4 5 6 7 8
16
R8
R9 10
R5
150R
2 7 1
'
SW -DIP8
4 3 2 1
C1
2 3 4 5 6 7 14 13
CONN-SIL4
22pF
X1 CRYSTA L
C2 22pF
150R
U1
GND
SENSOR I/P
GND
2
1 2 CONN-SIL2
VCC
RESPACK-8
SW1
GND
33 34 35 36 37 38 39 40
VCC
BUZ1
RA0/ AN AN0 RA1/ AN AN1 RA2/ AN AN2/ REF-/ REF RA3/ AN AN3/ REF+ / RCV RA4/ 0 I/ 1 RA5/ AN AN4/ /LVDIN/C2 RA6/ C2/CL C1/CL I
!
"
!
!
#
&
$
$
$
"
$
&
&
%
&
#
RC0/T1OSO/ T1CKI RC1/T1OSI/CCP2/ OE RC2/CCP1/P1 A RC4/D-/VM RC5/D+/VP RC6/TX/CK RC7/RX/DT/ SDO %
%
"
$
15 16 17 23 24 25 26
9 10 15
R4
IN1 IN2 EN1
VSS
RB0/ AN AN12/INT0/FLT0/ DI/ DA RB1/ AN AN10/INT1/ CK/ CL RB2/ AN AN8/INT2/VMO &
&
RD0/SPP0 RD1/SPP1 RD2/SPP2
&
&
RB3/ AN AN9/CCP2/VPO RB4/ AN AN11/KB I0/CSSPP CSSPP RB5/KB I1/PGM PGM RB6/KB I2/PGC RB7/KB I3/PGD
EN2
IN3 IN4
18
R10
RD3/SPP3 RD4/SPP4 RD5/SPP 5/P1B RD6/SPP 6/P1C RD7/SPP 7/P1D RE0/ AN AN5/CK1SPP RE1/ AN AN6/CK2SPP RE2/ AN AN7/OESPP RE3/MCLR/VPP
VUSB
L293D GND
R7 GND
150R
8 9 10 1
R2 10
R3 10 '
PIC18F4550
'
R12 (
BC547BP
UMPER
100R
R13
VCC
100R
GND (
1 2
R11
1 3 2 4
100R
1 VCC D+ DGND USBCONN
GND
11 14
OUT3 GND GND OUT4
150R
19 20 21 22 27 28 29 30
1 2 3
MOTOR 1 CONN-SIL3
'
Q1
10
3 6
#
GND BUZZER
U3
8 VS OUT1 OUT2
GND
GND
1 2 3
MOTOR 2 CONN-SIL3
27
PCB LAYOUT
COMPONENT LAYOUT
28
COST ESTIM ATE
NO
MATERIAL
SPE SPECIFICATION
PRI PRICE/UNIT
COST
1
PIC 18 18F4550
8BIT,40PIN,32K FLASH,2K EPROM
250.00
250.00
2
PCB+S B+SCREENING
GLASS EPOXY
180+200
380.00
3
L293D
00MA/CH 16PIN,4CHANNEL,600M
63.00
63.00
4
IR TRANSCEIVER
NGE E 2.5METER RANG
80
320.00
5
MOTOR
DC GEAR MOTOR,500 RPM RPM
140.00
280.00
6
METEL BODY
ALUMINUM
115.00
115.00
7
WHEELS
NYLONE WHEEL
40.00
80.00
8
CASTER WHEEL
MEDIUM
40.00
40.00
9
CONNECTOR
BERG
8
40.00
10
SWI SWITCH
4 PIN MICRO
2
10.00
11
REGULATOR IC
7805 BELL
7.00
14.00
12
RYSTAL CRYS
MHZ 20 MHZ
6.00
12.00
260
260
13
RESISTORS, CAPACITORS, CONNECTORS(RMC), LED'S, DIODES, MISCELLANEOUS SWI SWITCHES, etc
TOTAL COST
1864.00
29
SOFTWARE SECTION
The compiler used in the project is
MPLAB C-18 Tool kit.
MPLAB Integrated Development Environment (IDE) is a free, integrated toolset for the development of embedded applications
employing
Microchip's PI C® and dsPIC® microcontrollers. To create any project we project we have to create a corresponding workspace. A workspace links up all the associated files required for creating and debugging a project that has embedded software aspects. One can create assembly language programs for Microchip's PI C® and dsPIC® microcontrollers using MPL AB. To create C programs for the same task one task one has to use the C -18 tool suite along with
MPLAB.
30
HE AD ER
FILE
#ifndef
__robot _H
#define
__robot _H
//custom header file creation
//------------------------------------------//-----------------------------------------------------------------#include
#include
#include
#include
#include
#include
#include
//header files required
#include #include
//------------------------------------------//-------------------------------------------------------------------#pragma
udata
//code required for bootloading
extern void _startup (void); #pragma
code _RESET_INTERRUPT_VECTOR = 0x000800
void _reset (void) reset (void) { _asm goto _startup _endasm } #pragma
code
#pragma
code _HIGH_INTERRUP T_VECT OR = 0x000808
void _high_ISR (void) {
; } #pragma
code _LOW_INTERRUPT_VECTOR = 0x000818
void _low_ISR (void) { } #pragma
code
//------------------------------------------------------//constant defenitions //constant defenitions
31
#define
l0 PORTAbits.RA0
#define
l1 PORTAbits.RA1
#define
l2 PORTAbits.RA2
#define
mode (PORTA&0b00000 111 )
#define
ws 0
#define
bs 1
#define
ob 0
#define
nob 1
#define
cw 0
#define
aw 1
#define
pit 1
#define
nopit 0 nopit 0
#define
wall 0
#define
nowall 1
#define
light 1
#define
nolight 0 nolight 0
#define
rightlsensor PORTAbits.RA5
#define
leftlsensor PORTEbits.RE0
#define
rightosensor PORTEbits.RE1
#define
leftosensor PORTEbits.RE2
#define
buzzer PORTAbits.RA3
#define
bld
#define
motorra PORTCbits.RC1
#define
motorrb PORTDbits.RD0
#define
motorla PORTCbits.RC2
#define
motorlb PORTCbits.RC0
#define
motor_r_fwd PORTCbits.RC1=1;PORTDbits.RD0=0
#define
motor_r_bwd PORTCbits.RC1=0;PORTDbits.RD0=1
#define
motor_l_fwd PORTCbits.RC2=1;PORTCbits.RC0= 0
#define
motor_l_bwd PORTCbits.RC2=0;POR TC bits.RC0 =1
#define
motor_r_stp PORTCbits.RC1=0;PORTDbits.RD0=0
#define
motor_l_stp PORTC bits.RC2=0;POR TCbits.RC0= 0
#define
allanalog OpenADC(ADC_FOSC_2 & ADC_12_TA D, ADC_CH4 & ADC_REF_VDD_VSS &
PORTBbits.RB4
ADC_INT_OFF, ADC_13ANA); #define
allipdigital OpenADC(ADC_FOSC_2 & ADC_12_TAD, ADC_CH4 & ADC_REF_VDD_VSS &
ADC_INT_OFF, ADC_0ANA);
int rightldr,leftldr,rightthreshold,leftthreshold; int rightldr,leftldr,rightthreshold,leftthreshold; void initialize( void) { T2CON=0b00000 110;
PR2=0b11111111;
//variables required for working of light of light follower follower
32
CCPR1L = 0b00110011 ; CCP1CON = 0b00111100 ; CCPR2L = 0b00110011 ; CCP2CON = 0b00111100 ;
OpenADC(ADC_FOSC_2 & ADC_12_TAD, ADC_CH4 & ADC_REF_VDD_VSS & ADC_INT_OFF, ADC_0ANA); }
void speedirr(int r,int speedirr(int r,int dir) dir)
//function for speed and direction control of right of right motor motor
{
if(dir==cw) {
SetDCPWM1(r); PORTCbits.RC0=0; }
if(dir==aw) {
SetDCPWM1(1023-r); PORTCbits.RC0=1; } }
void speedirl(int l,int speedirl(int l,int dir) dir)
//function for speed and direction control of left of left motor motor
{
if(dir==cw) {
SetDCPWM2(l); PORTDbits.RD0=0; }
if(dir==aw) {
SetDCPWM2(1023-l); PORTDbits.RD0=1; } }
void acquire_ldr_digital_values()
//values acquiring digital for functioning as light
follower {
allanalog; Delay10TC Yx( 5 ); Convert ADC();
while( BusyADC() ); rightldr=ReadADC();
//to get right get right ldr vaue
33
Set ChanADC(ADC_CH8); Delay10TC Yx( 5 );
//to change analog channel //to get left get left ldr ldr value
Convert ADC();
while( BusyADC() ); leftldr=ReadADC(); Set ChanADC(ADC_CH12); Delay10TC Yx( 5 );
//to change analog channel //to get right get right potentiometer potentiometer value
Convert ADC();
while( BusyADC() ); rightthreshold=ReadADC(); Set ChanADC(ADC_CH9); Delay10TC Yx( 5 ); Convert ADC();
while( BusyADC() ); leftthreshold=ReadADC();
//to get left get left potentiometer potentiometer value
Set ChanADC(ADC_CH10);
//to change analog channel
if(rightldr
int convert int convert 2digital(int l) digital(int l) {
switch (l) {
case 0:Set ChanADC(ADC_CH0); break; case 1:Set ChanADC(ADC_CH1); break; case 2:Set ChanADC(ADC_CH2); break; case 3:Set ChanADC(ADC_CH3); break; case 4:Set ChanADC(ADC_CH4); break; case 5:Set ChanADC(ADC_CH5);
//compare ldr value with corresponding potentiometer
34
break; case 6:Set ChanADC(ADC_CH6); break; case 7:Set ChanADC(ADC_CH7); break; case 8:Set ChanADC(ADC_CH8); break; case 9:Set ChanADC(ADC_CH9); break; case 10:Set ChanADC(ADC_CH10); break; case 11:Set ChanADC(ADC_CH11); break; case 12:Set ChanADC(ADC_CH12); break; }
//to set analog set analog channel Delay10TC Yx( 5 ); Convert ADC();
//delay to charge ADC's internal capacitor //conversion
while( BusyADC() ); return(ReadADC());
//check if //check if conversion conversion is over //return the 10 bit digital bit digital value
} #endif
M A )
N PRO PR O R AM S 0
LIGHT F OLL LLOW OW ING ING
// Code for light following //---------------------------------------//------------------------------------------------------------------------------------------// header file for robot #include void main(void) { // setting setting PORTA as inputs inputs except except PA3 PA3 TRISA=0b11110111; // setting PORTB as outputs TRISB=0b00000000; // setting PORTD as outputs TRISC=0b00000000; // setting PORTC as outputs // setting PORTD as outputs TRISD=0b00000000; // setting PORTE as outputs
35
TRISE=0b11111111; // making the buzzer off buzzer =0; // initializing adc,pwm modules and making all pins digital initialize(); // loop to perform light follower while(1) { /*compare the ldr values with threshold setting potentiometers to generate digital output*/ acquire_ldr_digital_values() acquire_ldr_digi tal_values() ; // if light is detected in front of the bot then move forward forward if(rightldr==light if(rightldr==ligh t && leftldr==light) { speedirr(512,cw); speedirl(512,cw); } // if light is detected on the left of the bot if(rightldr==nolight if(rightldr==nolig ht && leftldr==light) // then turn to the left to follow the light { speedirr(512,cw); speedirl(512,aw); } // if light is detected on the right of the bot if(rightldr==light && leftldr==nolight) // then turn t urn to the right { speedirr(512,aw); speedirl(512,cw); } // if no light is detected in the vicinity of the bot // then keep turning till light is detected in the bots vicinity if(rightldr==nolight if(rightldr==nolig ht && leftldr==nolight) { speedirl(512,cw); speedirr(512,aw); } } } }
WALL WALL F OLL LLOW OW ING ING
// Code for left wall following //-------------------------------------//---------------------------------------------------------------------------------------------// header file for AGV #include void main(void) { // Setting PORTA as inputs except PA3 Setting TRISA=0b11110111; // PORTB as outputs TRISB=0b00000000; // Setting PORTC as outputs TRISC=0b00000000;
36
// Setting PORTD as outputs TRISD=0b00000000; // Setting PORTE as outputs TRISE=0b11111111; // Making the buzzer off buzzer =0; /* Initializing adc, pwm modules and setting PA0,PA1,PA2 AND PA3 pins as analog*/ initialize(); // loop to perform wall following with wall on left while(1) { /* Note :keep the left sensor facing to the left and right sensor facing the front*/ // if the only left sensor detects no wall if(leftosensor==nowall if(leftosensor== nowall ) { // Then move towards wall speedirr(512,cw); speedirl(211,cw); } // if the right sensor detects a wall while( rightosensor==wall ) { /* Then turn sharply sharply towards the right to avoid the 90 degree bend in the wall*/ speedirr(512,aw); speedirl(512,cw); } // if the bot drifts towards the wall if(leftosensor==wall if(leftosensor== wall ) { // then turn away from the wall speedirr(211,cw); speedirl(512,cw); } } }
// Code for right wall following //------------------------------//------------------------------ ----------------------------------------------------------------------// header file for AGV #include void main(void) { // Setting PORTA as inputs except PA3 TRISA=0b11110111; // Setting PORTB as outputs TRISB=0b00000000; // Setting PORTC as outputs TRISC=0b00000000; // Setting PORTD as outputs TRISD=0b00000000; // Setting PORTE as outputs TRISE=0b11111111; // Making the buzzer off buzzer =0; /* initializing adc, pwm modules and setting PA0,PA1,PA2 AND PA3 pins as analog*/ initialize();
37
// loop to perform wall following with wall on right while(1) { /* Note: please please keep the the right sensor facing the right and left left sensor facing the front */ // if the right sensor detects no wall if(rightosensor==nowall if(rightosensor= =nowall ) { // then move towards the wall speedirr(211,cw); speedirl(512,cw); } // if if the left sensor detects a wall while(leftosensor==wall while(leftosenso r==wall ) { /* then turn sharply towards the left to avoid the 90 degree bend in the wall */ speedirr(512,cw); speedirl(512,aw); } // if the bot drifts drifts toward towards s the w all if(rightosensor==wall if(rightosensor= =wall ) { // then turn away from the wall speedirr(512,cw); speedirl(211,cw); } } }
PIT A A OID AN AN C C 2
1
// Code for pit avoidance //-------------------------------------//---------------------------------------------------------------------------------------------#include // header file for AGV void main(void) { // setting PORTA as inputs except PA3 TRISA=0b11110111; // setting PORTB as outputs TRISB=0b00000000; // setting PORTC as outputs TRISC=0b00000000; // setting PORTD as outputs TRISD=0b00000000; // setting PORTE as outputs TRISE=0b11111111; // making the buzzer off buzzer= 0; // initializing adc, pwm modules and setting PA0,PA1,PA2 // AND PA3 pins as analog initialize(); // loop to perform pit avoidance using 2 sensors while(1)
38
{ // if if no pit is detected detected by 2 sensors sensors if(rightlsensor==nopit if(rightlsensor= =nopit && leftlsensor==nopi leftlsensor==nopit) t) // then move forward { speedirr(512,cw); speedirl(512,cw); } /* if the bot has detected detected a pit on the left left the n move back and turn to the right*/ if(rightlsensor==pit if(rightlsensor= =pit && leftlsensor==nop leftlsensor==nopit) it) { speedirr(200,aw); speedirl(1000,aw); Delay10KTCYx(700); Delay10KTCYx(700) ; //delay 700,000 clock cycles Delay10KTCYx(700); Delay10KTCYx(700); Delay10KTCYx(700) ; //delay 700,000 clock cycles speedirr(512,cw); speedirl(512,aw); } /* if the bot has detected a pit on the right then move back and turn to the left */ if(rightlsensor == nopit && leftlsensor == pit) { speedirr(700,aw); speedirl(512,aw); Delay10KTCYx(700); Delay10KTCYx(700) ; //delay 700,000 clock cycles Delay10KTCYx(700); //delay 700,000 clock cycles Delay10KTCYx(700); Delay10KTCYx(700) ; //delay 700,000 clock cycles speedirr(512,aw); speedirl(512,cw); } // if the bot has encountered a pit in front of the robot robot if(rightlsensor==pit if(rightlsensor= =pit && leftlsensor==pit leftlsensor==pit) ) { // then move back takin a small turn speedirr(400,aw); speedirl(1000,aw); Delay10KTCYx(70 0); //delay 700,000 clock cycles Delay10KTCYx(700); Delay10KTCYx(700) ; //delay 700,000 clock cycles } } }
39
APPLIC ATIONS
Automated Guided Vehicles can be used in a wide variety of applications of applications to transport many transport many different types different types of material of material including pallets, rolls, racks, carts, and containers. AGVs excel in applications with the following characteristics: y
y
y
y
y
y
Repetitive movement of movement of materials materials over a distance Regular delivery of stable of stable loads Medium throughput/volume When on-time delivery is critical and late deliveries are causing inefficiency Operations with at least at least two two shifts Processes where tracking material is important
40
AD ANT AGES -Reduce Manpower - Increase Productivity - Eliminate Unnecessary Fork Lift Fork Lift Trucks - Reduce Product Damage Product Damage - Maintain Better Control of Material of Material Management An Automated Guided Vehicle System (AGVS) can be an integral part of part of a a conventional warehouse characterized by long distances and "same path" movement. It offers It offers an alternative to fixed-path conveyors and overhead materials handling equipment for equipment for this type of facility. of facility.
of vehicles move pallet loads pallet loads of materials of materials and perform A wide range of vehicles various functions such as lift-lowering, towing carts, transferring loads to and from high level pallet racks, pallet racks, and precision placement of placement of loads loads in pickup and delivery stations. Loads of varying of varying weights (including several thousand pounds each) can be handled. AGVS Systems are now controlled by flexible, on-board microcomputers. Intelligent terminals Intelligent terminals and radio frequency controls are incorporated into the system to track and track and direct vehicles. direct vehicles.
Vehicles can move both forward and backward at various at various programmed speeds. Following a guide wire in the floor, some vehicles can even execute commands off-the-wire or "free range" when required. Sensors mounted throughout the throughout the guide path control can direct vehicles direct vehicles in motion. AGVS is frequently utilized in receiving materials into the warehouse and transferring pallet loads pallet loads from receiving dock areas dock areas to pallet rack pallet rack areas areas for put away. put away. Warehouse areas are best served best served by an AGVS in two ways. First, when pallet loads pallet loads are removed from warehouse storage racks, loads are transported to shipping or other warehouse areas. Second, an AGVS can be used to pick up pick up loads from the warehouse and deliver them to work in work in process areas or to redistribute loads to other manufacturing functions. Safety sensors and devices are installed on the vehicles to "warn " the vehicle of objects of objects and people. Bumpers and stopping devices, warning horns, lights and other audible sounds can also be provided.
41
LIMIT ATIONS -Installation cost is cost is very high -AGVs are fragile and should be handled with care. -Regular care, inspection and maintenance are required.
42
CONCLUSION
All the required
A
5
3
4
m
e Guid ed V e i c c e(AGV) e(A GV) have been checked and soldered on a 7
6
4
components for the project
8
9
PCB that is prepared by the procedures mentioned above. The soldering is done as per the P CB layout and components lay o ut. ut. The circuit is working well and the motors are run as per the programmed speed. The robot is robot is fully functional with the loaded programmes.
43
REFERENCE TEXT BOO KS
CAD /CAM : PN RAO AUTOMATION AND COMPUTER IN TEGRATED MANUF ACT URING :MIKELL P GROOVER COMPUTER IN TEGRAT ED MANUFACTURING, J. A. REHG &HENRY. W. KRAEBBER. CAD/CAM BY ZEID, TATA MCGRAW HILL
WEBSITES
WWW.JBL CORPORATION.COM
WWW.BOSCH INDIA.LOGISTIC.COM
WWW. WWW.ROBOTICSYSTEMSLTD.INDIA
WWW.WIKIPEDIA.COM WWW. HOW STUFFWORK.COM WWW.SCRIBD.COM
44
DAT A SHEETS