Arduino HC-SR04 Ultrasonic Rover
by Eagle199393 in Circuits > Microcontrollers
175924 Views, 454 Favorites, 0 Comments
Arduino HC-SR04 Ultrasonic Rover
![P1010120.JPG](/proxy/?url=https://content.instructables.com/F1B/IWCJ/HRKR2ABK/F1BIWCJHRKR2ABK.jpg&filename=P1010120.JPG)
Simple Arduno Rover with HC-SR04 Ultrasonic sensor.
![P1050657.JPG](/proxy/?url=https://content.instructables.com/FNR/AFJH/HRKR2AHF/FNRAFJHHRKR2AHF.jpg&filename=P1050657.JPG)
![P1050658.JPG](/proxy/?url=https://content.instructables.com/FUN/CIZB/HRKR2AIC/FUNCIZBHRKR2AIC.jpg&filename=P1050658.JPG)
![P1050660.JPG](/proxy/?url=https://content.instructables.com/FTI/ZD9A/HRKR2AIJ/FTIZD9AHRKR2AIJ.jpg&filename=P1050660.JPG)
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.
![P1050664.JPG](/proxy/?url=https://content.instructables.com/FO0/60OM/HRKR2AP6/FO060OMHRKR2AP6.jpg&filename=P1050664.JPG)
![P1050661.JPG](/proxy/?url=https://content.instructables.com/FQF/IEMY/HRKR2AJK/FQFIEMYHRKR2AJK.jpg&filename=P1050661.JPG)
![P1050662.JPG](/proxy/?url=https://content.instructables.com/F04/SID3/HRKR2AO1/F04SID3HRKR2AO1.jpg&filename=P1050662.JPG)
![P1050665.JPG](/proxy/?url=https://content.instructables.com/FQ1/S12W/HRKR2APF/FQ1S12WHRKR2APF.jpg&filename=P1050665.JPG)
You can see all the components you need on this photo.
- 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
![P1050666.JPG](/proxy/?url=https://content.instructables.com/FKL/MUGK/HRKR2AQG/FKLMUGKHRKR2AQG.jpg&filename=P1050666.JPG)
![P1050667.JPG](/proxy/?url=https://content.instructables.com/F7C/JLAO/HRKR2AQH/F7CJLAOHRKR2AQH.jpg&filename=P1050667.JPG)
![P1010124.JPG](/proxy/?url=https://content.instructables.com/FSV/PLLL/HRKR2AEC/FSVPLLLHRKR2AEC.jpg&filename=P1010124.JPG)
Сonnection scheme is very easy.
- 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
![P1010123.JPG](/proxy/?url=https://content.instructables.com/FEL/08IN/HRKR2AD8/FEL08INHRKR2AD8.jpg&filename=P1010123.JPG)
![P1010126.JPG](/proxy/?url=https://content.instructables.com/FRC/H0QG/HRKR2AFD/FRCH0QGHRKR2AFD.jpg&filename=P1010126.JPG)
![P1010127.JPG](/proxy/?url=https://content.instructables.com/FTQ/WRUE/HRKR2AGI/FTQWRUEHRKR2AGI.jpg&filename=P1010127.JPG)
![HC-SR04 Ultrasonic Arduino rover](/proxy/?url=https://content.instructables.com/FXD/94AK/HRKR2BDW/FXD94AKHRKR2BDW.jpg&filename=HC-SR04 Ultrasonic Arduino rover)
Final result and video.
Faster version without servo http://youtu.be/hBHpOV5TOY8
Put AFMotor.h and AFMotor.cpp to folder AFMotor in libraries folder Aduino.