SARNet Aids Search and Rescue
Because every minute counts during search and rescue operations, technologies that narrow the search area are always welcome. Learn how these three Camosun College students built a LoRa-based tracking system designed to aid search-and-rescue teams in locating lost or missing individuals. Called SARNet, the system can narrow down the initial search area and give technicians a larger searching radius.
Getting lost in the woods while camping or hiking can be dangerous, unless you have a rescue device such as Recco or Spot. However, the Recco and Spot devices are expensive and require GPS or specialized tags. Our SARNet (Search and Rescue Network) is a tracking system that will be more affordable, accurate and independent of GPS. Implementing LoRa (Long Range) wireless technology in a new and unique way, we made a system that can be used to narrow down a search area for persons requiring emergency assistance. Once a rescue team arrives, our system enables a technician to reduce the time it takes to find someone who is lost or in distress.
Our project is split into three main parts: The Cricket, the Bat and the Colony. The Cricket is the active transmitter device that a user carries while going into the woods or other remote area. The Bat is a handheld tracking device used to locate a Cricket. The Colony is a network of devices similar to the Bat that are mounted along a trail in a checkpoint fashion, and give the last known location of a Cricket. We designed, built and tested the first two parts of our system, the Bat and the Cricket (Figure 1). We did not manufacture a Colony setup as part of our project. However, a Bat module can be easily implemented as a Colony configuration in the future.
LoRa is short for “Long Range” and is an emerging wireless technology that uses extremely low-powered transmitters and receivers. The radios operate in the Industrial, Scientific and Medical frequency bands (ISM). Depending on the country of operation, the assigned frequency is either 430, 433, 868 or 915MHz .
LoRa radio uses a Chirp Spread Spectrum (CSS) radio modulation technique that is similar to FM modulation . LoRa has a resilience to noise and low bit error rates, which is critical in today’s world of busy airways. Semtech is a large stakeholder in LoRa technology, and it produced the SX1276 radio IC that is integrated into our project.
Reliability and the ease of implementation with the Internet of Things (IoT) sets LoRa apart from other radio technologies. LoRa setups often involve remote temperature monitoring or situations where brief digital messages are sent. Typically, a LoRa user will connect a device to an IoT service, such as The Things Network, to log on and read data via the Internet. This setup is called LoRaWAN. Essentially, a LoRa device can send its data to any public LoRa gateway, which then uploads the data to the Internet for viewing.
We decided to experiment with LoRa radio as the means of communication between our devices. After all, using LoRa radio hardware and protocol is possible, and is a simple two-way link that doesn’t require the Wide Area Network (WAN) aspect of public gateways. That being said, our system implements a similar private WAN for the future Colony portion of SARNet.
We ended up using LoRa because it was an inexpensive option that allowed us to get a long-range signal with good penetration, and also because it requires very little power to transmit. Also, we chose it for the ability to sacrifice data rate for added range. Because we send very little data between the Bat and the Cricket, we get a longer maximum distance using LoRa communication technology than with other methods.
The Cricket is a transmitter module that a user would purchase or rent before going on a hike or similar outing. We designed the Cricket to be as small and light as possible, so the user can carry it while on the move, without adding much space or weight. Our design closely resembles a carabiner in its overall style and the shape of its enclosure. To be as size- and shape-efficient as possible, we carefully designed the PCB and all its components to fit within the shape of the enclosure.
We printed our 3D enclosure with PLA (polylactic acid) filament on a Ultimaker Cura printer. The enclosure is a two-part design that snap fits together and has a removable battery cover. Inside the case is a custom-printed PCB that is pressure fit in to four standoffs, a battery holder for two AAA batteries and a channel for a whip-style antenna.
We designed our PCB to have a Murata CMWX1ZZA Type ABZ chip, two LEDs (green and red), two input buttons, a reset switch, power switch, programming header and an RF output port. The LEDs indicate to the user if the Cricket is actively transmitting, and double as an indicator for what state the Cricket is in—either Normal, Distress or Alarm mode. Refer to Figure 2 for the Cricket’s schematic and to Figure 3 for the Cricket PCB.
We selected a 915MHz, whip-style antenna for its light and flexible characteristics. To power the Cricket, AAA batteries were chosen, based on cost, size and capacity. With disposable lithium cells, the Cricket lasts for 16 days in Normal mode, 12 days in Distress mode and 4 days in Alarm mode. The batteries are accessed by removing the rear battery cover (Figure 4).
The best way to describe the Cricket’s functionality is to examine the software that runs on it. We wrote all the Cricket programming in the Arduino IDE, using a LoRa library and board support package that recognizes the Murata chip we used .
We programmed three modes of operation: Normal, Distress and Alarm. Normal mode will run by default when the Cricket is powered on. The device will transmit a check-in message and blink the green LED every 5 minutes. Distress mode will transmit a distress message and blink the red LED every minute. Alarm mode blinks both LEDs three times for good visibility, and transmits an alarm message every 10s. Alarm mode is activated when a Bat is close enough to detect a Cricket’s chirp. More transmissions help the Bat narrow in on the Cricket, and having both LEDs light up indicates to the lost person(s) that a rescuer with a Bat is nearby, and that they should make noise or try to alert the rescuer in some way.
In our application, we didn’t need fast data rates or high data volume, but we did need long range. This meant we could change various settings to sacrifice the data rate and volume to gain longer range. The LoRa Calculator software by Semtech was a helpful tool while changing the LoRa settings. The calculator indicated that for maximum range, we needed high spreading factor and low bandwidth . We set the spreading factor to 12, the bandwidth to 125kHz and the coding rate to 4. Also, we set the Murata chips to transmit at the highest supported power level of 20dBm (100mW).
The actual data we transmit over the LoRa protocol comprises 5 full bytes in series. The first byte is an asterisk (*) character, which serves as a start sequence. The asterisk prevents the Bat from listening to LoRa signals that are not transmitted from SARNet devices. The second and third bytes are used as a unique ID number to identify a Cricket device. The fourth and fifth bytes are used to indicate whether the Cricket is in Normal, Distress or Alarm mode. LoRa protocol supports a maximum payload size of 256 bytes to be transmitted at one time. Since we are using only 5 bits, we had room for expansion if a large amount of Cricket IDs were needed for the system.
The Bat is designed to be taken into the field once the approximate area of a Cricket device has been determined. We liked the idea of a rescue technician using a touchscreen, tablet-style device to close in on a distressed person. The method of search is not unlike recreational “fox hunts” by radio amateurs, in which someone hides a radio transmitting device and then others attempt to find it in a hide-and-seek fashion. Special direction-finding (DF) antennas are implemented to help the radio amateurs in their search.
Like the radio amateurs, we based our idea on a direction-finding principle. We combined an electronic compass module with a scan of the received Cricket signal amplitude. With compass and signal-strength data, our tracking device can plot a signal’s amplitude and the direction of its location on the screen.
Because the Bat must receive signals from the Cricket, we tuned the design for the antenna to 915MHz. An online antenna calculator tool helped us determine the antenna’s dimensions . We chose the moxon-style antenna because of its direction-finding capability and its wide, cone-like reception pattern (Figure 5). In our trials, we tested a front-to-back ratio of about a 10dBm.
Our trial results were useful in our design because the Bat relies on directional-radio signal detection. The Bat’s software requires the user to turn in a circle (360 degrees) while scanning for a Cricket’s signal. The software indicates the likely direction of the Cricket by displaying the direction that returned the highest signal amplitude.
The Bat handheld tracking device combines several assemblies into one. Like the Cricket, the Bat houses its components in a 3D-printed case. Our team used Fusion 360 to create all the enclosure components. The dimensions were based on the Raspberry Pi foundation 7” touchscreen, while including enough depth for the rest of the components.
We wanted the Bat enclosure to be comfortable to hold, so we modelled it to have ergonomic, controller-like grips. Fitting all our components inside and keeping our wiring neat proved to be a challenge. Inside the case is a Raspberry Pi 3, a Raspberry Pi foundation touchscreen, a custom Bat PCB, Arduino Nano, Adafruit LSM303DLHC compass module and a Ravpower 26,800mA-hour power bank (Figure 6). The moxon directional antenna is mounted on the exterior of the case. After some careful wiring and strategic component placement, we were able to fit the Bat together with all the components inside.
We needed the main processing power to come from Raspberry Pi, so we picked the Raspberry Pi 3 for its lower power consumption and cost, compared to the Raspberry Pi 4. The touchscreen was ideal, because it had full software driver support in Raspbian, and the touch functionality works out of the box. Also, we used the several mounting holes on the screen to attach the Raspberry Pi and keep everything in the case secure.
To receive radio signals from the Cricket, we designed a custom PCB in a HAT (Hardware Attached on Top) form for mounting on the Raspberry Pi (Figure 7). With this design, our Bat circuit board is powered directly by the Raspberry Pi’s 3.3V and ground pins. The Bat’s PCB has the same Murata chip for radio reception as does the Cricket, and a coaxial cable connects the U.FL connector to the moxon antenna. Figure 8 shows the Bat’s PCB schematic.
Finally, we power all these devices using a Ravpower 26,800mA-hour power bank. The power bank is capable of running the Bat for at least 8 hours. We chose the Ravpower for its high capacity and ability to deliver up to 2.4A of continuous current at 5V. The 7″ touchscreen draws up to 500mA, the Arduino Nano consumes a miniscule 20mA and the Pi 3 draws a maximum of about 1,500mA. The power bank can be conveniently charged via a micro USB port, accessed on the side of the enclosure. Refer to Figure 9 for a functional block diagram of the Bat and Cricket.
We controlled many different components from the one Raspberry Pi. Because of the variety of hardware, we had multiple programs made to run the functions for each of the components. We wrote a program for receiving packets and RSSI from the Crickets, calculating a heading for the compass module, and a main GUI program for the Bat’s user. We developed the Bat’s Type ABZ chip software using the Arduino IDE, just like the Cricket. The chip’s software includes the board support packages and LoRa libraries we used for the Cricket, since both devices have the Murata chip.
The purpose of the Bat chip’s program is to listen continually for any LoRa messages transmitted by the Cricket. Once it detects a message, the messages are parsed and the information inside each message is recorded. The messages contain the Cricket ID number and operating mode, and the received signal strength indicator (RSSI) value. The ABZ chip sends these values to the Raspberry Pi via the I2C bus. If the message received is from the Cricket being tracked, the Bat’s chip will send a signal back to the Cricket to trigger it to go into Alarm mode. To orient the Bat’s user toward the source of the Cricket’s signal, we implemented an Adafruit LSM303 compass module. To interface with the compass, we use an Arduino Nano connected to it over the I2C bus.
An example program written by Adafruit polls the compass module continually, retrieving acceleration X Y Z and magnetometer X Y Z values, which gives us a heading from 0 to 360 degrees. Using both accelerometer and magnetometer readings means that the compass direction is tilt compensated, so the user does not have to hold the Bat unit level to get an accurate heading. The compass heading is then transferred from the Arduino to the Pi over a USB serial connection.
We programmed our own GUI to clearly display all the information collected from the Bat PCB and the compass module. The main screen has basic instructions on how to use the Bat, and navigation buttons to access other screens with different features. Our GUI program reads files that have continually updated compass, Cricket ID and RSSI information in them. By reading the data files, current data are always available for access by any of the graphical features of the Bat.
We wrote all the code that runs on the Raspberry Pi in Python and mostly use tkinter and PyQT modules. We adapted and modified a handy graphical compass program from an existing Python widget . The compass graphic is updated continually with heading data received from the Arduino.
We implemented a sweep feature that live updates and plots the strength of the signal received as the user turns slowly in a 360-degree circle. The pointer in the graphic will grow or shrink corresponding to an increase or decrease in signal strength. The direction that resulted in the pointer having the highest amplitude indicates the general direction toward the source of the Cricket’s signal (Figure 10).
Finally, we do not want the user to have to launch all these complicated programs individually when the Raspberry Pi starts up. To avoid this problem, we took advantage of Linux’s bash script functionality, letting us have all scripts launch together as soon as the Raspberry Pi boots up. Because of the bash script, the Bat is ready for use when the user turns on the power.
The Colony aspect of the project was designed, but not implemented, because we did not have the time to increase the scope of our project. However, the Bat and Cricket working successfully is enough to demonstrate that a Colony setup is feasible, since a Colony is essentially a set of mounted Bat-like devices. We developed the Cricket code to be able to communicate with a Colony setup if it were implemented. Alternately, we could program the Cricket devices to communicate with commercial, off-the-shelf LoRa gateways.
The Colony would be mounted along trails or in parks in a checkpoint configuration. In a checkpoint configuration, when a Cricket sends out its chirp, it can be picked up by any section of the Colony, at which time the Cricket’s location is recorded and saved. Moving forward, the rescue team will look up the last known location of the Cricket, based on the last section of the Colony that picked up the device’s signal. The Colony’s data identify a focused initial search area, to which a rescue team with a Bat can be deployed.
We conducted several trials to ensure that LoRa was a feasible technology to use in our application. At the start of the project, we used Heltec LoRa 32 (V1) boards with included monopole antennas, to test maximum signal ranges. Both the Heltec devices and the Murata chips we selected use the Semtech SX1276 radio ICs. Therefore, we concluded the Heltec board would accurately reflect the performance we could expect with the devices we planned to develop.
We started our testing at Camosun College, and found that the units could communicate easily at 250 meters. Building on this success, we tested again in Mount Doug, a densely forested park, and found we still had reception up to 600 meters away with minimal packet loss.
After we had fully developed the Bat and Cricket, we conducted more testing to observe the results of our calibrated hardware. In a wide-open area with no obstructions, we successfully detected the Cricket up to 1,800 meters away from the Bat. In a more densely forested area, we were able to achieve up to 800 meters detection range. With more resources and better equipment, we could further expand on the performance of our technology.
Our group had to confirm that a person out of sight with a Cricket device could be located with the Bat. We did this in the most reasonable way possible—with a game of hide and seek. A group member hid outdoors, with a Cricket device transmitting in distress mode, and another team member with the Bat attempted track the person down. Every hide-and-seek test was successful, and proved that the Bat can effectively track down Crickets in a wilderness setting.
Our goal was to use LoRa radio technology in a new and exciting way. The SARNet rescue system is a departure from the typical IoT usage for LoRa. We hope using LoRa in this way will help to pioneer future LoRa-based professional safety systems. In the end, we produced a working proof of concept for SARNet. We successfully use LoRa as a radio location technology, by combining the power of Raspberry Pi, Arduino and the Murata chips on our self-made PCBs.
The Cricket works as a compact design, while retaining long battery life, and the Bat functions as planned, despite the complexity and number of components involved. Our team was surprised that the range exceeded 1.8km in clear conditions, and we are proud of how well the Cricket and Bat devices worked together.
Our project is an excellent engineering exercise for embedded and GUI programming, Linux systems, PCB design, RF design and 3D printing. Above all, SARNet showcases much of what we have learned over the past 3 years, along with our group’s creativity and teamwork skills. We completed all the objectives we set out at the beginning of the term, and collectively agree that our capstone project was a complete success.
References: “What is LoRa?,” Semtech, [Online]. Available: https://www.semtech.com/lora/what-is-lora
 B. Ray, 26 June 2018. [Online]. Available: https://www.link-labs.com/blog/what-is-lora
 T. Roell, “GrumpyOldPizza – ArduinoCore-stm32l0,” 2019. [Online]. Available: https://github.com/GrumpyOldPizza/ArduinoCore-stm32l0
 M. Zachmann, “Medium – The Best LoRa Settings for Range and Reliability,” 18 June 2018. [Online]. Available: https://medium.com/home-wireless/testing-lora-radios-with-the-limesdr-mini-part-2-37fa481217ff
 J. Simpson, “Moxon Calculator,” [Online]. Available: http://tippete.net/cgi-bin/moxgen.pl
 D. Boddie, “PyQt Compass widget,” June 2014. [Online]. Available: https://wiki.python.org/moin/PyQt/Compass%20widget
PUBLISHED IN CIRCUIT CELLAR MAGAZINE • MARCH 2020 #356 – Get a PDF of the issueSponsor this Article
Cameron Stauffer accumulated various employment experience in the retail, funeral and oil and gas industries, before choosing to pursue a diploma in Electronics and Computer Engineering Technology at Camosun College. His curiosity for physics and mathematics, and passion for electronics influenced his decision to return to school after 5 years in the workforce. Cameron plans on completing the Electronics and Computer Engineering Bridge program, and pursuing a bachelor's degree in engineering at the University of Victoria in Canada.
Callum Munn-Middleton has always had a passion for electronics, which drove him to enroll and now graduate from the Electronics and Computer Engineering Technology program at Camosun College. He plans to do the Bridge program at Camosun this year, which will then allow him to continue his engineering studies at the University of Victoria.
James Lawton worked in the electrical trade for 8 years before returning to school to study electronics. He has graduated from the Electronics and Computer Engineering Technology program at Camosun, and he plans to pursue a career in marine electronics systems.