NUST
SCHOOL OF ELECTRICAL ENGENEERING AND COMPUTER SCIENCES
GROUP MEMBERS:
Naeha Sharif
Nadra Ramzan
Inamullah Naveed
INSTRUCTOR:
Sir Abdul Afram
PROJECT TITLE:
OBSTACLE AVOIDING ROBOT
ABSTRACT
The obstacle detection scheme would be based a sonar sensor, one for forward direction , a microcontroller would take input from the sensor and then compare the inputs to decide where the robot should turn. It would then give input to the two h-bridges which would in turn direct the motors to control the movement of the robot. Apart from that we will use a 5v battery to power the microcontroller and the motors.
INTRODUCTION
This particular robotic device is a combination of both mechanical and electronics engineering. This system is made so that it can be used to detect and avoid obstacles successfully. This robot will be just like an electronic car that keeps on moving in straight line until something comes in its path that’s when it decides to turns into some other direction so it successfully avoids the obstacle.
Obstacle avoidance
In robotics, obstacle avoidance is the task of satisfying some control objective subject to non-intersection or non-collision position constraints. Normally obstacle avoidance is considered to be distinct from path planning in that one is usually implemented as a reactive control law while the other involves the pre-computation of an obstacle-free path which a controller will then guide a robot along.
INSPIRATION
The inspiration behind this project was to learn new things regarding our domain. We wanted to do a project that was creative and practical but at the same time cost effective.
LITERATURE SURVEY
We reviewed different obstacle detecting robot mechanisms that have been built by a lot of students and other practitioners that are in exisitance.
For an autonomous mobile robot performing a navigation-based task in a vague environment, to detect and to avoid encountered obstacles is an important issue and a key function for the robot body safety as well as for the task continuity. Obstacle detection and avoidance in a real world environment - that appears so easy to humans is a rather difficult task for autonomous mobile robots and is still a well-researched topic in robotics.In many previous works, a wide range of sensors and various methods for detecting and avoiding obstacles for mobile robot purpose have been proposed. Good references related to the developed sensor systems and proposed detection and avoidance algorithms can be found. Based on these developed sensor systems, various approaches related to this work can be grouped into two categories.
For an autonomous mobile robot performing a navigation-based task in a vague environment, to detect and to avoid encountered obstacles is an important issue and a key function for the robot body safety as well as for the task continuity. Obstacle detection and avoidance in a real world environment - that appears so easy to humans is a rather difficult task for autonomous mobile robots and is still a well-researched topic in robotics.In many previous works, a wide range of sensors and various methods for detecting and avoiding obstacles for mobile robot purpose have been proposed. Good references related to the developed sensor systems and proposed detection and avoidance algorithms can be found. Based on these developed sensor systems, various approaches related to this work can be grouped into two categories.
Ø The first one tends to use ultrasonic sensors for their simple implementation and fast obstacle detection, but they show great accuracy and reliability limits when it comes to detect obstacles having 3-dimensions.
Ø On the other hand, we have the vision-based sensor systems,which can be divided into two subgroups of sensor systems:
- 1. stereo vision
- 2. laser range sensors. The former one applies with good reliability to the detection of3-Dimensional objects but reveals to be deficient in term of speed and towards weaklytextured obstaclesThe latter one, when applied as an horizontally emittedlaser range sensor is efficient only towards 2-Dimensional obstacles.
We have also,2-Dimensional laser range finder sensor which can efficiently detect 3-Dimensional obstaclesbut is poorly characterized in real-time detection.
We did a lot of research on the obstacle detecting robots .we also found many graet articles and research papers on it.
One of the projects that we found ,was uploaded by a student thatis given below:
he broke down the robot into 5 subsytems: Locomotion , Power , Sensors , Control, and Display.
1. Locomotion - uses two HS-42BB servos for locomotion and one ball caster
2. Power - four AA batteries will provide the power for all the systems
3. Sensors - five QRB1113 reflective object sensors will track the line , one scanning PING ultrasonic sensor will provide ranging, and one photoresistor /LED will search for victims.
4. Control - One PIC 16F616 microcontroller will act as the brains for the robot . It will be programmed in PICBASIC and assembly
5. Display - one LCD display will show what routine is being done , one LED will show power , and one LED will flash when a victim is detected.
APPLICATION EXAMPLES
This device has application in surveying different landscapes and mapping them. it can also be used in commercial devices like
· automated lawn mower
· smart room cleaner etc
Some of the applications are mentioned below:
1. Obstacle Detection for a Mining Vehicle
Reliable obstacle detection is an essential element of an autonomous mining vehicle system. An autonomous vehicle must be capable of detecting potentially dangerous obstacles that would endanger the vehicle itself, other vehicles, personnel or expensive site infrastructure while navigating through the mine. Autonomous vehicles will not be deployed in the field alongside manned vehicles until robust obstacle detection systems have been developed.
The development of robust obstacle detection systems for these vehicles is difficult because of the relatively harsh conditions encountered in mining environments. The operating environment could include rain, dust, mud, high humidity,diesel fumes (small particles), extremes of temperature, severe vibration, extreme vehicle pitching and rolling, and bright light sources (e.g. the sun).
2. Driverless vehicles running along beams
behind obstacle detection as it stands today, and how it might fill the needs of driverless vehicles running along beams. To replace the eyes and brains of a human driver with equally good (or better) technological devices is very tricky. The human mind´s ability to process sensory information is very advanced and complex. The research going on today to make robots detect obstacles is very much based on how insects do the same thing.
the sensors of the obstacle detection systems that are of interest to us are built on different technologies. Those that are available to us today are:
1. Infrared sensors
2. Common radar
3. Microwave-based radar
4. Digital cameras
5. Laser
6. Combination of digital cameras and laser
The present invention provides a digital ultrasonic obstacle detection system for vehicles, which can tune reference data, which is the basis for the determination of whether an obstacle has been detected. This system executes a parking assist mode or a tuning mode in response to a command from an external master. The system is configured to store reflected wave signal data received from a sensor unit, in memory and transmit the reflected wave signal data to the external master via vehicle communication, at the time of executing the tuning mode.
3. Obstacle detecting system for a motor vehicle
An obstacle detecting system for a motor vehicle which is capable of detecting not only the distance to an obstacle(s) existing in front of the motor vehicle and the width thereof, but also its height to thereby allow a motor vehicle control to be effected more appropriately with high reliability. The distance to the object and its width are detected by a laser radar type distance detecting unit, while the distance to the object lying within a window preset by a window setting device is also detected by a distance detecting circuit of a stereoscopic video camera unit. An object size determining unit is provided for selecting a window corresponding to a distance value detected by the stereoscopic video camera unit and which coincides with a distance value calculated by the laser radar type distance detecting unit, to thereby determine the size of the object on the basis of the preset position of the selected window.
4. Autonomous cleaning robot
This invention relates to an obstacle detection system for an autonomous cleaning robot.
There is a long felt need for autonomous robotic cleaning devices for dusting, mopping, vacuuming, and sweeping operations. Although technology exists for complex robots which can, to some extent, "see" and "feel" their surroundings, the complexity, expense and power requirements associated with these types of robotic subsystems render them unsuitable for the consumer marketplace. It is therefore an object of this invention to provide a robot obstacle detection system which is simple in design, low cost, accurate, easy to implement, and easy to calibrate.
There is a long felt need for autonomous robotic cleaning devices for dusting, mopping, vacuuming, and sweeping operations. Although technology exists for complex robots which can, to some extent, "see" and "feel" their surroundings, the complexity, expense and power requirements associated with these types of robotic subsystems render them unsuitable for the consumer marketplace. It is therefore an object of this invention to provide a robot obstacle detection system which is simple in design, low cost, accurate, easy to implement, and easy to calibrate.
It is a further object of this invention to provide such a robot detection system which prevents an autonomous cleaning robot from driving off a stair or over an obstacle which is too high or too low is a further object of this invention to provide a robotic wall detection system which is low cost, accurate, easy to implement and easy to calibrate.It is a further object of this invention to provide such a robot wall detection system which effects smoother robot operation in the wall following mode.
BLOCK DIAGRAM
EXPLANATION OF BLOCK DIAGRAM
The different blocks of the block diagram function in the following manner:
Sensor:
The sensor used is a sonar sensor, they detect the obstacle by emitting ultrasonic sound.Ultrasonic sensors are often used in robots for obstacle avoidance, navigation and map.Thei ultrasonic range sensor works by emitting a short burst of 40kHz ultrasonic sound from a piezoelectric transducer. A small amount of sound energy is reflected by objects in front of the device and returned to the detector, another piezoelectric transducer. The receiver amplifier sends these reflected signals (echoes) to micro-controller which times them to determine how far away the objects are, by using the speed of sound in air. The calculated range is then converted to a constant current signal
Control block:
The control block includes a microcontroller and an H-bridge. The A/D converter which is in-built in the microcontroller converts the analog signal from the sonar sensors to digital signal and then depending upon the input from the sonar sensor the microcontroller calculates the distance of the robot from the obstacle. If the distance is less than or equal to 1m the microcontroller will send signal to the h-bridges to further control the motion of the robot. Then the H-bridges direct the robot motor to turn left as soon as an obstacle is detected close enough.
Motor:
The motor will drive the wheels. We in our project used the motors of a CD-rom.
HARDWARE PART
MECHANICAL STRUCTURE
BASE
The base chosen our robot is a CD-ROM. The base is light weight and flexible.
MOTORS
The motors are of the CD-ROM itself which need a voltage of 7V. The motors are strong enough to drive the base even with a weight on it.
WHEELS:
Three wheels have been used. One at the front and two at the back. The back wheels are toy car wheels and the front wheel is the free wheel (made from the rolling ball of a roll-on deodorant)
ELECTRICAL STRUCTURE
BATTERY
We are using a 12V battery since this is the maximum voltage that we need for our circuits.
POWER SUPPLY
The power supply converts the 12V from the batter to 5V since micro controller only needs 5V. While the sonar circuit needs a 12V input and the motors may require some voltage to increase speed.
GENERIC BOARD
The generic board consists of a micro controller, buffer IC's, led's, connecting pins etc. The micro controller has an in built A/D converter which converts sonar signal to a digital signal and based on this info decides whether the obstacle is close enough or not. It also controls the direction of the motors through an h-bridge.
H-BRIDGE
The h-bridge is used to control the direction of motors.
SONAR CIRCUIT
The sonar circuit consists of a sonar sensor which has a receiver and a transmitter. The transmitter transmits an ultrasonic sound and the receiver receives it.
SOFTWARE PART
ALGORITHM
SOURCE CODE
#include
sbit sonar_out=P0^0;
sbit motor1a=P0^1;
sbit motor1b=P0^2;
sbit motor2a=P0^3;
sbit motor2b=P0^4;
sbit pwm0=P0^5;
double time;
double distance;
bit flag0;
bit flag;
//HEX CODES AT DIFFERENT TIME PERIODS (micro-seconds)//
/*
100=FFA3
200=FF47
300=FEEB
400=FE84
500=FE33
600=FDD7
700=FDD4
800=FD1E
900=FCC2
1000=FC66
*/
void timer0() interrupt 1 {
TR0 = 0;
if (flag0 == 0) //Start of High level 90% DUTY CYCLE
{
TL0 = 0xC2; //900 microsec
TH0 = 0xFC;
TF0 = 0; //Clear interrupt flag
flag0 = 1; //Set flag
TR0 = 1;
pwm0 = 1;
}
else //Start of Low level
{
TL0 = 0xA3; //100 microsec
TH0 = 0xFF;
TF0 = 0; //Clear Interrupt flag
TR0 = 1;
pwm0 = 0; //Clear PWM o/p pin
flag0 = 0; //Clear flag
}
}
void external0() interrupt 0 {
flag=0;
}
void send_sonar()
{
sonar_out=1;
TL1=0x47;
TH1=0xFF;
TR1=1;
while (!TF1);
IE=0x83;
}
void main ()
{
IE=0x82; //enable timer 0 interrupt and external 0 interrupt
TMOD=0x11; // Timer 0 and Timer 1 Mode 1
TH0=0x00;
TL0=0x00;
TR0=1;
time=0;
while (1)
{
motor1a=1;motor1b=0; //motor_r moves clockwise
motor2a=0;motor2b=1; //motor_l moves anticlockwise
send_sonar();
while (flag)
{time++;}
TR1=0;
time+=200;
distance=(time*343)/1000000;
if (distance<=1)
{
motor1a=1;motor1b=0; //motor_1 moves clockwise
motor2a=1;motor2b=1; //motor_2 stops
}
TL1=0x66;
TH1=0xFC;
TR1=1;
while (!TF1);
TR1=0;
time=0;
}
}
PROBLEM FACED AND THEIR SOLUTIONS
The main problem that we faced was unavailability of circuit components so we had to modify our design.
Other prob is the designing of PCB because usually it gets shorted so we had to be very careful while making the PCB.
The most important problem was that we had to keep our circuits light weight as our base could not handle much weight.
CONCLUSION
This device brings out all that has been written in books to life and gives on an opportunity to test his mechanical and electronics and programming skills . This project also provides robot construction experience to beginners. This technology has application everywhere from industry to home appliances all that is required is to implement it correctly to get the best out of it.
FUTURE WORK
The future work includes the enhancement of the robot design so that it can compute area of a room and plot it on the computer.