To design and simulate Obstacle Avoidance Robot using Arduino UNO controller.
Arduino IDE
Proteous
Step1:Open the Arduino IDE
Step2: Go to file and select new file option
Step3:Type the program
Step4:Go to file and select save option to save the program
Step5:Go to sketch and select verify or compile options
Step6:If no error Hex file will be generated in the temporary folder
Step7:Open the Proteus software
Step8:Go to file select new design and click ok button
Step9:Select component mode and click pick devices from the library
Step10:Type the component name in the keyword to select the components and click ok button
Step11:Design the circuit as per the diagram
Step12:Double click the Arduino controller and upload the hex file generated by Arduino IDE
Step13:Click start button and check the output
Now day’s many industries are using robots due to their high level of performance and reliability and which is a great help for human beings. The obstacle avoidance robotics is used for detecting obstacles and avoiding the collision. This is an autonomous robot. The design of the obstacle avoidance robot requires the integration of many sensors according to their task. Obstacle detection is the primary requirement of this autonomous robot. The robot gets the information from the surrounding area through mounted sensors on the robot. Some sensing devices used for obstacle detection like bump sensors, infrared sensors, ultrasonic sensors, etc. Working Principle: The obstacle avoidance robotic vehicle uses IR sensors for its movements. A controller family is used to achieve the desired operation. The motors are connected through the motor driver IC to the controller. The IR sensor is attached in front, left and right of the robot. Whenever the robot is going on the desired path the IR sensor transmits the waves continuously from its sensor head. Whenever an obstacle comes ahead of it the IR waves are reflected from an object and that information is passed to the microcontroller. The microcontroller controls the motors left, right, back, front, based on IR signals.
Obstacle detection (IR sensor): The IR sensors are used for obstacle detection. The sensor output signal sends to the microcontroller. The microcontroller controls the vehicle (forward/back/Right/Left) by using the DC motor which is placed in the vehicle. If any obstacle placed inline the IR sensor fails to receive the light rays and gives signals to the microcontroller. The microcontroller will stop the vehicle immediately and the siren will on. After one minute the robot will check the path status if an obstacle is removed the robot moves farword else the robot will return to move starting place
/*
To design and simulate Obstacle Avoidance Robot using Arduino UNO controller.
Developed by: Jhagan B
RegisterNumber: 212220040066
*/
const int fs = 0;
const int rs = 1;
const int ls = 2;
int switchfs = 0;
int switchrs = 0;
int switchls = 0;
int br2 = 6;
int br1 = 7;
int bl2 = 8;
int bl1 = 9;
int fr2 = 10;
int fr1 = 11;
int fl2 = 12;
int fl1 = 13;
void setup()
{
pinMode(fs,INPUT);
pinMode(ls,INPUT);
pinMode(rs,INPUT);
pinMode(fl1,OUTPUT);
pinMode(fl2,OUTPUT);
pinMode(fr1,OUTPUT);
pinMode(fr2,OUTPUT);
pinMode(bl1,OUTPUT);
pinMode(bl2,OUTPUT);
pinMode(br1,OUTPUT);
pinMode(br2,OUTPUT);
}
void loop()
{
switchfs = digitalRead(fs);
switchls = digitalRead(ls);
switchrs = digitalRead(rs);
if (switchfs==0 && switchrs==0&& switchls==0)
{
digitalWrite(fl1,HIGH);
digitalWrite(fl2,LOW);
digitalWrite(fr1,HIGH);
digitalWrite(fr2,LOW);
digitalWrite(bl1,HIGH);
digitalWrite(bl2,LOW);
digitalWrite(br1,HIGH);
digitalWrite(br2,LOW);
}
else if (switchfs==1 && switchrs==0&& switchls==0)
{
digitalWrite(fl1,LOW);
digitalWrite(fl2,HIGH);
digitalWrite(fr1,HIGH);
digitalWrite(fr2,LOW);
digitalWrite(bl1,LOW);
digitalWrite(bl2,HIGH);
digitalWrite(br1,HIGH);
digitalWrite(br2,LOW);
}
else if (switchfs==1 && switchrs==0&& switchls==1)
{
digitalWrite(fl1,LOW);
digitalWrite(fl2,HIGH);
digitalWrite(fr1,HIGH);
digitalWrite(fr2,LOW);
digitalWrite(bl1,LOW);
digitalWrite(bl2,HIGH);
digitalWrite(br1,HIGH);
digitalWrite(br2,LOW);
}
else if (switchfs==1 && switchrs==1&& switchls==0)
{
digitalWrite(fl1,HIGH);
digitalWrite(fl2,LOW);
digitalWrite(fr1,LOW);
digitalWrite(fr2,HIGH);
digitalWrite(bl1,HIGH);
digitalWrite(bl2,LOW);
digitalWrite(br1,LOW);
digitalWrite(br2,HIGH);
}
else if (switchfs==1 && switchrs==1&& switchls==1)
{
digitalWrite(fl1,LOW);
digitalWrite(fl2,HIGH);
digitalWrite(fr1,LOW);
digitalWrite(fr2,HIGH);
digitalWrite(bl1,LOW);
digitalWrite(bl2,HIGH);
digitalWrite(br1,LOW);
digitalWrite(br2,HIGH);
}
}
Thus the Obstacle Avoidance Robot was designed and simulated using Proteus software.