SKM53 GPS Starter Kit, SKGPS-53
The SKM53 GPS module Starter Kit (SKGPS-53) as shown in Figure 1 is a special designed starter kit which offer convenient yet safer GPS module for user. Thus, it is designed with SKM53 GPS module which is an ultra high sensitivity and smart antenna GPS module. By referring to the SKM53 datasheet, it is embedded with GPS (Global Positioning System) antenna which enables high performance navigation in most stringent applications and solid fix even in harsh GPS visibility environments. In addition, it is based on the high performance features of the MediaTek 3329 single-chip architecture, its -165dBm tracking sensitivity extends positioning coverage into place like urban canyons and dense foliage environment where the GPS was not possible before. Therefore, there are some main applications of SKGPS-53 such as Location Based Service (LBS), vehicle navigation system, Portable Navigation Device (PND), timing applications and so forth.
Figure 1: SKGPS-53 Overview
Basically, SKGPS-53 will send the data continuously either in indoor or outdoor as long as it is power up but we can only read the correct data when the SKGPS-53 expose to the sky. Normally, we can check two main data from the GPS module, i.e. the current date and time based on Coordinated Universal Time (UTC) and our current position coordinate in terms of latitude and longitude. Thus, we can either interface with laptop/PC to view these data through specific software or interface with PIC and LCD to display the these data. Therefore, I will explain them in two separate sections in this tutorial. Let’s start now!
Main Hardware list:
Main Accessories list:
(v) Soldering Equipments (EQ-SLD936) -1
Main Software list:
(i) HyperTerminal – download from here.
(ii) MiniGPS 1.41 – download from Cytron product page here.
(iii) GPS Trace – download from Cytron product page here.
(iv) USB driver for UC00A- download from Cytron product page here.
(v) MPLAB IDE V8.86 – download from here.
(vi) HI-TECH C Compiler for PIC10/12/16 (MCUs) – download V9.83 from here.
(vii) PICKit2 V2.61 – download from Cytron product page here.
First of all, we need to solder the male header pin onto the UART extended connectors of SKGPS-53 as shown in Figure 2 so that we able to connect it with another devices such as UC00A or PIC using jumper wires or female header socket.
Figure 2: Male header pins that was soldered on extended connectors of SKGPS-53
After that, it’s the time for us to start using the SKGPS-53 to do something. Thus, in the following, there will be two separate sections which explain how to display data on our laptop/PC and then display on LCD with PIC16F628.
Section 1: Interface SKGPS-53 with laptop/PC using USB to UART Converter
PART I: Introduction
Easily, if we have a laptop/PC and a USB to UART Converter such as UC00A, we can actually read the data that send by GPS module from the laptop/PC using UC00A since the SKGPS-53 is operated using UART interface. To do this, we simply need an appropriate software such as HyperTerminal, MiniGPS, or GPS Trace to be installed in our laptop/PC to view the GPS data that received by UC00A. But, these data are based on NMEA (National Marine Electronics Association) protocol standard format. Therefore, we have to know how to analyse it in order to obtain the current UTC time, date, latitude, longitude and so on from it. But, before that, I will explain first how to connect SKGPS-53 to UC00A and PC/laptop and the important things that should be made for these software.
PART II: Connection Guidelines
Basically, we need only to connect 4 jumper wires between UC00A and SKGPS-53. Thus, the table below shows the connection summary:
|SKGPS-53 side||UC00A side|
|5V||+ (refer to Vcc)|
|GND||- (refer to Gnd)|
Here are the connection diagram as shown in Figure 3:
Figure 3: Connection diagram between UC00A with SKGPS-53
*Note: Please use Female-to-Female Jumper Wires to connect them.
PART III: Procedures
Step 1: USB Driver Installation for UC00A
After we finished the connection as shown in Figure 3, we then connect the UC00A to the USB port of our laptop/PC. Now, we need to install an USB driver to make the UC00A works on laptop/PC. To know how to install the USB driver, please refer to the following guides for further information:
*Note: For those who already installed this USB driver before, please proceed to the next part. If not, please make sure the USB driver is properly installed in your laptop/PC before proceed to the next part.
Step 2: Identify the COM Port Number for UC00A
After we have successfully install the USB driver, we need to check the COM port number that is connected to UC00A. Thus, we need to go Device Manager to check the COM port number under USB serial port as shown in the example below:
Figure 4: UC00A appear as USB Serial Port in Device Manager (COM14 in this case)
As an example, the COM port number of USB serial port as shown in Figure 4 is COM14.
*Note: To go Device Manager, there are a few ways, but for me, I just click the “Start” button, then type “Device Manager” in search bar to find and enter into it.
Step 3: Set-up the Software for GPS Module
There are several software we can use to read data from SKGPS-53, but in this tutorial, I will only explain three software that I have used before, i.e. HyperTerminal software, MiniGPS software and GPS Trace software. Therefore, we need to set-up these software first before we connect into it. Thus, we need to choose the correct COM port number as identified from Step 2 to connect. Apart from that, since the modules default baud rate is 9600 bps, then we need to configure these software to operate in 9600 bps also.
Now, I will briefly explain how to set-up for these three software in the following:
(A) HyperTerminal software
Instruction: Double click the “hypertrm.exe” to begin. Next, please refer to the following to set-up the Hyperterminal:
Figure 5: Connection Description Window
Figure 6: Connection setting Window
Figure 7: COM port properties Window
(B) MiniGPS V1.41 software
Instruction: Double click the “MiniGPS_1.41.exe” to begin. Next, please refer to the following to set-up the MiniGPS 1.41:
Figure 8: Mini GPS status window for properties
(C) GPS Trace software
Instruction: Double click the “Setup.exe” to install the GPS Locator Utility. After the installation finished, double click the “GPS Locator Utility” to begin. Next, we need to follow the properties as below:
Figure 9: GPS Locator Utility start-up window for setting
**Important Note: We cannot SIMULTANEOUSLY open these software, meaning that we cannot open two or three of these software at the same time. Meanwhile, we can only open one of these software at a time. So, please choose one to use at a time. To change to another software, we should close the running software first before open another software.
Step 4: Analyse the data send from SKGPS-53
After we finished set-up the software, now it is the time for us to view the data send from SKGPS-53. Basically, the data is based on the NMEA-0183 (National Marine Electronics Association) protocol. Thus, it is an ASCII-based protocol which start with a $ and end with carriage return/line feed. Meanwhile, for GPS module, all of its specific messages start with $GPxxx where xxx is a three-letter identifier of the message data that follows. Also, NMEA messages have a checksum, which allows detection of corrupted data transfers. Therefore, for the SKGPS-53 module, it supports the NMEA-0183 output messages such as GGA, GLL, GSA, GSV, RMC, VTG, ZDA and DTM. Apart from that, this module has its default NMEA-0183 output setting (factory setting) which is set up only GGA, GSA ,GSV, and RMC and default baud rate is set up to 9600 bps.
The following table shows the different type of output message and its description:
|GGA||Global positioning system fixed data|
|GSA||GNSS DOP and active satellites|
|GSV||GNSS satellites in view|
|RMC||Recommended minimum specific GNSS data|
|VTG||Course over ground and ground speed|
|ZDA||Date and Time|
Thus, the following shows the example of output message of each software:
(A) HyperTerminal software
Figure 10: HyperTerminal Output Message Window
(B) MiniGPS software
Figure 11: MiniGPS Output Message Status Window
Figure 12: MiniGPS Output Message in NMEA format (bottom)
(C) GPS Trace software
Figure 13: GPS Locator Utility Output Message Window
Each of these type of NMEA output message has its own format, meaning that each output message contains different type of data. But, here I have extract some useful messages for us as shown in the following:
(i) From $GPGGA message, we actually can obtain the data of our current position’s latitude and longitude as shown in the example below:
(ii) From $GPRMC message, we can obtain the data of latitude and longitude also as shown in the example below:
(iii) From $GPGLL message (*by default it is no activated, so if we want to see it, we need to activate it using MiniGPS or GPS Trace software or send the command through HyperTerminal to active it), then we can obtain the data of latitude and longitude also from it as shown in the example below:
(iv) From $GPZDA message (*by default it is no activated, so if we want to see it, we need to activate it using MiniGPS or GPS Trace software or send the command through HyperTerminal to active it), then we can obtain the data of UTC time and date as shown in the example below:
*Note: Please refer to SKM53 datasheet for further informations about this NMEA protocol output message format.
PART IV: Additional Notes
1. To activate certain output message such as GLL and ZDA, we can use the MiniGPS or GPS Trace software to change the configuration as shown below:
Figure 14: MiniGPS setup window
Figure 15: GPS Locater Utility User Setting for interval
2. Sometime you may done some misconfiguration on SKM53 which we are no aware, here are the reset command to cold reset the SKM53 which will additionally clear system/user configurations at re-start, meaning that the the receiver will return to the factory status:
Apart from that, there are some extra commands to configure the SKM53 to operate in different baud rate as stated below:
(i) $PMTK251,4800*17<CR><LF> - change baud rate to 4800 bps
(ii) $PMTK251,9600*17<CR><LF> - change baud rate to 9600 bps
(iii) $PMTK251,14400*17<CR><LF> - change baud rate to 14400 bps
(iv) $PMTK251,19200*17<CR><LF> - change baud rate to 19200 bps
(v) $PMTK251,38400*17<CR><LF> - change baud rate to 38400 bps
*Note: <CR><LF> is refer to carriage return (CR) and line feed (LF) which is \r\n which is hex 0D 0A. It is used for terminate the message. To send it from our laptop/PC, it is simply press the ‘ENTER’ button on keyboard.
3. To send these commands, we can use HyperTerminal to send. While send the command, we should remove the jumper wires that connect the Tx pin of SKM53 so that the UC00A will not receive data from SKM53 but we remain the connection for Rx pin of SKM53 so that we can send the command from laptop/PC to it using UC00A. Then, we just type the command correctly and terminate it by press ‘ENTER’. But, by default setting of HyperTerminal, we will not see what we type on the HyperTerminal, so we need to do some setting on ASCII sending under ASCII setup to make it visible. To do it, go File->Properties->Change to Settings tab, then we continue the steps as shown below:
Figure 16: ASCII setup window in HyperTerminal
Section 2: Interface SKGPS-53 with 16×2 LCD using PIC
PART I: Introduction
In this section, I want to share some ideas to display data send from SKGPS-53 on LCD using PIC16F628A. To do this, it need more of the hardware and programming skill. As for demo purposes, I use only the SK18B which already come with some basic elements such as Donut board base, 1 push button, 1 reset button, 2 red LED, 18 pins PIC socket, ICSP programmer socket, power adapter socket, slider switch and other important components. Therefore, I can easily solder the female header socket for 16×2 LCD and SKM53 onto the Donut board of SK18B so that we can plug them into it. Here is the diagram of SK18B after soldering the female header pin and plug in:
Figure 17: Final SK18B Overview
PART II: Connection Descriptions
The followings shows the pin mapping of the connection between PIC with LCD and SKGPS-53:
Figure 18: Pin Mapping of PIC16F628A with LCD and SKGPS-53
PART III: Connection Diagram
1. Schematic Diagram (by Eagle)
Figure 19: Schematic Diagram of full connection
PART IV: Programming using MPLAB IDE
Figure 21: The completed SK18B with LCD power On
In this part, I want to explain about how we program the PIC to obtain the latitude and longitude from NMEA protocol output message. To do this, we need manipulate the programming using MPLAB IDE. Therefore, I would like share my experience about how to write these source code. Here are the summary from me:
1. First of all, we need to define the constant variable name for particular PIC ports at the beginning of the source code. Also, we need to include the important libraries that we need to used in the program.
2. Next, we need to write a special function code for LCD so that we can call it easily whenever we want to initialize the LCD, display data in char or string, clear the LCD screen, and move the LCD cursor to specific location.
3. After that, we need to write also some special functions to initialize the PIC UART, receive or send data through UART. In addition, I write a function that specially used to cold reset the SKM53 by sending the command that was discussed earlier.
4. Then, we can start to write the main program code. Meanwhile, it starts with the declaration and initialization of the ports and some register flag. After that, we write the code to process the data send from SKM53 GPS. For me, I write the code for two mode which is normal mode and reset mode. For normal mode, it need to press SW to begin and start without cold reset the SKGPS-53. Meanwhile, for reset mode, it need to press SW1 to begin and start with sending the cold reset command to SKGPS-53. Then, I will write a loop to store a piece of received data from UART into an array variable, then I will write a loop also to check the content of array one by one to compare with the each character of protocol header accordingly such as ‘$’,’G’,’P’,’G’,’G’,’A’ or ‘$’,’G’,’P’,’G’,’L’,’L’, or ‘$’,’G’,’P’,’R’,’M’,’C’. If it is matched, I will display the data of latitude and longitude by increment the array content to the correct location and store these data on the LCD.
*Note: The completed sample source code is attached at the end of this tutorial.
In a nutshell, by using SKM53 GPS module, we can actually view our current UTC time, date, latitude, longitude and so on. In further application, it can used to interface with our smartphone, microcontroller such as Arduino or PIC, and so forth to know our own location. Meanwhile, when we use it, we need to expose it to the sky to capture the stronger signal. As an example, if we in the home, we need to put the GPS module near the window to get the signal. Otherwise, we will not receive the signal by GPS antenna if we inside a closed window room.
To download the completed sample source code, please click here.