Pi Zero GPS/GSM Tracker and Habitat Gateway

GSM-based trackers are quite rightly frowned upon for HAB tracking, mainly because they only work at low altitudes (within range of a mobile phone tower, which aim the signal generally downwards).  So they don’t provide tracking throughout a flight, which is a problem as then you don’t know where the payload is until it lands.

If you’re lucky.

There are 2 problems here – one is that GSM coverage isn’t 100%, and the other is that the popular GSM trackers don’t seem to like high altitudes.  I don’t know if they get confused, or they don’t like the cold, but I’ve tried these things several times and only had one work once.

A GSM/GPS tracker that actually works would be useful though, as a backup to a main tracker.  Having had little success with commercial offerings, I thought I’d make one.  I found a model that uses the SIM868 GSM/GPS module, plus supporting electronics on a Pi Zero HAT.  So that plus a Pi Zero and suitable power supply would make a fairly small backup tracker, and maybe even one that works.

The device supports GSM (calls, texts) and GPRS (2G, i.e. slow data).  It also has a GPS receiver.  It seemed attractive to use GPRS to provide internet access (via PPP), but that would lock out the single serial port thus making GPS unavailable.  So I decided to just send SMS from the device instead, using a script that gets the GPS position, then builds and sends an SMS containing that position.  I wrote this in Python using the PyGSM library, which makes things very easy (generally no need to mess around with AT commands).  PyGSM doesn’t know about the SIM868 GPS functions however, but it was simple to add those.  So my test script requests and parses the GPS position, then formulates a text message and ends it to my mobile phone:

It would also be useful to have the balloon position automatically uploaded to the live map, so I decided to have the device send a second SMS but this time to a gateway based at home.  This gateway is another Pi with a USB 3G modem attached.  I used the same library, but a different script to poll for new messages, determine whether an incoming message is of the correct format, and if so build a UKHAS telemetry sentence, finally uploading it to habhub for the live map:

UPDATE: Software now uploaded to github: https://github.com/daveake/GSMTracker

Note: Not tested in flight yet so I don’t know if the software and/or hardware chosen will work or not, so user beware!!

This entry was posted in Weather Balloon. Bookmark the permalink.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.