Back to List

IoT GPS Dog (or Reindeer) Tracker

Pete Febbraro Pete Febbraro   |  
Dec 09, 2016
With the growing popularity of the Internet of Things (IoT), more hardware components and connectivity platforms are available to developers than ever before.  It is now easier than ever to learn about hardware and create custom hardware projects.  The following is a description of a project I am working on to keep track of my dog Luna.  She is quite a rascal, fast and likes to jump fences.  I thought it would be handy to build a device that I could attach to her collar or harness that would obtain her coordinates using GPS, and then upload those coordinates to a database.  Then I could build a web site that would monitor the database and plot the incoming coordinates on a map.  With that in place, finding Luna would be as simple as logging in to the web site with my smart phone and viewing the map.   The following is a list of hardware components and software services used in this project.

Hardware components:
  • Adafruit FONA 808 - Mini Cellular GSM + GPS Breakout
  • Teensy 3.2 (ARM-based MCU board)
  • Adafruit Passive GPS Antenna uFL - 15mm x 15mm 1 dBi gain
  • Adafruit Slim Sticker-type GSM/Cellular Quad-Band Antenna - 3dBi uFL
  • Adafruit Lithium Ion Polymer Battery - 3.7v 500mAh
Software apps and online services:
  • Microsoft Azure
  • Google Maps Developer API
The Adafruit FONA is a breakout module that has GPS and cellular network functionality.  This makes it possible to get the longitude and latitude of the board and relay it using TCP/IP via the cellular connection.  For the cellular connection, a SIM card is required.  The FONA is not programmable, so we will use the Teensy MCU board to run our code that will process the signal from the GPS and relay the information.  This connection can be made with the on board UART of the MCU and FONA.  The figure below depicts how this can be wired.  Basically we are connecting the Tx and Rx pins of the boards for serial communication.  The Teensy ( and Adafruit ( web sites have detailed information about the board pins.

Now the MCU can be programmed to periodically query the Cellular + GPS breakout to obtain its longitude and latitude and once obtained, relay the data to an Azure IoT Hub. Azure IoT Hubs are designed for rapid telemetry ingestion. Microsoft also provides an IOT C SDK ( that can be leveraged for programming devices, such as the Teensy MCU.  The IoT Hub basically acts as a message bus.  Once data is on the bus, other services can read the data and continue processing.  For this processing, an Azure Web Job can be created to monitor the bus for incoming GPS data and persist it to the coordinate database. When a data point is received, it will be added to an Azure Storage table.  Additionally, the Web Job can send out a notification that a coordinate has been received.  This makes it easier for the web site to show the data in real time by subscribing to these notifications instead of periodically polling the database for new coordinates.  This can easily be achieved using SignalR/WebSockets.  Now, when the web site is loaded it can plot these incoming coordinates on a map, as well as read and plot previous coordinates from persistent storage.  The Google Maps API is one such service that offers this plotting functionality to developers.  The following diagram shows the architecture of the system.

Now we have a good starting point for our dog tracking system.  Because the device size should be as small as possible, a good enhancement for this would be to get all this on one board instead of the MCU and breakout.  Fritzing ( is a great online tool for PCB (printed circuit board) design and fabrication.  There are also many other interesting sensors we could add to our tracking device, such as accelerometers, gyros, inertial measurement units (IMU), temperature, etc. All this data could be collected by our MCU and relayed to the hub.  Also, due to the scalability and device provisioning features of the Azure IoT Hub, we could provision multiple trackers and monitor their telemetry simultaneously.  Then, we could use machine learning to analyze the data and devise an algorithm to describe the movements of all the dogs in the neighborhood which could be an indicator of neighborhood rabbit migration patterns, but I digress.  There is a lot of new technology becoming available in the IoT space, so it really is exciting to be involved in these projects.  I hope this article has given you some ideas of what can be achieved. 


Love our Blogs?

Sign up to get notified of new Skyline posts.


Related Content

Blog Article
How to Add Electronic and Digital Signatures to a Universal Application (UWP) with iText
Paul MadaryPaul Madary  |  
Aug 14, 2018
When paying for gas at the pump, checking out at Walmart, or electronically signing a contract to purchase real estate, have you ever thought about what technically goes into that electronic signature?  If not, then this is your lucky day! I recently had to implement this functionality in a...
Blog Article
Updated Mile of Music App Provides an Even Better User Experience
John PtacekJohn Ptacek  |  
Jul 26, 2018
As we get to the end of July at Skyline Technologies, our organization starts to get excited. We know that the Mile of Music festival is just around the corner. With over 70,000 people coming to Appleton, Wisconsin, for four days of original music, it is quite an adventure. Given one of the main...
Blog Article
Utilizing Azure Regions
Tyler StelzerTyler Stelzer  |  
May 08, 2018
Often when people hear Azure, they think “cloud”. But they should be thinking “clouds”. Azure has datacenters across the world that can be thought of as independent clouds. This gives organizations multiple options when determining the best utilization of a cloud-based...
Blog Article
WinForms Fluid Design - A Cautionary Tale
Jeff LucasJeff Lucas  |  
May 01, 2018
As a developer, you can find yourself digging into all sorts of code, even the occasional WinForms application.  WinForms come with a lot of handy features that can make fluid design quite simple, allowing your forms to be resized by the user but still hold the basic shape you desire without...
Blog Article
How to Use Azure Search Services
Steven NelsonSteven Nelson  |  
Apr 10, 2018
Azure has a unique service offering aptly named “Azure Search”. This is a search-as-a-service cloud solution that lets you add a rich search service to your apps.   The search service abstracts the complexities of document retrieval through both a REST API and a .NET SDK...