This work contains the development and implementation of an autonomous GPS (Global Positioning System) guided rover. This rover is under development and currently it can track three predefined GPS Coordinates. It can successfully find its current GPS location using an Ublox Neo M8N module. By calculating the heading angle from the current GPS location, the robot can adjust its direction using an HMC 5883L digital compass reading. The functionality and accuracy of this rover has been tested in different locations. The main goal of this project is to build a cost effective autonomous delivery robot that can navigate to a GPS location by finding the best route and can avoid collision in its path.

Required Electronic Components:

- Ublox GPS + compass module
- Arduino Mega Microcontroller
- Four wheel drive chassis
- L298N Motor Driver
- Ultrasonic Sensor for obstacle avoidance

Working Principle

- The GPS module reads the current location. To calculate the GPS location accurately, the GPS module must need to be locked with at least four satellites. During the test, the rover was locked with 9 satellites.
- Then the rover calculates the target angle. This is the algorithm I used to calculate the target angle-

difference_Longitude = radians(target_Longitude – current_Longitude);

Latitude1 = radians(current_Latitude);

Latitude2 = radians(target_Latitude);

x = sin(difference_Longitude) × cos(Latitude2);

y = cos(Latitude1) × sin(Latitude2) – sin(Latitude1) × cos(Latitude2)× cos(difference_Longitude);

target_angle = atan2(x,y)×(180/3.14159);

if (target angle < 0) target angle += 360;

- The current heading angle is received from the compass module and the error angle is measured from the current heading angle and the target angle.
- The four motors get pulses according to the error from the microcontroller. The L298N motor driver runs the motors and to align with the target angle.
- After a delay, the GPS location is measured again and the target angle is calculated.