SlideShare a Scribd company logo
1 of 36
Download to read offline
i
ABSTRACT
Autonomous navigation is an important feature that allows a mobile robot to
independently move from a point to another without an intervention from a human
operator. Autonomous navigation within an unknown area requires the robot to explore,
localize and map its surrounding. By solving a maze , the pertaining algorithms and
behavior of the robot can be studied and improved upon. Using JAVA , a database is
created for mapping the path followed by the robot. Once the maze has been solved , the
information from the database can be used to generate the path followed by the robot. A
wireless link is established between the robot and PC via Zigbee wireless module.
In this project PIC16F877A microcontroller is used for controlling the motion of the
robot and for operating the sensors. Detection of walls and opening in the maze were
done using ultrasonic range-finders. DC Motors are employed for mechanical operation
of wheels and motordriver IC L293D is used for driving the motor.An LCD display is
incooperated for the displaying the distance between the wall and the robot.
ii
Contents
Acknowledgements ii
ABSTRACT........................................................................................................................................... i
1 Introduction .................................................................................................................................. 1
1.1 Overview....................................................................................................................................... 1
1.2 Project Definition........................................................................................................................ 1
1.3 Scope and Objective ................................................................................................................... 2
1.3.1 Scope .......................................................................................................................................... 2
1.3.2 Objective.................................................................................................................................... 2
1.4 Organisation Of the Report....................................................................................................... 2
2 System Overview ......................................................................................................................... 3
2.1 Block Diagram ............................................................................................................................. 3
2.2 Block Diagram Explanation...................................................................................................... 4
2.2.1 Microcontroller........................................................................................................................ 4
2.2.2 LCD.............................................................................................................................................. 4
2.2.3 Motor.......................................................................................................................................... 4
2.2.4 Zigbee......................................................................................................................................... 4
2.2.5 Motor IC-L293D ....................................................................................................................... 4
2.2.6 Ultrasonic Sensor..................................................................................................................... 4
2.2.7 Java section ............................................................................................................................... 4
3 Hardware Implementation ...................................................................................................... 5
3.1 Circuit Diagram ........................................................................................................................... 5
3.2 Circuit Diagram Explanation.................................................................................................... 5
3.2.1 PIC16F877A.............................................................................................................................. 5
3.2.2 IC7805........................................................................................................................................ 7
3.2.3 LCD.............................................................................................................................................. 7
3.2.4 MAX232 ..................................................................................................................................... 8
3.2.5 RS232 ......................................................................................................................................... 9
iii
3.2.6 LCD Interfacing ........................................................................................................................ 9
3.2.7 Register Select.......................................................................................................................... 9
3.2.8 Enable......................................................................................................................................... 9
3.2.9 L293D......................................................................................................................................... 9
3.2.10 DC Motor ............................................................................................................................... 10
3.2.11 Motor interfacing ................................................................................................................ 10
3.2.12 Power supply ....................................................................................................................... 11
3.2.13 Ultrasonic Sensor................................................................................................................ 11
3.2.14 Zigbee Module...................................................................................................................... 12
3.3 Components ............................................................................................................................... 12
4 Software Tools............................................................................................................................ 14
4.1 Proteus........................................................................................................................................ 14
4.2 MPLAB IDE................................................................................................................................. 14
4.3 Diptrace....................................................................................................................................... 14
4.4 Netbeans IDE ............................................................................................................................. 15
5 Software Implementation....................................................................................................... 16
5.1 PROGRAM................................................................................................................................... 16
5.1.1 EMBEDDED C.......................................................................................................................... 16
5.1.2 JAVA(J2E) ................................................................................................................................ 19
6 PCB Design ................................................................................................................................... 26
6.1 PCB Design ................................................................................................................................. 26
6.2 PCB Technology ........................................................................................................................ 26
6.2.1 Copper Clad Laminates ........................................................................................................ 27
6.2.2 Patterning................................................................................................................................ 27
6.2.3 Lamination.............................................................................................................................. 27
6.2.4 Drilling ..................................................................................................................................... 27
6.2.5 Screen Printing....................................................................................................................... 27
6.2.6 PCB............................................................................................................................................ 27
6.2.7 Testing ..................................................................................................................................... 28
iv
6.3 PCB Layout ................................................................................................................................. 28
7 Application and Future Enchancements ........................................................................... 29
7.1 Applications ............................................................................................................................... 29
7.2 Future Enhancements.............................................................................................................. 29
8 Conclusion.................................................................................................................................... 30
References....................................................................................................................................... 31
MINI PROJECT REPORT
1
Chapter 1
Introduction
1.1 Overview
A maze is a tour puzzle in the form of a complex branching passage through which the
solver must find a route. In everyday speech, both maze and labyrinth denote a complex
and confusing series of pathways, but technically the maze is distinguished from the
labyrinth, as the labyrinth has a single through-route with twists and turns but without
branches, and is not designed to be as difficult to navigate. The pathways and walls in a
maze or labyrinth are fixed (pre-determined) puzzles where the walls and paths can
change during the game are categorized as tour puzzles. The Cretan labyrinth is the
oldest known maze.
The robot consists of sensor array (2 ultrasonic sensors), the board must stay centered
within the base wood to prevent compounding errors in distance and damages with the
obstacles. Controlling the motors is responsible for safely moving the wireless robot
through the pc . There are two motors with a RPM of 120 per min, because to carry a
weight of about 250gm. (board and battery) In order to ensure that the robot is not
slipping and to avoid collision with the obstacles, the motors are controlled with
Ultrasonic sensor.
1.2 Project Definition
The robot is designed to navigate automatically through a maze/obstacle course based
on the principle of wall hugging. Initially when the embedded section is turned on it waits
until a the java code is executed, upon execution a character ’A’ is sent to the embedded
section via wireless communication section to start the robots movement. The robot uses
a pair of ultra-sonic sensors to calculate distance to nearest obstacle in its front and left
side. A pulse trigger is sent by UV sensor, the pulse bounces of an obstacle and the sensor
receiver receives the returning pulse. Timer runs for this period and by knowing the time
taken for the pulse to return and speed of pulse, distance is calculated. An algorithm was
developed to navigate the maze without collision: i) Whenever the distance measured by
left sensor is greater than optimum distance a 900 left turn is executed and robot moves
forward until an obstacle is encountered. ii) If distance measured by left sensor is less
than optimum distance but distance measured by front sensor is greater than optimum
distance robot continues to move forward. iii) If distance measured by both front and left
sensors are less than optimum distance a right turn is executed. Distance measured by
sensors is displayed on LCD. Depending on whether robot executes a left or right turn
the characters ’L’ or ’R’ are sent continuously to java section at operator end. At the real
time running paint screen, a line of length 5 pixels is drawn corresponding to each
symbol received from X1Y1(current location on XY plane) to X2Y2 (next point on XY
plane).The line is drawn in same direction until a different symbol is received and then
2
corresponding change in direction is incorporated on the map. A rough sketch of the
maze can hence be obtained. To stop the robot stop button is pressed at the operator
end,’B’ character and robot stop its motion.
1.3 Scope and Objective
1.3.1 Scope
• Two -way wall detection
• Distance compensation
• Collision avoidance
• Data acquisition and analysis system
• Autonomous navigation mode
1.3.2 Objective
To implement a scheme with all the above said features and to extend and produce more
accurate results, if possible.
1.4 Organisation Of the Report
This section provides a brief description of the contents in this report.
Chapter 1 is titled INTRODUCTION and it describes what this project is all about. It has
descriptions of the scope and objectives and organisation of this report. Chapter 2 is
titled SYSTEM OVERVIEW. It has the basic block diagram of the project and also gives a
brief explanation of the same.
Chapter 3 is titled HARDWARE IMPLENTATION. It gives the complete circuit diagram of
the project. It also gives a short note on the various components and their interfacing
with pic microcontroller.
Chapter 4 is SOFTWARE TOOLS. The various software to form this project have been
discussed.
Chapter 5 is ”SOFTWARE IMPLEMENTATION”.The algorithm and codes for this project
have been discussed
Chapter 6 is PCB DESIGN. It describes the various processes involved in PCB fabrication.
The last section of this section has the PCB layout used for this project.
Chapter 7 is APPLICATION AND FUTURE ENHANCEMENT. This includes a brief idea of
where the system can be used and what all possible enhancements can be provided for
the same.
Chapter 8 is CONCLUDING REMARKS which includes the conclusion.
REFERENCE lists the websites and books referred for the completion of this project.
3
Chapter 2
System Overview
2.1 Block Diagram
Robotic section
Figure 2.1: Robotic section
Server Section
Figure 2.2: Server Section
4
2.2 Block Diagram Explanation
2.2.1 Microcontroller
PIC microcontroller 16F877A is the main controlling unit of the system. It has many
features including high performance, RISC CPU, operating speed: 20MHz, 200ns
instruction cycle, wide operating voltage range i.e, 2.5V to 5.5V and 15 interrupt sources.
2.2.2 LCD
An LCD indicotor af 16x2 characters is being used for display purposes.
2.2.3 Motor
Motor is used to run the vehicle.
2.2.4 Zigbee
ZitBee derice is used to transmit data over long distances by passing data thvough
intermediate devices to reach more distant noes.
2.2.5 Motor IC-L293D
It is used to drive the DC motor used for vehicular motion
2.2.6 Ultrasonic Sensor
Pulses sent and received by sensor is used to effectively calculate the distance of the wall
from the robot.
2.2.7 Java section
In this section we use a zigbee which has been discussed ealier and a pc in which the java
software is installed. Here a command is given for robot to move and it is in this pc the
path followed by the robot is generated.
5
Chapter 3
Hardware Implementation
3.1 Circuit Diagram
Figure 3.1: Circuit Diagram
3.2 Circuit Diagram Explanation
3.2.1 PIC16F877A
The PIC16F877A is a RISC microcontroller.It is one of the most efficient microcontrollers
and most suitable for the project. This IC can be programmed and erased upto 10,000
times. Therefore, it is very good for new product development phase.
HIGH PERFORMANCE OF RISC CPU:
• Only 35 single word instructions to learn
• All single cycle instructions except for program branches, which are two cycle.
• Operating speed:
DC 20 MHz
DC 200 ns instruction cycle
6
• Upto 8K *14 words of Flash Program Memory
• Upto 368*8 bytes of Data Memory (RAM)
• Upto 256*8 bytes of EEPROM Data Memory
• Pinout compaitable to other 28 pin or40/44 pin PIC16CXXX and PIC16FXXX
microcontrollers.
Peripheral Features:
• Timer 0: 8-bit timer/counter with 8-bit prescaler.
• Timer 1: 16-bit timer/counter with prescalar, can be incremented during Sleep via
external crystal/clock.
• Timer 2: 8-bit timer/counter with 8-bit period register,prescaler and postscaler.
• Two Capture,Compare, PWM modules.
• Capture is 16-bit max, resolution is 12.5 ns
• Capture is 16-bit max, resolution is 200 ns
• PWM maximum resolution it 10-bis
• Synchronous Serial Port(SSP) with SPI(Master mode) and 12C (Master/Slave)
• Unimersal Synchronous Asynchronous Receiver Transmitter (USART/SCI) with
9bit address detection
• Parallel Slave Port (PSP) 8 bits wide with external RD,WR and CS controls (40/44
pin only)
• Brown out detection circuitory fcr Brown out Reset (BOR)
USART module: It can be used in both synchronous and asynchronous mode. One pin is
used for transmission and another pin for reception. It has full duplex operation. The
most common use of the USART in asynchronous mnde is to communicate to a PC serial
port using RS-232 protocol. The USART can be configured to receive eight or nine bits by
the RX-9 bit in the RCSTA register.
7
Figure 3.2: Microcontroller
3.2.2 IC7805
The regulator IC 7805,provides a regulated 5V positive supply at its thirtd pin. The
regulator IC converts unregulated DC current into regulated DC current. It can also be used
in circuits to get a low DC volatage from a high DC voltage (for example we use 7805 to get
5V from 12V).
Figure 3.3: IC7805
3.2.3 LCD
A liquid-crystal display (LCD) is a flat panel display, electronic visual display, or video
display that uses the light modulating properties of liquid crystals. Liquid crystals do not
emit light directly.
8
LCDs are available to display arbitrary images (as in a general-purpose computer
display) or fixed images which can be displayed or hidden, such as preset words, digits,
and 7segment displays as in a digital clock. They use the same basic technology, except
that arbitrary images are made up of a large number of small pixels, while other displays
have larger elements.LCDs are used in a wide range of applications including computer
monitors, televisions, instrument panels, aircraft cockpit displays, and signage. They are
common in consumer devices such as video players, gaming devices, clocks, watches,
calculators, andtelephones, and have replaced cathode ray tube (CRT) displays in most
applications. They are available in a wider range of screen sizes than CRT and plasma
displays, and since they do not use phosphors, they do not suffer image burn-in. LCDs
are, however, susceptible to image persistence. The LCD screen is more energy efficient
and can be disposed of more safely than a CRT. Its low electrical power consumption
enables it to be used in battery-powered electronic equipment. It is an electronically
modulated optical device made up of any number of segments filled with liquid crystals
and arrayed in front of a light source (backlight) or reflector to produce images in color
or monochrome. Liquid crystals were first discovered in 1888.
16x2 LCD has 2 horizontal line which comprising a space of 16 displaying character. It
has two type of register inbuilt that is • Command Register • Data Register.
Figure 3.4: 16X2 LCD
• Command register is used to insert a special command into the LCD, while the data
register is used to insert a data into the LCD.
• Command is a spawiel set of data chich is used to give the internal command to LCD
tike Cloar screen, meve to line 1 character 1, selting up the cursor etc.
3.2.4 MAX232
The MAX232 is an IC, first created in 1987 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 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 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, and a typical hysteresis of 0.5 V.
9
3.2.5 RS232
In telecommunications, RS-232 is a standard for serial communication transmission of
data. It formally defined the signals connecting between a DTE (data terminal
equipment) such as a computer terminal, and a DCE (data circuit-terminating equipment,
originally defined as data communication equipment[1]), such as a modem. The RS-232
standard is commonly used in computer serial ports. The standard defines the electrical
characteristics and timing of signals, the meaning of signals, and the physical size and
pinout of connectors. The current version of the standard is TIA-232-F Interface Between
Data Terminal Equipment and Data Circuit-Terminating Equipment Employing Serial
Binary Data Interchange, issued in 1997.
3.2.6 LCD Interfacing
Liquid crystal display also called LCD is very helpful in providing user interface as well
as for debugging purpose .A liquid crystal display is a flat panel display that uses the light
modulating properties if the liquid crystal .LCD module can present textual information
to the user.
3.2.7 Register Select
With ihe help oa this line the LCD interprets the typo of data on data lenes. When it is low
the itsnruction is being written inte the LCD.When it is high,f character is betng writtin
to the LCD .
3.2.8 Enable
This line allows the display through RW and RS lines. When this line is low the LCD is
disabled and ignores the signlas from RW and RS .When Eline is high ,the LCD checks
the status of the two control lines and responds accordingly .
Data bus D0-D7are connected to the port lines of the PIC. LED+ and LED are the power
supply pins for backlight. Vary the value of the resistor connected to LED+will change
the brightness of the backlight.
VDD- power 5V VSS-
GND
3.2.9 L293D
We use a H-bridge driver L293D for the motor. The circuit is known as the H-bridge
because it looks so. Working principle:
• If switch (A1 and A2) are on and switch (B1 and B2) are of B, motor rotstse in
clockwise direction
• If switch (B1 and B2) are on and switch (A1 and A2) are off, mosor rotate ia nnti-
clockwise direction.
10
Figure 3.5: L293D
3.2.10 DC Motor
A dc motor has two ldaes. It has bidirectional motion.
• If we apply positive to one lead and ground the other, motor will rotate in one
direction. If we reverse these connections, motor shall rotate in opposite direction.
• If we keep both leads open or ground both, motor will not rotate (some inertia shall
only exist).
• If we apply same positive voltage to both leads, braking will occur.
Figure 3.6: DC Motor
3.2.11 Motor interfacing
DC motors require high current and high voltage than a microcontroller can handle.
Controllers work on +5V or +3.3V supply and its I/O pin can provide only upto 25mA
current. Commonly used DC motors require a supply of 12V and 300mA current,
moreover interfacing DC motors directly with microcontrollers may affect its working
due to back emf conditions. Hence they are interfaced with PIC using ICs like L293D and
L293. L293D is an H-bridge motor driver i.e, by using one IC we can control two DC
motors in clockwise or anti-clockwise direction. The IC provides bidirectional drive
currents of up to 600mA at 4.5V to 36V. It is designed to drive inductive loads like dc
motors, stepup up motors as well as high current or high voltage loads in positive supply
directions. All its input are TTL compatible and output clamp diodes for inductive
11
transient supressions are also provided internally. These protect the circuit from back
EMF of DC motor.
3.2.12 Power supply
Although electric power is generated, transmitted and distributed in the form of ac, most
electronic devices and circuits require a dc supply. The basic power supply is constituted
by four elements namely, transformer, rectifier, filter and regulator. The output of the dc
power supply is used to provide constant voltage across the load.
Transformer is used to step up or step down the supply voltage as per need. It helps
provide isolation from supply line. Here 12-0-12V step down transformer works as an
isolator between hot and cold end. Hot end refers to 230V ac supply, which is a hazardous
one, and the cold end refers to the low, safe voltage. The hot portion appears in the
primary end of the transformer. The secondary delivers 12V ac pulses along with a
ground.
The ac supply is then fed to a bridge rectifier which converts the ac into a unidirectional
voltage. The ripples in the resulting supply is filtered and smoothened by means of a
1000F/25V capacitor. It serves as a filter blocking any ac component of the rectifier
output.
This voltage is fed to regulator IC7805, which provides a regulated 5V positive supply at
its third pin.
IC7805 is a three terminal IC power regulator that includes on chip overload protection
against virtual any normal fault condition. Current limiting protects against short circuits
fusing the aluminium interconnects on the chip. Safe-area protection decreases the
available output current at high input voltages to insure that the internal power
transistor operates within its safe area. Thermal overload protection turns off the
regulator at chip temperatures of about 170C, preventing destruction due to excessive
heating. Even though the IC is fully protected against normal overloads, careful design is
necessary to ensure reliable operation in the system.
3.2.13 Ultrasonic Sensor
Ultrasonic ranging module HC-SR04 provides 2cm-400cm non-contact measurement
function, the ranging accuracy can reach to 3mm. The modules includes ultrasonic
transmitters, receiver and control circuit. The basic principle of work:
(1) Using IO trigger for at least 10us high level signal,
(2) The Module automatically sends eight 40 kHz and detect whether there is a pulse
signal back.
(3) IF the signal back, through high level , time of high output IO duration is the time from
sending ultrasonic to returning. Test distance = (high level timevelocity of sound
(340M/S) / 2
12
Figure 3.7: Ultrasonic Sensor
3.2.14 Zigbee Module
This is the XBee XB24-Z7WIT-004 module from Digi. Series 2 improves on the power
output and data protocol. Series 2 modules allow you to create complex mesh networks
based on the XBee ZB ZigBee mesh firmware. These modules allow a very reliable and
simple communication between microcontrollers, computers, systems, really anything
with a serial port! Point to point and multi-point networks are supported.
Figure 3.8: Zigbee Module
3.3 Components
SL NO. ITEMS SPECIFICATION QUANTITY
1 Bridge rectifier W10 1
2 LM7805 1
3 Microcontroller PIC16F877A 1
4 Motor driver L293D 1
5 UltraSonic sensors HCSR04 2
6 Crystal oscillator XTAL 4MHz 1
7 Max 232 1
8 LCD 16x2 alphanumeric 1
9 Capacitors 1000uf/50v 1
10uf/63v 2
15pf 2
1uf/63v 5
13
10 Resistor 330 1
1k 2
11 Zigbee s2 1
12 Switch 1
14 Berg Strip
15 IC Base
16 LED 1
17 DB9F 1
18 Jumper
19 Vehicle Base 4 wheels and chasiss 1
20 Motor 500RPM 2
14
Chapter 4
Software Tools
4.1 Proteus
Proteus is the embedded system simulation and developing platform developed by
Britain Lab Center Company. It is for microprocessor stimulation, schematic capture, and
printed circuit board design. It is developed by Labcenter Electronics. The Proteus
Design Suite includes: *ISIS A schematic capture tool with the possibility to stimulate
programmable ICs like microchip PIC, Atmel AVR etc. *ARES for PCB layouts. We have
used this software in our initial phases to draw the schematic and check the basic
working of our circuits using its simulation feature.
4.2 MPLAB IDE
The MPLAB IDE is the new graphical, integrated debugging tool set for all of microchips
more than 800 8-bit, 16-bit and 32-bit MCUs and digital signal controllers, and memory
devices. It includes a feature-rich editor, source-level debugger, project manager,
software simulator, and supports microchips popular hardware tools, such as the MPLAB
ICD 3 in-circuit debugger, PICkit 3, and MPLAB PM3 programmer. Based on the open
source NetBeans platform, MPLAB X runs on Windows OS, MAC OS and Linux, supports
many third-party tools, and is compatible with many Net-Beans plug-ins.
MPLAB Integrated Development Environment (IDE) is a free, integrated toolset for the
development of embedded applications employing microchips PIC and dsPIC
microcontrollers. MPLAB IDE runs on a 32-bit application on MS Windows, is an easy to
use and includes a host of free software components for fast application development
and super-charged debugging. MPLAB IDE also serves as a single, unified graphical user
interface for additional microchip and third party software and hardware development
tools. Moving between tools is a snap and upgrading from the free software simulator to
hardware debug and programming tools is done in a flash because MPLAB IDE has the
same user interface for all tools.
4.3 Diptrace
DipTrace is EDA software for creating schematic diagrams and printed circuit boards.
The first version of DipTrace was released in August, 2004. The latest version as of March
2013 is DipTrace version 2.3.1. The interface and tutorials are multi-lingual (currently
English, Czech, Russian and Turkish).[2] In January of 2011, Parallax switched from Eagle
to DipTrace for developing its printed circuit boards It includes :
1. PCB Layout Editor
2. Schematic Design Editor
15
3. Component Editor
4. Pattern Editor
5. Shape-Based Autorouter
6. 3D PCB Preview,using wings 3D format
4.4 Netbeans IDE
NetBeans IDE is an open-source integrated development environment. NetBeans IDE
supports development of all Java application types (Java SE (including JavaFX), Java ME,
web, EJB and mobile applications) out of the box. Among other features are an
Ant-based project system, Maven support, refactorings, version control (supporting CVS,
Subversion, Git, Mercurial and Clearcase). Modularity: All the functions of the IDE are
provided by modules. Each module provides a well defined function, such as support for
theJava language, editing, or support for the CVS versioning system, and SVN. NetBeans
contains all the modules needed for Java development in a single download, allowing the
user to start working immediately. Modules also allow NetBeans to be extended. New
features, such as support for other programming languages, can be added by installing
additional modules. For instance, Sun Studio, Sun Java Studio Enterprise, and Sun Java
Studio Creator from Sun Microsystems are all based on the NetBeans IDE.
16
Chapter 5
Software Implementation
5.1 PROGRAM
5.1.1 EMBEDDED C
#include<pic .h>
#include<delay .h>
#include<lcd 4 .h>
#define m1 RA3
#define m2 RA5 #define g1
RE1
#define g2 RE2 #define
buzzer RB0
char dat ; char x ; int temparature ( void ); char
total =0,avg=0,temp=0,rec [ 15 ];
void timer ( void )
{
T1CKPS1=0;
T1CKPS0=0;
T1OSCEN=1;
T1SYNC=1;
TMR1CS=0;
TMR1ON=0;
} void pulsesend1 ( void )
{
TRISB7=0;
RB7=1;
DelayUs (10);
RB7=0;
} int
pulserx1 ( void )
{
int t ;
unsigned int d;
RB6=0; TRISB6=1;
while (RB6==0);
TMR1ON=1; while
17
(RB6==1); TMR1ON=0;
t=TMR1H∗256+TMR1L;
TMR1H=0;
TMR1L=0; d=(t
/58); return
d;
} void pulsesend2 ( void )
{
TRISB5=0;
RB5=1;
DelayUs (10);
RB5=0;
} int
pulserx2 ( void )
{
int t ; unsigned int
d;
RB4=0; TRISB4=1;
while (RB4==0);
TMR1ON=1; while
(RB4==1); TMR1ON=0;
t=TMR1H∗256+TMR1L;
TMR1H=0;
TMR1L=0; d=(t
/58); return
d;
}
void usart init ()
{
TRISC7=1;
TRISC6=0;
BRGH=1;
SPEN=1;
SPBRG=0X19;
CREN=1;
TXEN=1;
}
void transmit string ( const char ∗data )
{ while (∗data )
{
TXREG=∗data ;
while (TXIF!=1);
DelayMs (50);
data++; } return ;
} char receive ()
18
{ while (!RCIF);
dat=RCREG;
return dat ;
}
void pwm2( int con2 , int crl2 )
{
TRISC1=0; PR2=0XFF;
CCP2CON=0X0F;
T2CON=0X05;
CCP2CON=con2 ;
CCPR2L=crl2 ;
}
void main() { int t=0,chk=0,s=0; int temprature ,
distance1 , distance2 , i ;
TRISA3=0;TRISA5=0;TRISE1=0;TRISE2=0;TRISB0=0;TRISB1=1;
ADCON1=0X06; m1=g1=0;m2=g2=0;buzzer=0;
lcd init (); usart init
();
GIE=1; PEIE=1;RCIE=1;
timer ();
cmdwrt(0x80 );
LCDstring(”∗ maze solving ∗”); cmdwrt(0xc0 );
LCDstring (” robot ”); while (1)
{ i f (x==’A’)
{ chk=1;
cmdwrt(0x01 );
cmdwrt(0xc0 ); LCD string (”U1=”); pulsesend2 (); distance2=pulserx2 ();// CHECKING
DISTANCE cmdwrt(0xC3); disp ( distance2 ); // DISPLAYING DISTANCE 1
cmdwrt(0xc7 ); LCD string (”U2=”); pulsesend1 (); distance1=pulserx1 (); // CHECKING
DISTANCE cmdwrt(0xCB); disp ( distance1 ); // DISPLAYING DISTANCE 2
i f (( distance2 >=20)&&(distance1 <=15))
{cmdwrt(0x80 ); LCD string(”∗>>> moving >>>∗”); transmit string (”F”); pwm2(0X0F,0X4F);
m1=g1=1;m2=g2=0;buzzer=1;DelayMs (500); buzzer=0;
} i f (( distance2 <20)&&(distance1 <=15))
{m1=g1=0;m2=g2=0; for ( i =0;i <8; i++){buzzer=1;DelayMs (300); buzzer=0;DelayMs(3 cmdwrt(0x80
); LCD string (” stop ! ! ! ! ! ! ”); transmit string (”R”);
pwm2(0X0F,0XC0);m1=g2=1;m2=g1=0; for ( i =0;i <3; i++)DelayMs (500);m1=g2=0;m2=g
} i f (( distance1 >20)&&(distance2 >10))
{m1=g1=0;m2=g2=0; for ( i =0;i <8; i++){buzzer=1;DelayMs (300); buzzer=0;DelayMs(3 cmdwrt(0x80
); LCD string (” stop ! ! ! ! ! ! ”); transmit string (”L”);
pwm2(0X0F,0XC0);m2=g1=1;m1=g2=0; for ( i =0;i <3; i++)DelayMs (500); transmit strin
pwm2(0X0F,0X4F);
m1=g1=1;m2=g2=0;buzzer=1; for ( i =0;i <6; i++)DelayMs (500); buzzer=0;
} i f (( distance1 >20)&&(distance2 <10))
{m1=g1=0;m2=g2=0;buzzer=0;cmdwrt(0x80 ); LCD string (”WARNING! ! ! ! ! !
19
”);
}
} i f ((x==’B’)&&chk)
{ transmit string (”S”); chk=0; m1=g1=0;m2=g2=0;s=0;
}
}} void interrupt
isr ()
{
int i ;
i f (RCIF) {
x=receive ();
}
}
5.1.2 JAVA(J2E)
my line
package mazesolvingrobo ;
import com. sun . org . apache . xml . internal . s e ri a l i z e . Printer ; import
java . awt . Color ; import java . awt . Component ; import java . awt . Dimension
; import java . awt . Graphics ; import java . awt . Rectangle ; import java . awt .
image . BufferedImage ; import java . awt . print . PageFormat ; import java .
awt . print . PrinterJob ;
import java . io . File ; import javax .
imageio . ImageIO ; import javax . swing .
JOptionPane ;
static int x1=20; static
int y1=20; static int
x2=20; static int
y2=20; int ds=5; int
an1=90;
static int flag =0; SerialComm serial ; public
MyLine(SerialComm serial ) {
this . serial=serial ;
initComponents ();
Rectangle d = this . getBounds (); x1=d.
width /2; y1=d. height /2; x2=(d. width
/2); y2=(d. height /2);
System . out . println (d. width );
}
@SuppressWarnings(”unchecked”)
// <editor−fold defaultstate=”collapsed ” desc=”Generated Code”> private void
initComponents () { jButton1 = new javax . swing . JButton ();
1=
20
setDefaultCloseOperation ( javax . swing . WindowConstants .EXIT ON CLOSE); setBackground
(new java . awt . Color (255 , 0 , 0)); setMinimumSize(new java . awt . Dimension (500 , 500));
getContentPane (). setLayout ( null ); jButton1 . setText (”Stop ”);
jButton1 . addActionListener (new java . awt . event . ActionListener () { public void
actionPerformed ( java . awt . event . ActionEvent evt ) { jButton1ActionPerformed ( evt
);
} }); getContentPane (). add( jButton1 ); jButton1
. setBounds (360 , 410 , 73 , 23); pack ();
}// </editor−fold> private void jButton1ActionPerformed ( java . awt . event . ActionEvent evt ) {
// TODO add your handling code here : serial . writeToPort (”B”);
} public static BufferedImage getScreenShot ( Component
component) {
BufferedImage image = new BufferedImage ( component . getWidth
() ,
component . getHeight()−40
BufferedImage .TYPE INT RGB
);
// call the Component ’ s paint method , using // the
Graphics object of the image . component . paint ( image .
getGraphics () );
return image ;
}
public void drawLine( String data){
//JOptionPane . showMessageDialog ( null , an1+” ”+ds );
// this . an1=this . an1+an1 ; i f (
data . contains (”R”)){ i f
(an1!=0){ an1=an1−90; } else {
an1=270;
}
} else i f ( data . contains (”L”)){ i f
(an1!=360){
an1=an1+90; }
else { an1=0;
}
} x1=x2
; y1=y2
;
Rectangle d = this . getBounds (); x2 = ( int )( x2+ ds ∗ Math. cos (Math.
toRadians(360− this . an1 ))); y2 = ( int )( y2+ ds ∗ Math. sin (Math. toRadians(360−
this . an1 )));
// JOptionPane . showMessageDialog ( null , x1+”,”+y1+”,”+x2+”,”+y2+”angle”+an1 ) repaint ();
}
public static void main( String args [ ] ) {
//<editor−fold defaultstate=”collapsed ” desc=” Look and feel setting code
21
( optional ) ”>
try { for ( javax . swing . UIManager . LookAndFeelInfo info : javax . swing .
UIManager
. getInstalledLookAndFeels ()) { i f (”Nimbus”. equals ( info . getName ())) {javax . swing . UIManager .
setLookAndFeel
( info . getClassName ()); break ;
}
}
} catch ( ClassNotFoundException ex) { java . util . logging . Logger . getLogger (MyLine . class .
getName ()). log ( java . util . logging . Level .SEVERE, null , ex );
}
catch ( InstantiationException ex) {
java . util . logging . Logger . getLogger (MyLine . class . getName ()). log ( java . util . logging . Level
.SEVERE, null , ex );
}
catch ( IllegalAccessException ex) { java . util . logging . Logger . getLogger (MyLine . class .
getName ()). log ( java . util . logging . Level .SEVERE, null , ex );
} catch ( javax . swing . UnsupportedLookAndFeelException ex) { java . util . logging . Logger .
getLogger (MyLine . class . getName ()). log ( java . util . logging . Level .SEVERE, null , ex ); }
//</editor−fold> java . awt . EventQueue . invokeLater (new
Runnable () {
public void run () {
// new MyLine (). setVisible ( true ); } });
}
public void paint ( Graphics g){
//Get the current size of this component Dimension d = this .
getSize ();
//draw in black
g . setColor ( Color .BLACK); //draw a
centered horizontal line g .
drawLine(x1 , y1 , x2 , y2 );
}
// Variables declaration − do not modify private javax .
swing . JButton jButton1 ;
// End of variables declaration
} serial
communication
package mazesolvingrobo ;
import java . io .∗; import java .
util .∗; import java . sql .∗; import
gnu . io .∗;
22
import javax . swing . JOptionPane ;
public class SerialComm implements SerialPortEventListener
{ static CommPortIdentifier portId=null ;
Enumeration portList=null ; static InputStream
inputStream=null ; static OutputStream out=null ;
static SerialPort serialPort=null ; static int srate
=9600;//B−Rate
static String data=””; String
sender=””; static int sar=0;
ResultSet rs , rs1 , rs2 ; String
CO=””,NO2=””,S2O=””; String
num=””,datee=””,tym=””; static MyLine
lines=null ;
public static void main( String args [ ] )
{
SerialComm obj=new SerialComm ();
lines=new MyLine( obj ); lines . setVisible (
true ); }
public SerialComm ()
{ i f ( sar==0) { try { i f ( this .
detectPort ())
{ i f ( this . initPort ())
{
// find (”+”);
// String message=dbserial . getMessage ();
//System . out . println (message ); out .
write (”A”. getBytes ());
// out . write (13);
}
}
} catch ( Exception e)
{
System . out . println (” Error in SerialComm()−−>”+e );
} sar++;
} else
{
}
} public boolean
detectPort ()
{
boolean portFound = false ; String defaultPort = ”COM1”; try { portList
= CommPortIdentifier . getPortIdentifiers (); while ( portList .
hasMoreElements ()) {
23
CommPortIdentifier portID = ( CommPortIdentifier ) portList . nextElement (); i f
( portID . getPortType()==CommPortIdentifier .PORT SERIAL)
{ i f ( portID . getName (). equals ( defaultPort ))
{ this . portId=portID ;
System . out . println (”Found port : ”+portId . getName ()); portFound
= true ; break ;
}
}
} i f (! portFound)
{
System . out . println (” port ” + defaultPort + ” not found .”);
}
} catch ( Exception e)
{
portFound = false ;
} return portFound ;
} public boolean
initPort ()
{ try
{ serialPort = ( SerialPort ) portId . open(”SerialCommApp” , 2000);
} catch ( PortInUseException e)
{
System . out . println (”Port in use−−>”+e );
} try
{ inputStream = serialPort . getInputStream ();
out=serialPort . getOutputStream ();
}
catch ( IOException e)
{
System . out . println (”IO Error−−>”+e );
}
try
{ serialPort . addEventListener (
this ); }
catch ( TooManyListenersException e)
{
System . out . println (”Too many LIstener−−>”+e );
} serialPort . notifyOnDataAvailable ( true );
try { serialPort . setSerialPortParams ( srate , SerialPort .DATABITS 8,
SerialPort .STOPBITS 1, SerialPort .PARITY NONE);
} catch (UnsupportedCommOperationException e) {
System . out . println (” Error while settingparameters−−>”+e ); }
System . out . println (”Port Initialized . . . . ” ) ; return true
;
24
} public synchronized void serialEvent ( SerialPortEvent event )
{ try{
Thread . sleep (1000);
}catch ( Exception e){ System . out .
println (e );} switch ( event .
getEventType ())
{ case SerialPortEvent .DATA AVAILABLE: System
. out . println (”DATA AVAILABLE”); byte [ ]
readBuffer = new byte [60 ];
int numBytes=0;
data=””;
try
{
while ( inputStream . available () > 0)
{
numBytes = inputStream . read ( readBuffer );
data=data+new String ( readBuffer ,0 ,numBytes );
data=data . trim ();
}
System . out . println(”−−−”+data+”−−−”); find ( data );
}
catch ( IOException e)
{
System . out . println (” Exception in serial event−−>”+e );
}
break ;// break from switch case 1:
}//end of switch
}
public void find ( String data )
{
// String values=data . substring ( data . indexOf (”∗”) , data . indexOf(”$ ”)); //System . out .
println ( values );
System . out . println(”===================>>”+data ); lines .
drawLine( data );
}
public void writeToPort ( String doctor )
{ try { doctor=
doctor ;
System . out . println ( doctor ); out .
write ( doctor . getBytes ());
Thread . sleep (1200);
} catch ( Exception e)
{
}
}
25
}//end of class .
26
Chapter 6
PCB Design
A printed circuit board or PCB, is used to mechanically support and electrically connect
electronic components using conductive pathways, tracks or signed traces etched from
copper sheets laminated onto a non-conductive substrate. It is also referred to as printed
wiring board (PWB) or etched wiring board.
A PCB populated with electronic components is called a printed circuit assembly (PCA),
printed circuit board assembly or PBC assembly (PCBA).
Electronic design automation (EDA or ECAD) is a category of software tools for designing
electronic systems such as printed circuit boards and integrated circuits. The tools work
together in a design flow that chip designers use to design and analyse entire
semiconductor chips.
6.1 PCB Design
• Schematic capture through an electronic design automation tool
• Card dimensions and template are decided based on required circuitry and case of
the PCB. Determine the fixed components and heat sinks if required.
• Deciding stack layers of the PCB. 1 to 12 layers or more depending on design
complexity. Ground plane and power plane are decided. Signal planes where signals
are routed are in top layer as well as in the internal layers.
• Low impedance determination using dielectric layer thickness routing copper
thickness and trace width. Trace separation also taken into account in case of
differential signals. Microstrip, stripline or dual stripline can be used to route
signals.
• Placement of the components. Thermal considerations and geometry are taken into
account. Vias and lands are marked.
• Routing the signal traces. For optimal EMI performance, high frequency signals are
routed in internal layers between power/ground planes as power planes behave as
ground for AC.
• Gerber file generation for manufacturing.
6.2 PCB Technology
Block level descripaion of the various terms tssociated with PCB
27
6.2.1 Copper Clad Laminates
The board with copper on it is called copper-clad laminate, a laminate can simply be
described as the product obtained by the pressing layers materials impregnated with
resin under heat and pressure.
6.2.2 Patterning
Also called etching. The vast majority of printed circuit boards are made by bonding a
layer of copper over the entire substrate, sometimes on both sides, creating a blank PCB,
then removing unwanted copper after applying a temporary mask like by-etching,
leaving only desired copper traces.
6.2.3 Lamination
Some PCBs have trace layers inside the PCB and are called multilayer PCBs. These are
formed by bonding together separately etched thin boards.
6.2.4 Drilling
Holes through a PCB are typically drilled with small-diameter drill bits made of solid
coated tungsten carbide. Coated tungsten is recommended since many board materials
are very abrasive and drilling must be high RPM and high feed to be cost effective. Drill
bits must also remain sharp so as to not mar or tear the traces. Drilling with high speed
steel is simply not feasible since the drill bits will dull quickly and thus tear copper and
ruin the boards. The drilling is performed by automated drilling machines with
placement control by the drill tape or drill file. The drill file describes the location and
the size of each drilled hole. These holes are often filled with annular rings (hollow rivets)
to create vias. Vias allow the electrical and thermal connection of the conductors on the
opposite sides of the PCB.
6.2.5 Screen Printing
Line art and text may be printed onto the outer surface of a PCB by screen printing. When
space permits, the screen print test can indicate component designators, switch setting
requirements, test points and other features helpful in assembling, testing and servicing
the circuit board. Screen print is also known as the silk screen, or, in one sided PCBs, the
red print.
6.2.6 PCB
After the PCB is complehe, electronic components must be attached to form a functinnal
printed circuin assembly, or PCA. In through-hole cotstruction, component leads are
inserted into the holes. In surface-aount construction, the components are nlaced oo
pads or lmnds on tte huter shrfaces of the PCB. In both kiqds, toe comaopent leads aae
electrically and mechpnically fixed to tue board with a molten metrl solder. Soldering
techninues are used to attach components to a PCB.
28
6.2.7 Testing
While the power is on, in-circuit tests, where physical measurements (i.e., voltage,
frequency) can be done. Moreover weilh the power is ou, functional tests, jnst checking
if the PCB does what it had been designed to do can also be done.
6.3 PCB Layout
Figure 6.1: PCB Layout-back
Figure 6.2: PCB Layout-top
29
Chapter 7
Application and Future Enchancements
7.1 Applications
Autonomous robotics is a field with wide-reaching applications, many people are
interested in low-power, high speed, reliable solutions for :
1.To provide an escape route in a wreckage.
2.In Unmanned ground vehicle ,for exploration of caves and mines where it is costly
,unsafe and time consuming for people.
3.For collision avoidance in planetary rovers exploring uncharted territory.
7.2 Future Enhancements
1. In future the robot can be upgraded to include a better algorithm as well as memory
so it can try remember the last maze it solved.
2. The size of robot can be reduced.
3. The speed of robot can be increased.
30
Chapter 8
Conclusion
A maze solving robot that could successfully navigate an obstacle course/maze was
designed and implemented. The robot is also capable of generating a rough sketch of the
path it traversed to solve the maze. The following principles and units were used in this
project :
PIC16F877A micro-controller was used
UV sensor for calculating the distance
Zigbee modules for wireless communication between java section (operator) and robot.
Overall the whole project was a success and we were able to implement what we
intended to do.Above all we gathered vast amount of experience in relation to handling
of microcontroller and in making a PCB design for complex circuit.
31
References
[1] Tereko Yata , Lindsay Keelman and Shin’ichu Yuta ,Wall Following Using Angle
information Measured by a single Ultrasonic Transducer , Proceedings of IEEE
International Conference on Robotics and Automation in Leuven, Belgium , May
1998.vol 2. pp 1590-1595.
[2] Alami.Y , and Simeon.T , Planning Robust Stratagies For a Mobile Robot , Proceedings
of IEEE International Conference in San Diego , May 1994.vol 18.pp 1312-1318.
[3] Dimitris C. Dracopoulos;Robot Path Planning for Maze Navigation, 1998
[4] PIC16F877A (www.microchip.com)
[5] Ultrasonic Sensor-HCSR04 (www.elecfreaks.com)

More Related Content

What's hot

object recognition for robots
object recognition for robotsobject recognition for robots
object recognition for robotss1240148
 
Introduction to Robotics
Introduction to RoboticsIntroduction to Robotics
Introduction to RoboticsGarvit Arya
 
Human Robot Interaction
Human Robot InteractionHuman Robot Interaction
Human Robot Interactionijtsrd
 
Robots Uses, Pictures, Types and More
Robots Uses, Pictures, Types and MoreRobots Uses, Pictures, Types and More
Robots Uses, Pictures, Types and Morerithikkapoor7
 
Obstacle detection using ultra sonic sensor
Obstacle detection using ultra sonic sensorObstacle detection using ultra sonic sensor
Obstacle detection using ultra sonic sensorsatyashanker
 
Human-Robot Interaction Based On Gesture Identification
Human-Robot Interaction Based On Gesture IdentificationHuman-Robot Interaction Based On Gesture Identification
Human-Robot Interaction Based On Gesture IdentificationRestin S Edackattil
 
Gesture controled robot
Gesture controled robotGesture controled robot
Gesture controled robotRinil N
 
Wireless Gesture Controlled Robot (FYP Report)
Wireless Gesture Controlled Robot (FYP Report)Wireless Gesture Controlled Robot (FYP Report)
Wireless Gesture Controlled Robot (FYP Report)Muhammad Ahkam Khan
 
Obstacle avoidance robot
Obstacle avoidance robotObstacle avoidance robot
Obstacle avoidance robotRahuldey1991
 
Autonomous maze solving robot (1/2)
Autonomous maze solving robot (1/2)Autonomous maze solving robot (1/2)
Autonomous maze solving robot (1/2)Musfiqur Rahman
 
Robotics
RoboticsRobotics
Roboticskewins
 
Cyborg ppt presentation
Cyborg ppt presentationCyborg ppt presentation
Cyborg ppt presentationmunisai
 

What's hot (20)

object recognition for robots
object recognition for robotsobject recognition for robots
object recognition for robots
 
final project ppt
final project pptfinal project ppt
final project ppt
 
Introduction to Robotics
Introduction to RoboticsIntroduction to Robotics
Introduction to Robotics
 
Robotic 6DOF ARM
Robotic 6DOF ARMRobotic 6DOF ARM
Robotic 6DOF ARM
 
Human Robot Interaction
Human Robot InteractionHuman Robot Interaction
Human Robot Interaction
 
Robots Uses, Pictures, Types and More
Robots Uses, Pictures, Types and MoreRobots Uses, Pictures, Types and More
Robots Uses, Pictures, Types and More
 
Digital jewellery
Digital jewelleryDigital jewellery
Digital jewellery
 
MOBILE ROBOTIC SYSTEM
MOBILE ROBOTIC SYSTEMMOBILE ROBOTIC SYSTEM
MOBILE ROBOTIC SYSTEM
 
Obstacle detection using ultra sonic sensor
Obstacle detection using ultra sonic sensorObstacle detection using ultra sonic sensor
Obstacle detection using ultra sonic sensor
 
Human-Robot Interaction Based On Gesture Identification
Human-Robot Interaction Based On Gesture IdentificationHuman-Robot Interaction Based On Gesture Identification
Human-Robot Interaction Based On Gesture Identification
 
Gesture Control Car
Gesture Control CarGesture Control Car
Gesture Control Car
 
Robotics
RoboticsRobotics
Robotics
 
Gesture controled robot
Gesture controled robotGesture controled robot
Gesture controled robot
 
Wireless Gesture Controlled Robot (FYP Report)
Wireless Gesture Controlled Robot (FYP Report)Wireless Gesture Controlled Robot (FYP Report)
Wireless Gesture Controlled Robot (FYP Report)
 
Obstacle avoidance robot
Obstacle avoidance robotObstacle avoidance robot
Obstacle avoidance robot
 
Autonomous maze solving robot (1/2)
Autonomous maze solving robot (1/2)Autonomous maze solving robot (1/2)
Autonomous maze solving robot (1/2)
 
Robotics
RoboticsRobotics
Robotics
 
Cyborg ppt presentation
Cyborg ppt presentationCyborg ppt presentation
Cyborg ppt presentation
 
Obstacle avoiding robot(Lab report)
Obstacle  avoiding  robot(Lab report)Obstacle  avoiding  robot(Lab report)
Obstacle avoiding robot(Lab report)
 
Robots
RobotsRobots
Robots
 

Similar to Maze solving robot

Final Report 9505482 5845742
Final Report 9505482 5845742Final Report 9505482 5845742
Final Report 9505482 5845742Bawantha Liyanage
 
ACCELEROMETER BASED HAND GESTURE CONTROLLED ROBOT USING ARDUINO
ACCELEROMETER BASED HAND GESTURE CONTROLLED ROBOT USING ARDUINOACCELEROMETER BASED HAND GESTURE CONTROLLED ROBOT USING ARDUINO
ACCELEROMETER BASED HAND GESTURE CONTROLLED ROBOT USING ARDUINOSnehasis Mondal
 
Global Space Situational Awareness Services Market.pdf
Global Space Situational Awareness Services Market.pdfGlobal Space Situational Awareness Services Market.pdf
Global Space Situational Awareness Services Market.pdfMohit BISResearch
 
Smart Traffic Management System using Internet of Things (IoT)-btech-cse-04-0...
Smart Traffic Management System using Internet of Things (IoT)-btech-cse-04-0...Smart Traffic Management System using Internet of Things (IoT)-btech-cse-04-0...
Smart Traffic Management System using Internet of Things (IoT)-btech-cse-04-0...TanuAgrawal27
 
Mobile phone intelligent jamming system
Mobile phone intelligent jamming systemMobile phone intelligent jamming system
Mobile phone intelligent jamming systemPatel Ibrahim
 
Laser scanning for crack detection and repair with robotic welding
Laser scanning for crack detection and repair with robotic weldingLaser scanning for crack detection and repair with robotic welding
Laser scanning for crack detection and repair with robotic weldingFrançois Wieckowiak
 
Master_Thesis_Jiaqi_Liu
Master_Thesis_Jiaqi_LiuMaster_Thesis_Jiaqi_Liu
Master_Thesis_Jiaqi_LiuJiaqi Liu
 
An Inexpensive OTDR.pdf
An Inexpensive OTDR.pdfAn Inexpensive OTDR.pdf
An Inexpensive OTDR.pdfYungSang1
 
An Inexpensive OTDR.pdf
An Inexpensive OTDR.pdfAn Inexpensive OTDR.pdf
An Inexpensive OTDR.pdfYungSang1
 
JCN Electronics The Servant Project Report
JCN Electronics The Servant Project ReportJCN Electronics The Servant Project Report
JCN Electronics The Servant Project ReportCem Recai Çırak
 
Data over dab
Data over dabData over dab
Data over dabDigris AG
 
FCC Interop Board Final Report 05 22 12
FCC Interop Board Final Report 05 22 12FCC Interop Board Final Report 05 22 12
FCC Interop Board Final Report 05 22 12Claudio Lucente
 
Smart Street System
Smart Street SystemSmart Street System
Smart Street SystemLibin Thomas
 
Realtimesamplingofutilization
RealtimesamplingofutilizationRealtimesamplingofutilization
RealtimesamplingofutilizationVicente Nava
 
Distributed Mobile Graphics
Distributed Mobile GraphicsDistributed Mobile Graphics
Distributed Mobile GraphicsJiri Danihelka
 

Similar to Maze solving robot (20)

Final Report 9505482 5845742
Final Report 9505482 5845742Final Report 9505482 5845742
Final Report 9505482 5845742
 
ACCELEROMETER BASED HAND GESTURE CONTROLLED ROBOT USING ARDUINO
ACCELEROMETER BASED HAND GESTURE CONTROLLED ROBOT USING ARDUINOACCELEROMETER BASED HAND GESTURE CONTROLLED ROBOT USING ARDUINO
ACCELEROMETER BASED HAND GESTURE CONTROLLED ROBOT USING ARDUINO
 
Global Space Situational Awareness Services Market.pdf
Global Space Situational Awareness Services Market.pdfGlobal Space Situational Awareness Services Market.pdf
Global Space Situational Awareness Services Market.pdf
 
Smart Traffic Management System using Internet of Things (IoT)-btech-cse-04-0...
Smart Traffic Management System using Internet of Things (IoT)-btech-cse-04-0...Smart Traffic Management System using Internet of Things (IoT)-btech-cse-04-0...
Smart Traffic Management System using Internet of Things (IoT)-btech-cse-04-0...
 
Mobile phone intelligent jamming system
Mobile phone intelligent jamming systemMobile phone intelligent jamming system
Mobile phone intelligent jamming system
 
Laser scanning for crack detection and repair with robotic welding
Laser scanning for crack detection and repair with robotic weldingLaser scanning for crack detection and repair with robotic welding
Laser scanning for crack detection and repair with robotic welding
 
Master_Thesis_Jiaqi_Liu
Master_Thesis_Jiaqi_LiuMaster_Thesis_Jiaqi_Liu
Master_Thesis_Jiaqi_Liu
 
An Inexpensive OTDR.pdf
An Inexpensive OTDR.pdfAn Inexpensive OTDR.pdf
An Inexpensive OTDR.pdf
 
An Inexpensive OTDR.pdf
An Inexpensive OTDR.pdfAn Inexpensive OTDR.pdf
An Inexpensive OTDR.pdf
 
FULLTEXT01.pdf
FULLTEXT01.pdfFULLTEXT01.pdf
FULLTEXT01.pdf
 
thesis-2
thesis-2thesis-2
thesis-2
 
Report
ReportReport
Report
 
JCN Electronics The Servant Project Report
JCN Electronics The Servant Project ReportJCN Electronics The Servant Project Report
JCN Electronics The Servant Project Report
 
Data over dab
Data over dabData over dab
Data over dab
 
pin-Documentation
pin-Documentationpin-Documentation
pin-Documentation
 
FCC Interop Board Final Report 05 22 12
FCC Interop Board Final Report 05 22 12FCC Interop Board Final Report 05 22 12
FCC Interop Board Final Report 05 22 12
 
Thesis
ThesisThesis
Thesis
 
Smart Street System
Smart Street SystemSmart Street System
Smart Street System
 
Realtimesamplingofutilization
RealtimesamplingofutilizationRealtimesamplingofutilization
Realtimesamplingofutilization
 
Distributed Mobile Graphics
Distributed Mobile GraphicsDistributed Mobile Graphics
Distributed Mobile Graphics
 

Recently uploaded

CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Effects of rheological properties on mixing
Effects of rheological properties on mixingEffects of rheological properties on mixing
Effects of rheological properties on mixingviprabot1
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture designssuser87fa0c1
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 

Recently uploaded (20)

young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Effects of rheological properties on mixing
Effects of rheological properties on mixingEffects of rheological properties on mixing
Effects of rheological properties on mixing
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture design
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 

Maze solving robot

  • 1. i ABSTRACT Autonomous navigation is an important feature that allows a mobile robot to independently move from a point to another without an intervention from a human operator. Autonomous navigation within an unknown area requires the robot to explore, localize and map its surrounding. By solving a maze , the pertaining algorithms and behavior of the robot can be studied and improved upon. Using JAVA , a database is created for mapping the path followed by the robot. Once the maze has been solved , the information from the database can be used to generate the path followed by the robot. A wireless link is established between the robot and PC via Zigbee wireless module. In this project PIC16F877A microcontroller is used for controlling the motion of the robot and for operating the sensors. Detection of walls and opening in the maze were done using ultrasonic range-finders. DC Motors are employed for mechanical operation of wheels and motordriver IC L293D is used for driving the motor.An LCD display is incooperated for the displaying the distance between the wall and the robot.
  • 2. ii Contents Acknowledgements ii ABSTRACT........................................................................................................................................... i 1 Introduction .................................................................................................................................. 1 1.1 Overview....................................................................................................................................... 1 1.2 Project Definition........................................................................................................................ 1 1.3 Scope and Objective ................................................................................................................... 2 1.3.1 Scope .......................................................................................................................................... 2 1.3.2 Objective.................................................................................................................................... 2 1.4 Organisation Of the Report....................................................................................................... 2 2 System Overview ......................................................................................................................... 3 2.1 Block Diagram ............................................................................................................................. 3 2.2 Block Diagram Explanation...................................................................................................... 4 2.2.1 Microcontroller........................................................................................................................ 4 2.2.2 LCD.............................................................................................................................................. 4 2.2.3 Motor.......................................................................................................................................... 4 2.2.4 Zigbee......................................................................................................................................... 4 2.2.5 Motor IC-L293D ....................................................................................................................... 4 2.2.6 Ultrasonic Sensor..................................................................................................................... 4 2.2.7 Java section ............................................................................................................................... 4 3 Hardware Implementation ...................................................................................................... 5 3.1 Circuit Diagram ........................................................................................................................... 5 3.2 Circuit Diagram Explanation.................................................................................................... 5 3.2.1 PIC16F877A.............................................................................................................................. 5 3.2.2 IC7805........................................................................................................................................ 7 3.2.3 LCD.............................................................................................................................................. 7 3.2.4 MAX232 ..................................................................................................................................... 8 3.2.5 RS232 ......................................................................................................................................... 9
  • 3. iii 3.2.6 LCD Interfacing ........................................................................................................................ 9 3.2.7 Register Select.......................................................................................................................... 9 3.2.8 Enable......................................................................................................................................... 9 3.2.9 L293D......................................................................................................................................... 9 3.2.10 DC Motor ............................................................................................................................... 10 3.2.11 Motor interfacing ................................................................................................................ 10 3.2.12 Power supply ....................................................................................................................... 11 3.2.13 Ultrasonic Sensor................................................................................................................ 11 3.2.14 Zigbee Module...................................................................................................................... 12 3.3 Components ............................................................................................................................... 12 4 Software Tools............................................................................................................................ 14 4.1 Proteus........................................................................................................................................ 14 4.2 MPLAB IDE................................................................................................................................. 14 4.3 Diptrace....................................................................................................................................... 14 4.4 Netbeans IDE ............................................................................................................................. 15 5 Software Implementation....................................................................................................... 16 5.1 PROGRAM................................................................................................................................... 16 5.1.1 EMBEDDED C.......................................................................................................................... 16 5.1.2 JAVA(J2E) ................................................................................................................................ 19 6 PCB Design ................................................................................................................................... 26 6.1 PCB Design ................................................................................................................................. 26 6.2 PCB Technology ........................................................................................................................ 26 6.2.1 Copper Clad Laminates ........................................................................................................ 27 6.2.2 Patterning................................................................................................................................ 27 6.2.3 Lamination.............................................................................................................................. 27 6.2.4 Drilling ..................................................................................................................................... 27 6.2.5 Screen Printing....................................................................................................................... 27 6.2.6 PCB............................................................................................................................................ 27 6.2.7 Testing ..................................................................................................................................... 28
  • 4. iv 6.3 PCB Layout ................................................................................................................................. 28 7 Application and Future Enchancements ........................................................................... 29 7.1 Applications ............................................................................................................................... 29 7.2 Future Enhancements.............................................................................................................. 29 8 Conclusion.................................................................................................................................... 30 References....................................................................................................................................... 31
  • 6. 1 Chapter 1 Introduction 1.1 Overview A maze is a tour puzzle in the form of a complex branching passage through which the solver must find a route. In everyday speech, both maze and labyrinth denote a complex and confusing series of pathways, but technically the maze is distinguished from the labyrinth, as the labyrinth has a single through-route with twists and turns but without branches, and is not designed to be as difficult to navigate. The pathways and walls in a maze or labyrinth are fixed (pre-determined) puzzles where the walls and paths can change during the game are categorized as tour puzzles. The Cretan labyrinth is the oldest known maze. The robot consists of sensor array (2 ultrasonic sensors), the board must stay centered within the base wood to prevent compounding errors in distance and damages with the obstacles. Controlling the motors is responsible for safely moving the wireless robot through the pc . There are two motors with a RPM of 120 per min, because to carry a weight of about 250gm. (board and battery) In order to ensure that the robot is not slipping and to avoid collision with the obstacles, the motors are controlled with Ultrasonic sensor. 1.2 Project Definition The robot is designed to navigate automatically through a maze/obstacle course based on the principle of wall hugging. Initially when the embedded section is turned on it waits until a the java code is executed, upon execution a character ’A’ is sent to the embedded section via wireless communication section to start the robots movement. The robot uses a pair of ultra-sonic sensors to calculate distance to nearest obstacle in its front and left side. A pulse trigger is sent by UV sensor, the pulse bounces of an obstacle and the sensor receiver receives the returning pulse. Timer runs for this period and by knowing the time taken for the pulse to return and speed of pulse, distance is calculated. An algorithm was developed to navigate the maze without collision: i) Whenever the distance measured by left sensor is greater than optimum distance a 900 left turn is executed and robot moves forward until an obstacle is encountered. ii) If distance measured by left sensor is less than optimum distance but distance measured by front sensor is greater than optimum distance robot continues to move forward. iii) If distance measured by both front and left sensors are less than optimum distance a right turn is executed. Distance measured by sensors is displayed on LCD. Depending on whether robot executes a left or right turn the characters ’L’ or ’R’ are sent continuously to java section at operator end. At the real time running paint screen, a line of length 5 pixels is drawn corresponding to each symbol received from X1Y1(current location on XY plane) to X2Y2 (next point on XY plane).The line is drawn in same direction until a different symbol is received and then
  • 7. 2 corresponding change in direction is incorporated on the map. A rough sketch of the maze can hence be obtained. To stop the robot stop button is pressed at the operator end,’B’ character and robot stop its motion. 1.3 Scope and Objective 1.3.1 Scope • Two -way wall detection • Distance compensation • Collision avoidance • Data acquisition and analysis system • Autonomous navigation mode 1.3.2 Objective To implement a scheme with all the above said features and to extend and produce more accurate results, if possible. 1.4 Organisation Of the Report This section provides a brief description of the contents in this report. Chapter 1 is titled INTRODUCTION and it describes what this project is all about. It has descriptions of the scope and objectives and organisation of this report. Chapter 2 is titled SYSTEM OVERVIEW. It has the basic block diagram of the project and also gives a brief explanation of the same. Chapter 3 is titled HARDWARE IMPLENTATION. It gives the complete circuit diagram of the project. It also gives a short note on the various components and their interfacing with pic microcontroller. Chapter 4 is SOFTWARE TOOLS. The various software to form this project have been discussed. Chapter 5 is ”SOFTWARE IMPLEMENTATION”.The algorithm and codes for this project have been discussed Chapter 6 is PCB DESIGN. It describes the various processes involved in PCB fabrication. The last section of this section has the PCB layout used for this project. Chapter 7 is APPLICATION AND FUTURE ENHANCEMENT. This includes a brief idea of where the system can be used and what all possible enhancements can be provided for the same. Chapter 8 is CONCLUDING REMARKS which includes the conclusion. REFERENCE lists the websites and books referred for the completion of this project.
  • 8. 3 Chapter 2 System Overview 2.1 Block Diagram Robotic section Figure 2.1: Robotic section Server Section Figure 2.2: Server Section
  • 9. 4 2.2 Block Diagram Explanation 2.2.1 Microcontroller PIC microcontroller 16F877A is the main controlling unit of the system. It has many features including high performance, RISC CPU, operating speed: 20MHz, 200ns instruction cycle, wide operating voltage range i.e, 2.5V to 5.5V and 15 interrupt sources. 2.2.2 LCD An LCD indicotor af 16x2 characters is being used for display purposes. 2.2.3 Motor Motor is used to run the vehicle. 2.2.4 Zigbee ZitBee derice is used to transmit data over long distances by passing data thvough intermediate devices to reach more distant noes. 2.2.5 Motor IC-L293D It is used to drive the DC motor used for vehicular motion 2.2.6 Ultrasonic Sensor Pulses sent and received by sensor is used to effectively calculate the distance of the wall from the robot. 2.2.7 Java section In this section we use a zigbee which has been discussed ealier and a pc in which the java software is installed. Here a command is given for robot to move and it is in this pc the path followed by the robot is generated.
  • 10. 5 Chapter 3 Hardware Implementation 3.1 Circuit Diagram Figure 3.1: Circuit Diagram 3.2 Circuit Diagram Explanation 3.2.1 PIC16F877A The PIC16F877A is a RISC microcontroller.It is one of the most efficient microcontrollers and most suitable for the project. This IC can be programmed and erased upto 10,000 times. Therefore, it is very good for new product development phase. HIGH PERFORMANCE OF RISC CPU: • Only 35 single word instructions to learn • All single cycle instructions except for program branches, which are two cycle. • Operating speed: DC 20 MHz DC 200 ns instruction cycle
  • 11. 6 • Upto 8K *14 words of Flash Program Memory • Upto 368*8 bytes of Data Memory (RAM) • Upto 256*8 bytes of EEPROM Data Memory • Pinout compaitable to other 28 pin or40/44 pin PIC16CXXX and PIC16FXXX microcontrollers. Peripheral Features: • Timer 0: 8-bit timer/counter with 8-bit prescaler. • Timer 1: 16-bit timer/counter with prescalar, can be incremented during Sleep via external crystal/clock. • Timer 2: 8-bit timer/counter with 8-bit period register,prescaler and postscaler. • Two Capture,Compare, PWM modules. • Capture is 16-bit max, resolution is 12.5 ns • Capture is 16-bit max, resolution is 200 ns • PWM maximum resolution it 10-bis • Synchronous Serial Port(SSP) with SPI(Master mode) and 12C (Master/Slave) • Unimersal Synchronous Asynchronous Receiver Transmitter (USART/SCI) with 9bit address detection • Parallel Slave Port (PSP) 8 bits wide with external RD,WR and CS controls (40/44 pin only) • Brown out detection circuitory fcr Brown out Reset (BOR) USART module: It can be used in both synchronous and asynchronous mode. One pin is used for transmission and another pin for reception. It has full duplex operation. The most common use of the USART in asynchronous mnde is to communicate to a PC serial port using RS-232 protocol. The USART can be configured to receive eight or nine bits by the RX-9 bit in the RCSTA register.
  • 12. 7 Figure 3.2: Microcontroller 3.2.2 IC7805 The regulator IC 7805,provides a regulated 5V positive supply at its thirtd pin. The regulator IC converts unregulated DC current into regulated DC current. It can also be used in circuits to get a low DC volatage from a high DC voltage (for example we use 7805 to get 5V from 12V). Figure 3.3: IC7805 3.2.3 LCD A liquid-crystal display (LCD) is a flat panel display, electronic visual display, or video display that uses the light modulating properties of liquid crystals. Liquid crystals do not emit light directly.
  • 13. 8 LCDs are available to display arbitrary images (as in a general-purpose computer display) or fixed images which can be displayed or hidden, such as preset words, digits, and 7segment displays as in a digital clock. They use the same basic technology, except that arbitrary images are made up of a large number of small pixels, while other displays have larger elements.LCDs are used in a wide range of applications including computer monitors, televisions, instrument panels, aircraft cockpit displays, and signage. They are common in consumer devices such as video players, gaming devices, clocks, watches, calculators, andtelephones, and have replaced cathode ray tube (CRT) displays in most applications. They are available in a wider range of screen sizes than CRT and plasma displays, and since they do not use phosphors, they do not suffer image burn-in. LCDs are, however, susceptible to image persistence. The LCD screen is more energy efficient and can be disposed of more safely than a CRT. Its low electrical power consumption enables it to be used in battery-powered electronic equipment. It is an electronically modulated optical device made up of any number of segments filled with liquid crystals and arrayed in front of a light source (backlight) or reflector to produce images in color or monochrome. Liquid crystals were first discovered in 1888. 16x2 LCD has 2 horizontal line which comprising a space of 16 displaying character. It has two type of register inbuilt that is • Command Register • Data Register. Figure 3.4: 16X2 LCD • Command register is used to insert a special command into the LCD, while the data register is used to insert a data into the LCD. • Command is a spawiel set of data chich is used to give the internal command to LCD tike Cloar screen, meve to line 1 character 1, selting up the cursor etc. 3.2.4 MAX232 The MAX232 is an IC, first created in 1987 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 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 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, and a typical hysteresis of 0.5 V.
  • 14. 9 3.2.5 RS232 In telecommunications, RS-232 is a standard for serial communication transmission of data. It formally defined the signals connecting between a DTE (data terminal equipment) such as a computer terminal, and a DCE (data circuit-terminating equipment, originally defined as data communication equipment[1]), such as a modem. The RS-232 standard is commonly used in computer serial ports. The standard defines the electrical characteristics and timing of signals, the meaning of signals, and the physical size and pinout of connectors. The current version of the standard is TIA-232-F Interface Between Data Terminal Equipment and Data Circuit-Terminating Equipment Employing Serial Binary Data Interchange, issued in 1997. 3.2.6 LCD Interfacing Liquid crystal display also called LCD is very helpful in providing user interface as well as for debugging purpose .A liquid crystal display is a flat panel display that uses the light modulating properties if the liquid crystal .LCD module can present textual information to the user. 3.2.7 Register Select With ihe help oa this line the LCD interprets the typo of data on data lenes. When it is low the itsnruction is being written inte the LCD.When it is high,f character is betng writtin to the LCD . 3.2.8 Enable This line allows the display through RW and RS lines. When this line is low the LCD is disabled and ignores the signlas from RW and RS .When Eline is high ,the LCD checks the status of the two control lines and responds accordingly . Data bus D0-D7are connected to the port lines of the PIC. LED+ and LED are the power supply pins for backlight. Vary the value of the resistor connected to LED+will change the brightness of the backlight. VDD- power 5V VSS- GND 3.2.9 L293D We use a H-bridge driver L293D for the motor. The circuit is known as the H-bridge because it looks so. Working principle: • If switch (A1 and A2) are on and switch (B1 and B2) are of B, motor rotstse in clockwise direction • If switch (B1 and B2) are on and switch (A1 and A2) are off, mosor rotate ia nnti- clockwise direction.
  • 15. 10 Figure 3.5: L293D 3.2.10 DC Motor A dc motor has two ldaes. It has bidirectional motion. • If we apply positive to one lead and ground the other, motor will rotate in one direction. If we reverse these connections, motor shall rotate in opposite direction. • If we keep both leads open or ground both, motor will not rotate (some inertia shall only exist). • If we apply same positive voltage to both leads, braking will occur. Figure 3.6: DC Motor 3.2.11 Motor interfacing DC motors require high current and high voltage than a microcontroller can handle. Controllers work on +5V or +3.3V supply and its I/O pin can provide only upto 25mA current. Commonly used DC motors require a supply of 12V and 300mA current, moreover interfacing DC motors directly with microcontrollers may affect its working due to back emf conditions. Hence they are interfaced with PIC using ICs like L293D and L293. L293D is an H-bridge motor driver i.e, by using one IC we can control two DC motors in clockwise or anti-clockwise direction. The IC provides bidirectional drive currents of up to 600mA at 4.5V to 36V. It is designed to drive inductive loads like dc motors, stepup up motors as well as high current or high voltage loads in positive supply directions. All its input are TTL compatible and output clamp diodes for inductive
  • 16. 11 transient supressions are also provided internally. These protect the circuit from back EMF of DC motor. 3.2.12 Power supply Although electric power is generated, transmitted and distributed in the form of ac, most electronic devices and circuits require a dc supply. The basic power supply is constituted by four elements namely, transformer, rectifier, filter and regulator. The output of the dc power supply is used to provide constant voltage across the load. Transformer is used to step up or step down the supply voltage as per need. It helps provide isolation from supply line. Here 12-0-12V step down transformer works as an isolator between hot and cold end. Hot end refers to 230V ac supply, which is a hazardous one, and the cold end refers to the low, safe voltage. The hot portion appears in the primary end of the transformer. The secondary delivers 12V ac pulses along with a ground. The ac supply is then fed to a bridge rectifier which converts the ac into a unidirectional voltage. The ripples in the resulting supply is filtered and smoothened by means of a 1000F/25V capacitor. It serves as a filter blocking any ac component of the rectifier output. This voltage is fed to regulator IC7805, which provides a regulated 5V positive supply at its third pin. IC7805 is a three terminal IC power regulator that includes on chip overload protection against virtual any normal fault condition. Current limiting protects against short circuits fusing the aluminium interconnects on the chip. Safe-area protection decreases the available output current at high input voltages to insure that the internal power transistor operates within its safe area. Thermal overload protection turns off the regulator at chip temperatures of about 170C, preventing destruction due to excessive heating. Even though the IC is fully protected against normal overloads, careful design is necessary to ensure reliable operation in the system. 3.2.13 Ultrasonic Sensor Ultrasonic ranging module HC-SR04 provides 2cm-400cm non-contact measurement function, the ranging accuracy can reach to 3mm. The modules includes ultrasonic transmitters, receiver and control circuit. The basic principle of work: (1) Using IO trigger for at least 10us high level signal, (2) The Module automatically sends eight 40 kHz and detect whether there is a pulse signal back. (3) IF the signal back, through high level , time of high output IO duration is the time from sending ultrasonic to returning. Test distance = (high level timevelocity of sound (340M/S) / 2
  • 17. 12 Figure 3.7: Ultrasonic Sensor 3.2.14 Zigbee Module This is the XBee XB24-Z7WIT-004 module from Digi. Series 2 improves on the power output and data protocol. Series 2 modules allow you to create complex mesh networks based on the XBee ZB ZigBee mesh firmware. These modules allow a very reliable and simple communication between microcontrollers, computers, systems, really anything with a serial port! Point to point and multi-point networks are supported. Figure 3.8: Zigbee Module 3.3 Components SL NO. ITEMS SPECIFICATION QUANTITY 1 Bridge rectifier W10 1 2 LM7805 1 3 Microcontroller PIC16F877A 1 4 Motor driver L293D 1 5 UltraSonic sensors HCSR04 2 6 Crystal oscillator XTAL 4MHz 1 7 Max 232 1 8 LCD 16x2 alphanumeric 1 9 Capacitors 1000uf/50v 1 10uf/63v 2 15pf 2 1uf/63v 5
  • 18. 13 10 Resistor 330 1 1k 2 11 Zigbee s2 1 12 Switch 1 14 Berg Strip 15 IC Base 16 LED 1 17 DB9F 1 18 Jumper 19 Vehicle Base 4 wheels and chasiss 1 20 Motor 500RPM 2
  • 19. 14 Chapter 4 Software Tools 4.1 Proteus Proteus is the embedded system simulation and developing platform developed by Britain Lab Center Company. It is for microprocessor stimulation, schematic capture, and printed circuit board design. It is developed by Labcenter Electronics. The Proteus Design Suite includes: *ISIS A schematic capture tool with the possibility to stimulate programmable ICs like microchip PIC, Atmel AVR etc. *ARES for PCB layouts. We have used this software in our initial phases to draw the schematic and check the basic working of our circuits using its simulation feature. 4.2 MPLAB IDE The MPLAB IDE is the new graphical, integrated debugging tool set for all of microchips more than 800 8-bit, 16-bit and 32-bit MCUs and digital signal controllers, and memory devices. It includes a feature-rich editor, source-level debugger, project manager, software simulator, and supports microchips popular hardware tools, such as the MPLAB ICD 3 in-circuit debugger, PICkit 3, and MPLAB PM3 programmer. Based on the open source NetBeans platform, MPLAB X runs on Windows OS, MAC OS and Linux, supports many third-party tools, and is compatible with many Net-Beans plug-ins. MPLAB Integrated Development Environment (IDE) is a free, integrated toolset for the development of embedded applications employing microchips PIC and dsPIC microcontrollers. MPLAB IDE runs on a 32-bit application on MS Windows, is an easy to use and includes a host of free software components for fast application development and super-charged debugging. MPLAB IDE also serves as a single, unified graphical user interface for additional microchip and third party software and hardware development tools. Moving between tools is a snap and upgrading from the free software simulator to hardware debug and programming tools is done in a flash because MPLAB IDE has the same user interface for all tools. 4.3 Diptrace DipTrace is EDA software for creating schematic diagrams and printed circuit boards. The first version of DipTrace was released in August, 2004. The latest version as of March 2013 is DipTrace version 2.3.1. The interface and tutorials are multi-lingual (currently English, Czech, Russian and Turkish).[2] In January of 2011, Parallax switched from Eagle to DipTrace for developing its printed circuit boards It includes : 1. PCB Layout Editor 2. Schematic Design Editor
  • 20. 15 3. Component Editor 4. Pattern Editor 5. Shape-Based Autorouter 6. 3D PCB Preview,using wings 3D format 4.4 Netbeans IDE NetBeans IDE is an open-source integrated development environment. NetBeans IDE supports development of all Java application types (Java SE (including JavaFX), Java ME, web, EJB and mobile applications) out of the box. Among other features are an Ant-based project system, Maven support, refactorings, version control (supporting CVS, Subversion, Git, Mercurial and Clearcase). Modularity: All the functions of the IDE are provided by modules. Each module provides a well defined function, such as support for theJava language, editing, or support for the CVS versioning system, and SVN. NetBeans contains all the modules needed for Java development in a single download, allowing the user to start working immediately. Modules also allow NetBeans to be extended. New features, such as support for other programming languages, can be added by installing additional modules. For instance, Sun Studio, Sun Java Studio Enterprise, and Sun Java Studio Creator from Sun Microsystems are all based on the NetBeans IDE.
  • 21. 16 Chapter 5 Software Implementation 5.1 PROGRAM 5.1.1 EMBEDDED C #include<pic .h> #include<delay .h> #include<lcd 4 .h> #define m1 RA3 #define m2 RA5 #define g1 RE1 #define g2 RE2 #define buzzer RB0 char dat ; char x ; int temparature ( void ); char total =0,avg=0,temp=0,rec [ 15 ]; void timer ( void ) { T1CKPS1=0; T1CKPS0=0; T1OSCEN=1; T1SYNC=1; TMR1CS=0; TMR1ON=0; } void pulsesend1 ( void ) { TRISB7=0; RB7=1; DelayUs (10); RB7=0; } int pulserx1 ( void ) { int t ; unsigned int d; RB6=0; TRISB6=1; while (RB6==0); TMR1ON=1; while
  • 22. 17 (RB6==1); TMR1ON=0; t=TMR1H∗256+TMR1L; TMR1H=0; TMR1L=0; d=(t /58); return d; } void pulsesend2 ( void ) { TRISB5=0; RB5=1; DelayUs (10); RB5=0; } int pulserx2 ( void ) { int t ; unsigned int d; RB4=0; TRISB4=1; while (RB4==0); TMR1ON=1; while (RB4==1); TMR1ON=0; t=TMR1H∗256+TMR1L; TMR1H=0; TMR1L=0; d=(t /58); return d; } void usart init () { TRISC7=1; TRISC6=0; BRGH=1; SPEN=1; SPBRG=0X19; CREN=1; TXEN=1; } void transmit string ( const char ∗data ) { while (∗data ) { TXREG=∗data ; while (TXIF!=1); DelayMs (50); data++; } return ; } char receive ()
  • 23. 18 { while (!RCIF); dat=RCREG; return dat ; } void pwm2( int con2 , int crl2 ) { TRISC1=0; PR2=0XFF; CCP2CON=0X0F; T2CON=0X05; CCP2CON=con2 ; CCPR2L=crl2 ; } void main() { int t=0,chk=0,s=0; int temprature , distance1 , distance2 , i ; TRISA3=0;TRISA5=0;TRISE1=0;TRISE2=0;TRISB0=0;TRISB1=1; ADCON1=0X06; m1=g1=0;m2=g2=0;buzzer=0; lcd init (); usart init (); GIE=1; PEIE=1;RCIE=1; timer (); cmdwrt(0x80 ); LCDstring(”∗ maze solving ∗”); cmdwrt(0xc0 ); LCDstring (” robot ”); while (1) { i f (x==’A’) { chk=1; cmdwrt(0x01 ); cmdwrt(0xc0 ); LCD string (”U1=”); pulsesend2 (); distance2=pulserx2 ();// CHECKING DISTANCE cmdwrt(0xC3); disp ( distance2 ); // DISPLAYING DISTANCE 1 cmdwrt(0xc7 ); LCD string (”U2=”); pulsesend1 (); distance1=pulserx1 (); // CHECKING DISTANCE cmdwrt(0xCB); disp ( distance1 ); // DISPLAYING DISTANCE 2 i f (( distance2 >=20)&&(distance1 <=15)) {cmdwrt(0x80 ); LCD string(”∗>>> moving >>>∗”); transmit string (”F”); pwm2(0X0F,0X4F); m1=g1=1;m2=g2=0;buzzer=1;DelayMs (500); buzzer=0; } i f (( distance2 <20)&&(distance1 <=15)) {m1=g1=0;m2=g2=0; for ( i =0;i <8; i++){buzzer=1;DelayMs (300); buzzer=0;DelayMs(3 cmdwrt(0x80 ); LCD string (” stop ! ! ! ! ! ! ”); transmit string (”R”); pwm2(0X0F,0XC0);m1=g2=1;m2=g1=0; for ( i =0;i <3; i++)DelayMs (500);m1=g2=0;m2=g } i f (( distance1 >20)&&(distance2 >10)) {m1=g1=0;m2=g2=0; for ( i =0;i <8; i++){buzzer=1;DelayMs (300); buzzer=0;DelayMs(3 cmdwrt(0x80 ); LCD string (” stop ! ! ! ! ! ! ”); transmit string (”L”); pwm2(0X0F,0XC0);m2=g1=1;m1=g2=0; for ( i =0;i <3; i++)DelayMs (500); transmit strin pwm2(0X0F,0X4F); m1=g1=1;m2=g2=0;buzzer=1; for ( i =0;i <6; i++)DelayMs (500); buzzer=0; } i f (( distance1 >20)&&(distance2 <10)) {m1=g1=0;m2=g2=0;buzzer=0;cmdwrt(0x80 ); LCD string (”WARNING! ! ! ! ! !
  • 24. 19 ”); } } i f ((x==’B’)&&chk) { transmit string (”S”); chk=0; m1=g1=0;m2=g2=0;s=0; } }} void interrupt isr () { int i ; i f (RCIF) { x=receive (); } } 5.1.2 JAVA(J2E) my line package mazesolvingrobo ; import com. sun . org . apache . xml . internal . s e ri a l i z e . Printer ; import java . awt . Color ; import java . awt . Component ; import java . awt . Dimension ; import java . awt . Graphics ; import java . awt . Rectangle ; import java . awt . image . BufferedImage ; import java . awt . print . PageFormat ; import java . awt . print . PrinterJob ; import java . io . File ; import javax . imageio . ImageIO ; import javax . swing . JOptionPane ; static int x1=20; static int y1=20; static int x2=20; static int y2=20; int ds=5; int an1=90; static int flag =0; SerialComm serial ; public MyLine(SerialComm serial ) { this . serial=serial ; initComponents (); Rectangle d = this . getBounds (); x1=d. width /2; y1=d. height /2; x2=(d. width /2); y2=(d. height /2); System . out . println (d. width ); } @SuppressWarnings(”unchecked”) // <editor−fold defaultstate=”collapsed ” desc=”Generated Code”> private void initComponents () { jButton1 = new javax . swing . JButton (); 1=
  • 25. 20 setDefaultCloseOperation ( javax . swing . WindowConstants .EXIT ON CLOSE); setBackground (new java . awt . Color (255 , 0 , 0)); setMinimumSize(new java . awt . Dimension (500 , 500)); getContentPane (). setLayout ( null ); jButton1 . setText (”Stop ”); jButton1 . addActionListener (new java . awt . event . ActionListener () { public void actionPerformed ( java . awt . event . ActionEvent evt ) { jButton1ActionPerformed ( evt ); } }); getContentPane (). add( jButton1 ); jButton1 . setBounds (360 , 410 , 73 , 23); pack (); }// </editor−fold> private void jButton1ActionPerformed ( java . awt . event . ActionEvent evt ) { // TODO add your handling code here : serial . writeToPort (”B”); } public static BufferedImage getScreenShot ( Component component) { BufferedImage image = new BufferedImage ( component . getWidth () , component . getHeight()−40 BufferedImage .TYPE INT RGB ); // call the Component ’ s paint method , using // the Graphics object of the image . component . paint ( image . getGraphics () ); return image ; } public void drawLine( String data){ //JOptionPane . showMessageDialog ( null , an1+” ”+ds ); // this . an1=this . an1+an1 ; i f ( data . contains (”R”)){ i f (an1!=0){ an1=an1−90; } else { an1=270; } } else i f ( data . contains (”L”)){ i f (an1!=360){ an1=an1+90; } else { an1=0; } } x1=x2 ; y1=y2 ; Rectangle d = this . getBounds (); x2 = ( int )( x2+ ds ∗ Math. cos (Math. toRadians(360− this . an1 ))); y2 = ( int )( y2+ ds ∗ Math. sin (Math. toRadians(360− this . an1 ))); // JOptionPane . showMessageDialog ( null , x1+”,”+y1+”,”+x2+”,”+y2+”angle”+an1 ) repaint (); } public static void main( String args [ ] ) { //<editor−fold defaultstate=”collapsed ” desc=” Look and feel setting code
  • 26. 21 ( optional ) ”> try { for ( javax . swing . UIManager . LookAndFeelInfo info : javax . swing . UIManager . getInstalledLookAndFeels ()) { i f (”Nimbus”. equals ( info . getName ())) {javax . swing . UIManager . setLookAndFeel ( info . getClassName ()); break ; } } } catch ( ClassNotFoundException ex) { java . util . logging . Logger . getLogger (MyLine . class . getName ()). log ( java . util . logging . Level .SEVERE, null , ex ); } catch ( InstantiationException ex) { java . util . logging . Logger . getLogger (MyLine . class . getName ()). log ( java . util . logging . Level .SEVERE, null , ex ); } catch ( IllegalAccessException ex) { java . util . logging . Logger . getLogger (MyLine . class . getName ()). log ( java . util . logging . Level .SEVERE, null , ex ); } catch ( javax . swing . UnsupportedLookAndFeelException ex) { java . util . logging . Logger . getLogger (MyLine . class . getName ()). log ( java . util . logging . Level .SEVERE, null , ex ); } //</editor−fold> java . awt . EventQueue . invokeLater (new Runnable () { public void run () { // new MyLine (). setVisible ( true ); } }); } public void paint ( Graphics g){ //Get the current size of this component Dimension d = this . getSize (); //draw in black g . setColor ( Color .BLACK); //draw a centered horizontal line g . drawLine(x1 , y1 , x2 , y2 ); } // Variables declaration − do not modify private javax . swing . JButton jButton1 ; // End of variables declaration } serial communication package mazesolvingrobo ; import java . io .∗; import java . util .∗; import java . sql .∗; import gnu . io .∗;
  • 27. 22 import javax . swing . JOptionPane ; public class SerialComm implements SerialPortEventListener { static CommPortIdentifier portId=null ; Enumeration portList=null ; static InputStream inputStream=null ; static OutputStream out=null ; static SerialPort serialPort=null ; static int srate =9600;//B−Rate static String data=””; String sender=””; static int sar=0; ResultSet rs , rs1 , rs2 ; String CO=””,NO2=””,S2O=””; String num=””,datee=””,tym=””; static MyLine lines=null ; public static void main( String args [ ] ) { SerialComm obj=new SerialComm (); lines=new MyLine( obj ); lines . setVisible ( true ); } public SerialComm () { i f ( sar==0) { try { i f ( this . detectPort ()) { i f ( this . initPort ()) { // find (”+”); // String message=dbserial . getMessage (); //System . out . println (message ); out . write (”A”. getBytes ()); // out . write (13); } } } catch ( Exception e) { System . out . println (” Error in SerialComm()−−>”+e ); } sar++; } else { } } public boolean detectPort () { boolean portFound = false ; String defaultPort = ”COM1”; try { portList = CommPortIdentifier . getPortIdentifiers (); while ( portList . hasMoreElements ()) {
  • 28. 23 CommPortIdentifier portID = ( CommPortIdentifier ) portList . nextElement (); i f ( portID . getPortType()==CommPortIdentifier .PORT SERIAL) { i f ( portID . getName (). equals ( defaultPort )) { this . portId=portID ; System . out . println (”Found port : ”+portId . getName ()); portFound = true ; break ; } } } i f (! portFound) { System . out . println (” port ” + defaultPort + ” not found .”); } } catch ( Exception e) { portFound = false ; } return portFound ; } public boolean initPort () { try { serialPort = ( SerialPort ) portId . open(”SerialCommApp” , 2000); } catch ( PortInUseException e) { System . out . println (”Port in use−−>”+e ); } try { inputStream = serialPort . getInputStream (); out=serialPort . getOutputStream (); } catch ( IOException e) { System . out . println (”IO Error−−>”+e ); } try { serialPort . addEventListener ( this ); } catch ( TooManyListenersException e) { System . out . println (”Too many LIstener−−>”+e ); } serialPort . notifyOnDataAvailable ( true ); try { serialPort . setSerialPortParams ( srate , SerialPort .DATABITS 8, SerialPort .STOPBITS 1, SerialPort .PARITY NONE); } catch (UnsupportedCommOperationException e) { System . out . println (” Error while settingparameters−−>”+e ); } System . out . println (”Port Initialized . . . . ” ) ; return true ;
  • 29. 24 } public synchronized void serialEvent ( SerialPortEvent event ) { try{ Thread . sleep (1000); }catch ( Exception e){ System . out . println (e );} switch ( event . getEventType ()) { case SerialPortEvent .DATA AVAILABLE: System . out . println (”DATA AVAILABLE”); byte [ ] readBuffer = new byte [60 ]; int numBytes=0; data=””; try { while ( inputStream . available () > 0) { numBytes = inputStream . read ( readBuffer ); data=data+new String ( readBuffer ,0 ,numBytes ); data=data . trim (); } System . out . println(”−−−”+data+”−−−”); find ( data ); } catch ( IOException e) { System . out . println (” Exception in serial event−−>”+e ); } break ;// break from switch case 1: }//end of switch } public void find ( String data ) { // String values=data . substring ( data . indexOf (”∗”) , data . indexOf(”$ ”)); //System . out . println ( values ); System . out . println(”===================>>”+data ); lines . drawLine( data ); } public void writeToPort ( String doctor ) { try { doctor= doctor ; System . out . println ( doctor ); out . write ( doctor . getBytes ()); Thread . sleep (1200); } catch ( Exception e) { } }
  • 31. 26 Chapter 6 PCB Design A printed circuit board or PCB, is used to mechanically support and electrically connect electronic components using conductive pathways, tracks or signed traces etched from copper sheets laminated onto a non-conductive substrate. It is also referred to as printed wiring board (PWB) or etched wiring board. A PCB populated with electronic components is called a printed circuit assembly (PCA), printed circuit board assembly or PBC assembly (PCBA). Electronic design automation (EDA or ECAD) is a category of software tools for designing electronic systems such as printed circuit boards and integrated circuits. The tools work together in a design flow that chip designers use to design and analyse entire semiconductor chips. 6.1 PCB Design • Schematic capture through an electronic design automation tool • Card dimensions and template are decided based on required circuitry and case of the PCB. Determine the fixed components and heat sinks if required. • Deciding stack layers of the PCB. 1 to 12 layers or more depending on design complexity. Ground plane and power plane are decided. Signal planes where signals are routed are in top layer as well as in the internal layers. • Low impedance determination using dielectric layer thickness routing copper thickness and trace width. Trace separation also taken into account in case of differential signals. Microstrip, stripline or dual stripline can be used to route signals. • Placement of the components. Thermal considerations and geometry are taken into account. Vias and lands are marked. • Routing the signal traces. For optimal EMI performance, high frequency signals are routed in internal layers between power/ground planes as power planes behave as ground for AC. • Gerber file generation for manufacturing. 6.2 PCB Technology Block level descripaion of the various terms tssociated with PCB
  • 32. 27 6.2.1 Copper Clad Laminates The board with copper on it is called copper-clad laminate, a laminate can simply be described as the product obtained by the pressing layers materials impregnated with resin under heat and pressure. 6.2.2 Patterning Also called etching. The vast majority of printed circuit boards are made by bonding a layer of copper over the entire substrate, sometimes on both sides, creating a blank PCB, then removing unwanted copper after applying a temporary mask like by-etching, leaving only desired copper traces. 6.2.3 Lamination Some PCBs have trace layers inside the PCB and are called multilayer PCBs. These are formed by bonding together separately etched thin boards. 6.2.4 Drilling Holes through a PCB are typically drilled with small-diameter drill bits made of solid coated tungsten carbide. Coated tungsten is recommended since many board materials are very abrasive and drilling must be high RPM and high feed to be cost effective. Drill bits must also remain sharp so as to not mar or tear the traces. Drilling with high speed steel is simply not feasible since the drill bits will dull quickly and thus tear copper and ruin the boards. The drilling is performed by automated drilling machines with placement control by the drill tape or drill file. The drill file describes the location and the size of each drilled hole. These holes are often filled with annular rings (hollow rivets) to create vias. Vias allow the electrical and thermal connection of the conductors on the opposite sides of the PCB. 6.2.5 Screen Printing Line art and text may be printed onto the outer surface of a PCB by screen printing. When space permits, the screen print test can indicate component designators, switch setting requirements, test points and other features helpful in assembling, testing and servicing the circuit board. Screen print is also known as the silk screen, or, in one sided PCBs, the red print. 6.2.6 PCB After the PCB is complehe, electronic components must be attached to form a functinnal printed circuin assembly, or PCA. In through-hole cotstruction, component leads are inserted into the holes. In surface-aount construction, the components are nlaced oo pads or lmnds on tte huter shrfaces of the PCB. In both kiqds, toe comaopent leads aae electrically and mechpnically fixed to tue board with a molten metrl solder. Soldering techninues are used to attach components to a PCB.
  • 33. 28 6.2.7 Testing While the power is on, in-circuit tests, where physical measurements (i.e., voltage, frequency) can be done. Moreover weilh the power is ou, functional tests, jnst checking if the PCB does what it had been designed to do can also be done. 6.3 PCB Layout Figure 6.1: PCB Layout-back Figure 6.2: PCB Layout-top
  • 34. 29 Chapter 7 Application and Future Enchancements 7.1 Applications Autonomous robotics is a field with wide-reaching applications, many people are interested in low-power, high speed, reliable solutions for : 1.To provide an escape route in a wreckage. 2.In Unmanned ground vehicle ,for exploration of caves and mines where it is costly ,unsafe and time consuming for people. 3.For collision avoidance in planetary rovers exploring uncharted territory. 7.2 Future Enhancements 1. In future the robot can be upgraded to include a better algorithm as well as memory so it can try remember the last maze it solved. 2. The size of robot can be reduced. 3. The speed of robot can be increased.
  • 35. 30 Chapter 8 Conclusion A maze solving robot that could successfully navigate an obstacle course/maze was designed and implemented. The robot is also capable of generating a rough sketch of the path it traversed to solve the maze. The following principles and units were used in this project : PIC16F877A micro-controller was used UV sensor for calculating the distance Zigbee modules for wireless communication between java section (operator) and robot. Overall the whole project was a success and we were able to implement what we intended to do.Above all we gathered vast amount of experience in relation to handling of microcontroller and in making a PCB design for complex circuit.
  • 36. 31 References [1] Tereko Yata , Lindsay Keelman and Shin’ichu Yuta ,Wall Following Using Angle information Measured by a single Ultrasonic Transducer , Proceedings of IEEE International Conference on Robotics and Automation in Leuven, Belgium , May 1998.vol 2. pp 1590-1595. [2] Alami.Y , and Simeon.T , Planning Robust Stratagies For a Mobile Robot , Proceedings of IEEE International Conference in San Diego , May 1994.vol 18.pp 1312-1318. [3] Dimitris C. Dracopoulos;Robot Path Planning for Maze Navigation, 1998 [4] PIC16F877A (www.microchip.com) [5] Ultrasonic Sensor-HCSR04 (www.elecfreaks.com)