GPS Rover

The goal of this robot is to navigate autonomously using waypoints and a sonar rangefinder.

For this robot I am using the Lynxmotion A4WD1 as a base and an Arduino Uno for the microcontroller. Inside the rover, I have a Sabertooth 2x12 motor controller and two 7.2 Nimh batteries. I also soldered my own perf board that has two sensors, the EM406A GPS and the HM6352 Compass module. In addition, the perf board contains male headers for servos. On top of the robot I have a netbook running Ubuntu and installed on it is the arduino ide and processing ide. When I want to utilize rc control of the robot, to make sure everything is working, I SSH into my netbook from my macbook and use the processing application on the netbook to give commands to the motors.

Here is a picture of the inside of the robot, you can see the GPS and perf board

Here in figure two you can get a closer look at the inside of the rover. The top right corner is the perf board with the GPS and compass module. The Sabertooth 2x12 motor controller in the center of the robot is used to send pulses to the motors which the arduino is unable to do. In front of the Sabertooth 2x12 is an Arduino Uno microcontroller. The arduino is responsible for doing all the calculations and getting sensor information. The arduino operates as the "brains" of the robot.

In order to control the rover under manual control, I use a program called processing that is running on the netbook on the rover. I SSH from my Macbook into the netbook and then run the Rover Control program. This program, written by Mark Craig, receives input from the keyboard and translates data into commands for the motors on the rover.

Once I am able to confirm that each motor runs properly, I test each sensor out individually. To do this I run the example code given on the arduino pages for the GPS and compass to see if I am getting correct readings for the sensors.

I started with the PING ultrasound. This sensor sends out an ultrasonic burst and returns an the time it took for the burst echo to return to the sensor. By measuring the echo pulse width, the distance to the object can easily be calculated. I hooked up ground (gnd), 5 volts and signal wire to an arduino uno and uploaded the example code. Figure 5 is a picture of the program running with the serial monitor reporting the distances calculated. In figure 6 is the setup of the top piece of the robot with the ping sensor connected to the arduino.

Having confirmed that both the GPS and the ping sensors are working, I am able to formulate the final code for the project. The way the code works is the user hard codes in the gps waypoint or the 'goal points', then the robot calculates the distance away from that point. Then using the compass module the robot turns to the direction of the goal point and starts heading there until the gps sensor reads the 'goal point'. The robot will continue going from its current position to the goal positions until all positions have been reached.

Sources

http://letsmakerobots.com/node/35360

http://letsmakerobots.com/content/fundamentals-gps-guided-vehicle