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:

  1. Ublox GPS + compass module
  2. Arduino Mega Microcontroller
  3. Four wheel drive chassis
  4. L298N Motor Driver
  5. Ultrasonic Sensor for obstacle avoidance

Working Principle

  1. 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.

  2. 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;

  1. 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.

  2. 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.

  3. After a delay, the GPS location is measured again and the target angle is calculated.