Sei sulla pagina 1di 16

Explore

Create

Contests

Community

let's make

Login

share what you make >

Arduino HC-SR04 Ultrasonic Rover


Download

open in browser PRO version

Vote!

by Eagle199393

5 Steps

Are you a developer? Try out the HTML to PDF API

+ Collection

I Made it!

Favorite

pdfcrowd.com

About This Instructable


14,629 views

License:

252 favorites
Eagle199393
http://www.youtube.com/user/Dm

Follow

Simple Arduno Rover with HC-SR04 Ultrasonic sensor.

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

34

More by Eagle199393

pdfcrowd.com

Google Cloud
Computing
cloud.google.com/CloudComputing
Tools For Modern Applications. Speed,
Scale and Security.

Tags:

Arduino

obstacle

Robot

Rover

HC-SR04

avoid

Related

Remove these ads by Signing Up

Autonomous Arduino
Rover 5
by pjdtechy

Arduino obstacle
avoiding robot

Step 1:

by Djnix

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Arduino Rover 2.0


by Crazyffrey

Autonomous Sumo
Combat Robot with
Pneumatic Flipper - How
to
3D Printed Sumo Robot
with High Traction Wheels
by kmmarlow

See More

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

YOU will need to build this:


HC-SR04 Ultrasonic sensor
Battery holder for 6 AA batteries
6 AA batteries
Arduino UNO (I use UNO R2)
Motor Shield for Arduino (L293)
9g Servo
2 gear motors with wheels
CD box
4 male-to-male cables
4 female-to-female cables
few cable ties
I buy all components for this rover on ebay.
First you will need 2pcs Plastic Tire Wheel + DC 6V Gear Motor 48:1.
I solder 2 male-to-male cables and 104 capacitors.
I used slim CD box as a chassis, I made 2 holes on each side of CD box and then
fixed gear motors with cable tie.

Step 2:
open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

You can see all the components you need on this photo.
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.

HC-SR04 Ultrasonic sensor


Battery holder for 6 AA batteries
6 AA batteries
Arduino UNO (I use UNO R2)
Motor Shield for Arduino (L293)
9g Servo
2 gear motors with wheels on CD box chassis.
4 male-to-male cables
4 female-to-female cables
few cable ties

Step 3:

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

onnection scheme is very easy.


1.
2.
3.
4.
5.
6.

Connect 9g servo to SERVO_2 pins on motorshield


Left motor to M4
Right motor to M1
Echo - pin A4
Trig - pin A5
Vcc - pin +5 ; Gnd - Gnd

I fix servo on battery box with cable tie

Step 4:

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Final result and video.

Faster version without servo

http://youtu.be/hBHpOV5TOY8

Step 5:
Put AFMotor.h and AFMotor.cpp to folder AFMotor in libraries folder Aduino.

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

AFMotor.cpp

18 KB

AFMotor.h

5 KB

ROBOT.rtf

40 KB

Make Comment

gholam

8 days ago

Reply

10 days ago

Reply

gooooooooood

b10101

Hi, Nice robot. did you have any problems with spiking results from the
ultrasonics?
I rotate mine at 15 degree intervals reading in both directions. giving me 7
values 15 degrees apart. But I get two things happen, odd spikes and
swapping values, for eg:
open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

4 5 8 15 17 21 9
3 5 7 35 18 21 8
4 4 7 14 16 3 9
4 6 9 34 17 22 7
Notice the center values swapping without the bot moving 15 35 14 34 ??
Also 2nd last column 21 21 3 22 Where did the 3 come from.
The code is simple, I have been a code cutter for years so I am no stranger to
debugging.
Only this one has the better off me so far.
Any ideas
Cheers

biomech75

11 days ago

Reply

Nice Job!!! 2 Things:


1. You can use a 9V battery pack (less weight, less space)
2. If the code wont compile even with the NewPing code you need to install
the Adafruit motor shield library Link: http://learn.adafruit.com/adafruitmotor-shield/library-install

Eagle199393 (author)

biomech75

11 days ago

Reply

L293 drivers, 2 motors, servo consumes too much power for 9v


battery. Using 9v batteries is waste of money. Only rechageable 9V
are good, but I dont have one.

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

11 days ago

pdfcrowd.com

epaybot

11 days ago

Reply

13 days ago

Reply

12 days ago

Reply

12 days ago

Reply

got an error with the code

MoonDocker

I checked the code it will not compile :(

Eagle199393 (author)

MoonDocker

, I uploaded correct version of the code. It works. Try it.

MoonDocker

Eagle199393

Okay looks good it compiles okay. I will let you know how it turns out. I
am waiting for another HC-SR04. You might want to mention they will
need to install the NewPing library. You can find it here -->
http://forum.arduino.cc/index.php?topic=106043.0
Thanks for sharing !

cudy789

14 days ago

Reply

13 days ago

Reply

Do you happen to have the code to control the robot?

Eagle199393 (author)

cudy789

(removed by author or community request)

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

cudy789

Eagle199393

13 days ago

Reply

13 days ago

Reply

Cool, Thanks!

mahesh_jo

cudy789

I have made similar one earlier. Watch it at


www.youtube.com/watch?v=Nh31PzSrANo
If anybody want code of it, mail me at mahesh_jo@hotmail.com

mahesh_jo

13 days ago

Reply

14 days ago

Reply

14 days ago

Reply

I have made similar one earlier. Watch it at


www.youtube.com/watch?v=Nh31PzSrANo
If anybody want code of it, mail me at mahesh_jo@hotmail.com

John_the_Builder

My dogs would love this, then Eat it.. Sadly..

M4rc3lv

What did you put on the bottom of the CD Box as a third wheel? Or does it
work without a third wheel?

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Eagle199393 (author)

M4rc3lv

14 days ago

Reply

I glued small plastic ball, which was cut to make a platform for glue.
Watch also faster version without servo
youtu.be/hBHpOV5TOY8?t=2m50s

About Us
Who We Are
Advertise
Contact
Jobs
Help

Find Us
Facebook
Youtube
Twitter
Pinterest

Resources

Mobile

For Teachers
Artists in Residence

Download our new apps for


iOS and android!

Gift Pro Account


Android

Forums
Answers

iOS

Go Pro Today

We're Hiring!

Google+

Join our newsletter:

enter email

Join!

English

All content on Instructables including How To's, Downloads, Images, Comments


Terms of service | Privacy Policy | Legal Notices & Trademarks | Mobile Site
are Copyright 2014 Autodesk Inc. All rights reserved.

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Potrebbero piacerti anche