I have put a lot of work and research into improving on the LoRa GPS Tracker I wrote about here: https://www.instructables.com/id/LoRa-GPS-Tracker/
I have been asked about how to apply that project to things like:
- Wildlife tracking
- Personal S.O.S alert
- Aged care tracker for dementia patients
One challenge common to all these was long battery life, so I made a number of changes to the Ripple LoRa mesh protocol, the Commander app, and the device firmware to get the power consumption down to a minimum.
Configuration Options
The Ripple Commander app is used for setting up the mesh network, and can be downloaded from Google Play here: https://play.google.com/store/apps/details?id=com.spleenware.deviceprovision
It now has the screen below for configuring the GPS Tracker devices:
The top section is for devices which will feature an alert S.O.S button. This is optional, eg. you would leave this unchecked for a wildlife tracker application.
The Power Modes section is where all the new magic is. For the different device modes (Standby, Live Track, etc) you can now set the power mode for the MPU (main processor) and whether to enable to Peripheral power pin. You can now wire up a transistor or a dedicated voltage regulator with an ENable pin, to Pin 12 of the Feather. (On the Heltec boards, you use one of the Vext pins to power the GPS, rather than having to use an external Polulu voltage regulator)
In the screen-shot above, when in STANDBY mode, the MPU will sleep for 2 minutes (Low Power3) AND power down the Peripherals. (ie. the GPS receiver).
When in LIVE track mode, the MPU will stay on (Normal) AND it will power up the Peripherals (ie. the GPS receiver).
You could also, for example have LIVE use Low Power2 and enable Peripheral pin. With this combination, the MPU would sleep for 30 seconds, and only power up the peripherals (GPS receiver) briefly to obtain a geo-location, then power back down.
NEW: You can configure the trackers for use with the Ripple Tactical app by checking the 'Broadcast to team' check box.
NEW: There is now a new mode labelled LOGGER, which makes the device log timestamps + GPS location on a configurable interval. You can then download the logged locations as CSV data. At present only the firmware for the Heltec board supports this mode.
Test Results
For a number of use-cases, like aged care, the device will mostly be in the STANDBY mode, and only rarely needs the LIVE tracking enabled (ie. if a dementia patient has wandered off). The admin can simply enable this mode, remotely waking up the device. (see screen below)
With the 850mAh lipo battery the device can stay in Low Power3, with Peripheral off, for approximately 7 days.
With a much smaller 220mAh battery I got about 2 days of standby.
S.O.S Alerts
When the user long-presses the button ( > 2 seconds), the device goes into S.O.S mode, and sends an alert text message to the radio connected to the Commander Android device. It also changes the status of the device to 'Help!' as seen in the device list in the main screen:
The Peripheral pin is also enabled which turns on the GPS receiver, and the MPU is put into Normal (stay on) mode.
The admin can see where the device is on the 'Map' tab, which shows a Google Map view with pins showing live location.
Wiring Up The Feather Device
Below is a wiring diagram for the Adafruit Feather and the different peripherals needed:
For help installing a LoRa antenna to the Feather please see the original article (link near top of this article).
NOTE: for some use-cases you may want the GPS receiver to stay on, and not use the Peripheral enable pin. In this case you'd simple wire the BN-180's VCC pin to the 3.3V output power on the Feather, and not use the Polulu regulator.
Wiring a Seeeduino Xiao board (Alternative)You can now use the affordable Xiao board, along with an RFM95 LoRa module, as an alternative the the Feather. Below is a wiring diagram:
I've now added support for using the affordable Heltec board. This has some extra advantages, and is simpler, as it has built-in 'Vext' power pins, for powering a peripheral, eg. the GPS, and being able to power it up/down in software. Also, it has a user-programmable button above the USB port (labelled PRG), which I've used as the Alert/SOS button. So, no wiring for that either!
So, all that is required is to wire up the GPS receiver like so:
You need to make sure you have the Arduino IDE installed, with the SAMD Zero boards support added. Go to the Ripple Github site for instructions:
https://github.com/spleenware/ripple
For this project and the Feather board, you need to flash this specific binary:
https://github.com/spleenware/ripple#gps-tracker-node---433-to-915mhz-configurable--usb-otg
For the Xiao board, you need to flash this specific binary:
https://github.com/spleenware/ripple#gps-tracker-node---433-to-915mhz-configursble-usb-otg
For the Heltec, you need to flash this binary:
https://github.com/spleenware/ripple#gps-tracker-node---433-to-915mhz-configurable
Configuring the devices (ID, settings)The Ripple Commander app has TWO launcher icons. For defining and configuring the devices on the mesh network, launch from the 'Device Provision' icon.
To add sensor nodes to the Commander app, you now just plug the device in using a USB-OTG cable, and the app should detect that it's a previously unknown device and prompt you to Add. Select Yes, then in the next screen give the tracker node a unique ID and name, and optionally set custom configuration by tapping the '...' button to the right.
Click on SAVE. This button should then disappear and be replaced with a PROGRAM button. Click on this to send the config to the device. If all goes well, there should be a 'Done' message appear.
The device should now have its ID, config and encryption keys stored in its EEPROM.
The 'home' deviceYou also need to setup a Ripple device and connect over USB-OTG cable to the Android running the Commander app. This is the 'home' node (and will assume ID 1).
You need to flash one of the 'Messenger' (or Repeater) firmware binaries to this device. For the TTGO V2 board (which I recommend), you would flash this firmware: https://github.com/spleenware/ripple#repeater-or-messenger---433-to-915mhz-configurable--usb-otg-only-5
Making a caseIf you have a 3D printer, you can make your own case to protect the components. I designed one for use with a small 220mAh battery, where I can just slot the battery into the underside to turn it on:
Let me know in the comments if you want the STL files.
Support
If you find this project useful and want to support the development, I now have a Buy Me A Coffee page here:
https://www.buymeacoffee.com/ripplebiz
FeedbackI will be conducting an initial trial of these devices at an aged care village. It will be interesting getting some real-world feedback and refining the product.
I continue to work on this project because it really engages me and interests me. I hope it can prove to be useful to the wider community. Feel free to message me here if you have questions.
Enjoy!
Regards,
Scott Powell
Comments