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:
3) Wires (Lots of them)
4) L293D (Motor H-Bridge)
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
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.)
And thank you to you for reading through my Second Instructable.
HARSHITK29 made it!
We have a be nice policy.
Please be positive and constructive.