How to make a simple obstacle avoiding robot using Arduino uno


Obstacle avoiding robot

Its a kind of automatic robot which can avoid obstacles coming in front its path.In this tutorial I am gonna show you how to make it using simple components and using super simple code.

Components we need :

  • Arduino uno R3 *1
  • Ultrasonic sensor *1
  • 150 RPM BO motors *2
  • Motor driver IC (L293D)
  • Wheels*2
  • 4V rechargable battery *2
  • Power bank( any mAh specification )*1
  • Jumper wires
  • chassis*1


Steps to be followed :


Step-1
Assemble BO motors and Castro wheel on the chassis as shown in the figure.


Note: This is an example,my real robot have hand made chassis but the process is same.


Step-2
Now place the battery and the Arduino uno board on the top of the chassis as shown.Connect the two batteries in series to get 8V out put.




Step-3
Connect the motors and power source to the L293D IC as shown in the figure
The polarity of the motors can be changed by altering the pin no. jack if the motor does not spin in the right direction

Step-4
Now connect the ultrasonic sensor to the Arduino board.


Place the sensor at the front of the robot to detect the obstacles.


Step-5
Connect the power bank,motor driver IC and sensor with the Arduino board.

Step-6

Finally the motor right and motor left pin will goes to the pin no. 8,9 and 11,12 and sensor pin will goes to 3,4 i.e. trigpin=3 and echopin=4.

Copy and paste the given code on to the Arduino compiler and 
upload it.


const int trigPin=3; //connect the trigpin to the pin no 3

const int echoPin=4; //connect the echopin to the pin no 3

long duration,distance,cm,inches;

void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);
pinMode(trigPin,OUTPUT);
pinMode(echoPin,INPUT);
pinMode(8,OUTPUT);  // connect the left motor to the pin no 8 & 9
pinMode(9,OUTPUT);
pinMode(11,OUTPUT); //connect the right motor to the pin no 8&9
pinMode(12,OUTPUT);

}
void loop() {
  // put your main code here, to run repeatedly:
{
  *******************************************
}

to get code please send a mail to (coolvickydas@gmai.com)


Step-7
Switch on the power bank and if everything is going fine,your robot will work properly.



















Comments

  1. Got real time help from the steps of obstacle avoiding robot. Crystal clear and easily understandable steps.

    ReplyDelete
  2. Thanku bhaya .m in standard 9. And i love robotics.i followed ur steps and made my own robot.thank u so much....hope u will post more such articles abt robots

    ReplyDelete
    Replies
    1. Thank you very much jitu....keep working...now you can directly mail me if u face any problems regarding robotics aur arduino projects..all the best

      Delete

Post a Comment

Popular posts from this blog

How to make a simple line following robot using Arduino uno

How to make a two channel wireless robot at your home