Texas Instruments | GPS Tracking Using Sub-1GHz Devices | Application notes | Texas Instruments GPS Tracking Using Sub-1GHz Devices Application notes

Texas Instruments GPS Tracking Using Sub-1GHz Devices Application notes
Application Report
SWRA584 – November 2017
GPS Tracking Using Sub-1GHz Devices
Andres Blanco and Skyler Schmidt
ABSTRACT
This application report offers a ready-made solution for GPS tracking with CC13xx devices, and includes a
Python script that will plot data points onto Google® Maps. This application can be used for various device
tracking or range testing and evaluation.
1
2
3
4
5
Contents
Introduction ................................................................................................................... 2
System Description .......................................................................................................... 2
Hardware...................................................................................................................... 2
Software ....................................................................................................................... 5
Range Test .................................................................................................................. 12
List of Figures
1
System Block Diagram ...................................................................................................... 2
2
Block Diagram................................................................................................................ 3
3
UART TX/RX Removal ...................................................................................................... 3
4
Method 1: Jumper Cable
5
Method 2: Solder Pins
6
7
8
9
10
11
12
13
14
15
16
17
................................................................................................... 3
...................................................................................................... 3
CC1310 RXD Pin Removal ................................................................................................. 5
Collector/Concentrator Software Diagram ................................................................................ 6
Sensor/Node Software Diagram ........................................................................................... 6
Software Flowchart .......................................................................................................... 7
CCS Apply Patch ............................................................................................................ 8
Project Properties ............................................................................................................ 9
Apply Predefined Symbols ................................................................................................ 10
Python Script GUI .......................................................................................................... 11
Create CSV File ............................................................................................................ 11
Google Maps GUI .......................................................................................................... 12
Range Test Results #1 (Colors respresent RSSI) ..................................................................... 13
Range Test Results #2 (Colors respresent RSSI) ..................................................................... 14
Trademarks
Code Composer Studio is a trademark of Texas Instruments.
Bluetooth is a registered trademark of Bluetooth SIG, Inc.
Chrome is a trademark of Google Inc.
Google is a registered trademark of Google Inc.
Wi-Fi is a trademark of Wi-Fi Alliance.
ZigBee is a registered trademark of ZigBee Alliance.
All other trademarks are the property of their respective owners.
SWRA584 – November 2017
Submit Documentation Feedback
GPS Tracking Using Sub-1GHz Devices
Copyright © 2017, Texas Instruments Incorporated
1
Introduction
1
www.ti.com
Introduction
Sub 1 GHz wireless radio microcontrollers are becoming a popular choice for many applications
worldwide. These devices work on the ISM spectrum bands below 1 GHz, typically in the 769 MHz to 935
MHz, 315 Mhz and the 468 Mhz frequency range, and with the emerging IoT market moving into industrial
applications, Sub 1 GHz wireless radio communication are becoming the standard for these applications
due to three main reasons:
• Range: Sub 1GHz offers better range than other bands such as 2.4GHz. If range is an important factor
to take into consideration when designing your application, then Sub 1GHz is the better choice to
transmit your data since it can offer about 2 times more range than 2.4 GHz. If your application can
handle a lower data rate, Sub 1 GHz has a Long Range Mode that will let you do up to 100km in
range.
• Low Power: Sub 1 GHz requires less power signal from the transceiver compared to other higher
frequency bands. Since the device’s have a peak power consumption of up to 5.5 mA in Rx mode,
22.6 mA in Tx, and as little as 0.6 µA in standby or sleep mode, the devices are perfect for battery
operated end products that can run up to 10 years on a single battery.
• Interference: Most of today’s most popular wireless equipment operates in the 2.4 GHz band; this
includes Wi-Fi ™ routers, Bluetooth®, ZigBee®, and other proprietary protocols. This means that by
operating in the Sub 1 GHz band will help you avoid problems associated with high traffic bands such
as: collisions, slower throughput, and data corruptions.
Long range sensors for tracking and monitoring are becoming one of the most popular applications on the
industrial and consumer market; for this reason, range limits are a highly important specification when
deciding on a radio device. Range limits may vary depending on the environment since many variables
may affect the range such as physical objects, bodies of water, transmission lines, and so forth.
2
System Description
In this application report, the CC1310 Wireless MCU attached to a GPS module is used, running two
different communication protocols in the same Sub 1 GHz band to do range testing and compare the
results of both protocols.
The CC1310 GPS sensor node connects to the Collector/Concentrator CC1310 using one of the two
wireless protocols provided: TI 15.4 Stack or EasyLink. Then, the GPS coordinates are sent in one second
intervals. When the Collector/Concentrator CC1310 receives the data, it sends the data through UART to
a PC running a python script that collects this data and saves it in a csv file and JSON array. The JSON
array is then read by the html page provided and plots the points in a map dynamically.
PC
gpsdata.jps
Sensor / Node
+
GPS
Sub 1GHz
UART
Collector /
Concentrator
.html with
Google API
Python Script
.csv file
Copyright © 2017, Texas Instruments Incorporated
Figure 1. System Block Diagram
3
Hardware
The evaluation module (EVM) is attached directly to the CC1310 Launchpad. This allows for a simpler and
more modular design/system.
2
GPS Tracking Using Sub-1GHz Devices
Copyright © 2017, Texas Instruments Incorporated
SWRA584 – November 2017
Submit Documentation Feedback
Hardware
www.ti.com
3.1
Block Diagram
Sub
1GHz
TC6000GN-EM GPS
Module
TI CC1310 MCU
UART-Rx
UART-Tx
IOD 11
PushToFix
IOD 5
NRESET
Copyright © 2017, Texas Instruments Incorporated
Figure 2. Block Diagram
3.2
Required Equipment
•
•
3.3
3.3.1
CC1310/50 Device as (TI 15.4 Stack) Collector/Concentrator or (EasyLink Wireless Network)
Sensor/Node
CC4000 GPS Module + EVM Adapter Boosterpack or GPS Module with UART interface (configurable)
Hardware Configuration
CC4000 GPS Module + EVM Adapter Boosterpack
This application code runs on the CC1310 SimpleLink Device, but can easily run on the CC1310 and
CC1350 Launchpads by changing the target configuration on Code Composer Studio™ (CCS).
A GPS module is required for the sensors/nodes for GPS positioning on a map. The default configuration
for this application uses the GPS CC4000 Module (CC400-TC6000GN) paired with the EVM Adapter
Boosterpack (BOOST-CCEMADAPTER). When using the EVM Adapter Boosterpack, it is required that
the 0 Ω resistors R4 and R5 that connect UART TX/RX from the EVM to UART TX/RX of the MCU be
removed (see Figure 3).
Figure 3. UART TX/RX Removal
Once the R4 and R5 are removed from the board, it is required to connect the RX of the EVM to the TX of
the GPS; this can be done with two methods shown with pictures below:
SWRA584 – November 2017
Submit Documentation Feedback
GPS Tracking Using Sub-1GHz Devices
Copyright © 2017, Texas Instruments Incorporated
3
Hardware
www.ti.com
Figure 4. Method 1: Jumper Cable
3.3.2
Figure 5. Method 2: Solder Pins
Generic UART GPS Module
This application also works with any GPS module as long as it uses UART to communicate with the host
(CC1310). In order to make this application work with another UART GPS Module, make sure the UARTRx Pin (DIO 2) on the LaunchPad is connected to the UART-Tx Pin on the GPS Module. The data coming
from the GPS module has to be in NMEA GGA format in order to be detected by the CC1310.
For proper operation with the Launchpad as a sensor node, the ‘RXD<<’ Jumper must be disconnected so
that the UART line from the GPS module is not connected to the debug interface.
4
GPS Tracking Using Sub-1GHz Devices
Copyright © 2017, Texas Instruments Incorporated
SWRA584 – November 2017
Submit Documentation Feedback
Software
www.ti.com
Figure 6. CC1310 RXD Pin Removal
4
Software
The TI 15.4 Stack and EasyLink example codes run as state machines waiting for events. To make these
example codes work, two modifications were necessary: We added a new event to the
Collector/Concentrator and Sensor/Note examples and added an additional task running in parallel in
charge of trigger said event. The new event is triggered when new GPS data is sent or received to or from
the GPS/PC. Below is a description of the said Event and Task.
SWRA584 – November 2017
Submit Documentation Feedback
GPS Tracking Using Sub-1GHz Devices
Copyright © 2017, Texas Instruments Incorporated
5
Software
4.1
www.ti.com
Collector/Concentrator
Main Task
Received Data
From Sensor/Node
GPS Task
ProcessSensorData()
semaphorePend()
extractDataFromPacket()
T
F
semaphorePost()
GPS_SENSOR?
Semaphore
sendGPSData()
Copyright © 2017, Texas Instruments Incorporated
Figure 7. Collector/Concentrator Software Diagram
4.2
Sensor/Node
Main Task
GPS_SENSOR
Event
GPS Task
semaphorePend()
TimeOut
readGPSModule()
ProcessSensorMsg()
gpsReport()
Semaphore
parseUARTData()
Send Data to Collector/
Concentrator
semaphorePost()
Set_GPS_SENSOR_Event()
Copyright © 2017, Texas Instruments Incorporated
Figure 8. Sensor/Node Software Diagram
6
GPS Tracking Using Sub-1GHz Devices
Copyright © 2017, Texas Instruments Incorporated
SWRA584 – November 2017
Submit Documentation Feedback
Software
www.ti.com
4.3
PC Application
Start GUI
Init State Variables
Open CSV Button
Pressed
Stop Button Pressed
Open CSV
Start Button Pressed
No
GPSStayOn
Erase and
create new js
Yes
GPSStayOn
Yes
Main Loop
No
Clear
GPSStayOn
File Does
Not Exhist
New GPS Data
File Exist
Ask to save CSV
No
Open HTML in
Browser
Yes
Erase and create
new CSV
Overwrite
Open Uart
Overwrite
or
Append
Format Data
Append
Append CSV
Erase and create
new js
Append js
Open HTML in
Browser
SET GPSStayOn
Copyright © 2017, Texas Instruments Incorporated
Figure 9. Software Flowchart
4.4
Software Configuration
The software required for this application to work is based on two software examples in the CC13x0 SDK.
These examples are:
• TI 15.4 Stack (Sensor and Collector)
• EasyLink Wireless Sensor Network (Node and Concentrator)
This provides the flexibility of using either communication protocol.
Since the software is based on SDK examples, the necessary patch files to run this application are
provided. You only need to apply a patch once the projects are imported. Section 4.5 provides a more
detailed description on how to run each demo.
SWRA584 – November 2017
Submit Documentation Feedback
GPS Tracking Using Sub-1GHz Devices
Copyright © 2017, Texas Instruments Incorporated
7
Software
4.5
www.ti.com
Patch
1. Download or clone the necessary files from https://git.ti.com/gps-tracking-using-sub-1ghz/gps-trackingusing-sub-1ghz. Once the files are located on your PC, open CCS and import one of the following
examples:
a. TI 15.4 Stack (Sensor and Collector)
b. EasyLink Wireless Sensor Network (Node and Concentrator)
2. Import the .patch files included on the downloaded or cloned contents. This is done by right-clicking the
project, selecting Team → Apply Patch… and selecting the corresponding patch file (for example, if
applying the patch to Collector example use collector.patch). This patch will edit the existing files and
add new files for GPS operation.
Figure 10. CCS Apply Patch
8
GPS Tracking Using Sub-1GHz Devices
Copyright © 2017, Texas Instruments Incorporated
SWRA584 – November 2017
Submit Documentation Feedback
Software
www.ti.com
3. In these projects, you must include GPS_SENSOR as a predefined symbol in the TI Stack projects,
and GPS in the WSN projects. In the WSN projects, you can also define CC1310_CC1190_LP if using
the high gain mode with a CC1310-CC1190 Launchpad. This is done by right clicking on the project,
selecting Properties → Build → ARM Compiler → Predefined Symbols and adding new symbols by
pressing the add button on the top right corner.
Figure 11. Project Properties
SWRA584 – November 2017
Submit Documentation Feedback
GPS Tracking Using Sub-1GHz Devices
Copyright © 2017, Texas Instruments Incorporated
9
Software
www.ti.com
Figure 12. Apply Predefined Symbols
4. Once done, connect your CC3XX build and compile.
4.6
Running the PC Software
You need the following to run the PC application:
• Python 3
• Py Serial installed on your computer
Once these two software have been installed on your PC and the Collector/Concentrator and
Sensor/Node CC1310 boards flashed:
1. Open a command line console and go to the directory where you saved the provided software; type in
“python gps_tracker_gui_v1.0.py” and a graphical user interface (GUI) should pop up.
10
GPS Tracking Using Sub-1GHz Devices
Copyright © 2017, Texas Instruments Incorporated
SWRA584 – November 2017
Submit Documentation Feedback
Software
www.ti.com
Figure 13. Python Script GUI
2. If your collector is already plugged in, you should be able to see it as COMxxx in the dropdown menu.
Select your device from the dropdown menu and press start, this prompts you to create or choose
where to save the .csv file, make sure you use the “/csv” folder in the directory.
Figure 14. Create CSV File
SWRA584 – November 2017
Submit Documentation Feedback
GPS Tracking Using Sub-1GHz Devices
Copyright © 2017, Texas Instruments Incorporated
11
Range Test
www.ti.com
3. Once the .csv file has been setup, an html page should automatically open in your default browser (the
Chrome™ browser is recommended) and start plotting data as soon as the Sensor/Node joins in the
Collector/Concentrator network and sends GPS coordinates.
Figure 15. Google Maps GUI
5
Range Test
5.1
Overview
The purpose of the development of the software described in this document is to provide a way to easily
test range using our Sub 1 GHz wireless MCU. For this test, both a CC1310 with on board antenna and
with external antenna + PA were used. Section 5.1.1 and Section 5.1.2 lists an overview of the tests
performed.
5.1.1
Test 1
Location:
– Outdoor Test in dense neighborhood area
• Hardware:
– CC1310 at 14dBm (as Collector/Concentrator)
• EasyLink
• SimpleLink Long Range Mode 5kbps
– CC1310 + CC1190 at 26dBm (as Sensor/Node)
• EasyLink
• SimpleLink Long Range Mode 5kbps
•
12
GPS Tracking Using Sub-1GHz Devices
Copyright © 2017, Texas Instruments Incorporated
SWRA584 – November 2017
Submit Documentation Feedback
Range Test
www.ti.com
5.1.2
Test 2
Location:
– Outdoor Test with less interference
• Hardware:
– CC1310 at 14dBm (as Collector/Concentrator)
• EasyLink
• SimpleLink Long Range Mode 5kbps
– CC1310 + CC1190 at 26dBm (as Sensor/Node)
• EasyLink
• SimpleLink Long Range Mode 5kbps
•
5.2
5.2.1
Results
Test 1
Figure 16. Range Test Results #1 (Colors respresent RSSI)
CC1310-CC1190 Range: 0.61 mi (0.99 km)
CC1310 Range: 0.20 mi (0.32 km)
SWRA584 – November 2017
Submit Documentation Feedback
GPS Tracking Using Sub-1GHz Devices
Copyright © 2017, Texas Instruments Incorporated
13
Range Test
5.2.2
www.ti.com
Test 2
Figure 17. Range Test Results #2 (Colors respresent RSSI)
CC1310-1190 Range: 2.34 mi (3.77 km)
14
GPS Tracking Using Sub-1GHz Devices
Copyright © 2017, Texas Instruments Incorporated
SWRA584 – November 2017
Submit Documentation Feedback
IMPORTANT NOTICE FOR TI DESIGN INFORMATION AND RESOURCES
Texas Instruments Incorporated (‘TI”) technical, application or other design advice, services or information, including, but not limited to,
reference designs and materials relating to evaluation modules, (collectively, “TI Resources”) are intended to assist designers who are
developing applications that incorporate TI products; by downloading, accessing or using any particular TI Resource in any way, you
(individually or, if you are acting on behalf of a company, your company) agree to use it solely for this purpose and subject to the terms of
this Notice.
TI’s provision of TI Resources does not expand or otherwise alter TI’s applicable published warranties or warranty disclaimers for TI
products, and no additional obligations or liabilities arise from TI providing such TI Resources. TI reserves the right to make corrections,
enhancements, improvements and other changes to its TI Resources.
You understand and agree that you remain responsible for using your independent analysis, evaluation and judgment in designing your
applications and that you have full and exclusive responsibility to assure the safety of your applications and compliance of your applications
(and of all TI products used in or for your applications) with all applicable regulations, laws and other applicable requirements. You
represent that, with respect to your applications, you have all the necessary expertise to create and implement safeguards that (1)
anticipate dangerous consequences of failures, (2) monitor failures and their consequences, and (3) lessen the likelihood of failures that
might cause harm and take appropriate actions. You agree that prior to using or distributing any applications that include TI products, you
will thoroughly test such applications and the functionality of such TI products as used in such applications. TI has not conducted any
testing other than that specifically described in the published documentation for a particular TI Resource.
You are authorized to use, copy and modify any individual TI Resource only in connection with the development of applications that include
the TI product(s) identified in such TI Resource. NO OTHER LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE TO
ANY OTHER TI INTELLECTUAL PROPERTY RIGHT, AND NO LICENSE TO ANY TECHNOLOGY OR INTELLECTUAL PROPERTY
RIGHT OF TI OR ANY THIRD PARTY IS GRANTED HEREIN, including but not limited to any patent right, copyright, mask work right, or
other intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information
regarding or referencing third-party products or services does not constitute a license to use such products or services, or a warranty or
endorsement thereof. Use of TI Resources may require a license from a third party under the patents or other intellectual property of the
third party, or a license from TI under the patents or other intellectual property of TI.
TI RESOURCES ARE PROVIDED “AS IS” AND WITH ALL FAULTS. TI DISCLAIMS ALL OTHER WARRANTIES OR
REPRESENTATIONS, EXPRESS OR IMPLIED, REGARDING TI RESOURCES OR USE THEREOF, INCLUDING BUT NOT LIMITED TO
ACCURACY OR COMPLETENESS, TITLE, ANY EPIDEMIC FAILURE WARRANTY AND ANY IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL
PROPERTY RIGHTS.
TI SHALL NOT BE LIABLE FOR AND SHALL NOT DEFEND OR INDEMNIFY YOU AGAINST ANY CLAIM, INCLUDING BUT NOT
LIMITED TO ANY INFRINGEMENT CLAIM THAT RELATES TO OR IS BASED ON ANY COMBINATION OF PRODUCTS EVEN IF
DESCRIBED IN TI RESOURCES OR OTHERWISE. IN NO EVENT SHALL TI BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL,
COLLATERAL, INDIRECT, PUNITIVE, INCIDENTAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES IN CONNECTION WITH OR
ARISING OUT OF TI RESOURCES OR USE THEREOF, AND REGARDLESS OF WHETHER TI HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
You agree to fully indemnify TI and its representatives against any damages, costs, losses, and/or liabilities arising out of your noncompliance with the terms and provisions of this Notice.
This Notice applies to TI Resources. Additional terms apply to the use and purchase of certain types of materials, TI products and services.
These include; without limitation, TI’s standard terms for semiconductor products http://www.ti.com/sc/docs/stdterms.htm), evaluation
modules, and samples (http://www.ti.com/sc/docs/sampterms.htm).
Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265
Copyright © 2017, Texas Instruments Incorporated
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising