How to Make a HC-SR04 Obstacle Avoiding Robot With Arduino

About: I am a student in high school who loves robotics. I am great with Arduino and can code Java and C + +

In this Instructable today, you will be shown how to make a Obstacle Avoiding Robot with a few cheap parts and a free open-source software coding platform IDE called Arduino. This is a great robotics project and is very easy to make. After you are finished, you can let it free and see what it can do!

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Parts Needed

Listed below are all the parts needed to build this. I have provided links if you need to buy them from Amazon

Step 2: Connections

Now it's time to connect these parts you have collected and make this robot. Refer to my schematic for all the connections.

--For the motors, the orientation in which you place them will make a difference so plug them in and if after finishing, it doesn't go forward, try switching them.--

The ultrasonic sensor needs to spin with the servo motor so you either need to buy a ultrasonic bracket or use 2 pieces of cardboard to make one.

The 9V battery going to the L298N H-Bridge needs to be a 4 AA Battery Holder unless you can get the 9V battery to have 2 separate wires.

Step 3: Code

Now you need this machine you built to do something. We will achieve that using Arduino. If you already haven't done so, download Arduino IDE from this website - https://www.arduino.cc/en/Main/Software

After you do that, watch this video if you don't know how to upload a library to Arduino.

The video will also show you how to download the NewPing Library, to which the link is here. This is needed for the code to work. https://goo.gl/Qe6XU6

The code is here.

Be the First to Share

    Recommendations

    • CNC Contest

      CNC Contest
    • Make it Move

      Make it Move
    • Teacher Contest

      Teacher Contest

    Discussions