Mini GPS Autonomous Car for Under $100Posted: July 20, 2009
First off, if you haven’t watched episode #5 of The Tech Junkies, I’d have to insist you do that now:
Okay, so let’s get onto the details. As seen in the video, we hacked apart a $15 Radioshack R/C car for the purpose of outfitting it with a GPS chip. We ripped out the motor that was being used for steering and replaced it with a low-cost $10 servo. We also cut out the existing electronics so that only the wires coming from the battery and running to the drive motor we’re left. From here we took a breadboard and connected up our H-Bridge drive chip.
The H-Bridge chip is given the job of providing current to the motor (whether it be forward or reverse) which takes its inputs from a microcontroller. As you can see, for this project we ended up using a standard Arduino board. Here’s a color coded schematic of the whole project:
Paste that into your address bar, hit enter, and then you should get a message box with the coordinates in degree decimal format. This is what our program running on the car will use.
Speaking of the program running on the car, you can grab our full source code right here: GPS Car – Arduino Sketch. You’re also going to need the Arduino NMEA library for this to compile, which you can grab from here.
Edit: Since the release of Arduino 1.0, the NMEA library is broken. You can fix this by opening up nmea.cpp and changing #include “WProgram.h” to #include “Arduino.h” Then open up nmea.h and change #include “WConstants.h” to #include “Arduino.h”
The code should be documented for the most part. The only code you should need to change will be right under the line “/* BEGIN EDITABLE CONSTANTS SECTION */”. Everything is pretty much self explanatory…just make sure you have all your connections in the same place as we did.
NOTE: You cannot write the program to the Arduino with the GPS pin connected to the RX pin. If the GPS chip is outputting data, it will interfere with the uploading of the program. Just make sure to reconnect the pin after your program is flashed to the chip!
Well, there you go! Now you should have everything to get you started with building your very own sub $100 GPS navigated vehicle. Enjoy and make sure to contact us or leave a comment if you make something cool based off these concepts.