Global Positioning System(GPS)


GPS, a navigation device also called as GPS receiver. When it used for vehicle navigation commonly referred to simply as a GPS. It is a device that is capable of receiving information from GPS satellites and then to accurately calculate its geographical location. GPS gives location in terms of Longitude, latitude and Altitude. It can also gives date.

  1. Power supply: 3.3-5V
  2. Default Baud rate: 9600bps
  3. Dimensions: 39*25.5 mm
  4. Communication Protocol: UART

  • It provides Micro USB interface.
  • It provides USB-TTL interface.
  • SMA interface can be directly connected to an active antenna SMA.
  • Module can interface with Arduino.
  • PPS indicator.

#1.4>Pin Description:
PIN Description
VCC Input Power 3.3V-5V
GND Ground
RX Data Input
TX Data Output
PPS Shows GPS taking Data or not
from satellite or GPS is working or not.


 Pin DescriptionIt has one SMA connector at which enternal SMA antenna can be attached.(Refer Following Figure)

 #1.5>Connection Diagram with Arduino and software steps:

Step:1  Connect VCC 3.3V-5V and GND to Arduino GND

Step:2  Connect RX to Arduino’s Pin 1 (TX) and TX to Arduino’s Pin 0 RX.

Step:3  Download GPS library Tinygps for Arduino.

Step:4 Select COM port and choose Arduino Uno upload Arduino code to the Arduino board. (Refer code attached below)

Step:5 Open Serial Monitor. It will Shows Longitude and Latitude from GPS.

Following figure shows GPS connections with Arduino.

#1.5.1>Arduino Program:
#include <TinyGPS.h>
TinyGPS gps;  //Creates a new instance of the TinyGPS object
void setup()
  Serial.print("Simple TinyGPS library v. ");
  Serial.println("Testing GPS");

void loop()
  bool newData = false;
  unsigned long chars;
  unsigned short sentences, failed;

  // For one second we parse GPS data and report some key values
  for (unsigned long start = millis(); millis() - start < 1000;)
    while (Serial.available())
      //read and encode the data.
      char c =;
      if (gps.encode(c)) 
        newData = true;  

  if (newData)      //If newData is true
    float flat, flon;
    unsigned long date,time;
    gps.f_get_position(&flat, &flon); // store values into lat and lon variables 
    gps.get_datetime(&date,&time); //store values into date and time variables
    //Print data lat, lon , date , time.  
    Serial.print("Latitude = ");
    Serial.print(flat == TinyGPS::GPS_INVALID_F_ANGLE ? 0.0 : flat, 6);
    Serial.print(" Longitude = ");
    Serial.print(flon == TinyGPS::GPS_INVALID_F_ANGLE ? 0.0 : flon, 6);
    Serial.print("Date = ");
    Serial.print(date == TinyGPS::GPS_INVALID_F_ANGLE ? 0.0 : date, 6);
    Serial.print(" Time = ");
    Serial.print(time == TinyGPS::GPS_INVALID_F_ANGLE ? 0.0 : time, 6);

 // if failed to get data from gps


#1.5.2>Code Explanation:   
A.	 TinyGPS gps; // create gps object

The “gps” object is used to separate the receiver’s data into individual components.

first check if there is any data available in the receiver.

B.	while(gpsSerial.available())

Then read and encode the data.

C.	if(gps.encode(

At last, we store the latitude and longitude values into the lat and lon variables.

D.	gps.get_position(&lat,&lon);

store values into lat and lon variables (passed by reference)

E.	gps.get_datetime(&date,&time);

store values in to date and time variables and that is it. Serial monitor will display the output from gps.

  1. It gives real time at particular location (clock synchronization).
  2. It is used for navigation purpose.
  3. In cellular telephony.
  4. It robotics it can use for self navigating, autonomous robots.
  5. To make a map and surveying.