Making An IoT GPS / Cellular Dog Collar

I’ll be getting a dog soon and started looking around for a way to track it down should it ever escape. There are lots of neat commercial options but most require a monthly subscription, and those that don’t seem to be of dubious quality, so i decided to build my own.

I’ve based the build off the LilyGo-T-SIM7000G which includes an ESP32, SimCom7000G LTE cell modem / GPS receiver, and battery hold / charger for an 18650 lithium battery. The boards can be had from the usual suppliers for around $40, quite a deal for so much functionality. I used the Botletics fork of the Adafruit Fona library as a jumping off point to get the basics working. For cellular connectivity I use Google Fi as my cell provider, so I ordered a Fi data only SIM card. Getting the SIM card was the easy part, connecting the SimCom7000G module to connect to the Fi network was a bit more work. I couldn’t find any reliable documentation on getting the two to work together so it was a bit of trial and error to find that this works reliably:

fona.setNetworkSettings(F("h2g2"), F("h2g2"));

With the board on the network and getting a GPS lock remarkably quickly the next step was to push data to someplace accessible remotely. The Google Fi data only SIM card blocks SMS messages so that was out. The example library I am using references dweet.io so I thought I’d give it a try. Within just a few minutes i was able to post data to dweet and check it via the web. With the basics done and tested its time to dream add some features and optimizations.

More to come as the build continues. You can follow along at the GitHub project here.