Arduino: How to Build an Obstacle Avoiding Robot




About: Arduino, Raspberry Pi, esp8266, Tutorials, Projects

Intro: Arduino: How to Build an Obstacle Avoiding Robot

This instructable is the written version of my "Arduino: How To Build An Obstacle Avoiding Robot" Youtube video that I've uploaded recently. I strongly recommend you to check it out.

My YouTube Channel. Please Subscribe for Support

So, without further ado, Let's get started !

Step 1: Video Tutorial : Just 6 Minutes - Watch and Make...

Arduino Tutorial : How To Build An Obstacle Avoiding Robot

Watch carefully

Step 2: Materials : Necessary Materials and Equipments

* Arduino Uno R3

* Adafruit Motor Shield

*HC-SR04 Ultrasonic Module Distance Sensor for Arduino

* Tower Pro SG90 RC Mini Servo Motor

* Bracket / Holder for HC-SR04

* DC Motors and Wheels

* Bovine Wheel

* Plate or something like that

* Jumper

* Battery Buckle 9V

* Battery 9V

* Glue Gun or Cable Ties

Step 3: A Chassis and Sensor Connections

A Chassis

Attaching The Arduino To The Chassis

Connecting The Sensor To The Arduino

Step 4: Motors and Motor Shield Connections

Attaching The Motor Shield To The Ardunio

Connecting Motors To The Shield

Step 5: Programming the Robot

Step 6: For Me + What's Next ?

First of all, I would like to thank you for reading this guide ! I hope it helped you build your own robot and improved your knowledge about robotics and arduino.

I think now it's a good time to introduce myself. My name is Mert . Likes Math, Computers, Robotics and programming. I've just started a youtube channel, hoping to help people, share some of my knowledge and learn myself.

My YouTube Channel

My next Youtube (and Instructables) tutorials will deal with different methods of controlling electronics (Smartphone-Bluetooth control, remote control and much more) and specifically robots. There will also be videos about home automation (controlling every day appliances with your smartphone or computer using arduino). so make sure you are a subscriber so you won't miss them, and I will see you next time.

Bye !

6 People Made This Project!


  • Electronics Tips & Tricks Challenge

    Electronics Tips & Tricks Challenge
  • Audio Contest 2018

    Audio Contest 2018
  • Plastics Contest

    Plastics Contest

37 Discussions


1 day ago

Nice little bot project. Made it fwith a couple of 24v geared motors and whatever i could find at home, code works fine for me. Thank you for sharing. BTW, your blog shows empty page on Opera, Chrome and Firefox browsers. Keep creating

lohit moharana

5 months ago

dude your arduino code is wrong so I had to go to a robotics lab to get the code


10 months ago

This is awesome! I want to make a wall-e style one of these. Do you know how I could replace the wheels/dc motor with tracks?


1 year ago

sir my robot is not working the program is verified and uploaded but it is not working the servo motor is not rotating and the wheels are also not rotating

only the motorshield and ardunio are getting the current supply and a buzzing sound is been heard anda pop sound after a intervel of time .


1 year ago

how to upload the program in the ardunio

Kanak Shilledar RM

1 year ago

Your program is giving errors it is not working correctly.

please check it positively.

1 reply

Why do you think it's not correct? Maybe you made a mistake! If you are getting an error, first share the error. Maybe then I can help you.


Reply 1 year ago

You can copy from here:


1 year ago

Please watch this tutorial;

MertArduinoKing H4rsh

Reply 1 year ago

Only the rotation of the wheels may not be equal. If this is the case, it is enough to replace the DC motor connections in the motor shield.

King H4rsh

1 year ago

Sir in the 2nd step you wrote install arduino libraries , does that mean the af Motor and new ping 7 or something else ?