You are on page 1of 29

OBSTACLE DETECTION ROBOT

USING 8051 MICROCONTROLLER


The mini project report submitted in partial fulfilment of the

requirements for the award of the degree of

BACHELOR OF TECHNOLOGY
In
ELECTRONICS AND COMMUNICATION ENGINEERING
Submitted By

PALAPARTHI ABHIJITH
(17131A04G4)
Under the Guidance of
Sri P. SRINU
Assistant Professor Dept. of E.C.E.

COLLEGE OF ENGINEERING
(AUTONOMOUS)

Department of Electronics and Communication Engineering


GAYATRI VIDYA PARISHAD COLLEGE OF ENGINEERING (AUTONOMOUS)
(Affiliated to J.N.T University, Kakinada, A.P) VISAKHAPATNAM – 530048
GAYATRI VIDYA PARISHAD COLLEGE OF ENGINEERING (AUTONOMOUS)

(Affiliated to J.N.T. University, Kakinada, A.P)

Accreditedby NBA & NAAC with “A” Grade with CGPA 3.47/4.00

Madhurawada , Visakhapatnam – 530048.

COLLEGE OF ENGINEERING
(AUTONOMOUS)

CERTIFICATE
This is to certify that the mini project entitled ‘ OBSTACLE DETECTION ROBOT USING 8051
MICROCONTROLLER’ is a Bona fide record of work done by PALAPARTHI ABHIJITH
(Regd.no.17131A04G4) to the Department of Electronics and Communication Engineering, Gayatri
Vidya Parishad College of Engineering (Autonomous),Visakhapatnam, affiliated to Jawaharlal
Nehru Technological University, Kakinada in partial fulfilment of the requirement for the award
of the degree of Bachelor of Technology in electronics and communication engineering during
the academic year 2020-21.

Signature of the Guide Signature of the H.O.D.

Sri. P . Srinu Dr. M. V. S. Sai Ram ,

Assistant Professor, Professor and H.O.D.,

Department of E.C.E., Department of E.C.E.,

G.V.P. College of Engineering (A). G.V.P. College of Engineering (A).


ACKNOWLEDGEMENT

I am grateful to Prof. A.B.K. RAO, Principal, and Gayatri Vidya Parishad


College of engineering for giving me a noble opportunity to enhance my
knowledge through inclusion of Industry oriented mini project in our
curriculum.

I am thankful to Prof. Dr. M.V.S. SAIRAM, Head of the


Department, Electronics and communication engineering, for giving me
this opportunity to undergo Industry oriented mini project.

With deep sense of gratitude, acknowledging the guidance,


help and active cooperation rendered by internal guide Sri. P. SRINU
Assistant Professor, Department of ECE who guided throughout the
completion of mini project.

Finally, I thank everyone who has supported me directly and


indirectly in making the training a successful one.

BY

PALAPARTHI ABHIJITH
ABSTRACT
An industrial robotics is an automatic, servo-controlled, freely
programable, multipurpose manipulator which is used for handling
the work pieces, tools and also several handling devices. A robot can
also determine its own behaviour and conduct through its functions
of sense and recognition.
The Obstacle Avoiding Robot using 8051 microcontroller Project is
the foundation level of any automatic robot. The technology has
enough conceptual to include the great field of given area. This
includes using infrared rays that are applied to identify the hurdles
which comes in the field of ROBOTICS. The manufacturing of the
circuit ROBOT is simple and easy to construct.
The zero voltage is seen and hence the microcontroller concludes to
ignore the hurdles by turning from left to right or vice versa. When
the sensor produces +5v to microcontroller it ensures that there are
no hurdles found in the way and hence it moves straight unless and
until any hurdle is found.
CONTENTS

CERTIFICATE
ACKNOWKEDGEMENT
ABSTRACT

1. INTRODUCTION--------------------------------------------------------------------------------------1
1.1 OVERVIEW---------------------------------------------------------------------------------------------1
1.2 WORKING OF OBSTACLE DETECTION--------------------------------------------------------1
1.3 HISTORY OF 8051 MICROCONTROLLER------------------------------------------------------2
2. USED SOFT WARES----------------------------------------------------------------------------------2
2.1 KEILUVISION 4----------------------------------------------------------------------------------------2
2.2 PROTEUS 8----------------------------------------------------------------------------------------------3
3.DESCRIPTION OF BLOCK DIAGRAM--------------------------------------------------------------4
4. CONCEPT OF PROJECT--------------------------------------------------------------------------------4
5. DESCRIPTION OF CIRCUIT DIAGRAM-----------------------------------------------------------5
6. COMPONENTS DESCRIPTION-----------------------------------------------------------------------6
6.1 8051 MICROCONTROLLERS------------------------------------------------------------------------6
6.2 LCD DISPLAY-----------------------------------------------------------------------------------------10
6.3 INFRARED SENSOR---------------------------------------------------------------------------------11
7. SYSTEM IMPLEMENTATION----------------------------------------------------------------------12
7.1 SOFTWARE DESIGN--------------------------------------------------------------------------------12
7.2 SOFTWARE DEVELOPMENT---------------------------------------------------------------------12
7.3 DEVELOPMENT PROCESS------------------------------------------------------------------------14
7.4 CHOICE OF PROGRAMMING LANGUAGE---------------------------------------------------14
7.5 COMPILING AND LINKING-----------------------------------------------------------------------14
7.6 PROGRAM---------------------------------------------------------------------------------------------14
8. METHODOLOGY--------------------------------------------------------------------------------------18
8.1 PROCEDURE FOR SIMULATION----------------------------------------------------------------18
8.2 OPERATION OF THE CIRCUIT-------------------------------------------------------------------18
9. ADVANTAGES-----------------------------------------------------------------------------------------19
10. DIS ADVANTAGES---------------------------------------------------------------------------------19
11. SIMULATION RESULTS---------------------------------------------------------------------------19
12. APPLICATIONS--------------------------------------------------------------------------------------20
13. CONCLUSION--------------------------------------------------------------------------------------21
14. FUTURE SCOPE------------------------------------------------------------------------------------21
15. REFERENCES---------------------------------------------------------------------------------------21
FIGNO FIGURE CAPTION PAGE NO
3.1 BLOCK DIAGRAM OF OBSTACLE DETECTOR 4

5.1 CIRCUIT DIAGRAM OF OBSTACLE DETECTOR 5

6.1 BLOCK DIAGRAM OF 8051 MICROCONTROLLER 6

6.2 8051 PACKAGE CHIP 8

6.3 PIN DIAGRAM 8

6.4 LCD DISPLAY 11

6.5 LCD COMMANDS 11

6.6 INFRARED SENSOR 11

11.1 INTIALIZED LCD OUTPUT 19

11.2 OBSTACLE NOT DETECTED 20

11.3 OBSTACLE DETECTED 20


1. INTRODUCTION
Robot is a computer-controlled machine that is programmed to move
manipulated objects, and accomplish work while interacting with
appropriate sensors. In this robots, Infra-red pairs are used for sensing the
obstacles and IR leads are used for transmitting and receiving infra-red
rays. Using infra-red rays robots will find out the obstacles present in front
of them and move right or left from their current position and move
forward. Obstacle detection robots are nothing but self-thinking robots
which can take decisions itself using programmed brain without any
guidance from human beings. There are two types of robots, In one type
robots perform action as we give signals remotely whereas second type of
robots are self-thinking robots which can detect obstacles and move
forward. This project is of second type of robots.

1.1 OVERVIEW
Robotics is a branch of science that deals with mechanical, electrical and
software fields. Robots are the machines that are used in our day to day life
to reduce men power and work accurately without any distortions. Robots
are classified into two sections based upon their skills as automated and
manual, automated robot recognizes the obstacle in its path and moves in
obstacle free path.

1.2 WORKING OF OBSTACLE DETECTION


The obstacle avoidance robotic vehicle uses ultrasonic sensors for its
movements. A microcontroller of 8051 families is used to achieve the desired
operation. The motors are connected through the motor driver IC to the
microcontroller. The ultrasonic sensor is attached in front of the robot.

Whenever the robot is going on the desired path the ultrasonic sensor
transmits the ultrasonic waves continuously from its sensor head. Whenever
an obstacle comes ahead of it the ultrasonic waves are reflected from an
object and that information is passed to the microcontroller. The
microcontroller controls the motors left, right, back, front, based on ultrasonic
signals. To control the speed of each motor pulse width modulation is used.

1|Page
1.3 HISTORY OF 8051 MICROCONTROLLER
A highly integrated chip that contains all the components comprises a
controller. Typically this includes a CPU, RAM, some form of ROM, I/O
ports, and timers. Unlike a general purpose computer, which also includes
all of these components, a microcontroller is designed for a very specific
task; to control a particular system. As a result, the parts can be simplified
and reduced, which cuts down on production costs. Microcontrollers are
sometimes called embedded microcontrollers. This just means that they
are part of anembedded system; that is, one part of a larger device or
system. Microcontrollers are used in automatically controlled products and
devices, such as automobile engine control systems, implantable medical
devices, remote controls, office machines, appliances, power tools, toys and
other embedded systems. The first integrated circuit was developed by Jack
Kilby of Texas Instruments and Robert Noyce of Fairchild Semiconductor
in 1950.

2. USED SOFTWARES
2.1 KEIL uVERSION4
Keil is a German software subsidiary of Arm Holdings. It was founded in
1982 by Gü nter and Reinhard Keil, initially as a German GbR. In April 1985
the company was converted to Keil Elektronik GmbH to market add-on
products for the development tools provided by many of the silicon
vendors. Keil implemented the first C compiler designed from the ground-
up specifically for the 8051 microcontroller.

Keil provides a broad range of development tools like


ANSICcompiler,macro assemblers,debuggers and simulators, linkers,IDE,
library managers, real-time operating system sand evaluation boards for
Intel 8051, Intel MCS-251,ARM, and XC16x/C16x/ST10families.

It's a free software which solves many of the pain points for an embedded
program developer. This software is an integrated development
environment (IDE), which integrated a text editor to write programs, a
compiler and it will convert your source code to hex files too.
Here is simple guide to start working with Keil vision which can be used for

 Writing programs in C/C++ or Assembly language

 Compiling and Assembling Programs

 Debugging program

 Creating Hex file

 Testing your program without Available real Hardware


(Simulator Mode)

2.2 PROTEUS 8
The first version of what is now the Proteus Design Suite was called PC-B
and was written by the company chairman, John Jameson, for DOS in 1988.
Schematic Capture support followed in 1990, with a port to the Windows
environment shortly thereafter. Mixed mode SPICE Simulation was first
integrated into Proteus in 1996 and microcontroller simulation then
arrived in Proteus in 1998. Shape based auto routing was added in 2002
and 2006 saw another major product update with 3D Board Visualisation.
More recently, a dedicated IDE for simulation was added in 2011 and MCAD
import/export was included in 2015. Support for high-speed design was added
in 2017. Feature led product releases are typically biannual, while
maintenance-based service packs are released as it is required.

 Product module: The Proteus Design Suite is a Windows application for


schematic capture, simulation, and PCB (Printed Circuit Board) layout
design. It can be purchased in many configurations, depending on the
size of designs being produced and the requirements for microcontroller
simulation. All PCB Design products include an auto router and basic
mixed mode SPICE simulation capabilities.
 Schematic capture: Schematic capture in the Proteus Design Suite is
used for both the simulation of designs and as the design phase of a
PCB layout project. It is therefore a core component and is included
with all product configurations.

 Micro controller simulation: The micro-controller simulation in


Proteus works by applying either a hex file or a debug file to the
microcontroller part on the schematic. It is then co-simulated along
with any analogue and digital electronics connected to it. This
enables its use in a broad spectrum of project prototyping in areas
such as motor control, temperature control and user interface design.
It also finds use in the general hobbyist community and, since no
hardware is required, is convenient to use as a training or teaching
tool

3. DESCRIPTION OF BLOCK DIAGRAM


The block diagram of obstacle detector consists of one microcontroller unit,
input power supply, IR sensor unit, one LCD display, buzzer, driver unit
and motors

3.1 BLOCK DIAGRAM OF OBSTACLE DETECTOR


4 .CONCEPT OF THE PROJECT
This obstacle avoiding robot was programmed and designed by using
PIR(Passive Infrared) sensors which sends and receives IR rays in order to
detect the fore coming obstacles in an unstructured environment to avoid
collision.

Here the microcontroller (8051) acts as an interface between the


sensor signals and the robot’s pre-programmed instructions about its
motion controls. Thus, guides it in the required direction to reach its final
destination.

5. CIRCUIT DIAGRAM
The emitter is simply an IR LED which is called as Light Emitting Diode and the
detector is simply an IR photodiode. Photodiode is sensitive to IR light of the
same wave length which is emitted by the IR LED. When the IR light falls on the
photodiode, the resistances and the output voltages will change in proportion
to the magnitude of the IR light received.

5.1Circuit diagram of obstacle detection robot


6. COMPONENTS DESCRIPTION

6.1 8051 MICROCONTROLLERS:


The main reason for the development of microcontroller is to overcome the
only drawback of the microprocessor. Even though microprocessors are
powerful devices, they require external chips like RAM, ROM, Input / Output
ports and other components in order to design a complete working system.
This made it economically difficult to develop computerized consumer
appliances on a large scale as the system cost is very high. Microcontrollers are
the devices that actually fit the profile “Computer – on – a chip” as it consists
of a main processing unit or processor along with some other components that
are necessary to make it a complete computer.
A Microcontroller is a VLSI IC that contains a CPU (Processor) along with
some other peripherals like Memory (RAM and ROM), I/O Ports,
Timers/Counters, Communication Interface, ADC, etc.

8051 is an 8 – bit Microcontroller i.e. the data bus of the 8051


Microcontroller (both internal and external) is 8 – bit wide. It is a CISC
based Microcontroller with Harvard Architecture (separate program and
data memory).

6.1 Block diagram of 8051 microcontroller


6.1.1 8051 MICROCONTROLLER FEATURES
 8 – Bit ALU: ALU or Arithmetic Logic Unit is the heart of a
microcontroller. It performs arithmetic and bitwise operation on
binary numbers. The ALU in 8051 is an 8 – Bit ALU i.e. it can perform
operations on 8 – bit data.
 8 – Bit Accumulator: The Accumulator is an important register
associated with the ALU. The accumulator in 8051 is an 8 – bit
register.
 RAM: 8051 Microcontroller has 128 Bytes of RAM which includes
SFRs and Input / Output Port Registers.
 ROM: 8051 has 4 KB of on-chip ROM (Program Memory).
 I/O Ports: 8051 has four 8 – bit Input / Output Ports which are bit
addressable and bidirectional.
 Timers / Counters: 8051 has two 16 – bit Timers / Counters.
 Serial Port: 8051 supports full duplex UART Communication.
 External Memory: 8051Microcontroller can access two 16 – bit
address line at once: one each for RAM and ROM. The total external
memory that an 8051 Microcontroller can access for RAM and ROM
is 64KB (216 for each type).
 Additional Features: Interrupts, on-chip oscillator, Boolean
Processor, Power Down Mode, etc.

6.1.2 8051 Microcontroller Packaging

8051 Microcontroller is available in a variety of IC Packaging Types. The


most popular and commonly used 8051 Microcontroller Packaging is Dual
in-line or DIP. It is often available as a 40 – pin PDIP or Plastic DIP IC.

The other common packaging type is 44 – Lead PLCC (Plastic Leaded Chip
Carrier). It is a kind of surface mount package.

Another surface mount packaging for 8051 microcontroller is 44 – Lead


TQFP (Thin Quad Flat Package).
6.2 8051 package chip

6.1.3 8051 Microcontroller Pin Diagram


As mentioned in the previous tutorial, 8051 Microcontroller is
available in a variety of packages like 40 – pin DIP or 44 – lead PLCC and
TQFP. Thepin orientation of an 8051 Microcontroller may change with the
package but the Pin Configuration is same

6.3 Pin diagram of 8051 microcontroller


The Pin Description or Pin Configuration of the 8051 Microcontroller will
describe the functions of each pins of the 8051 Microcontroller. Let us now
see the pin description.

Pins 1 – 8 (PORT 1):Pins 1 to 8 are the PORT 1 Pins of 8051. PORT 1 Pins
consists of 8 – bit bidirectional Input / Output Port with internal pull – up
resistors. In older 8051 Microcontrollers, PORT 1 doesn’t serve any
additional purpose but just 8 – bit I/O PORT.
In some of the newer 8051 Microcontrollers, few PORT 1 Pins have
dual functions. P1.0 and P1.1 act as Timer 2 and Timer 2 Trigger Input
respectively.P1.5, P1.6 and P1.7 act as In-System Programming Pins i.e.,
MOSI, MISO and SCK respectively.

Pin 9 (RST):Pin 9 is the Reset Input Pin. It is an active HIGH Pin i.e. if the
RST Pin is HIGH for a minimum of two machine cycles, the microcontroller
will be reset. During this time, the oscillator must be running.

Pins 10 – 17 (PORT 3):Pins 10 to 17 form the PORT 3 pins of the


8051 Microcontroller. PORT 3 also acts as a bidirectional Input / Output
PORT with internal pull-ups. Additionally, all the PORT 3 Pins have special
functions. The following table gives the details of the additional functions of
PORT 3 Pins.

Pins 18 & 19: Pins 18 and 19 i.e. XTAL 2 and XTAL 1 are the pins for
connecting external oscillator. Generally, a Quartz Crystal Oscillator is
connected here.

Pin 20 (GND):Pin 20 is the Ground Pin of the 8051 Microcontroller. It


represents 0V and is connected to the negative terminal (0V) of the Power
Supply.

Pins 21 – 28 (PORT 2):These are the PORT 2 Pins of the 8051


Microcontroller. PORT 2 is also a Bidirectional Port i.e. all the PORT 2 pins
act as Input or Output. Additionally, when external memory is interfaced,
PORT 2 pins act as the higher order address byte. PORT 2 Pins have
internal pull-ups.

Pin 29 (PSEN):Pin 29 is the Program Store Enable Pin (PSEN). Using this
pins, external Program Memory can be read.
Pin 30 (ALE/PROG):Pin 30 is the Address Latch Enable Pin. Using this
Pins, external address can be separated from data (as they are multiplexed
by 8051).During Flash Programming, this pin acts as program pulse input
(PROG).
Pin 31 (EA/VPP):Pin 31 is the External Access Enable Pin i.e., allows
external Program Memory. Code from external program memory can be
fetched only if this pin is LOW. For normal operations, this pin is pulled
HIGH.

During Flash Programming, this Pin receives 12V Programming Enable


Voltage (VPP).

Pins 32 – 39 (PORT 0):Pins 32 to 39 are PORT 0 Pins. They are also


bidirectional Input / Output Pins but without any internal pull-ups. Hence,
we need external pull-ups in order to use PORT 0 pins as I/O PORT.

In addition to acting as I/O PORT, PORT 0 also acts as lower order


address/data bus when external memory is accessed.

Pin 40 (VCC): Pin 40 is the power supply pin to which the supply voltage is
given (+5V).

6.2 LCD DISPLAY:


The seven segment displays are made up of either LEDs (Light emitting
diode) or LCDs (Liquid crystal display). LED or light emitting diode is P-N
junction diode which emits the energy in the form of light, differing from
normal P-N junction diode which emits in the form of heat.

Liquid crystal displays (LCD) use the properties of liquid crystal for
displaying. LCD will not emit the light directly. These LED’s or LCD are used
to display the required numeral or alphabet. Single seven segment or
number of segments arranged in an order meets our requirements.

A seven-segment display is a form of electronic display device for


displaying decimal numerals that is an alternative to the more complex
dotmatrix displays.Sevensegmentdisplaysare widely used in digital clocks,
electronic meters, basic calculators, and other electronic devices that
display numerical information

6.4LCD display 6.5LCD commands

6.3 INFRARED SENSOR


IR sensor is an electronic device, that emits the light in order to sense some
object ofthesurroundings. An IR sensor can measure the heat of an object as
well asdetects themotion. Usually, in the infrared spectrum, all the objects
radiate some form of thermal radiation. These types of radiations are
invisible to our eyes, but infrared sensor can detect these radiations.

6.6 INFRARED SENSOR


7. SYSTEM IMPLEMENTATION

7.1 SOFTWARE DESIGN:


Software is computer program, instructions that cause the software, the
machine to do work. Software as whole can be divided into a number of
categories base on the type of work done. The two primary software are
operating software (system software), which controls the working of the
computer, application software, which addresses the multitude of task for
which people use computer.
Application software, perform word 52 processing, data base management,
and the like. Two additional categories that are either system nor
Application software, and language software, which provide programmers
with tools they need to write programs. In addition to these task-based
categories, several types of software are described based on their
application

7.2 SOFTWARE DEVELOPMENT:

Software development involves series of steps or is a set of activities that


are necessary to be taken for the development of reliable and maintenance
software, It is of great importance because hardware design cannot be used
with micro-controller base system without depending on software. A
typical micro-controller development system (MDS) includes, VDU
registers, RAM which serve as a stone for the PROM programmer. Software
system is the term use to describe a program PLANING BUILDING THE
PROGRAM SETTINGPROPERTIES WRITING CODES HARDWARE
INTERFACING COMPILING TESTING 53 that is provide by the manufacturer
to aid the development of users (applications) programs. These include
programs that convert assembly language into machine code (assembler),
or high-level language into machine code (interpreter or compiler). It also
includes programs that facilitate modifications (edition), the computer
aided development methodology, we use keil software for compilation.
TEXT EDITOR:

This is kind of word processing that is used. After keying in the used in
programs code using the input device and the programs is display on the
VDU, the text edition can be used to check and correct errors in
thprograms. In a nutshell, the text edition is used to edit the programs
after it has been written.

TRANSLATOR:
There are two types of translators, assembler, interpreter and compiler. An
assembler translates assembly language in the form of ammonic (memory
aids) into machine code. A good feature of assembler is creating a list that
shows the machine code and the assembly language of the programs side
by side. A compiler on the other hand translates a 54 high-level language
into machine code. An interpreter reads the source code of our programs
one line at a time and performs the specification instructions contained in
that line.

LINKER/LOCATOR:
This is used to join the different modules that make up the programs
together in the correct sequence and this is to be bound to addresses. The
linker/locator pair works together to co-ordinate between the separate
modules for smooth programs execution.

LOADER:

The loader aids in loading an object code into RAM

TESTING:
After the programs is written, it was tested, this involve executing the
programs with selected input called test cases, the result whether or not
the program is functioning as desired.

DEBUGGING:

This involves detecting out and removing errors in the program.


7.3 DEVELOPMENT PROCESS:

In writing the software for this project, a modular approach was employed.
This made it easier to check for errors and debug the program. Three
majortools were used in the development process; the C51 compiler was
used to translate from the source code into the object code. The SDCPP was
employed to link the program while the PACKIHX did the conversion from
binary to hexadecimal.

7.4 CHOICE OF PROGRAMMING LANGUAGE:


My implementation programming for this project is C programming
language reasons being the fact that C combines the element of high-level
language with functionalism of assembly language. C allows the
manipulation of bits, bytes and addresses. Also C codes are portable which
means that it is possible to adapt software written for one type of computer
to another. Nevertheless, a special feature of C is that it allows the direct
manipulation of bite, byte, word and pointers. This suite it to system level
programming where these operation are common. C has only 32 key word
as compare with Q-basic for IBM pc which contain 159 key word.

7.5 COMPILING AND LINKING:

The small device C “compiler” comes with a lot of modules. It dose


the task of compilation, linking binary to hexadecimal conversion once the
compilation command is issued an object file, a hexadecimal and a binary
file
7.6 PROGRAM :
#include<reg51.h>

sbit rs=p3^4;

sbit rw=p3^5;

sbit en=p3^7;

//lcd control pins connections//

sbit mot1p=p3^0;

sbit mot1n=p3^1;
sbit mot2p=p3^2;

sbit mot2n=p3^3;

//Driver ic inputs//

sbit sensor=p1^0;

sbit buzz=p1^1;

void lcddat(unsigned char);

void lcdcmd(unsigned char);

void lcddis(unsigned char *);

void lcdinit();

void delay();

void main();

mot1p=mot1n=mot2p=mot2n=0; buz=0;

lcdinit();

lcddis("OBSTACLE DETECTION");

lcdcmd(0xc0); lcddis("

ROBOT ")

delay();delay();delay();delay();

delay();delay();delay();delay();

delay();delay();delay();delay();

while(1)

lcdcmd(0x01);

lcddis("ROBOT IS MOVING");

mot1p=mot2p=1; mot1n=mot2n=0; buz=0; if(sensor==1)


{

mot1p=mot1n=mot2p=mot2n=0; buz=1;

lcdcmd(0x01); lcddis("OBSTACLE

DETECTED");

while(sensor==1);

void lcdinit()

lcdcmd(0x38);

lcdcmd(0x10);

lcdcmd(0x06);

lcdcmd(0x0c);

lcdcmd(0x80);

void lcddis(unsigned char *s)

unsigned char w; for(w=0;s[w]!

='\0';w++)
{

lcddat(s[w]);

void lcddat(unsigned char val)

p2=val;

rs=1;

rw=0;

en=1;

delay();

en=0;

void lcdcmd(unsigned char val)

p2=val;

rs=0;

rw=0;

en=1;

delay();

en=0;

void delay()

{
unsigned int v; for(v=0;v<3000;v+

+);

8. METHODOLOGY

8.1 PROCEDURE FOR SIMULATION:


After generate the .hex file in Keil µVision IDE. By using proteus,the
microcontroller used in the circuit is AT89C51 the LCD DISPLAY are
connected to the P2.0, P2.1, P2.2, P2.3, P2.4, P2.5, P2.6, P2.7.pins are
connected to these pins (P3.0 ,P3.1and P3.2) of 8051 microcontroller. A
virtual terminal is connected which has pins txd, rxd, rts, cts. The receiver
of the virtual terminal will be connected to the transmitter of the 8051 mc
i.e., pin P3.1. The transmitter of the virtual terminal will be connected to
the receiver of the 8051 mc i.e., pin P3.0. The read, write and en pins of the
lcd LM016L are connected to the pins P1.0, P1.1, P1.2 respectively.

8.2 OPERATION OF THE CIRCUIT:


 Initially LCD displays project :”OBSATCLE DETECTION ROBOT”.

 If logic pin is zero, then motors move in forward direction then LCD
displays “ROBOT IS MOVING”.

 If logic pin is one, then motors stop moving then LCD displays
“OBSTACLE DETECTED”.

 Again logic pin changes to zero then motor starts moving in forward
direction and LCD displays “ROBOT IS MOVING”, like this the
operation continues.
9. ADVANTAGES
 Whenever robot senses any obstacle automatically diverts its
position to left or right and follows the path without humans
guidance.

 The programming of the microcontroller is easy.

 It is a low cost circuit.

10. DISADVANTAGES
 It is time consuming project.
 It is use for short distances only.
 It is not recommended to keep the range very long because this
would cause the ROBOT to keep moving forward and backward as it
senses any obstacle, even far away from it.

 It is not in human control.

11. SIMULATION RESULTS


let us discuss about the results or how the system behaves when we are
practically implementing the project. Initially LCD displays as

11.1 INTIALIZED LCD OUTPUT


If the user entered the logic zero pin, then motors starts rotating in
forward direction and LCD displays as
11.2 OBSTACLE NOT DETECTED

If the user entered the logic one pin, then motors stops moving and LCD
displays as

11.3 OBSTACLE DETECTED

12 APPLICATIONS
 Obstacle detection robot can be applied at the toys where small
children will play.

 With proper programming we can use it as a weight lifter and auto


parking assistance.

 The modification of this logic has been specially designed for vacuum
cleaner.

 These are used in mines.

 It can be used for the army applications.


13 CONCLUSION
The objective of OBSTACLE DETECTION ROBOT is implemented. This
project also provides robot construction experience to beginners. This
technology also has applications everywhere from industry to home
appliances. It also gives an opportunity to test the mechanical and
programming skills.

14 FUTURE SCOPE

 This work can be extended with Ultra Sonic For


Distance Measurement.

 “Obstacle detecting sensors” to avoid physical obstacles and


continue on the line.

 By doing extra things , it can be used in Army application.

15 REFERENCES
[1] “8051 and embedded system” by Mazidi and

[2] www.keil.com

[3] About AT89s8252 from www.atmel.com

[4] 8051 Reference Manual, TICO Institute of Embedded Technology

You might also like