Thursday, 15 August 2013

GPS interfacing with PIC micrconroller using Fastrax UP501 (Code + Schematic)

This post will provide a practical example of how to interface GPS receiver with 16Bit PIC Microcontrollers. This time I am using Fastrax UP501R from Finland based company. Now it is acquire by Swiss based company U-blox. This module is incredible with built-in chargeable battery last for 4 hours of backup, with small form factor and also has onboard antenna. Fast in tracking satellites as compares to Holux M-89.

You may download code and Proteus Simulation from the download section at the bottom of this post. I am using MPLAB X IDE, C30 Compiler and Proteus Simulation on v8.0. This code is written in C Language and will work on PIC24, DsPIC33 and DsPIC30 (16bit microcontroller) by slightly changing the code.

This post is an addition to my previous post of How to interface GPS receiver (Holux M-89) please visit it before proceeding further. In this post I show a new GPS module that is really fast in tracking satellites and much smaller in size as shown in figure 1. Plus in this post I port the same code written for PIC24 into my DsPIC33FJ I/O board with two small changes.

1)      This module has default baudrate 9600bps. So I change the baudrate for my in-built Uart1 module.
2)      As baudrate is increased so timing was critical so I rearrange the position of displaying strings on LCD you may compare the two codes nothing is written new in this code.

Figure 1. Fastrax UP501R with embedded Antenna. 

As my previous module Holux has max update rate of 4Hz but this module can be configured to update at 10Hz which is good not best, for use with UAV (Unmanned Aerial Vehicle) or UGV (Unmanned ground vehicle). You may order it from Mouser.

Experimental Setup and circuit:
As I am using UP501R GPS module where R stands for RS232 compatible interface so one RS232 to CMOS 3.3VDC IC must be required. Here I used ADM211EARS form analog devices for this purpose following figure 2 shows ADM211.

Figure 2. ADM211EARS RS232 level IC.
Now the circuit is very simple the TX coming from GPS modules passes through the interface converter (ADM211EARs) and enters into RXD pin of DsPIC33. Which is connected to LCD on PortD. As this controller is working on 3.3VDC so I used 3.3VDC to 5.0VDC level shifters you may visit bidirectional level shifters for its help and usage. The Basic I/O board is shown in flowing figure 3.

Figure 3. DsPIC33FJ256GP710 I/O board.

In the following figure 4. We have some GPS data on LCD. So in first line I have UTC time then we have Latitude data and a longitude data and then fix value 0 for invalid and 1 for fixed location and at the end we have no. of satellites being tracked down by GPS receiver.

Figure 4. GPS data displayed on LCD.

As I was in my room when I took these pictures so this GPS data has 10m diameter accuracy. Because as mentioned in my previous post the signals coming from satellites has few attoWatt power so LOS (Line OF Sight) is good for accurate results. So when you plot these coordinates on Maps you get like this what I got as shown in figure 5.

Figure 5. GPS Coordinates plotted.

For having a clear picture of experimental setup please watch this video.

You can download Code (MPLAB X and C30 compiler) and Proteus (v8) Simulation. Click here
Reading Suggestions:

·         Over Voltage Protection
·         AC Voltmeter RMS + Peak voltage 

For all topics Click here:
That’s all for this post hope you will learn please comment if you have any questions for upcoming posts please subscribe or follow.
All the text and graphics contained on this blog belongs to owner except otherwise mentioned. Other parties' trademarks and service marks that may be referred to herein are the property of their respective owners. Reproducing or distributing text and graphics on your own site is strictly not allowed without proper linking to original content and before publishing that you should ask for permission. 
© Copyright 2013 IbrahimLabs. All rights reserved.

Getting started with Arduino coding. (A beginner’s quick guide)

Welcome to my first Arduino coding guide. This would take you to kickstart with Arduino boards. I would go through following things real...