Simple Digital GPS Speedometer Using PIC16F877A with LCD Display

Speedometer is a speed measuring gauge used to calculate the speed of motor vehicles. They are mainly of two types- electronics and mechanical. Digital speedometer measures the speed and mileage in vehicles. Normally both types work on the principle of electromagnetism, however they have a disadvantage that they cannot be used if there are no wheels on the moving object. Here I am introducing a simple digital GPS speedometer using PIC16F877A with LCD display. This GPS speed meter provides the location, speed or other information of the moving objects based on GPS coordinates. The advantage of digital speedometer with GPS is that it can be placed easily anywhere on moving objects such as vehicles, running men, flying helicopter, aircraft, boats or ships. This system has an LCD Display which is used for monitoring the speed or any other information.

Also Read: Interfacing GPS Receiver with 8051 Microcontroller

Using GPS as a speedometer, you can monitor much more information like speed, time, position, satellite in use, no of satellite, satellite ID number and SNR (Signal to Noise ratio). The NMEA message from GPS gives the necessary information, since NMEA sends a line of data based on the GPS coordinates.

Circuit Diagram for GPS Speedometer Using PIC 16F877A Microcontroller

image of digital GPS Speedometer using PIC16F877A LCD Display

Components Required

  1. PIC16F877A
  2. GPS Module
  3. LCD 2×16
  4. Crystal (20MHz)
  5. Capacitor (22PFx2, 10uF)
  6. Resistor (1K)
  7. POT (10K)
  8. Power Supply

Working of Simple Digital Speedometer Using PIC 16F877A

  • As seen in the circuit diagram, our small GPS digital speedometer requires both 5 V and 12 V power supplies. This is because GPS module needs 12 V and other components require 5 V only.We can generate both these voltages from a single power supply circuit, so 12 V is enough for doing the GPS speed meter project with PIC 16F877A.
  • When power is supplied, GPS is turned ON and gets started to work.
  • GPS module continuously gives NMEA sentences based on the GPS coordinates. NMEA sentences from the GPS signal include time, position, GPS receiver operating mode, active satellites used, number of GPS satellites in view, satellite ID number, SNR (signal to noise ratio) values, azimuth values, elevation, position, date, time and speed of the GPS system with speedometer.
  • Every NMEA lines start with a dollar symbol ‘$’ which indicates starting of sentences. Every first sentence of GPS information will contain $GPXXX, which indicate global positioning system fixed values for the GPS system.
  • The information content for each NMEA sentence is shown in the table given below.GPS NMEA sentences
  • I took the VTG sentence for the digital speedometer, because it contains the speed information relative to the ground.
  • The given table below describes the values in the VTG sentence from the GPS system.
    image of GPVTG data information table
  • In GPS module by default you will not get $GPVTG, you have to enable it by using SiRFDemo software. If you want to know how to enable VTG value, Insha Allah we will try to publish an article on that in the future.
  • After enabling VTG sentence, the GPS system will start giving values continuously. To get the optimum values for the GPS module we have to filter these sentence values.
  • We only need the sentence starting with $GPVTG here, so I have filtered sentences starting with $GPVTG from the GPS module.
  • I have used PIC 16F877A for receiving the filtered values and LCD2x16 for displaying the values.
  • An infinite loop which continuously checks for receiving ‘$’ is programmed in the coding side. After receiving the data correctly, controller then checks for the order ‘G’, ‘P’, ‘V’, ‘T’, ‘G’ respectively.
  • Each character is separated by commas in coding as shown above. A ‘for loop’ is programmed for receiving 7 commas (‘,’) continuously, so the controller waits to receive it.
  • After the 7 commas, an infinite loop is used to get the speed in km/hr unit. After collecting the sentences it is stored into a buffer and an LCD display is used for displaying the results.

These are the techniques I have used in designing this simple digital speedometer using PIC 16F877A.

Hi-Tech C Program

We charge a reasonable amount for the codes as our program developers are spending their precious time for the best results. As an offer we are providing .HEX file absolutely free! Visit our program store now to purchase the code.

4 thoughts on “Simple Digital GPS Speedometer Using PIC16F877A with LCD Display

Leave a Reply

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