How to Interface GPS to 8051 Microcontroller?

GPS Modem Interfacing with 8051 Microcontroller

GPS Modem Interfacing with 8051 Microcontroller

The term ‘GPS’ stands for Global Positioning System module is a device that has become a most important tool in the surveillance field, scientific use, and tracking. This GPS modem is based on satellite navigation technology that provides the information of time and location in all weather situations anyplace on the earth. The main use of the GPS system is to track the vehicle or person’s location. A GPS receiver finds the exact location of an object in terms of longitude, latitude and also offers timing services, reliable navigation and positioning to the users at any place and anytime on the earth.This article discusses how GPS modem interfaces with an 8051 microcontroller working, and its applications.

GPS Modem Interfacing with 8051 Microcontroller

The GPS system mostly uses 24 to 32 satellites to give the data to the users. The GPS system has become very significant for global navigation and it is beneficial for tracing, surveillance, way and map design, and much more.

But before going to discuss this GPS system, let us increase an idea about how GPS system interfacing with the microcontroller which is a minor application based on GPS can be done.

GPS Interfacing to 8051 Microcontroller

GPS Interfacing to 8051 Microcontroller

It defines the use of GPS system to find the location.The information attained from the GPS system is handled by the microcontroller to take out its standards in the form of longitude and latitude. The GPS system interfacing with 8051 microcontroller and the values of the location are shown on an LCD display.

Block Diagram of GPS Interfacing with 8051 Microcontroller

The interfacing of GPS modem with 8051 microcontrollers can be built with a GPS module, 8051 microcontroller, MAX 232, and an LCD display.

The MAX232 is a combined circuit, used to change the TTL (transistor logic levels) to RS232 logic levels over serial communication of ATmels microcontroller with a personal computer. The microcontroller works at TTL logic level (0-5V). But, the USART serial communication with PC works on RS232 principles (-2.5V to +2.5V). This makes it hard to find a straight link to interconnect with each other.

GPS Interfacing with Microcontroller

GPS Interfacing with Microcontroller

The AT89C51 is an 8-bit microcontroller that belongs to Atmel 8051 families. It has 4KB of flash PEROM (programmable and erasable read only memory) and 128 bytes of RAM. It can be programmed and also removed too many times.

A 16×2 LCD display is an electronic display, commonly used in several circuits and also devices. These displays are chosen over seven segment displays.

The working principle of GPS module is, it continuously transmits serial data in the sentence form. The values of the location include the sentence. To communicate over UART or USART we just require three basic signals, namely; TXD, RXD, nd GND – So that we can interface UART with 8051 Microcontroller.

The main objective here is to track the precise location of the GPS receiver in the form of longitude and latitude values. The GPS system gives the o/p data in RS232 logic level format. To change RS232 format into TTL format, a line converter MAX232 is used.

It is associated with a GPS module and also AT89C51 microcontroller. The interfacing of the GPS with 8051 block diagram is shown in the above diagram. The location values are shown on an LCD which is interfaced to the microcontroller.

Circuit Diagram of GPS Interfacing with Microcontroller

The circuit diagram of GPS interfacing with 8051 Microcontroller can be built with required electrical and electronic components like an AT89C51 microcontroller, MAX 232 IC, GPS module, LCD display, 12V DC battery or adapter, programming board, 12MHz Crystal. Capacitors, Resistors.

GPS Interfacing with Microcontroller Circuit Diagram

GPS Interfacing with Microcontroller Circuit Diagram

The connections of GPS interface with microcontroller circuit are as follows:

The MAX232 is used for the serial communication. The receiver pin-3 of the GPS module is connected to pin-13 R1IN and the o/p pin of MAX 232 is connected to the RxD pin-10 of the microcontroller.

Pins 1,2 and 3 of the AT89C51 microcontroller are connected to the control pins like RS, R/W and EN of LCD display. The data pins of the display are linked to port p2 of the controller. The longitude and latitude values are shown on the LCD.

In the above circuit, the GPS receiver continuously transmits the data according to NMEA formats using RS232 protocol. In this format, the values like longitude and latitude of exact location are obtainable in GPRMC sentence. These are removed from NMEA values and displayed on LCD.

By using the protocol UART, the microcontroller gets the data from the GPS module, and then it removes the values from the received messages lastly displays them on the LCD.

Extraction of GPS Values from NMEA Format

The first received six characters from the GPS module are matched to the GPRMC series. If this series is matched, then you need to wait till you will get two commas; next, the character states whether the GPS is triggered or not.

If the following character is ‘A’, then the GPS module is activated otherwise, it is not triggered. Again, you have to postpone until you get a comma. The next nine characters state the LATITUDE. Once again, delay until you get two commas- the next 10 characters state the LONGITUDE.

If you want to check the values of the precise location without any coding, use the software of TRIMBLE STUDIO. Once you interface a GPS module, then the software straight gives longitude, latitude, time, speed, and altitude.

It offers the precise location in google maps. This data is collected in a specific string format which is decoded by the GPS module. The GPS system gives the o/p data in a series format called as NMEA and a common GPS sentence is explained below.

$GPGGA,070912.00,2412.9675,N,07632.7122,E,1,04,1.2,430.6M,-43.5,M,,0000*36

  • A string always starts with a sign ‘$’
  • GPGGA: Global Positioning System Fix Data
  • Comma (,) specifies the separation between two values
  • 070912.00: GMT time as 07 hours: 09 minutes: 12 Seconds: 00 m seconds
  • 2412.9675, N: Latitude 24 degrees: 122 minutes: 9675 seconds North
  • 07632.7122, E: Longitude 076 degrees: 32 minutes: 7122 seconds East
  • 1: Fix Quantity 0= invalid data, 1= valid data, 2= DGPS fix
  • 04: Number of satellites currently viewed
  • 1.2: HDOP
  • 430.6, M: Altitude (Height above sea level in meter)
  • -43.5, M: Geoids height
  • ,, DGPS data
  • 0000: DGPS Data
  • *36: Checksum

Applications of Interfacing GPS Module with 8051 Microcontroller

The applications of GPS module with microcontroller include in everything ranging from cell phones, wrist watches to shipping vessels, Automatic Teller Machines (ATM) and Earthmovers. GPS growths productivity across an extensive swath of the economy, to comprise construction, mining, farming, package delivery, banking systems, surveying, and financial markets etc. Some wireless communication facilities cannot function without GPS module.

GPS Applications

GPS Applications

Applications of Interfacing GPS with 8051 Microcontroller include the following

  • The proposed system is used in car navigation, fleet management, and marine navigation.
  • It is used for tracking and mapping the devices.
  • It is used in personal positioning and in several embedded systems based projects to discover the precise
  • location of the vehicle or person.
  • By using GPS module, the precise time calculation with respect to GMT can also be done.
  • Mining of the location values from the NMEA format.

Thus, this is all about GPS interfacing with 8051 Microcontroller. This technology can be used in several electronic engineering projects to discover the exact location of a vehicle using a GPS method and other navigational systems that work through satellites and also ground based stations.

The information of the vehicle can be observed on a map by using a software. Even data can be kept and downloaded to a computer from the GPS module unit at a base station, and future, it can be used for the study.Here is a question for you, what is the function of GPS module?

 

Add Comment

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