fbpx

Interface GPS With Arduino Uno

GPS is space based satellite navigation system.

  • It provides location ,date and time.
  • This navigation system made up of a network of a 24 satellite placed into orbit.
  • GPS navigation device provide data in all weather conditions.
  • GPS satellite placed in orbit from a distance of 20,000 km above the earth.
  • A satellite make complete two revolution ever day.
  • Each GPS receiver get the information from four satellite.
  • GPS receiver is used to calculate the location from the information obtained from four satellite.
  • Calculations based on mathematical principle called trilateration.

Calculating Location:

EXAMPLE

  • To know the exact location.
  • There is four person
    • Person 1= unknown location, (GPS Receiver)
    • Person 2=Chennai, (Satellite 1)
    • Person 3=Bangalore (Satellite 2)
    • Person 4= Coimbatore (Satellite 3)
  • Person1 ask person2 where am I,he says you are 139km from Chennai.
  • Person1 ask person3 where am I,he says you are 215 km from Bangalore.
  • Person1 ask person4 where am I,he says you are 391 km from coimbatore.

GPS Received Data In NMEA Format

  • $GPBOD = Bearing, origin to destination.
  • $GPBWC = Bearing and distance to waypoint, great circle.
  • $GPGGA = Global Positioning System Fix Data.
  • $GPGLL = Geographic position, latitude / longitude.
  • $GPGSA = GPS DOP and active satellites.
  • $GPGSV = GPS Satellites in view.
  • $GPHDT = Heading, True.
  • $GPR00 = List of waypoints in currently active route.
  • $GPRMA = Recommended minimum specific Loran-C data.
  • $GPRMB = Recommended minimum navigation info.
  • $GPRMC = Recommended minimum specific GPS/Transit data.
  • $GPRTE = Routes.
  • $GPTRF = Transit Fix Data.
  • $GPSTN = Multiple Data ID.
  • $GPVBW = Dual Ground / Water Speed.
  • $GPVTG = Track made good and ground speed.
  • $GPWPL = Waypoint location.
  • $GPXTE = Cross-track error, Measured.
  • $GPZDA = Date and Time.

Hardware Required

  • GPS Module.
  • Arduino.

GPS Pinout

  • Vin= +5V.
  • Tx= Rx of Microcontroller.
  • Rx= Tx of Microcontroller.
  • Gnd= Ground

Circuit

Virtual Circuit

Code

int gpsval;
 void setup()
 {
 Serial.begin(9600);
 }
 void  loop()
 {
 if (Serial.available())
 {
 gpsval=Serial.read();
 if(gpsval=='$')
 {
 gpsval=Serial.read();
 if(gpsval=='G')
 {
 gpsval=Serial.read();
 if(gpsval=='P')
 {
 gpsval=Serial.read();
 if(gpsval=='G')
 {
 gpsval=Serial.read();
 if(gpsval=='G')
 {
 gpsval=Serial.read();
 if(gpsval=='A')
 {
 gpsval=Serial.read();
 while(gpsval!=',');
 {
 gpsval=Serial.read();
 Serial.print(gpsval);
 }
 while(gpsval!=',')
 {
 gpsval=Serial.read();
 Serial.print("North");
 Serial.print(gpsval);
 }
 while(gpsval!=',')
 {
 gpsval=Serial.read();
 Serial.print("West");
 Serial.print(gpsval);
 }
 }
 }
 }
 }
 }
 }
 }
 }

Leave a Reply

Your email address will not be published. Required fields are marked *