Wall Following Robot Car

by tisaconundrum in Circuits > Arduino

50122 Views, 27 Favorites, 0 Comments

Wall Following Robot Car

It lives!!!
IMG_0008.JPG
finished product.jpg
IMG_0002.JPG
1904025_10203206450831754_679164372_n.jpg
ArduinoDuemilanove.jpg
10152430_10203496348479014_2828317698760749185_n.jpg
1002695_10203497504507914_3173874378391101802_n.jpg
10169449_10203497496227707_8648999991256049977_n.jpg
10154302_10203496359639293_6893641719570151868_n.jpg
Untitled picture.png
10256953_10203497497587741_6081596015246033622_n.jpg
IMG_0009.JPG
1397871005562.gif

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)

HowToBreadboard :D

robot_Car_Expert_bb.png
Untitled picture.png
Untitled picture.png
Untitled picture.png

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.

Wiring the Board

Wall Following Robot Car (Part 1/5)
Untitled picture01.png
Untitled picture02.png
Untitled picture03.png

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.

Adding the Arduino

Untitled picture04.png
Untitled picture05.png
Untitled picture06.png
Untitled picture07.png
Untitled picture08.png

Now lets add the Arduino.

Adding GND Bridges

Untitled picture09.png
Untitled picture10.png
Untitled picture11.png
Untitled picture12.png
Untitled picture13.png

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

Motor Input/outputs

Untitled picture14.png
Untitled picture15.png
Untitled picture16.png
Wall Following Robot Car (Part 2/5)
Untitled picture17.png
Untitled picture18.png

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

Bridging the Gap

Untitled picture19.png
Untitled picture20.png
Untitled picture21.png
Untitled picture22.png
Untitled picture23.png

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.

L293D and the Vmotor Pins

Untitled picture24.png
Untitled picture25.png
Untitled picture26.png
Untitled picture27.png
Untitled picture28.png

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.

Wire Inputs to the Arduino

Untitled picture29.png
Untitled picture30.png
Untitled picture31.png
Wall Following Robot Car (Part 3/5)
Untitled picture33.png
Untitled picture32.png

Looking good :D

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

Sensors!

Untitled picture34.png
Untitled picture35.png
Untitled picture36.png
Untitled picture38.png
Untitled picture39.png

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!

Wires to the Sensor

Untitled picture40.png
Untitled picture41.png
Untitled picture42.png
Untitled picture43.png
Untitled picture44.png

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

Still Wiring Sensors...

Untitled picture45.png
Untitled picture46.png
Untitled picture47.png
Untitled picture48.png
Untitled picture49.png

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

Oh Good Let Me Tape It :D

Untitled picture50.png
Untitled picture51.png
Untitled picture52.png
Wall Following Robot Car (Part 4/5)

Great :D
We're almost done.

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

Lets begin wiring.

More Wiring?

Untitled picture53.png
Untitled picture54.png
Untitled picture55.png
Untitled picture56.png
Untitled picture57.png

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.

Are We Done Yet?

Untitled picture58.png
Untitled picture59.png
Untitled picture60.png
Untitled picture61.png
Untitled picture62.png

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.

Oh Look We're Done... Sort Of

Pop in the batteries.jpg
Dremeled out the window, and preparing to program.jpg

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

Code of Arduino! Do You Solemnly Swear to the Code?

Untitled picture.png
Untitled picture.png
Wall Following Robot Car (Part 5/5)

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