LoRa GPS Tracker

41,504

359

32

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:

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.

Be the First to Share

    Recommendations

    • Box Challenge

      Box Challenge
    • Make it Real Student Design Challenge #3

      Make it Real Student Design Challenge #3
    • Explore Science Challenge

      Explore Science Challenge

    32 Comments

    0
    vadermf1
    vadermf1

    Question 16 days 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

    0
    sqij
    sqij

    Answer 15 days 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.

    0
    radwanbasher2017
    radwanbasher2017

    Question 4 months 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

    0
    tanner.jergensen
    tanner.jergensen

    Question 5 months 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!

    0
    Jblaguirr
    Jblaguirr

    8 months 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.

    0
    sqij
    sqij

    Reply 8 months 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

    0
    Jblaguirr
    Jblaguirr

    Reply 8 months 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.

    0
    sqij
    sqij

    Reply 8 months 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

    0
    Jblaguirr
    Jblaguirr

    Reply 6 months 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.

    0
    sqij
    sqij

    Reply 6 months ago

    Which GPS did you wire up? The BN-180?

    0
    Jblaguirr
    Jblaguirr

    Reply 6 months ago

    Yes. I followes your example and use the same parts. I have a couple extra batteries and will try switching it out for a new one and make sure it is fully charged. I will let you know if that fixes it.
    Thanks again for all the help

    0
    sqij
    sqij

    Reply 6 months ago

    I have uploaded a new firmware to Github, so download (or pull) the repo, and re-flash the firmware to the Feather. Note: when the firmware is reflashed the data onboard also gets wiped, so you'll need to add it as a New Device in Ripple Commander (ie. its ID/key won't be recognised).

    0
    sqij
    sqij

    Reply 6 months ago

    I have reproduced this, even with the latest code, so it's definitely a bug in the tracker firmware. I will have a new firmware out with a fix in next few days

    0
    sqij
    sqij

    Reply 6 months ago

    It *could* be that the battery is too low. ie. the board is briefly powered up, but then volts drop to 3.5 or lower and it shuts down.

    0
    sqij
    sqij

    Reply 6 months ago

    I'll try on a spare Feather I have, and see if I can reproduce the freezing up.

    0
    DaniK8
    DaniK8

    6 months ago

    nice project, one question:
    does the phone/ ripple commander need internet or cellular network to update real time location of feather?

    0
    sqij
    sqij

    Reply 6 months ago

    Not really. The only issue could be rendering the Google map view. It will cache areas you have previously viewed, but if you scroll the map to somewhere new, at new zoom level, while offline then the map data will be missing

    4
    BrianQ13
    BrianQ13

    1 year ago on Step 2

    Hi, I have never used Github before, and find the flashing instructions difficult to follow. Can anyone simplify this for me, please?

    0
    DavidC1399
    DavidC1399

    1 year ago

    Good day, can i use an st link for flash the binary file or i need another board and program??

    0
    sqij
    sqij

    Reply 1 year ago

    I'm not sure what you are referring to? You can only use the Adafruit Feather board at present, and you flash it over the built-in USB port.