607.273.3828

Meshtastic Pet Tracker

Meshtastic Tracker Case

Doggone

In spring 2024, our family dog took off while we were in a local state forest, dragging the retractable leash behind her. We were eventually reunited an hour later a half-mile away, and she was without leash, halter, and Apple AirTag. It was a relief to find her, and I concluded we needed a pet tracker.

As a software and wearable developer, perhaps I could figure out a solution without paying the monthly subscription fees that commercial pet trackers charge. I eventually stumbled across LoRa radio technology, which could be used to communicate over several miles. I’m a hardware engineer wannabe, so I decided to try some hardware hacking using hobby electronic components.

The goal was to have a transmitter on the pet and a receiver that I could carry, and they would indicate the relative location to each other, specifically direction and distance. For that each device would need GPS for location, LoRa radio to transmit information, and enough battery juice for several hours hours.

I tried some LoRa ESP32 programmable devices from AdaFruit, but it didn’t work out since I discovered that putting a display screen on top of a GPS chip did not allow the satellite signals to get through (duh!). An external antenna helped a bit, but building components using “hat” boards was big and bulky.

Heltec board solution

For the next iteration of development, I purchased several Heltec Wireless Tracker devices, which has embedded components for GPS, LoRa, Bluetooth, WiFi, and a display screen. There are several Arduino example programs that show how these features are configured and used.

I started writing software to control the devices, and soon had the devices showing the distance and direction between each other using the Haversine formula calculations against the GPS location information. This was pretty cool, but I discovered Meshtastic, an open-source mesh communicator which supports GPS and other messages between devices. It also has iOS and Android app integration using Bluetooth, so a device could be tracked and displayed against a map on a smart phone. Configuring the Mestastic devices was easy just using a web browser, and I set the trackers to transmit their locations every 60 seconds.

3D Case Printed

Now I needed to put the Heltec device, battery, and antenna into a case. I used OpenSCAD to design the bottom and top halves of the case, including support for the hardware two buttons and antenna mount. I added holes in each corner for straps or elastic to connect to a dog harness. It took perhaps a dozen design iterations on my 3D Printer, but through trial and error I built what I think is a practical and efficient case. You can download and print the cases yourself at Printables.com.

Meshtastic Pet Tracker Cases

Success!

In conclusion, this solution works! I can attach one of the trackers to our dog’s halter, and if she again goes foraging through the woods solo then I feel confident that I will be able to track her down. Each unit is about $40 when the total costs are factored in for the board, battery, and plastic filament. Cheap compared with commercial solutions both for cost and subscription!

These devices are also useful for communicating in remote areas that do not have cellular service. A smart phone can be used to craft a message to send to another device by radio. I kinda wish I had these to play with when I was a kid!

Written by Matt Clark

RECENT ARTICLES:

GORGES Web Development The owner of this website has made a commitment to accessibility and inclusion, please report any problems that you encounter using the contact form on this website. This site uses the WP ADA Compliance Check plugin to enhance accessibility.