Introduction: Wall Following Robot Car

Here's a little history on how this all got started :D

So my club was in desperate need of a new project, and it so happened that I had stumbled across an RC car at GoodWill for about 75 cents. It was here that we figured: "Hey, we can build something out of this." However, once we were knee deep in the project, we realized we had bitten off more than we could chew. However, in the end we managed to swallow and get the project done but it ended up taking 5 weeks and 6 days (41 days) to finish the whole thing LOL. (March 7 - April 17). This amount of time was really just due in part to the fact that the pieces we needed were coming in slowly. One thing that is for certain is that there are a lot of various ways of completing this project. (I hint at the copious amounts of Trial and Error*)

*Lots of errors... -.-

Let’s get to the Nitty Gritty

So first step would be the materials:

1) Car

2) Arduino

3) Wires (Lots of them)

4) L293D (Motor H-Bridge)

5) Breadboard

6) HY-SRF05 or HC-SR04, it really doesn't matter. I was able to get both of them working just fine

7) 3 x AA Battery Mount or 4 x AA Battery Mount (Go with the 3 pack only because you’re just controlling the Arduino and not pulling or giving any current to the car.)

8) Lots of batteries for testing. I just grabbed a few packs from my local dollar store (Just for testing. Don't use these kinds of batteries for the real fun.)

9) Soldering Iron

10) Optional: Switch (From Lamp)

11) Tape (I used painter's tape)

Step 1: HowToBreadboard :D

In my case, my car could pack in 5 x AA batteries. So that's a lot of energy to pack in.

Your going to want to wire everything like in the pictures I've provided.

Note: The pins on the arduino for pins 2 and 4, are wrong. The L293D displays correct pin connections. (Here's to another Error)

Edit: I've also included another picture of the corrected layout.

I've included the .fzz file that will show all of the correct connections for the board.

Modify as needed.

Step 2: Wiring the Board

Alright, lets get started! First you're going to want to add your battery and rubberband, I've already done so.
Then you're going to add your breadboard.

Step 3: Adding the Arduino

Now lets add the Arduino.

Step 4: Adding GND Bridges

Once you've added your Arduino, you're going to want to add your GND bridges.

Step 5: Motor Input/outputs

Looking good so far. Lets go ahead and wire our motor input/output wires.

Step 6: Bridging the Gap

It's crucial that you've made sure that everything (wire wise) is sound. If components start doing weird things fix it.

Here we're going to add our Vcc wire for Arduino to the main Vcc rail. Also you're going to want to add your GND bridge.

Step 7: L293D and the Vmotor Pins

This is really important, make sure you wire up your Vmotor out to the Vmotor in pin on the L293D, DO NOT add it to your main Vcc Rail. You will fry things.

Now that, that is clear. go ahead and add your GND from your RC car to your GND rail.

Also add your Arduino's GND to the GND rail.

Step 8: Wire Inputs to the Arduino

Looking good :D

Here we're just adding our motor input/output wires to the Arduino.

Step 9: Sensors!

I've also added a switch, it's up to you if you want to add one. I recommend it as you're going to need a way to shut the Car off when you're done playing with it.

We're also now adding our SRF05 to the car.

We're almost done!

Step 10: Wires to the Sensor

Now go ahead and feed your wire through the hood area of the car, and the tape your sensor down.

Step 11: Still Wiring Sensors...

Once you've done that add your SR04 and feed those wires through the hood as well.

Step 12: Oh Good Let Me Tape It :D

Great :D
We're almost done.

Now tape that sensor down, and make sure your wires are separated.

Lets begin wiring.

Step 13: More Wiring?

Add your Sensor's Vcc's to the Vcc rail, your GND to the GND rail, and your sensors input output wires to their specific pins on the Arduino.

Step 14: Are We Done Yet?

Wooh, the finish line is ahead, lets finish this.

Don't be like me and forget to add your Power Cord.

Now that, that is solved lets add the final screws and start programming it :D

You made it this far, I congratulate you on your accomplishment.

Step 15: Oh Look We're Done... Sort Of

Unfortunately we're not quite done. We still need to add the program, and then you can start playing with it.

Step 16: Code of Arduino! Do You Solemnly Swear to the Code?

And here's the code. :D Enjoy racing this little beast around the house.
Don't forget to read up on how the NewPing library works, (if you plan on picking a part my code.)
http://playground.arduino.cc/Code/NewPing


And thank you to you for reading through my Second Instructable.

- Tisaconundrum

Comments

author
HARSHITK29 made it! (author)2017-02-26

The programe giving error massage paste blow and image attached -

Arduino: 1.8.1 (Windows 10), Board: "Arduino/Genuino Uno"

C:\Users\hp\Downloads\Wf\Wf.ino:14:21: fatal error: NewPing.h: No such file or directory

#include <NewPing.h>

^

compilation terminated.

exit status 1

Error compiling for board Arduino/Genuino Uno.

This report would have more information with

"Show verbose output during compilation"

option enabled in File -> Preferences.

Thank you sir

Screenshot (19).png
author
tisaconundrum (author)HARSHITK292017-03-01

Please be sure to read the error
it says: No such file or directory

this means that you didn't import your NewPing library into your arduino library

author
HARSHITK29 (author)tisaconundrum2017-03-21

Thanks sir, its working.

author
tisaconundrum (author)HARSHITK292017-03-01

refer to this video on how to install a new library

author
YezatoI (author)2017-03-16

sir how about if the car is isolated by the wall, I mean if in front of the car is a wall and the right and left is also a wall, what will this robot do? will it move to the backward or it will stop?

author
Eloisa CamelM (author)2015-03-21

sir can we use the us-100 ultrasonic sensor.

author
kumarsrt (author)2015-02-09

Nice work friend.could you please provide me a example program for wall following robot using single HC-SR04 distance sensor with 2 DC motors connected to a L293D h bridge driver circuit.

author
eloisacamille.meran (author)2015-01-14

hi sir. we are also working on a project like this .. but the proposed components are unavailable in our country.. we found your project and the materials are available.. but we need to make our car run slower so we bought a truck with tank-steering wheel but it has only one dc motor.. what should we do sir.. badly need your help.. just a beginner on arduino.. thanks a lot..

author

>> the proposed components are unavailable in our country

i'm sorry to hear that.

>> we found your project and the materials are available

that's good.

>> what should we do sir

i suggest a voltage regulator. and a transistor.

author
bill2009 (author)2014-09-04

Excellent! and nicely documented. I'm doing something similar using an ancient microprocessor I call olduino. I don't have it fully built yet but we could stage a race when we're done. Something like a 4'X8' arena and the car has to stay within 12" of the wall. What do you think?
You can see the current state of my build here:
http://olduino.wordpress.com/2014/09/03/time-for-a...

14-09-03 in all its glory.jpg
author
tisaconundrum (author)bill20092014-09-04

Thank you i appreciate that. It was a really long time coming documenting all of this
OldDuino huh? I like that.
I don't have it fully built yet but we could stage a race when we're done.
I doubt mine could compete with yours. But it's worth a shot. Considering mine has a bad time reading the the sensors you might win out. Either way i think all of that was pretty cool.

author
zaid.bro (author)2014-04-29

can you please tell me which educational course do we need to do to learn these stuff ??

author
tisaconundrum (author)zaid.bro2014-04-29

I didn't take any educational course. All self taught.

author

Although, perhaps a programming class can help.

author
muddog15 (author)2014-04-20

All the right down to it... Argh

About This Instructable

25,277views

19favorites

License:

More by tisaconundrum:DIY Bow TopperThe Butterfly BristlebotEasy DIY: Launch with a Rubber Band Airplane
Add instructable to: