Professional Documents
Culture Documents
CHAPTER 1
INTRODUCTION
The project aims towards providing an economical and reliable solution for pothole filling
process. The idea behind this project is to help the society with technology that will provide an
easy solution to the real life problem of monotonous task of filling the potholes. This project
builds a robot which autonomously does the whole job of detecting and filling the pothole at
regular periods to ensure the safety of the passengers on the road. Using real time and embedded
system we present a prototype of the design, later this can be fabricated into a real life model
with ease.
1.1
General Introduction
The aim of this project is to provide solution to the real life problem of fixing the potholes on the
road by using embedded and real time systems. The autonomous filler robot will detect the
potholes on the road and start filling them automatically and does the real time scanning for the
filled condition. Filling a pothole is a monotonous task, it should be done at a regular periods to
maintain the roads. Instead of manual filling of a pothole, automatic filling by a robot saves lot
of time and funds which were wasted on the labours who work for repairing these potholes.
In this project, Firebird V robot from NEX robotics is used as a platform for developing
the robot. The basic platform is further built to have a mechanical assembly and is coded in such
a way that it performs the pothole filling action by itself (without the aid of the user). The robot
is navigated by means of two 75RPM DC motors, it also has position encoder to move exactly to
a particular distance. It is fixed with four sharp sensors mounted on arm assembly to detect the
potholes on the road. The arm assembly is rotated with the aid of servo motor. To fill the pothole
the dispenser mechanism is activated by the stepper motor.
The design of the mechanical assemblies can be of various sizes depending on the needs
of the robot. The prototype design is limited with capabilities but real life model can be
fabricated with little modifications.
Page 1
1.2
Problem Statement
In India, roadways are one of the major kinds of transport. Potholes on the roads pose a serious
problem to the health and deeper potholes may even cause accident. Potholes should be regularly
fixed by the laborers, finding a pothole and filling it manually is a monotonous task. Keeping
these facts in mind, a robot is designed to eliminate the above problem.
1.3
Methodology
This project is applicable for fixing a pothole. This project is based on a microcontroller based
autonomous robot which will automatically detect and fill the potholes which are present on the
road. When all potholes are filled the robot indicates it with a buzzer sound.
1.4
Firebird V used as a platform for building the robot, further improvements can be
made easily with this robot.
The project makes effective use of resource and saves lot of time.
1.5 Limitations
Some parameters during design were limited to the prototype design. Real life model
will be different.
Page 2
CHAPTER 2
THEORETICAL BACKGROUND
This chapter discusses about the basic functioning of the units that are employed in this project
and the theoretical background associated with them. Various components required to develop
this system are discussed here.
Page 3
1. Arm Mechanism: Robot is fitted with an arm mechanism which consists of four
arms, all these arms are dependent arms and they are rotated by the servo motor.
These arms help in scanning the entire road for potholes.
2. Distance sensors: These are the sensors which detects the distance from the sensors
to the object, these sensors are placed facing the ground so that they detect the
difference in between the ground and the pothole.
3. White Line sensors: These are the sensors which detects the white line on the road ,
this white line guides the robot to traverse along the arena.
4. Filler Mechanism: Filler Mechanism consists of the dispenser mechanism , the
dispenser is switched with the help of stepper motor which rotates a circular plate
which is below a source of the filler.
5. Robotic Vehicle : Firebird V is used as a robotic vehicle the block diagram of the
Firebird V is illustrated below
Page 4
Page 5
Atmega2560 microcontroller
LCD (16*2)
External Motors
Servo Motor
Stepper Motor
Page 6
Page 7
Page 8
Page 9
Page 10
Page 11
Since we can see red light its easier to calibrate it using eyes
Any colour appears black because it does not reflect visible light.
Which means black surface can be ultraviolet or infrared in colour. If black is infrared colour
then robot's white line sensors will not be able to distinguish between white and black as black
will reflect all infrared waves as effectively as white surface. In case of red illumination which
Page 12
Page 13
(GP2Y0A02YK)
Features of GP2Y0A02YK:
Judgment distance.
Low cost
This is used to detect the potholes present is the arena. Sharp sensor consists of IR LED and
CCD array boxed with precision lens mounted. These sensors have blind spot of particular range
within which gives wrong reading. These sensors are attached to arm hence detects potholes.
Range: 10-80cm
These sensors are attached to the arm hence they the detect the potholes
Page 14
Page 15
Page 16
2.12 Buzzer
Robot has 3 KHz piezo buzzer. It can be used for debugging purpose or as attention seeker for a
particular event. The buzzer is connected to PC3 pin of the microcontroller. Also the same
buzzer is used in battery monitoring circuit to alert the battery low indication.
Page 17
Buzzer is driven by BC548 transistor. Resistor 100K is used to keep transistor off, if the input
pin is floating. Buzzer will get turned on if input voltage is greater than 0.65V.
Page 18
Page 19
Another way of depicting the H-Bridge... Since each half of the bridge can both sink and
source current, it qualifies as a push-pull type amplifier, and can be drawn with the symbol for
the amplifier.
H-bridges are applicable not only to the control of stepping motors, but also to the control
of DC motors, solenoids and many other applications, where polarity reversal is needed. Diodes
protect the switches from the kickback of inductive type loads, such as the coils of a stepper.
Two such circuits are needed to drive both coils of the bipolar stepper, and are commonly
called a" Dual H-Bridge."
Page 20
Page 21
CHAPTER 3
Start
Divider detected
to CenterIR range
sensor?
N
o
U Turn Interrupt
Y
Y
White line following & pothole detection &
filling with continuous divider sensing
White
line
found?
Finish
Page 22
Start
Configure motion ports to adjust
speed of robot
Buzzer Initialization
ADC Conversion
1
Dept. of TCE, JNNCE, Shimoga
Page 23
Divider
Detecte
d?
U-Turn
Already
taken ?
U -Turn
Page 24
Pothole
detected
?
White line
detected at
center
sensor?
Return
Adjust to white line
Page 25
START
MOVE FORWARD BY 30 CM
MOVE FORWARD BY 49 CM
RETURN
Figure 3.3 U- Turn interrupt
Page 26
START
POTHOLE
DETECTED BY
MAIN RIGHTOR
LEFT SENSOR
IF POTHOLE
DETECTED TO
THE RIGHT OR
LEFT
SECONDARY
SENSOR
L
ROTATE STEPPER MOTOR IN
ANTICLOCKWISE DIRECTION TILL
FILLER REACHES CORRECT PLACE
RETURN
TRANSFER THE
POSITION OF THE
DETECTED POTHOLE TO
THE MAIN LEFT SENSOR
BY EXTENDING THE
DETECTION ANGLE
Page 27
Page 28
Traverse throughout the arena and scan the area for the potholes using arm assembly
mounted on the robot.
3.2 Navigation
Navigation consists of movement of the robot along the arena, to make this traversal
possible, the following components are involved
DC Geared Motor
Position Encoder
Page 29
Pulse width modulation is a process in which duty cycle of constant frequency square wave is
modulated to control power delivered to the load i.e. motor. Duty cycle is the ratio of TON/ T.
Where TON is ON time and T is the time period of the wave. Power delivered to the motor is
proportional to the TON time of the signal. In case of PWM the motor reacts to the time
average of the signal.PWM is used to control total amount of power delivered to the load without
power losses which generally occur in resistive methods of power control.
Page 30
Page 31
Position Encoder:
Position Encoder is used for the precise movement during the U-turn of the robot to enter the
other lane of the road
Page 32
Page 33
Infrared Range
Sensor for
detection of
pothole.
Servo Motor
Fig 3.7 Side View of the Arm Assembly used in detecting Pothole
Page 34
So when Distance detected is x mm, it is detected that pothole is filled or there is no pothole and
robot moves forward.
Dept. of TCE, JNNCE, Shimoga
Page 35
Auxiliary Arms
Page 36
Arms made
from Fiber
material
(Sun wood)
The arms are constructed with the help of the locally available material called the sun wood. This
wood provides maximum strength and is very light weight, economical too. So this is chosen as
the best material for the whole construction of the robot.
Page 37
First initial
estimation for
lling
Initial point
Final point
The best point for filling is found out by the algorithm which finds the centroid of the whole
pothole. Initially only a random point is detected while the robot is traversing, a when this
algorithm is applied then the robot will find the best point by calculating the average of the
maximum stretches of the ends of the pothole. That average will be the center of the pothole and
itll be the best point for filling.
Page 38
Container
Dispenser
Mechanism
Sweeper
Page 39
Gear Assembly
Page 40
Anti Clockwise
movement of
stepper motor
for left
opening.
Clockwise
movement of
stepper motor
for right
opening.
Page 41
Page 42
Jumper adjustable programming clock speeds for low clock speed microcontrollers. Low
speeds from 32 KHz to 1MHz are supported.
USB powered
Page 43
Page 44
Page 45
Click on Program
Page 46
CHAPTER 4
4.2 Advantages
4.3 Limitations
During design phase some parameters were limited to only prototype model, real life
model is still needed to designed and fabricated.
Line Sensors may be affected by the ambient light. Real life model should overcome this
Page 47
REFERENCES
[1] ACE in the Hole: Adaptive Contour Estimation Using Collaborating Mobile Sensors
Sumana Srinivasan, Krithi Ramamritham and Purushottam Kulkarni Department of Computer
Science and Engineering,Indian Institute of Technology Bombay, Mumbai - 400076, INDIA.
[2] Resource management for real-time tasks in mobile robotics Huan Li , Krithi Ramamritham
Prashant Shenoy , Roderic A. Grupen ,John D. Sweeney
[3] Fire Bird V ATMEGA2560 Hardware Manual
[4] Fire Bird V ATMEGA2560 Software Manual
[5] AVR Studio 4 Tutorail
[6] USB ISP Programmer Manual
[7] www.stepperworld.com/Tutorials/pgBipolarTutorial.htm
[8] www.edaboard.com
Page 48
APPENDIX A
Source Code
#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/delay.h>
#include <math.h>
#include "lcd.c"
voidport_init();
void timer5_init();
void velocity(unsigned char, unsigned char);
unsigned char ADC_Conversion(unsigned char);
unsigned char ADC_Value;
unsigned char sharp_center;
unsigned char sharp_left;
unsigned char sharp_right;
unsigned char sharp_aux_left;
unsigned char sharp_aux_right;
unsigned char flag1 = 0;
unsigned char flag2 = 0;
unsigned char flag3 = 0;
unsigned char flag4 = 0;
unsigned char flag5 = 0;
unsigned char Left_white_line = 0;
unsigned char Center_white_line = 0;
unsigned char Right_white_line = 0;
unsigned int value_center,value_left,value_right,value_aux_left,value_aux_right;
unsigned long intShaftCountLeft = 0; //to keep track of left position encoder
unsigned long intShaftCountRight = 0; //to keep track of right position encoder
unsigned long int ShaftCountLeft1 = 0; //to keep track of left position encoder
unsigned long int ShaftCountRight1 = 0; //to keep track of right position encoder
unsigned int Degrees,degrees1; //to accept angle in degrees for turning
unsigned int count=0;
int motor_pattern[4]= {0x10,0x80,0x20,0x40};
int servo_pattern[6]={15,20,25,30,25,20};
int steps,l=0;
int v=0,p=0,k=0,z=0,x=0,u=0,w=0;
unsigned int index1=0,index2=0,y=0;
Page 49
Page 50
Page 51
Page 52
Page 53
Page 54
Page 55
//Stop
//Counter higher 8-bit value to which OCR5xH value is compared
//Counter lower 8-bit value to which OCR5xH value is compared
//Output compare register high value for Left Motor
//Output compare register low value for Left Motor
//Output compare register high value for Right Motor
//Output compare register low value for Right Motor
//Output compare register high value for Motor C1
//Output compare register low value for Motor C1
/*{COM5A1=1, COM5A0=0; COM5B1=1, COM5B0=0;
For Overriding normal port functionality to OCRnA
outputs.
{WGM51=0, WGM50=1} Along With WGM52 in
TCCR5B for Selecting FAST PWM 8-bit Mode*/
Dept. of TCE, JNNCE, Shimoga
Page 56
TCCR5B = 0x0B;
}
void buzzer_on (void)
{
unsigned char port_restore = 0;
port_restore = PINC;
port_restore = port_restore | 0x08;
PORTC = port_restore;
}
void buzzer_off (void)
{
unsigned char port_restore = 0;
port_restore = PINC;
port_restore = port_restore& 0xF7;
PORTC = port_restore;
}
void adc_init()
{
ADCSRA = 0x00;
ADCSRB = 0x00;
ADMUX = 0x20;
ACSR = 0x80;
ADCSRA = 0x86;
}
//MUX5 = 0
//Vref=5V external --- ADLAR=1 --- MUX4:0 = 0000
//ADEN=1 --- ADIE=1 --- ADPS2:0 = 1 1 0
Page 57
Page 58
Page 59
Page 60
Page 61
Page 62
void left_open(void)
{
stop();stepper_cw(65);
while(1)
{arm_update();_delay_ms(5);
if(value_left<137){stepper_ccw(65);forward_mm(20);_delay_ms(100);break;}
}
stop();_delay_ms(30);
}
void right_open(void)
{
stop();stepper_ccw(65);
while(1)
{
arm_update();_delay
if(value_right<137){stepper_cw(65);forward_mm(20);_delay_ms(100);break;
}
}
stop();_delay_ms(30);
}
void left_fill(void)
{
x=0,v=0,k=0,p=0,z=0,y=0;
x=i;
for(v=0;v<50;v++)
{
servo_1(i);_delay_ms(100);
i--;arm_update();_delay_ms(10);
if (value_left<155||i<=1){ p=i;break;} // p is lesser
Page 63
// p is lesser
}
}
i=u;
servo_1(i+5);_delay_ms(100);
arm_update();_delay_ms(10);
if(value_left>180)
{
for(v=0;v<50;v++)
{
servo_1(i);_delay_ms(100);
i++;arm_update();_delay_ms(10);
if (value_left<155||i>=35){ k=i;break;}
// p is lesser
Page 64
// p is lesser
}
}
}
if(p>0 && k>0)
{
z=(int)((p+k)/2);i=z;_delay_ms(100);
servo_1(i);_delay_ms(200);
while(1)
{
whiteline_backward();
arm_update();_delay_ms(5);
if(value_left<155)
{
Dept. of TCE, JNNCE, Shimoga
Page 65
Page 66
// p is lesser
}
}
y=k-p;
if(y<5)
{
i=u;servo_1(i);_delay_ms(100);
Dept. of TCE, JNNCE, Shimoga
Page 67
// p is lesser
}
}
if(k>=25)
{
for(v=0;v<50;v++)
{
servo_1(i);_delay_ms(100);
i--;arm_update();_delay_ms(10);
if (value_right<155||i<=1){ p=i;break;}
// p is lesser
}
}
}
if(p>0 && k>0)
{
z=(int)((p+k)/2);i=z;_delay_ms(100);
servo_1(i+2);_delay_ms(200);
while(1)
{
whiteline_backward();
arm_update();_delay_ms(5);
if(value_right<155)
{
stop();_delay_ms(50);forward_mm(65);break;
}
}
arm_update();_delay_ms(10);
if(value_right>180)
{
Dept. of TCE, JNNCE, Shimoga
Page 68
// p is
void fill_aux_right()
{
back_mm(20);stop();
for(v=0;v<50;v++)
{
servo_1(i);_delay_ms(100);
i--;arm_update();_delay_ms(10);
if (value_right>180||i<=1){ servo_1(i-3);_delay_ms(100);right_fill();break;}
// p is lesser
Page 69
Page 70
Page 71
Page 72
APPENDIX- B
Page 73
Page 74
Page 75
Page 76
Page 77