Introduction: How to Build Obstacle Avoiding Robot for Beginners With Arduino Tutorial

This Tutorial is for anyone getting started with arduino. We will be building an obstacle avoiding robot that uses an ultrasonic HC SR-04 sensor to detect objects and 2 continuous (360 degree) servos wired to an external battery supply. This project uses an Arduino Uno without motor shield. The code is not mine, but not sure who to give credit to as I combined about 4 different sketches I found online.

Comment with any questions and sorry I said UMMM about 3000 times, I get nervous on camera...

All parts and code can be found here : http://wirebeings.com/Arduino-Robot.html

CH340g driver for chinese arduino uno can be downloaded here: http://www.wch.cn/download/CH341SER_MAC_ZIP.html

Step 1:

Comments

author
YADHUKRISHNAN made it!(author)2016-01-05

hey .. very nice vedio ..can i have the program plz i checkde with the link that you have mentioned bt unable to get the code

author
matthewh8 made it!(author)2016-01-12

Sorry about that just fixed the link, it's not pretty but it works for now.

author
BonnieS6 made it!(author)2015-11-12

I made the robot and it worked finally :) BUT now I went to use it again after it sat for 4 or 5 days and I went to show it to someone, and it only goes in circles. Can you maybe explain to me what I did wrong that this could happen? Thank you so much.

author
matthewh8 made it!(author)2015-11-12

Yeah my bad, I should have mentioned somewhere to undo the power wire while its sitting I think the battery may have slowly drained. Change the batteries and it should work again no problem.

author
alyssamalagueno made it!(author)2015-07-11

Can i use 2 dc motors instead of servos? Please reply

author
matthewh8 made it!(author)2015-07-11

You can but you would need geared DC motors and you would have to connect the to the board through a motor shield or an h bridge set up

author
jaspreet+singh123 made it!(author)2015-07-12

I am using futaba s3003 are they correct servos to use ???

author
matthewh8 made it!(author)2015-07-12

I do not believe those servos will work, they need to be labeled continuous or 360 degree to work for this tutorial. However, with some modification you can make it rotate continuously to work for this tutorial. Check this out https://www.youtube.com/watch?v=6G1nHfvl4aI

author
jaspreet+singh123 made it!(author)2015-08-11

oh sorry i used 180 degree now i am using 360 they are working

author
matthewh8 made it!(author)2015-08-11

Nice, glad to hear that!

author
jaspreet+singh123 made it!(author)2015-08-15

sorry it worked only once and now servos are not moving when changed with180 degree once they workrd but when i connect 360 degree once they are not working

author
jaspreet+singh123 made it!(author)2015-07-18

hey math i am waiting for your response pls help me to figure out

author
matthewh8 made it!(author)2015-07-05

I sent an email back a while ago. You didn't recieve it?

author
jaspreet+singh123 made it!(author)2015-07-07

I will check

author
jaspreet+singh123 made it!(author)2015-07-05

waiting for your reply

author
jaspreet+singh123 made it!(author)2015-06-30

i think connections are not wrong

author
matthewh8 made it!(author)2015-06-30

skaterank@gmail.com

author
jaspreet+singh123 made it!(author)2015-07-04

did u watch that video ?

author
jaspreet+singh123 made it!(author)2015-06-30

thx for telling me your email address .i will send my video on my drive

author
jaspreet+singh123 made it!(author)2015-07-02

watched that video

author
matthewh8 made it!(author)2015-06-29

I would check the connections again, make sure the trig and echo pins are not backwards.

author
jaspreet+singh123 made it!(author)2015-06-30

i have made the connections many time but it works differently from your video .the robot do not moves forward . pls can i send a video on my drive pls tell me your email address .

author
jaspreet+singh123 made it!(author)2015-06-28

this code not works properly

author
matthewh8 made it!(author)2015-06-28

are you getting a compiler error, or did I make a logic error?

author
jaspreet+singh123 made it!(author)2015-06-29

it do not moves in front as compared to robot you made in your video

author
jaspreet+singh123 made it!(author)2015-06-29

in the video that works like when nothing is front of it it runs in your video and in my case it only move when obstacle is near it and the it stops [sorry i am small to understand the code and explain you properly]

About This Instructable

7,250views

32favorites

License:

Bio: My name is Matthew and I attend the University of Pittsburgh. Currently I am a senior, going for a bachelors in Information Science with a ... More »
More by matthewh8:Apple ArKit Augmented Reality AppAugmented Reality Fidget SpinnerFacial Recognition With Tracking.js
Add instructable to: