You are on page 1of 14

Path Tracking Robot

Prepared by :
MOHAMMED AL-NAJJAR

Abstract
In this project will design a robot which will be able to trace a specified path. The path characteristics was specified by Palestinian Technical collage which is holding a competition between Palestinian universities and academies and our team was called "Alazhar Challenger II".
2

Objectives
To fabricate a robot which will be able to trace a specified path without collision.

To make the tracking process intelligent.


The robot must finish the path as fast as possible.
3

Introduction
As the industry acceleration is increasing, the manufacturing processes are developed to be more automated, so the dependence in Robotics in this field is increased. Suppose there are a factory and there are some parts needs to be transported to a position which the conveyor cannot reach, so one of the possible solutions is to build a path, and a robot will carry this parts to that position. As we mentioned later, we applied to the competition and the characteristics specified for the path are : Length=6m Width=50cm Height=30cm The path is not continuous (may has a gap). And the conditions are: Robot length<=30cm Robot width<=25cm 4 Robot height<=20cm

Hardware :

Requirements
Software :
1) PIC BASIC pro compiler . 2) Proteus . 3) IC prog .

1) PIC 16F877A 2) TIP 122 Transistor 3) 16k resistor 4) 2N2222 NPN transistor 5) Diode 1N4001 6) ULN 2003A 7) Unipolar Stepper motor 8) DC motor 9) 3x Sharp GP2D12 (Diffuse type Proximity sensor). 10) 3x 10K resistor 11) 100nF capacitor 12) 4MHz Crystal 13) 2x30pF capacitor

Background
At first, we want to make the positioning of Left-Right wheels more precision, so we use a stepper motor to perform this function. The control process using High torque technique which require two coils to be active at the same time, so we made the center position when coils a and b are active and the sequence is as the following:

CONT
The DC motor is used to move the robot forward and controlled by TIP 122 which can hold current up to 5A, and the speed is controlled by Pulse Width Modulation (PWM). The diffuse type proximity sensor Sharp GP2D12 is used to detect the walls of the path, this sensor can detect 10cm up to 80cm as shown in the curve below. The output of the sensor needs to be converted to digital value which is suitable for calculations using Analog to digital converter module with 10-bit resolution in the PIC 16F877A.
7

CONT

CONT..
The output of this sensor is non linear so we to use empirical data to linearize output by Numerical analysis

P(x)=65+(X-0.5)(-100) Y =-100X+115 Eg. At point the voltage is 0.55 then Y=-100*0.55+115 =60 cm By applying this to all segments of the curve, we get a collection of linear curves with different slopes . Here the operator which will play this role is the division itself which acts as a linearizing function, but directly use the digital value: V=1/(R+k) Where V is voltage, R is range and k is a constant which depends on the sensor type and calibration data.
9

CONT..
The first step in getting a good voltage-to-range function is to find a constant k that linearizes the data. The following plot shows how the GP2D12 response graph shown above can be linearized by defining the variable k = 4.0. y=m*x+b 1 / (R + k) = m * V + b R = (1 / (m * V + b)) k R = (m' / (V + b')) - k where m' = 1/m, b' = b/m . Then create a table of voltage in controller units vs. linearized range. Some calculations may be required to find the constants to produce a linear plot.
10

CONT..

By using 10-bit ADC measurements (integers ranging from 0 to 1023) successful interpolation yields the following formula for a GP2D12 sensor: R = (6787 / (V - 3)) 4
11

Circuit Design

12

Program Flowchart

13

Comments
1)Analog-to-Digital conversion is done in the program Background using TMR0 Interrupt in order to be read continuously. 2)Pause instruction affects negatively in the interrupt so we used for loop with very small delay to compensate the whole delay time.

14

You might also like