agv project report

59

Click here to load reader

Upload: pratheesh-pala

Post on 26-Nov-2014

258 views

Category:

Documents


26 download

DESCRIPTION

Automated Guided Vehicle

TRANSCRIPT

Page 1: AGV Project Report

1

MAHATMA GANDHI UNIVERSITY

COLLEGE OF ENGINEERING

THODUPUZHA, KERALA-685587

A MINI PROJECT REPORT

ON

AUTOMATED GUIDED VEHICLE

Submitted by

PONNILA RAJAN

PRATHEESH P R

DEPARTMENT OFELECTRONICS AND COMMUNICATION ENGINEERING

2011

Page 2: AGV Project Report

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

External Examiner

Head of the Department

Electronics and Communication

Engineering

Page 3: AGV Project Report

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 the bona-fide record of the work done 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

External Examiner

Head of the Department

Electronics and Communication

Engineering

Page 4: AGV Project Report

4

ACKNOWLEDGEMENT

First and foremost I express our sincere thanks to, our honoured

Principal PROF. K T SUBRAMANIAN for providing excellent lab facilities and

the permission to use the same.

I am extremely grateful to Dr.LETHAKUMARI.B (Head of Electronics and

Communication Department) for her continuous support in the process of

completing the project.

I also convey thanks to Ms MARY METILDA ,Mr RAJEESH BABU & Ms

VRINDA P for their endeavours in providing constant guidance and

encouragement through out the project. I wish to express my deep sense of

gratitude to all staff members of Electronics and Communication department

for their keen interest in this project and valid support.

I am also grateful to my classmates for their concern and interest

in the project. I thank all who have shown interest and helping us with ideas

and opinions to complete this project.

Above all I thank ALMIGHTY GOD and our PARENTS for giving me the

blessing to take over this venture.

Page 5: AGV Project Report

5

CONTENTS

SL.NO. CONTENTS PAGE NO.

1 INTRODUCTION 6

2 BLOCK DIAGRAM 7

3 BLOCK DIAGRAM DESCRIPTION 8

4 CIRCUIT DIAGRAM 12

5 CIRCUIT DIAGRAM DESCRIPTION 13

6 PCB FABRICATION 19

7 IMPLEMENTATION OF CIRCUITS AND LAYOUT 25

8 COST ESTIMATE 28

8 SOFTWARE SECTION 29

9 APPLICATIONS 39

10 ADVANTAGES 40

11 LIMITATIONS 41

12 CONCLUSION 42

13 REFERENCE 43

14 DATASHEETS 44

Page 6: AGV Project Report

6

INTRODUCTION

The American Society of Safety Engineers (ASSE) defined AGVs as:

a. Machines without drivers that can move along pre-programmed

routes, or use sensory and navigation devices to find their own way around.

b. Vehicles that are equipped with automatic guidance systems and are

capable of following prescribed paths.

c. Driverless vehicles that are programmed to follow a guide path.

The AGV robot described here is a PIC microcontroller

based, and is developed with three degrees of freedom. (Light following, wall

following & pit avoidance capability).The robot contains the USB 2.0

compliant PIC 18F4550 microcontroller, motors, sensors, wheels, battery, etc.

The robot uses four IR sensor modules and two LDR circuits. ALL the sensors

of the robot are precise and sensitivity can be varied.

Page 7: AGV Project Report

7

BLOCK DIAGRAM

PIC 18F4550

POWER SUPPLY

IR TRANSCEIVER

(WALL & PIT)

DETECTOR)

USB INTERFACE

FOR LIVE PROGRAMING

ALARM CONTROL SWITCHES

DIFFERENTAL

DRIVE

MOTORS

MOTOR DRIVER

LDR CIRCUIT

(LIGHT FOLLOWER)

Page 8: AGV Project Report

8

BLOCK DIAGRAM DESCRIPTION

Micro controller-PIC 18F4550

The heart of the Robot is a PIC 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 PIC 18F4550 microcontroller

also has an integrated full speed USB 2.0 transreceiver, which has been

configured for high speed USB programming of the Robot.

Page 9: AGV Project Report

9

Core Features

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 (WDT): Programmable period from 41 ms to 131s Programmable Code Protection Single-Supply 5V In-Circuit Serial Programming™ (ICSP™) via two pins In-Circuit Debug (ICD) via two pins Wide Operating Voltage Range (2.0V to 5.5V) High-Current 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 (ECCP) module: Multiple output modes Selectable polarity Programmable dead time Auto-shutdown and auto-restart Enhanced USART module: LIN bus support Master Synchronous Serial 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.

Page 10: AGV Project Report

10

Motor and Motor Driver

The Robot comes with two geared dc motors of 500 rpm. The

motors have helical gears for higher efficiency and lower noise. A single

L293D motor driver IC drives the motors. The motor driver IC has a current

rating of up to 600mA per channel. The purpose of the motor driver IC is to

convert the five or 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 by it will

be very low to dive the motor.

Buzzer

The Robot has an on board buzzer which is driven by a

Darlington pair. When a voltage of 5 volts, 25mA is given at the base terminal

using the microcontroller, the Darlington pair amplifies the current to drive

the buzzer making it sound. This buzzer can be used to sound an alarm for a

particular purpose or during debugging 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.

Page 11: AGV Project Report

11

LDR circuit

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 sensitivity.

Power Supply

The Robot consist of an 8* 1.5 V AA cell bundle. This pack can

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 the 12volt as 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 modules. However, this is not suitable for

driving the motors.

Page 12: AGV Project Report

12

CIRCUIT DIAGRAM

RA0/AN02

RA1/AN13

RA2/AN2/VREF-/CVREF4

RA3/AN3/VREF+5

RA4/T0CKI/C1OUT/RCV6

RA5/AN4/SS/LVDIN/C2OUT7

RA6/OSC2/CLKO14

OSC1/CLKI13

RB0/AN12/INT0/FLT0/SDI/SDA33

RB1/AN10/INT1/SCK/SCL34

RB2/AN8/INT2/VMO35

RB3/AN9/CCP2/VPO36

RB4/AN11/KBI0/CSSPP37

RB5/KBI1/PGM38

RB6/KBI2/PGC39

RB7/KBI3/PGD40

RC0/T1OSO/T1CKI 15

RC1/T1OSI/CCP2/UOE 16

RC2/CCP1/P1A 17

VUSB18

RC4/D-/VM 23

RC5/D+/VP 24

RC6/TX/CK 25

RC7/RX/DT/SDO 26

RD0/SPP0 19

RD1/SPP1 20

RD2/SPP2 21

RD3/SPP3 22

RD4/SPP4 27

RD5/SPP5/P1B 28

RD6/SPP6/P1C 29

RD7/SPP7/P1D 30

RE0/AN5/CK1SPP 8

RE1/AN6/CK2SPP 9

RE2/AN7/OESPP 10

RE3/MCLR/VPP 1

U1

PIC18F4550

1234

VCC _SENSORS

CONN-SIL4

1234

GND_SENSORS

CONN-SIL4

GND

VCC

X1CRYSTAL

C1

22pF

C2

22pFGND

VI1 VO 3

GN

D2

U27805

C3220u

12

POWER

CONN-SIL2

R11k

D1LED

C40.1Uf

VCC

GND

D21N4148

R210k

R3

10k

GND

1234SENSOR I/P

CONN-SIL4

12345678

161514131211109

SW1SW-DIP8

GND

IN12 OUT1 3

OUT2 6

OUT3 11

OUT4 14

IN27

IN310

IN415

EN11

EN29

VS

8

VSS

16

GND GND

U3

L293D

R4

150R

R5 150R

R6

150R

D3LED

ON OFF SWITCH

23456789

1RP1

RESPACK-8

VCC

GND

123 MOTOR 1

CONN-SIL3

123 MOTOR 2

CONN-SIL3

GND

+12V

+12V

R8

150R

R7

150R

R910k

VCC

GNDQ1

BC547BP

R10

10k

GND

BUZ1

BUZZER

VCC

VCC1

D+3

D-2

GND4

J1

USBCONN

1 2

JUMPER

R11

100R

VCC

R12

100RR13

100R

GND

C5

0.1uF

GND

R14

10R

12

J2

CONN-SIL2

GND

R15

150R

Page 13: AGV Project Report

13

CIRCUIT DIAGRAM DESCRIPTION

The microcontroller used in this project Automated

Guided Vehicle is microchip PIC18f4550(40PIN DIP). It is powerful yet easy-

to-program. It has an operating frequency of DC-48 MHz. 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 PIC18f4550 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 16-

bit, max. resolution 83.3 ns (TCY). The device also have Enhanced

Capture/Compare/PWM (ECCP) module. All of these features make it ideal for

more advanced level A/D applications in automotive, industrial, appliances

and consumer applications.

Another important feature of the device is the On-Chip USB

Transceiver with On-Chip Voltage Regulator, which makes the devise capable

of full speed usb2.0 communication (2Mb/s). 1-Kbyte Dual Access RAM is also

dedicated for USB which ensures bulk data transfer.

The circuit here described have 3 degrees 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 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 turn even 90 degree easier.

Page 14: AGV Project Report

14

LIGHT FOLLOWING

When operate the Robot in Light Following mode the Robot will

follow a light beam. However, this time the user has to do some hands on

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 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 LDR

circuit as shown in Figure to the power supply, the output voltage (Vout) of

the circuit will vary according to the amount of light falling on the LDR.

REFERRENCE VOLTAGE

Page 15: AGV Project Report

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 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 RB2 and RB3 respectively.

Page 16: AGV Project Report

16

LDR Circuit Assembly

RA0/AN02

RA1/AN13

RA2/AN2/VREF-/CVREF4

RA3/AN3/VREF+5

RA4/T0CKI/C1OUT/RCV6

RA5/AN4/SS/LVDIN/C2OUT7

RA6/OSC2/CLKO14

OSC1/CLKI13

RB0/AN12/INT0/FLT0/SDI/SDA33

RB1/AN10/INT1/SCK/SCL34

RB2/AN8/INT2/VMO35

RB3/AN9/CCP2/VPO36

RB4/AN11/KBI0/CSSPP37

RB5/KBI1/PGM38

RB6/KBI2/PGC39

RB7/KBI3/PGD40

RC0/T1OSO/T1CKI 15

RC1/T1OSI/CCP2/UOE 16

RC2/CCP1/P1A 17

VUSB18

RC4/D-/VM 23

RC5/D+/VP 24

RC6/TX/CK 25

RC7/RX/DT/SDO 26

RD0/SPP0 19

RD1/SPP1 20

RD2/SPP2 21

RD3/SPP3 22

RD4/SPP4 27

RD5/SPP5/P1B 28

RD6/SPP6/P1C 29

RD7/SPP7/P1D 30

RE0/AN5/CK1SPP 8

RE1/AN6/CK2SPP 9

RE2/AN7/OESPP 10

RE3/MCLR/VPP 1

U1

PIC18F4550

R1150k

R2150k

VCC

RV1RES-VAR

RV2RES-VAR

GND

1.0

LDR1

LDR

1.0

LDR2

LDR

WALL FOLLOWING

In Wall following mode, the Robot will move along the length of a wall.

Before we can use 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 is used to avoid obstacles while performing wall following. This

sensor also helps in navigating 90-degree bends in the wall. Hence, the

robot moves parallel to the wall maintaining a constant distance from it.

Page 17: AGV Project Report

17

START

A

NO YES If Sensor pointing towards

Wall detects Wall B

Turn away If Sensor pointing towards YES Wall detects no Wall

Move towards B

NO The wall

YES If Sensor pointing front Doesn’t detect obstacle

Do nothingNO

If Sensor pointing YES front detects obstacle

Turn sharplyNO

A

Page 18: AGV Project Report

18

PIT AVOIDANCE

Here we make use of the two IR sensors kept under the chassis.

The IR emitter present in the sensor module keep on emitting 38KHz

modulated IR signal, so long as the reflected beam, from the surface where

the Robot is travelling, falls on the IR detector the Robot continues its

motion. Whenever a pit comes on its way, the emitted IR rays never are

reflected back to the IR detector. Then the IR detector output changes and

microcontroller gives the control signal to the motor according to this.

Page 19: AGV Project Report

19

Page 20: AGV Project Report

20

PCB FABRICATION

Nowadays the Printed Circuit Board here after mentioned as

PCBs makes the electronic circuit manufacturing as easy one. In olden days

vast area was required to implement a small circuit to 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 have done the PCB design with the help of OR-

CAD software. The different steps in the PCB design and how the same was

done by us are explained below.

BOARD TYPES

The most popular board types are:

1. Single-sided boards: They are mainly used in entertainment

electronics where manufacturing costs have to be 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.

Page 21: AGV Project Report

21

MANUFACTURING PROCESS

The different steps involved in the design and fabrication of PCB

are explained below. We, observing the necessary precaution during the

entire fabrication period have been carefully followed these steps.

LAYOUT APPROACHES

The first rule is to prepare each and every PCB layout as viewed

from the component side. Another important rule is not to start the

designing of a layout unless an absolutely clear circuit diagram is available,

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

of other components is not necessary if they have to be replaced.

The layout for our circuit was obtained with the help of OR-CAD

software. For this, as the first step we drew our circuit with the help 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.

BOARD CLEANING

The cleaning of the copper surface prior to 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

Page 22: AGV Project Report

22

difficulties in PCB fabrication although it might not always be recognized as

this. But it is quite often the reasons of poor resist adhesion, uneven photo-

resist films, pinholes, poor plating adhesion etc.

The cleaning of the board was done with just a 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 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.

PLATING

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.

Page 23: AGV Project Report

23

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 unwanted

copper which is 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 PCB manufacturers and generally in

smaller PCB production laboratories.

COMPONENT PLACING

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 possible interconnections. The

bending of the axial component leads was done to guarantee an optimum

retention of the component of the PCB 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

Page 24: AGV Project Report

24

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 have to be provided.

SOLDERING

Soldering is a process for the joining of metal parts with the aid

of a molten metal (solder),where the melting temperature is suited below

that of the material joined and whereby the surface of the parts are wetted,

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, 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

solder and to improve the degree of wetting. Following characteristics are

required in the flux:

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.

Page 25: AGV Project Report

25

It should be readily displaced from the metal by the molten

soldering operation.

Residues should be removable after completion of the soldering.

Generally applied soldering methods are iron soldering, torch

soldering, electrical soldering, furnace soldering etc. of which we have gone

for iron soldering. Components are mounted on only one side 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

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 much later than during the final functioning testing of the

board in the factory. Among the contaminants, we can typically find flux,

chips 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 salts and silicone oils.

Displacing of particulate and other insoluble matters, e.g., chips,

dust and lint.

Page 26: AGV Project Report

26

IMPLEMENTATION CIRCUITS AND LAYOUTS

We have decided to implement the project as two units; one

with PIC 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 project because 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 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 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 PIC, the whole project can be taken to a

next level by additional circuits and suitable software modification.

Page 27: AGV Project Report

27

CIRCUIT BOARD

RA0/AN02

RA1/AN13

RA2/AN2/VREF-/CVREF4

RA3/AN3/VREF+5

RA4/T0CKI/C1OUT/RCV6

RA5/AN4/SS/LVDIN/C2OUT7

RA6/OSC2/CLKO14

OSC1/CLKI13

RB0/AN12/INT0/FLT0/SDI/SDA33

RB1/AN10/INT1/SCK/SCL34

RB2/AN8/INT2/VMO35

RB3/AN9/CCP2/VPO36

RB4/AN11/KBI0/CSSPP37

RB5/KBI1/PGM38

RB6/KBI2/PGC39

RB7/KBI3/PGD40

RC0/T1OSO/T1CKI 15

RC1/T1OSI/CCP2/UOE 16

RC2/CCP1/P1A 17

VUSB18

RC4/D-/VM 23

RC5/D+/VP 24

RC6/TX/CK 25

RC7/RX/DT/SDO 26

RD0/SPP0 19

RD1/SPP1 20

RD2/SPP2 21

RD3/SPP3 22

RD4/SPP4 27

RD5/SPP5/P1B 28

RD6/SPP6/P1C 29

RD7/SPP7/P1D 30

RE0/AN5/CK1SPP 8

RE1/AN6/CK2SPP 9

RE2/AN7/OESPP 10

RE3/MCLR/VPP 1

U1

PIC18F4550

1234

VCC _SENSORS

CONN-SIL4

1234

GND_SENSORS

CONN-SIL4

GND

VCC

X1CRYSTAL

C1

22pF

C2

22pFGND

VI1 VO 3

GN

D2

U27805

C3220u

12

POWER

CONN-SIL2

R11k

D1LED

C40.1Uf

VCC

GND

D21N4148

R210k

R3

10k

GND

1234SENSOR I/P

CONN-SIL4

12345678

161514131211109

SW1SW-DIP8

GND

IN12 OUT1 3

OUT2 6

OUT3 11

OUT4 14

IN27

IN310

IN415

EN11

EN29

VS

8

VSS

16

GND GND

U3

L293D

R4

150R

R5 150R

R6

150R

D3LED

ON OFF SWITCH

23456789

1RP1

RESPACK-8

VCC

GND

123 MOTOR 1

CONN-SIL3

123 MOTOR 2

CONN-SIL3

GND

+12V

+12V

R8

150R

R7

150R

R910k

VCC

GNDQ1

BC547BP

R10

10k

GND

BUZ1

BUZZER

VCC

VCC1

D+3

D-2

GND4

J1

USBCONN

1 2

JUMPER

R11

100R

VCC

R12

100RR13

100R

GND

C5

0.1uF

GND

R14

10R

12

J2

CONN-SIL2

GND

R15

150R

Page 28: AGV Project Report

28

PCB LAYOUT

COMPONENT LAYOUT

Page 29: AGV Project Report

29

COST ESTIMATE

NO MATERIAL SPECIFICATION PRICE/UNIT COST

1 PIC 18F4550 8BIT,40PIN,32K FLASH,2K EPROM 250.00 250.00

2 PCB+SCREENING GLASS EPOXY 180+200 380.00

3 L293D 16PIN,4CHANNEL,600MA/CH 63.00 63.00

4 IR TRANSCEIVER 2.5METER RANGE 80 320.00

5 MOTOR DC GEAR MOTOR,500 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 SWITCH 4 PIN MICRO 2 10.00

11 REGULATOR IC 7805 BELL 7.00 14.00

12 CRYSTAL 20 MHZ 6.00 12.00

13 MISCELLANEOUS

RESISTORS, CAPACITORS, CONNECTORS(RMC), LED'S, DIODES, SWITCHES, etc 260 260

TOTAL COST 1864.00

Page 30: AGV Project Report

30

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 PIC® and dsPIC® microcontrollers. To create any 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 PIC® and dsPIC® microcontrollers using MPLAB. To create

C programs for the same task one has to use the C-18 tool suite along with

MPLAB.

Page 31: AGV Project Report

31

HEADER FILE

#ifndef __robot_H //custom header file creation

#define __robot_H

//-------------------------------------------------------

#include <adc.h> //header files required

#include <stdio.h>

#include <stdlib.h>

#include <p18f4550.h>

#include <delays.h>

#include <pwm.h>

#include <i2c.h>

#include <math.h>

#include <xlcd.h>

//--------------------------------------------------------

#pragma udata //code required for bootloading

extern void _startup (void);

#pragma code _RESET_INTERRUPT_VECTOR = 0x000800

void _reset (void)

{

_asm goto _startup _endasm

}

#pragma code

#pragma code _HIGH_INTERRUPT_VECTOR = 0x000808

void _high_ISR (void)

{

;

}

#pragma code _LOW_INTERRUPT_VECTOR = 0x000818

void _low_ISR (void)

{

}

#pragma code

//-------------------------------------------------------

//constant defenitions

Page 32: AGV Project Report

32

#define l0 PORTAbits.RA0

#define l1 PORTAbits.RA1

#define l2 PORTAbits.RA2

#define mode (PORTA&0b00000111)

#define ws 0

#define bs 1

#define ob 0

#define nob 1

#define cw 0

#define aw 1

#define pit 1

#define nopit 0

#define wall 0

#define nowall 1

#define light 1

#define nolight 0

#define rightlsensor PORTAbits.RA5

#define leftlsensor PORTEbits.RE0

#define rightosensor PORTEbits.RE1

#define leftosensor PORTEbits.RE2

#define buzzer PORTAbits.RA3

#define bld PORTBbits.RB4

#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;PORTCbits.RC0=1

#define motor_r_stp PORTCbits.RC1=0;PORTDbits.RD0=0

#define motor_l_stp PORTCbits.RC2=0;PORTCbits.RC0=0

#define allanalog OpenADC(ADC_FOSC_2 & ADC_12_TAD, ADC_CH4 & ADC_REF_VDD_VSS &

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; //variables required for working of light follower

void initialize( void)

{

T2CON=0b00000110;

PR2=0b11111111;

Page 33: AGV Project Report

33

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 dir) //function for speed and direction control of right motor

{

if(dir==cw)

{

SetDCPWM1(r);

PORTCbits.RC0=0;

}

if(dir==aw)

{

SetDCPWM1(1023-r);

PORTCbits.RC0=1;

}

}

void speedirl(int l,int dir) //function for speed and direction control of left 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;

Delay10TCYx( 5 ); //to get right ldr vaue

ConvertADC();

while( BusyADC() );

rightldr=ReadADC();

Page 34: AGV Project Report

34

SetChanADC(ADC_CH8); //to change analog channel

Delay10TCYx( 5 ); //to get left ldr value

ConvertADC();

while( BusyADC() );

leftldr=ReadADC();

SetChanADC(ADC_CH12); //to change analog channel

Delay10TCYx( 5 ); //to get right potentiometer value

ConvertADC();

while( BusyADC() );

rightthreshold=ReadADC();

SetChanADC(ADC_CH9);

Delay10TCYx( 5 );

ConvertADC();

while( BusyADC() );

leftthreshold=ReadADC(); //to get left potentiometer value

SetChanADC(ADC_CH10); //to change analog channel

if(rightldr<rightthreshold)

rightldr=1; //compare ldr value with corresponding potentiometer

else

rightldr=0;

if(leftldr<leftthreshold)

leftldr=1;

else

leftldr=0;

allipdigital;

}

int convert2digital(int l)

{

switch (l)

{

case 0:SetChanADC(ADC_CH0);

break;

case 1:SetChanADC(ADC_CH1);

break;

case 2:SetChanADC(ADC_CH2);

break;

case 3:SetChanADC(ADC_CH3);

break;

case 4:SetChanADC(ADC_CH4);

break;

case 5:SetChanADC(ADC_CH5);

Page 35: AGV Project Report

35

break;

case 6:SetChanADC(ADC_CH6);

break;

case 7:SetChanADC(ADC_CH7);

break;

case 8:SetChanADC(ADC_CH8);

break;

case 9:SetChanADC(ADC_CH9);

break;

case 10:SetChanADC(ADC_CH10);

break;

case 11:SetChanADC(ADC_CH11);

break;

case 12:SetChanADC(ADC_CH12);

break;

}

//to set analog channel

Delay10TCYx( 5 ); //delay to charge ADC's internal capacitor

ConvertADC(); //conversion

while( BusyADC() ); //check if conversion is over

return(ReadADC()); //return the 10 bit digital value

}

#endif

MAIN PROGRAMS

LIGHT FOLLOWING

// Code for light following//---------------------------------------------------------------------// header file for robot#include<robot.h> void main(void){// setting PORTA as inputs except 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

Page 36: AGV Project Report

36

TRISE=0b11111111; // making the buzzer offbuzzer =0; // initializing adc,pwm modules and making all pins digital initialize(); // loop to perform light followerwhile(1) { /*compare the ldr values with threshold setting potentiometers to generate digital output*/ acquire_ldr_digital_values() ;// if light is detected in front of the bot then move forward if(rightldr==light && leftldr==light) { speedirr(512,cw); speedirl(512,cw); }// if light is detected on the left of the bot if(rightldr==nolight && 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 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 && leftldr==nolight) { speedirl(512,cw); speedirr(512,aw); } } }}

WALL FOLLOWING

// Code for left wall following//---------------------------------------------------------------------// header file for AGV#include<robot.h> void main(void){ // Setting PORTA as inputs except PA3 Setting TRISA=0b11110111; // PORTB as outputsTRISB=0b00000000; // Setting PORTC as outputsTRISC=0b00000000;

Page 37: AGV Project Report

37

// Setting PORTD as outputsTRISD=0b00000000; // Setting PORTE as outputsTRISE=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 leftwhile(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 ) { // Then move towards wall speedirr(512,cw); speedirl(211,cw); }// if the right sensor detects a wallwhile( rightosensor==wall ) {/* Then turn 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 wallif(leftosensor==wall ) {// then turn away from the wall speedirr(211,cw); speedirl(512,cw); }}}

// Code for right wall following//---------------------------------------------------------------------// header file for AGV#include<robot.h> 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 outputsTRISD=0b00000000; // Setting PORTE as outputsTRISE=0b11111111; // Making the buzzer off buzzer =0; /* initializing adc, pwm modules and setting PA0,PA1,PA2 AND PA3 pins as analog*/initialize();

Page 38: AGV Project Report

38

// loop to perform wall following with wall on right while(1) { /* Note: please keep the right sensor facing the right and left sensor facing the front */

// if the right sensor detects no wallif(rightosensor==nowall ) { // then move towards the wall speedirr(211,cw); speedirl(512,cw); }// if the left sensor detects a wall while(leftosensor==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 towards the wall if(rightosensor==wall ) {// then turn away from the wallspeedirr(512,cw); speedirl(211,cw); }}}

PIT AVOIDANCE

// Code for pit avoidance//---------------------------------------------------------------------#include<robot.h> // header file for AGVvoid main(void){ // setting PORTA as inputs except PA3 TRISA=0b11110111; // setting PORTB as outputsTRISB=0b00000000; // setting PORTC as outputsTRISC=0b00000000; // setting PORTD as outputsTRISD=0b00000000; // setting PORTE as outputsTRISE=0b11111111; // making the buzzer off buzzer= 0; // initializing adc, pwm modules and setting PA0,PA1,PA2 // AND PA3 pins as analoginitialize(); // loop to perform pit avoidance using 2 sensorswhile(1)

Page 39: AGV Project Report

39

{// if no pit is detected by 2 sensors if(rightlsensor==nopit && leftlsensor==nopit) // then move forward { speedirr(512,cw); speedirl(512,cw); }/* if the bot has detected a pit on the left then move back and turn to the right*/if(rightlsensor==pit && leftlsensor==nopit) { speedirr(200,aw); speedirl(1000,aw); Delay10KTCYx(700); //delay 700,000 clock cycles 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); //delay 700,000 clock cycles Delay10KTCYx(700); //delay 700,000 clock cycles Delay10KTCYx(700); //delay 700,000 clock cycles speedirr(512,aw); speedirl(512,cw); } // if the bot has encountered a pit in front of the robotif(rightlsensor==pit && leftlsensor==pit) {// then move back takin a small turn speedirr(400,aw); speedirl(1000,aw); Delay10KTCYx(700); //delay 700,000 clock cycles Delay10KTCYx(700); //delay 700,000 clock cycles} } }

Page 40: AGV Project Report

40

APPLICATIONS

Automated Guided Vehicles can be used in a wide variety of applications to transport many different types of material including pallets, rolls, racks, carts, and containers. AGVs excel in applications with the following characteristics:

Repetitive movement of materials over a distance Regular delivery of stable loads Medium throughput/volume When on-time delivery is critical and late deliveries are causing

inefficiency Operations with at least two shifts Processes where tracking material is important

Page 41: AGV Project Report

41

ADVANTAGES

-Reduce Manpower- Increase Productivity- Eliminate Unnecessary Fork Lift Trucks- Reduce Product Damage- Maintain Better Control of Material Management

An Automated Guided Vehicle System (AGVS) can be an integral part of a conventional warehouse characterized by long distances and "same path" movement. It offers an alternative to fixed-path conveyors and overhead materials handling equipment for this type of facility.

A wide range of vehicles move pallet loads of materials and perform various functions such as lift-lowering, towing carts, transferring loads to and from high level pallet racks, and precision placement of loads in pickup and delivery stations. Loads of varying weights (including several thousand pounds each) can be handled.

AGVS Systems are now controlled by flexible, on-board microcomputers. Intelligent terminals and radio frequency controls are incorporated into the system to track and direct vehicles.

Vehicles can move both forward and backward 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 guide path control can direct vehicles in motion. AGVS is frequently utilized in receiving materials into the warehouse and transferring pallet loads from receiving dock areas to pallet rack areas for put away.

Warehouse areas are best served by an AGVS in two ways. First, when 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 loads from the warehouse and deliver them to 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 and people. Bumpers and stopping devices, warning horns, lights and other audible sounds can also be provided.

Page 42: AGV Project Report

42

LIMITATIONS

-Installation cost is very high-AGV’s are fragile and should be handled with care.-Regular care, inspection and maintenance are required.

Page 43: AGV Project Report

43

CONCLUSION

All the required components for the project

Automated Guided Vehicle(AGV) have been checked and soldered on a

PCB that is prepared by the procedures mentioned above. The soldering

is done as per the PCB layout and components lay out. The circuit is

working well and the motors are run as per the programmed speed. The

robot is fully functional with the loaded programmes.

Page 44: AGV Project Report

44

REFERENCE

TEXT BOOKS CAD /CAM : PN RAO AUTOMATION AND COMPUTER INTEGRATED MANUFACTURING :MIKELL P GROOVER  COMPUTER INTEGRATED 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.ROBOTIC SYSTEMS LTD. INDIA

  WWW.WIKIPEDIA.COM  WWW. HOW STUFFWORK.COM  WWW.SCRIBD.COM

Page 45: AGV Project Report

45

DATA SHEETS