LCD-LED Display

Interfacing GPS with 8051 Microcontroller

A Interfacing GPS module is a gadget that uses the Global Positioning System to detect a vehicle’s or person’s location. GPS receivers are used to give users with accurate navigation, positioning, and timing services at any time and from any location on the planet. The data is delivered to the receivers by 24 to 32 satellites in this global positioning system. GPS has become extremely significant for global navigation, as well as land surveying, way marking, map-making, tracking and surveillance, commerce, and scientific applications. However, before learning about this design, learn how to connect an LCD to an 8051 microcontroller.

Outline

  • Circuit Principle:
  • Circuit Diagram:
  • Circuit Components:
  • Circuit Design:
  • Circuit Simulation Video:
  • How to Operate?
  • Project Output Video:
  • Circuit Applications:
  • Download Project Code

Circuit Principle:

By reading the signals broadcast by the satellites, the GPS module estimates the position. Each satellite continuously transmits messages containing the time of transmission. Based on the arrival time of each transmission, the GPS receiver calculates the distance to each satellite. The GPS receiver’s position is calculated using this information. The raw data is converted to LATITUDE, LONGITUDE, ALTITUDE, SPEED, and TIME for the user.

Circuit Diagram:

Interfacing GPS

Circuit Diagram of Interfacing GPS to 8051 Microcontroller

Circuit Components:

  • at89c51 controller
  • Programming board
  • programming cable
  • 12V DC battery or adaptor
  • max232 IC
  • 16*2 LCD
  • GPS module
  • Pot 10k
  • 12 MHz crystal
  • Electrolytic capacitors – 1uF (4), 10u
  • Ceramic capacitors – 33pF (2)
  • Resistor – 10k

Circuit Design:

The data pins of the LCD (liquid crystal display) are linked to the controller’s PORT2, while the control pins RS, RW, and EN are attached to P1.0, P1.1, and P1.2, respectively. On the LCD, the location’s latitude and longitude are displayed. The contrast of the LCD is adjusted with pot RV1. The GPS module’s reception pin is linked to the 13th pin of the max232 IC, while the GND pin is grounded. The RXD pin of the controller is connected to the 12th pin of the max232. For level conversion, a max232 IC is employed.

The GPS receiver uses the RS232 protocol to continuously transmit data in accordance with NMEA specifications. The LATITUDE and LONGITUDE values of location are available in GPRMC sentences in this NMEA format. LATITUDE and LONGITUDE data are taken from NMEA format and shown on LCD in this project.

We must serially accept data from the GPS module to the controller using the UART protocol, then extract the latitude and longitude values from the received messages and display them on the LCD.

Extraction of Latitude and Longitude values from NMEA Format:

The first six characters received from the GPS module are compared to the string $GPRMC; if they match, the operation continues; otherwise, the process repeats. If the string matches, wait until you see two 2 commas; the following character shows whether or not the GPS is turned on. If this character is A, GPS is enabled; else, GPS is disabled. Wait until you get comma again (,). The LATITUDE is indicated by the next nine characters. Wait until you see two more commas (,) before continuing. The next 10 characters are the LONGITUDE.

Trimble studio software can be used to examine the location’s latitude and longitude values without requiring any coding. When you connect a GPS module to this software, it automatically delivers latitude, longitude, altitude, speed, time, and date. It also shows your location on Google Maps.

The LATITUDE and LONGITUDE data are extracted from the NMEA format using the function below.

void gps ()

{

unsigned int LAT[9], LON[10];

unsigned char Temp, i;

if (rx_data() == ‘$’)

{

if( rx_data() == ‘G’)

{

if (rx_data() == ‘P’)

{

if (rx_data() == ‘R’)

{

if (rx_data() == ‘M’)

{

if (rx_data() == ‘C’)

{

while (rx_data() != ‘,’);

while (rx_data() != ‘,’);

/*checking for “A” condition*/

Temp = rx_data();

if (Temp == ‘A’||Temp == ‘V’)

{

while (rx_data() != ‘,’);

/*latitude values*/

LCDCmd (0x80);

for (i=0; i<9; i++)

{

LAT[i] = rx_data();

LCDData (LAT[i]);

}

while (rx_data() != ‘,’);

while (rx_data() != ‘,’);

/*longitude values*/

LCDCmd (0xc0);

for (i=0; i<10; i++)

{

LON[i] = rx_data();

LCDData (LON[i]);

}

}

}}}}}}

}

Circuit Simulation Video:

How to Operate?

  1. Burn the software to the 8051 microcontroller first.
  2. Make the connections as shown in the circuit diagram.
  3. Using an adaptor, provide power to the GPS module.
  4. Connect the GPS module to the computer and use the hyper terminal to check the messages you’ve received.
  5. Check to see if the GPS is on or not.
  6. When you connect the GPS to the circuit, the LCD will display the latitude and longitude readings.
  7. Turn off the circuit and the GPS module’s power.

Project Output Video:

Circuit Applications:

  • This system is used in marine navigation, car navigation and fleet management
  • Used in tracking devices and mapping devices
  • Used in personal positioning
  • This project is used in embedded system applications to find out the location.
Tags

Related Articles

Leave a Reply

Your email address will not be published.

Check Also
Close
Back to top button
Close
Close