Thursday, March 28, 2024

PC-Based GPS Receiver

By Lalit Prakash Vatsal

Today, there are many gadgets available with GPS technology. GPS stands for ‘global positioning system.’ It provides the data corresponding to the position of the GPS receiver itself on international-standard latitude-longitude basis, in addition to the standard coordinated universal time (UTC), along with some more information received from the nearest satellite assigned for this purpose. (UTC is the primary time standard by which the world regulates clocks and time.)

Presented here is a PC-based GPS receiver that lets you find the location of a place and also gives the standard time on your PC. It may be useful in remote areas where no other wireless network for mobile and the Internet is available. The GPS receiver is also useful for research and other sophisticated applications.

Circuit description

The system consists of a PC, a GPS receiver that collects data from the satellite and an interfacing circuit to send the data to the PC through the serial port.

Fig. 1: Block diagram of pc-based gps receiver
Fig. 1: Block diagram of pc-based gps receiver
Fig. 2: Circuit of pc-based gps receiver
Fig. 2: Circuit of pc-based gps receiver
Fig. 3: GPS module
Fig. 3: GPS module

The only circuitry involved is the serial connection between the PC and the GPS module. The block diagram of the PC-based GPS receiver is shown in Fig. 1. All you need is a serial cable, a MAX232 driver circuit and power supply. The complete circuit is shown in Fig. 2. The system requires 5V as well as 3.3V DC supplies—5V for the MAX232 and 3.3V for the GPS module.

GPS module

We have used the iWave GPS module (refer Fig. 3) with external antenna. This module requires 3.3V DC supply.

- Advertisement -

The basic working of the system is based upon decoding of the NMEA protocol. The iWave GPS module uses the NMEA-0183, which is a subset of the NMEA protocol. This protocol includes a set of messages which use ASCII character set and have a defined format. These messages are continuously sent by the GPS module to the interfacing device. Each message starts with a ‘$’ (hex 0x24) and ends with (hex 0x0D 0x0A).

These messages include GGA, GGL, GSA, GSV, RMC, VTG and ZDA. Here you need not know about all of these messages. You need only the GGA message string which represents the time, position and fixed data for this application. This string has a format like:

$GPGGA, 002153.000, 3342.6618, N, 11751.3858, W, 1.2, 27.0, M, -34.2, M,, 0000*5E

- Advertisement -

where each field separated by comma (,) represents a particular information. We have used only five of these fields for our purpose of displaying the time, latitude, latitude-direction, longitude and longitude-direction, which are second, third, fifth, fourth and sixth fields, respectively.

A5A_partsSoftware

The position conversion software has been developed using a high-level programming language. It’s basically a .NET desktop (Windows Form) application customised such that it can run on any PC having .NET framework 3.5 or higher version. The code is written in C# .NET language and compiled on the .NET platform on Microsoft Visual Studio 2010. The screenshot of the program output is shown in Fig. 4.

Fig. 4: Program output of the PC-based GPS receiver
Fig. 4: Program output of the PC-based GPS receiver

The GPS receiver receives the latitudinal and longitudinal data from the satellite. This data provides you the exact position of the receiver on the Earth’s surface in real time. With the latitude and longitude information, you can view the location from the standard map. The latitude and longitude data obtained can also be entered into any freely available software such as itouchmap available from http://itouchmap.com/latlong.html, where you can view the exact point of the location on earth. You can also get the map from www.mapsofworld.com/lat_long/india-lat-long.html

Construction and testing

An actual-size, single-side PCB layout of the PC-based GPS receiver is shown in Fig. 5 and its component layout in Fig. 6.

Fig. 5: An actual-size, single-side PCB for the PC-based GPS receiver
Fig. 5: A single-side PCB for the PC-based GPS receiver
Fig. 6: Component layout for the PCB
Fig. 6: Component layout for the PCB

Download PCB and Component Layout PDFs: click here

Download Source Code: click here

This part is relatively simpler and user-friendly as the software gives all the steps needed to be performed on its simple user-interface. When you connect the 9V adaptor to the circuit, LED1 glows to indicate the presence of power supply in the circuit. Wait for some time, say, 5 to 10 minutes, for initialisation of the GPS module. After the initialisation, you can run the software to start receiving the data.

The steps are as follows:

  1. Open the executable (.exe) file created right after the compilation of the C# code. A ‘GPS Display’ window appears on the screen (refer Fig. 4).
  2. Select the serial COM port by clicking the arrow.
  3. Choose COM port to which you have connected your GPS module from the drop-down menu.

If everything’s fine, you will receive the latitude and longitude right on your PC screen. Otherwise, switch off and switch on the circuit again, wait for some time and repeat the above steps.

Once you have the coordinates on your screen, you can pick up a world map and locate the place yourself. In case you want to see the exact standard time, refer to the time obtained in this application, which entirely depends on satellite navigation.


The author is in the third year of integrated dual-degree course in electronics and communication engineering at IIT, Roorkee.

The article was first published on 26 October 2015 and was updated on 28 April 2020.

SHARE YOUR THOUGHTS & COMMENTS

Electronics News

Truly Innovative Tech

MOst Popular Videos

Electronics Components

Calculators