COLLISION AVOIDANCE VEHICLE

Published on February 2017 | Categories: Documents | Downloads: 70 | Comments: 0 | Views: 622
of 33
Download PDF   Embed   Report

Comments

Content

Mini Project Report 2014

ACKNOWLEDGEMENT

At the outset, I express my gratitude to the almighty who has been with
me during each and every step that I have taken towards the completion of this
Mini project.
With great pleasure, I express my deep sense of gratitude to Dr. K.
Rajiv Kumar, Head Department of instrumentation for giving his valuable
help and guidance in preparation of my Mini project.
I express my heartfelt gratitude to Mrs. Archana Mohan, Department
of instrumentation for her valuable assistance and advice for presenting this
Mini project
I also express my thanks to all other faculties of Instrumentation and
Control Engineering Department for giving their valuable cooperation.
I express my gratitude to all my friends for their help, co-operation and
encouragement.

1

Mini Project Report 2014

ABSTRACT

Nowadays the industries are preferring robot rather than human for
labours because of more production result. Our aim of this project was to
develop a Collision Avoidance Mobile Robot with onboard sensor and a PIC
Microcontroller. The mobile robot designed is capable of moving in an
environment which has obstacles avoiding collision.
In this mobile robot we are providing IR sensor for the detection of
obstacles which is mounded on a dc motor for scanning its surrounding area.
The algorithm runs on the PIC Microcontroller based on the information
received by the IR range. We are providing four basic directions for this robot
forward, backward, right, and left.
We are proving a particular range in PIC programming for IR sensor
known as threshold length. If the obstacles are within this threshold region or
length an interrupt is given to change the direction as in programming logic. .
PIC 16F877A is used for programming and integrating two dc motor, motor
driver and IR sensor. In the program mounted, microcontroller will control the
movement of the vehicle and will control the operations of the attached
modules.

2

Mini Project Report 2014

CONTENTS

Chapter

Page No

ACKNOWLEDGEMENT

i

ABSTRACT

ii

CONTENT

iii

LIST OF FIGURES

iv

1. INTRODUCTION

1

1.1 Scope and overview

1

1.2 Basic operation

1

1.3 Anti-collision system

2

2. BLOCK DIAGRAM

4

3. FLOW CHAT

5

4. CIRCUIT DIAGRAM

6

5. CIRCUIT EXPLANATION

7

5.1 Microcontroller

7

5.2 IR sensor

7

5.3 DC motors

8

3

Mini Project Report 2014
5.4 L293D

8

5.5 Power supply

9

5.6 Serial Communication

10

5.7 Max 232

10

5.8 LM7805

11

6. CONCLUTION

13

REFERENCES

v

APPENDIX-1

Program

vi

APPENDIX-2

Selection of Components listed in Hardware

vi

4

Mini Project Report 2014

LIST OF FIGURES

Table No

i.
ii.
iii.
iv.
v.
vi.
vii.
viii.

Description

Anti-Collision System
Block Diagram
Flow Chart
Circuit diagram
Power Supply
Serial Communication
Pin Diagram of MAX232
LM7805 Regulator

Page No

2
4
5
6
9
10
10
11

5

Mini Project Report 2014

IX. INTRODUCTION
x.
xi.

The purpose of this project was to develop a mobile
robot with the collisions avoidance capability in an obstructed
environment. The mobile robot has been built as a fully
autonomous vehicle with onboard sensors to get information about
the surrounding environment.

xii.
1.1 SCOPE AND OVERVIEW
xiii.
The mobile robot is a four wheeled robot platform which
employs the differential steering mechanism for motion in given direction.
Two dc motors have been used for the driving wheels. The robot has an
onboard IR sensor which is mounted on the standard dc motor. The dc Motor
and the IR sensor are controlled by a dedicated PIC Microcontroller which
sends the control signal to motor driver L293D which control the action of
motor.
xiv. The Potential Field method has been used as the obstacle avoidance
algorithm and the Algorithm is implemented in the main PIC microcontroller
which is on the mobile robot. The Algorithm implemented is used to avoid
the obstacle and to drive the robot to a locally generated goal.
xv.
1.2 BASIC OPERATION
xvi.
When the robot is switch on it scan its environment using IR
sensor. If any obstacle was detected the IR rays will get reflected and will
received by the receiving section. The controller will check whether the
obstacle is
xvii. in given threshold region which was given by the programmer.
1

Mini Project Report 2014

If it is not in the threshold length the PIC controller will just ignore it and if
xviii.
xix. it is in the threshold region the PIC controller will instruct the motor
driver to move the direction. The scanning will continues until the system is
shutdown.
xx.
1.3 ANTI-COLLISION SYSTEM
xxi.
xxii.

xxiii.

Fig-i: Anti-Collision System

xxiv.
xxv.

The basic Anti-collision system consists of a
transmitter module which is mounted on the front end of the
vehicle. In practical case, electromagnetic of the frequency in the
2

Mini Project Report 2014

range of IR or ultrasonic waves can be used. The transmitter
transmits radio waves continuously in the forward direction.
Whenever an obstacle or any vehicle comes within a specific
distance in front of the vehicle, the radio waves incident on
them are
xxvi.
xxvii. reflected back to the vehicle. These reflected waves are collected
by a receiver module which is also mounted on the front end of the
vehicle. On the reception of these reflected waves, an alarm is
triggered which warns the driver to manually slow down the
vehicle if possible. If the driver fails to perform the required action
within a few seconds, a solenoid valve in the vehicle fuel system
which is electronically controlled, reduces the fuel flow to the
engine there by slowing down the vehicle.
xxviii.

xxix.
xxx.
xxxi.
xxxii.
xxxiii.
XXXIV.
xxxv.
xxxvi.
3

Mini Project Report 2014
xxxvii.

XXXVIII.
XXXIX.
xl.
xli.

XLII. 2. BLOCK DIAGRAM
xliii.
xliv.

4

Mini Project Report 2014

XLV.

XLVI.
XLVII. FIG-II: BLOCK DIAGRAM
xlviii.
xlix.
l.

5

Mini Project Report 2014
li.

lii.
liii.

3. FLOW CHART

liv.
lv.

6

Mini Project Report 2014
lvi.

lvii.
lviii.

lix.

Fig-iii: Flow chart
7

Mini Project Report 2014
lx.
lxi.

lxii.

4. CIRCUIT DIAGRAM

lxiii.
lxiv.

8

Mini Project Report 2014
lxv.

lxvi.
lxvii.

lxviii.

Fig-iv: Circuit Diagram

9

Mini Project Report 2014

lxix.
lxx.
lxxi.
lxxii.

lxxiii.

5. CIRCUIT EXPLANATION

lxxiv.

lxxv.

5.1 MICROCONTROLLER: PIC16F877A
lxxvi. PIC is a family of modified Harvard architecture

microcontrollers made by Microchip Technology, derived from the
PIC1650

originally

developed

by

General

Instrument's

Microelectronics Division. The name PIC initially referred to
"Peripheral Interface Controller".
lxxvii.

PICs are popular with both industrial developers

and hobbyists alike due to their low cost, wide availability, large user
base, extensive collection of application notes, availability of low cost
or free development tools, and serial programming (and reprogramming with flash memory) capability. They are also commonly
used in educational programming as they often come with the easy to
use 'pic logicator' software.
lxxviii. 5.2 IR SENSOR

10

Mini Project Report 2014

lxxix.

In the electromagnetic spectrum, infrared radiation is the region
having wavelengths longer than visible light wavelengths, but
shorter than microwaves. The infrared region is approximately
demarcated from 0.75 to 1000µm. The wavelength region from
0.75 to 3µm is termed as near infrared, the region from 3 to 6µm is
termed mid-infrared, and the region higher than 6µm is termed as
far infrared.

lxxx.
lxxxi. Infrared technology is found in many of our everyday products.
For example, TV has an IR detector for interpreting the signal from
the remote control. Key benefits of infrared sensors include low
power requirements, simple circuitry, and their portable feature.
lxxxii.

lxxxiii.

5.3 DC MOTORS

lxxxiv.

A DC motor is a mechanically commutated electric motor

powered from direct current (DC). The stator is stationary in space
by definition and therefore so is its current. The current in the rotor
is switched by the commutator to also be stationary in space. This
is how the relative angle between the stator and rotor magnetic flux
is maintained near 90 degrees, which generates the maximum
torque.
lxxxv.DC motors have a rotating armature winding but non-rotating
armature magnetic field and a static field winding or permanent
11

Mini Project Report 2014

magnet. Different connections of the field and armature winding
provide different inherent speed/torque regulation characteristics.
The speed of a DC motor can be controlled by changing the
voltage applied to the armature or by changing the field current.
The introduction of variable resistance in the armature circuit or
field circuit allowed speed control. Modern DC motors are often
controlled by power electronics systems called DC drives.
lxxxvi. 5.4 L293D
lxxxvii.

The Device is a monolithic integrated high voltage, high current

four channel driver designed to accept standard DTL or TTL logic
levels and drive inductive loads (such as relays solenoides, DC
and stepping motors) and switching power transistors. To simplify
use as two bridges each pair of channels is equipped with an enable
input. A separate supply input is provided for the logic, allowing
operation at a lower voltage and internal clamp diodes are
included. This device is suitable for use in switching applications
at frequencies up to 5 kHz.
5.4 POWER SUPPLY

lxxxviii. Here the ac supply is fed into a bridge rectifier. The bridge
rectifier converts the ac to pulsated dc volt. The PIC need pure dc
supply of 5v. So it is then fed into a filter capacitor , 1000uF which
converts the pulsated dc to pure dc. It is then fed into a voltage
rectifier LM7805 to convert into 5v supply. An indicator LED is
kept for power on off indication.

12

Mini Project Report 2014
lxxxix.

xc.

xci.

Fig-v: power supply

xcii.
xciii.
xciv.
xcv. 5.6 SERIAL COMMUNICATION

13

Mini Project Report 2014
xcvi.

xcvii.

Fig-vi: SERIAL COMMUNICATION

xcviii.

xcix. 5.7 MAX 232

c.
14

Mini Project Report 2014

ci.
cii.

fig:vii-pin diagram for MAX232
The MAX232 is an integrated circuit, first created by Maxim Integrated
Products, that converts signals from an RS-232 serial port to signals suitable
for use in TTL compatible digital logic circuits. The MAX232 is a dual

ciii.

driver/receiver and typically converts the RX, TX, CTS and RTS signals.
The drivers provide RS-232 voltage level outputs (approx. ± 7.5 V) from a
single + 5 V supply via on-chip charge pumps and external capacitors. This
makes it useful for implementing RS-232 in devices that otherwise do not
need any voltages outside the 0 V to + 5 V range, as power supply design does

civ.

not need to be made more complicated just for driving the RS-232 in this case.
The receivers reduce RS-232 inputs (which may be as high as ± 25 V), to
standard 5 V TTL levels. These receivers have a typical threshold of 1.3 V
The later MAX232A is backwards compatible with the original MAX232 but
may operate at higher baud rates and can use smaller external capacitors –

cv.

0.1 μF in place of the 1.0 μF capacitors used with the original device.
The newer MAX3232 is also backwards compatible, but operates at a broader
voltage range, from 3 to 5.5 V

cvi.
cvii.

cviii. 5.8 LM7805

cix.
cx.
cxi.

Fig-viii: LM7805 regulator

This series of fixed-voltage integrated-circuit voltage regulators is
designed for a wide range of applications. These applications
15

Mini Project Report 2014

include on-card regulation for elimination of noise and distribution
problems associated with single-point regulation. Each of these
regulators can deliver up to 1.5 A of output current. The internal
current-limiting and thermal-shutdown features of these regulators
essentially make them immune to overload. In addition to use as
fixed-voltage regulators, these devices can be used with external
components to obtain adjustable output voltages and currents, and
also can be used as the power-pass element in precision regulators.
cxii.
cxiii.
cxiv.
cxv.
cxvi.
cxvii.
cxviii.
cxix.
cxx.
cxxi.
cxxii.
cxxiii.
cxxiv.

16

Mini Project Report 2014
cxxv.
cxxvi.
cxxvii.

cxxviii. CONCLUSION
cxxix.
cxxx. After creating the mobile robot, implementing the
collision avoidance algorithm on the microcontroller, testing and with
modification we were able to achieve our project goal. That is to
design a collision avoidance robot. Our final version of the mobile
robot was able to avoid collision 90% of the time (according to test
results). Since it is quite difficult to develop a 100% collision
avoidance system, we believe that the achieved collision avoidance
rate is satisfactory.
cxxxi.
cxxxii.
cxxxiii.
cxxxiv.
cxxxv.
cxxxvi.
cxxxvii.

CXXXVIII.
cxxxix.
17

Mini Project Report 2014
cxl.
cxli.
cxlii.

CXLIII.

REFERENCES
cxliv.

cxlv.

[1]. S. C. "Electromagnetic Waves". Centre for Remote Imaging, Sensing and
Processing.

Retrieved 2006-10-27.

cxlvi. [2]. William H. Yeadon, Alan W. Yeadon. Handbook of small electric motors.
McGraw-Hill Professional, 2001. Page 4-134.
cxlvii. [3]. Electronic Design Automation For Integrated Circuits Handbook, by
Lavagno, Martin, and Scheffer, ISBN 0-8493-3096-3 A survey of the field of
electronic design automation, one of the main enablers of modern IC design.
cxlviii. [4]. Sabyasachi Ghoshray, K.K. Yen (1996). "A Comprehensive Robot
Collision Avoidance Scheme by Two-Dimensional Geometric Modeling".
cxlix.
cl.
cli.
clii.
cliii.
cliv.
clv.
clvi.

18

Mini Project Report 2014
clvii.
clviii.

CLIX.
CLX.

APPENDIX-1 [PROGRAM]

clxi.
clxii. #include<pic.h>
clxiii. #define motor1_e1 (RE2)
clxiv. #define motor1_i1 (RE1)
clxv.

#define motor1_i2 (RE0)

clxvi. #define motor2_e2 (RA2)
clxvii. #define motor2_i1 (RA5)
clxviii. #define motor2_i2 (RA3)
clxix. #define motorir_en (RB7)
clxx.

#define motorir_in1 (RB6)

clxxi. #define motorir_in2 (RB5)
clxxii. void delayms(int x);
clxxiii. void delay(int x);
clxxiv. void forward(void);
clxxv. void backward(void);
clxxvi. void right(void);

19

Mini Project Report 2014
clxxvii.

void left(void);

clxxviii.

void stop(void);

clxxix. void stopi(void);
clxxx. void mtrrht(void);
clxxxi. void mtrlft(void);
clxxxii.

char status=0;

clxxxiii.

void main()

clxxxiv.

{

clxxxv.

ADCON1=0X07;

clxxxvi.

TRISA=0x00;

clxxxvii.

TRISE=0x00;

clxxxviii.

RBPU=0;

clxxxix.

TRISB=0X00;

cxc.

TRISD=0xFF;

cxci.

PORTD=0X00;

cxcii.

PORTB=0X00;

cxciii.

stop();

cxciv.

delayms(20);

cxcv.

while(1)

cxcvi.

{

cxcvii.

if(RD0==1)
20

Mini Project Report 2014
cxcviii.

{

cxcix.

stop();

cc.

delayms(70);

cci.

mtrrht();

ccii.

delayms(55);

cciii.

stop();

cciv.

delayms(70);

ccv.

if(RD0==1)

ccvi.

{

ccvii.

mtrlft();

ccviii.

delayms(135);

ccix.

stop();

ccx.

delayms(70);

ccxi.

if(RD0==1)

ccxii.

{

ccxiii.

mtrrht();

ccxiv.

delayms(54);

ccxv.

stop();

ccxvi.

delayms(70);

ccxvii.

backward();

ccxviii.

delayms(140);
21

Mini Project Report 2014
ccxix.

stop();

ccxx.

delayms(70);

ccxxi.

while(1);

ccxxii.

}

ccxxiii.

else

ccxxiv.

{

ccxxv.

mtrrht();

ccxxvi.

delayms(53);

ccxxvii.

stop();

ccxxviii.

delayms(70);

ccxxix.

backward();

ccxxx.

delayms(40);

ccxxxi.

stop();

ccxxxii.

delayms(50);

ccxxxiii.

left();

ccxxxiv.

delayms(40);

ccxxxv.

stop();

ccxxxvi.

delayms(70);

ccxxxvii.

}

ccxxxviii.

}

ccxxxix.

else
22

Mini Project Report 2014
ccxl.

{

ccxli.

mtrlft();

ccxlii.

delayms(53);

ccxliii.

stop();

ccxliv.

delayms(70);

ccxlv.

backward();

ccxlvi.

delayms(40);

ccxlvii.

stop();

ccxlviii.

delayms(50);

ccxlix.

right();

ccl.

delayms(40);

ccli.

stop();

cclii.

delayms(70);

ccliii.

}

ccliv.

}

cclv.

if(RD0==0)

cclvi.

{

cclvii.

forward();

cclviii.

delayms(10);

cclix.

}

cclx.
23

Mini Project Report 2014
cclxi.
cclxii.

}

cclxiii. }
cclxiv.
cclxv. void backward(void)
cclxvi. {
cclxvii.

motor1_e1=1;

cclxviii.

motor1_i1=1;

cclxix.

motor1_i2=0;

cclxx.

motor2_e2=1;

cclxxi.

motor2_i1=0;

cclxxii.

motor2_i2=1;

cclxxiii.

}

cclxxiv.

void forward(void)

cclxxv. {
cclxxvi.
cclxxvii.

motor1_e1=1;

cclxxviii.

motor1_i1=0;

cclxxix.

motor1_i2=1;

cclxxx.
cclxxxi.

motor2_e2=1;
motor2_i1=1;
24

Mini Project Report 2014
cclxxxii.

motor2_i2=0;

cclxxxiii. }
cclxxxiv. void stop(void)
cclxxxv.

{

cclxxxvi.
cclxxxvii.

motor1_e1=0;

cclxxxviii.

motor1_i1=0;

cclxxxix.

motor1_i2=0;

ccxc.

motor2_e2=0;

ccxci.

motor2_i1=0;

ccxcii.

motor2_i2=0;

ccxciii.
ccxciv.

motorir_en=0;

ccxcv.

motorir_in1=0;

ccxcvi.

motorir_in2=0;

ccxcvii.

}

ccxcviii.

void stopi(void)

ccxcix. {
ccc.
ccci.

motor1_e1=0;

cccii.

motor1_i1=0;
25

Mini Project Report 2014
ccciii.

motor1_i2=0;

ccciv.

motor2_e2=0;

cccv.

motor2_i1=0;

cccvi.

motor2_i2=0;

cccvii. }
cccviii.void right(void)
cccix. {
cccx.
cccxi.

motor1_e1=1;

cccxii.

motor1_i1=1;

cccxiii.

motor1_i2=0;

cccxiv.

motor2_e2=1;

cccxv.

motor2_i1=1;

cccxvi.

motor2_i2=0;

cccxvii.

}

cccxviii.

void left(void)

cccxix. {
cccxx.
cccxxi.

motor1_e1=1;

cccxxii.

motor1_i1=0;

cccxxiii.

motor1_i2=1;
26

Mini Project Report 2014
cccxxiv.

motor2_e2=1;

cccxxv.

motor2_i1=0;

cccxxvi.

motor2_i2=1;

cccxxvii. }
cccxxviii. void delayms(int x)
cccxxix.

{

cccxxx.

int i,j;

cccxxxi.

for(i=0;i<x;i++)

cccxxxii.

for(j=0;j<1000;j++);

cccxxxiii.
cccxxxiv. }
cccxxxv. void delay(int x)
cccxxxvi. {
cccxxxvii.

int i,j;

cccxxxviii.

for(i=0;i<x;i++)

cccxxxix.

for(j=0;j<1000;j++);

cccxl.
cccxli. }
cccxlii.void mtrrht(void)
cccxliii.
cccxliv.

{
motorir_en=1;
27

Mini Project Report 2014
cccxlv.

motorir_in1=0;

cccxlvi.
cccxlvii.

motorir_in2=1;
}

cccxlviii. void mtrlft(void)
cccxlix.

{

cccl.

motorir_en=1;

cccli.

motorir_in1=1;

ccclii.

motorir_in2=0;

cccliii. }
cccliv.
ccclv.
ccclvi.

28

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close