Overview

In this tutorial you are going to learn how to simulate a GPS module in Proteus interfaced to an Arduino Uno. You may be working on a project which requires you to simulate GPS data. This tutorial will teach you exactly how to do that!.

As usual all source code and files used in this tutorial can be downloaded in the Resources section at the end of this post.

Details

To run the simulation, we are going to make use of the following resources:

  • A GPS library for Proteus designed by Theengineeringprojects.com which adds a GPS module to our components library and allows us to use GPS modules in our Proteus simulations
  • The GPS Module hex file which defines how the GPS module should work and also contains dummy NMEA strings. The GPS hex file was also written by Theengineeringprojects.com and is included in the resources for this project at the bottom of the post.
  • TinyGPS library, an NMEA (GPS Data) parser (written by Mikal Hart) so that we can make sense out of the random GPS data we will be receiving from the GPS module.
  • Arduino Sketch
  • Arduino hex file

GPS-library-for-proteus

I am assuming that you already have the Arduino library installed in Proteus. If not, learn how to install the Arduino library in Proteus.

I will be using Proteus 7.8 for this tutorials and for most of my Proteus tutorials.

So here is what is going to happen:

  • The GPS module in Proteus has been designed to output some fake NMEA data. NMEA is just a format in which GPS devices output data.
  • The NMEA data from the GPS module is received by the Arduino through its hardware serial port.
  • The TinyGPS library parses the data received and “translates” it into understandable GPS data such as longitude and latitude.
  • The data is displayed on a virtual terminal inside Proteus

Extracting the GPS library for Proteus

  • Scroll to the Resources section and download the zipped file containing the GPS library, TinyGPS library and GPS Hex file.
  • Upon opening the zipped file, you’ll see a number of files. Extract the files and save them somewhere on your PC.
  • Next, extract the contents of the proteus-gps-library.zip into your Proteus library folder.
  • If you use Proteus 7, the path will be something like C:\Program Files (x86)\Labcenter Electronics\Proteus 7 Professional\LIBRARY . Note:  If your computer  runs a 64bit architecture, the your Program Files folder will rather be Program Files (x86)
  • If you use Proteus 8, the path will be something like C:\ProgramData\Labcenter (Electronics\Proteus 8 Professional\Data\LIBRARY
  • After that, extract the content of the TinyGPSNew.zip  into the Arduino libraries folder located at C:\Program Files (x86)\Arduino\libraries

 

resources-folder

A view of the files attached to this tutorial

 

Extract TinyGPS library into Arduino libraries folder

extracting-TinyGPS

Extracting TinyGPSNew into Arduino Libraries folder

extracting-proteus

 

Proteus Simulation

After extracting all files and libraries to their respective locations, open up Proteus and add Arduino Uno and GPS Module to your work space and connect them as shown in the image below.

  • TXD pin of GPS module goes to PIN0 (RXD pin of Arduino) since the GPS module will be transmitting data to Arduino
  • TXD pin of Arduino is connected to the Virtual terminal so that we can display and view GPS data in the Virtual terminal.
gpsmdule-proteus

Circuit diagram and schematic

 

Next, double-click on the GPS module. A dialog box will appear. GO to the “Program File” section, click on the little folder icon on the right, navigate to the “ProteusGPSResources” folder and select GpsTEP.hex.

Repeat the same process for the Arduino Uno but this time, select “ArduinoGPS_ino.cpp.hex”. 

loading-GPSHex

loading-arduinoHEX

 

And that’s it! You are all set. When you run the simulation, you should see something like this on your screen.

proteus-sim-1

 

The Arduino Code used as well as the Proteus file is also attached so you can modify it as you please.

Here is the code below

 

Resources

Proteus GPS Simulation Files (Zipped)

If you like this tutorial, have any questions or found any mistakes, please let us know in the comments section below.

Also please support the development of more tutorials by Buying Your Arduino or GPS Module from Amazon. I get a 4% commission if you buy anything using these links and that helps me keep this site running.

If you live in Ghana, you can buy your Arduino and GPS Module from Invent Electronics.