Introduction: LoRa GPS Tracker
This project will show how to assemble your own GPS tracker module, for use with Ripple LoRa mesh networks. See this companion article for info: https://www.instructables.com/id/LoRa-Mesh-Radio/
These tracker modules use the Semtech LoRa radios, and compatible Arduino dev boards. Initially, there is just support for the Adafruit Feather, but will be more added over time. The modules can be used to track the location of anything remotely, via the LoRa packet radio mesh network.
Supplies
Hardware components can be purchased here:
- Adafruit Feather with LoRa module: https://www.adafruit.com/product/3178
- BN-180 GPS receiver: https://www.banggood.com/Beitian-Smallest-Mini-Dua...
- 900MHz dipole antenna: https://www.banggood.com/T-Type-900MHz-Long-Range-...
- 1S LiPo: https://www.banggood.com/GAONENG-GNB-4_35V-450mAh...
NOTE: the wires must be swapped in the connector of these Lipo batteries before plugging into the Feather!!
That is, this battery has right connector type, but the polarity is reversed!!
Alternatively, you can buy 1S lipo batteries from Adafruit. These have the connectors with right polarity.
Step 1: Wiring
The Feather board just needs the BN-180 GPS receiver wired up to it, with the following connections:
- (black) GND -> GND pin on feather
- (red) VCC -> 3.3V pin on feather
- (white) TX -> RX1 pin feather
- (green) RX -> TX1 pin on feather
The antenna doesn't have the right connector, so you need to cut the IPEX4 one off, then separate the coax braids and solder to the antenna ground pads (see end pic above). To do this, you need to strip about 10mm of the outer plastic off the end of the cable, then separate the very fine surrounding coax wire mesh then put some solder onto this. Then remove about 1mm of the plastic from the inner active wire and put a small amount of solder on this.
Next, pre-tin the antenna ground pads on the Feather, and the active antenna pad in the middle, then solder the antenna to these pads (separated coax to ground pads, active inner wire to antenna pad).
Step 2: Flashing the Firmware
For this you will need to have installed the Arduino IDE, and support for the target board type.
There are instructions on how to flash the firmware on this Github page: https://github.com/spleenware/ripple
Choose one of the 'GPS Tracker Node' targets.
With the board connected via USB cable, test that the firmware is OK by opening the Serial Monitor in the Arduino IDE. Enter 'q' (without quotes) in the send line, and press enter.
The serial monitor should reply with text starting with "Q: ..."
Step 3: Configure the Tracker in the App
To configure the tracker module and to actually track it, you need to install the Ripple Commander app. Currently only Android is supported. Download from Play: https://play.google.com/store/apps/details?id=com....
The app has two launcher icons. The 'Device Provision' one is just for when you are setting up your mesh network (repeaters, sensors, gateway, etc). The tracker nodes just need to be assigned a unique Id (between 2 and 254), and have their encryption keys generated. Just click on the 'NEW' menu on the toolbar, and enter the Id and name for the tracker, then click SAVE.
The tracker should now be in the main list. Tap on the 'chip' icon to the right, to go the 'Programmer' screen. Connect the tracker board via USB-OTG cable to the Android, then tap on the 'PROGRAM' button. If all goes well, then there should be a message saying 'Done', and that you can now disconnect.
Exit back to the Android launcher, then tap on the main 'Ripple Commander' launcher icon.
This is the main UI of the app, where you can chat with other 'pager' users in the network (who use the Ripple Messenger app), plus monitor your special nodes, like repeaters and the GPS Tracker nodes. Tap on a tracker node in the list, and you should see the device status screen (see second screen-shot above). Tap on the tracking option 'LIVE TRACK', and you should then be able to monitor the live location of the module.
The 'Map' tab will show a map pin for each of the tracker modules currently being tracked.
Step 4: NEW: Geo Fence Alerts
The latest firmware now supports Geo Fence mode. In this mode you select a geo region (which you define in the Map tab), and just get alert messages when the device goes in or out of the region.
First, switch to the Map tab, and tap on the '...' menu in the toolbar, then select one of the 'New Region' options (circle or polygon).
Circle: long-press on the map where you want the center of the circle region should be. Then tap on the '+' and '-' floating options to the left to increase or decrease the size.
Polygon: long-press each of the points in the polygon on the map. To undo the last point, tap on the 'x' button in the floating options to the left.
For either, once you have finished defining the region geography, tap on the green 'tick' option then enter a unique name for the region.
Back in the 'Home' tab, tap on the tracker item in the list, to go to the tracker status screen. Now select the 'GEOFENCE' option under Tracking, then select a region from the list. If all goes well, the status will update, and the tracker device will send alert messages when it goes in or out of the region. See the 'History' tab for the alert messages.
Step 5: (Optional) 3D Print the Case
This case can nicely house the feather and GPS: https://www.thingiverse.com/thing:3947782
It also has a holder for the antenna.
Above is a picture of my dog with a tracker attached to here collar :-) (the first beta tester of the system!)
Step 6: Feedback
Let me know if this has worked for you, or if you encounter problems. The feedback is very welcome.
Enjoy!
regards,
Scott Powell.
43 Comments
Question 7 months ago
What is the range of this device with the antenna added on?
1 year ago
Hi does this require a lora board connected to the phone
Question 1 year ago on Introduction
Can I use a second Lora unit connected to a PC to connect with the tracker?
If so how do I configure the units to talk to each other please. I have 2 x Ebyte E220 400T22D, a GPS receiver connected to APM2.8 (Arduino based) flight controller and a USB plug with cable and V+ V- Rx Tx.
This all works with Sik radios but of course very limited range
Question 1 year ago
Hi, can you tell me how this could be set up to work with Helium mapping?
https://docs.helium.com/use-the-network/coverage-mapping/
I want to weed out the spoofers since the whole point of Helium hotspots is to provide coverage.
1 year ago
I am also working on similar project , Loko -tiny gps tracker with Lora radio, might be interesting https://hackaday.io/project/166619-loko-open-source-gps-tracker-with-lorawan
Question 1 year ago
Thank you great tutorial, how to add solar panel to increase battery life?
Answer 1 year ago
I have this article which shows how to do that, and the parts needed: https://www.hackster.io/scottpowell69/your-own-private-lora-pager-network-e91fa7
Reply 1 year ago
Thank you how long is the battery life of the lora collar?
Reply 1 year ago
I have some more up to date info in the article below, with some battery life estimates: https://www.hackster.io/scottpowell69/android-tbeam-gps-tracker-45e736
2 years ago
Hi, i just don't understand how your circuit communicate with Ripple Commander app (on phone), while the circuit (contain LoRa, GPS Receiver) don't have device support protocol (like internet) to communicate with phone? Thanks in advance
Reply 2 years ago
You need two LoRa development boards, one for connecting to your Android device, and the other with the GPS wired to it. The LoRa radios just communicate with a custom packet protocol, and the Android talks a custom serial protocol with the 'home' LoRa. I have more up to date guides here: https://www.hackster.io/scottpowell69/
Question 2 years ago
Do you know if you could just use the Adafruit UFL SMD instead of soldering the coax directly to the board? Would make the antenna more modular...
https://www.adafruit.com/product/1661
Answer 2 years ago
Yes, the underside of the Feather has pads for those u.fl connectors. Is very fiddly doing the soldering, but do-able. The latest Lora Feather boards have the u.fl pre-installed, which is a bonus.
Question 2 years ago on Step 6
It's a really nice project.. can u share some recording videos about the project steps especially the real LoRa radio-tracking in the car (about 5 km range) .. thanks
Question 2 years ago on Step 2
Can you elaborate more on the software flashing process? I have tried adding SAM21 Boards to the board manager in Arduino IDE. I don’t see one that is marked for the Feather M0. I’ve tried a couple different board types and adding the text to the “run code continuously” line, but haven’t passed the “q” test. Any help would be appreciated, apologies if this is super basic but I am not versed in GitHub, Arduino or programming of any type. Thanks!
3 years ago
Need some help. I have windows 10 with ESPHome-flasher 1.3.0. and two different feather boards. I believe I have the correct drives. I get a COMxx for each board in the serial port box but when flashing " Unexpected error: Write timeout". Using rippletrackerv4-usb-feather.bin. It does load correctly on my t-beam.
An suggestions on what is going wrong?
Thanks for the help.
Reply 3 years ago
The Feather boards aren't ESP32 boards. They're in the SAMD21 Cortex family. You will need to use the command line command I have pasted into the readme. (I'll paste below). For these commands, you need to install the Arduino IDE and add in the Boards Manager the SAMD21 board support.
~/Library/Arduino15/packages/arduino/tools/bossac/1.7.0/bossac -i -d --port=cu.usbmodem14101 -U true -i -e -w -v RippleTrackerV4-USB-feather.bin -R
Reply 3 years ago
Thanks, got it loaded. A little different because I am on windows 10. I got it to say it loaded with Commander app using tracker-915-usb.feather. using version 3 or 4 gave me a "firmware unsupported" error.
BUT,
What are you using with Commander as a gateway? I have heltech and tbeams and can not get them to talk in/with Commander. So don't really know if my tracker is working. I understand it needs to be USB attached and have tried the 915-USB.heltech.
Thanks for the help.
Reply 3 years ago
OK, a couple of things I probably haven't documented properly:
Sounds like you are attaching the Feather while the Commander's main screen is showing. (thus the 'not supported' error). To configure the tracker/feather radio, you need to launch the app from the 'Device Provision' icon. (Flash the V4 firmware again, the old one is prob not supported now).
When you plug in the feather, when in the Device Provision screen, Android should ask you for the USB permission, then you should be prompted to Add the device, as Commander should detect it's new.
For the Home/Gateway device, you can NOW use either the USB firmware, or the Bluetooth (Classic) firmware. I will create updated Heltec binaries right now, as I haven't updated for that board in some months :-( eg. the USB one is named: Ripple-USB-heltech_v2.bin
Reply 2 years ago
Thanks for the help. I got two of them up and running. They work well for about 4 minutes and then freeze up. If I hit the live track button it will get an update but will not track. Or I unplug the battery and reset it. It will work for about a nother 4 min.
Any ideas on why? I reflashed them to see if that helps but same result.