Introduction: How to Simulate GPS Module in Proteus

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


Step 1: Extracting Necessary Files and Libraries

I am assuming that you already have the Arduino library installed 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

  • 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

Step 2: Proteus Simulation

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.
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".  And that's it! You are all set. When you run the simulation, you should see something like this on your screen.

Step 3: Final Simulation and Code

When you run the simulation, you should see something like this on your screen.

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

Click here to see the code used to run the simulation and download all the resources and files you need for the project.

You can Buy Your Arduino or GPS Module from Amazon if you need components for this tutorial.

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

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

For more tutorials, please visit our website

Cheers

Comments

About This Instructable

5,711views

13favorites

License:

Bio: Current City is the place where you learn and have fun with electronics and Arduino. Get free tutorials and projects in Arduino and electronics complete ... More »
More by currentcitycc:How to simulate GPS Module In ProteusHow to Connect Liquid Crystal Display(LCD) to ArduinoObstacle Avoider Using HC-SR04 Ultrasonic Sensor
Add instructable to: