ABSTRACT
Open-source technology has been increasingly used for developing low-cost animal-borne bio-loggers; however, a gap remains for a bio-logger that records both inertial movement and GPS positions. We address this need with the Tapered Wings Logger (TWLogger), an archival bio-logger that records high-resolution (e.g. 50 Hz) tri-axial accelerometry and magnetometry, temperature and GPS. The TWLogger can be built for 90 USD, accepts user-defined sampling parameters, and with a 500 mA h battery weighs 25 g. We provide publicly available build instructions and custom analysis scripts. Bench tests recorded 50 Hz inertial movement and 2 min GPS for 31.8±2.2 h (mean±s.d., n=6) with GPS accuracy within 10.9±13.6 m. Field deployments on a medium-sized bird of prey in the wild achieved similar results (n=13). The customizable TWLogger has wide-ranging application across systems and thus offers a practical solution for eco-physiology applications.
INTRODUCTION
Animals continuously integrate their internal states and external environments to decide where, when and how to move through a landscape in search of food, shelter or a mate (Nathan et al., 2008). Historically, researchers have struggled to gain insight into the underlying mechanisms of animal movement without disrupting the focal individual or introducing observer bias (Altmann, 1974). Bio-logging technology enables researchers to reduce the disruption by removing themselves as a confounding factor in behavioral observations, by allowing remote measurement of animal movement and environmental variables. With continuous data, researchers can answer questions about physiology, energy expenditure, foraging, migration, habitat use and sociality (Ropert-Coudert and Wilson, 2005; Wilmers et al., 2015).
While bio-loggers are powerful tools, they are often expensive and proprietary. However, with the increase in popularity of user innovation communities (i.e. product development without manufacturers), open-source platforms are more prevalent (Von Hippel, 2005) and resources now exist that enable researchers to design custom bio-loggers for biological applications. Arduino is one such open-source platform used to build miniaturized, modular electronics suitable for biological research that, for example, control laboratory experimental treatments (Teikari et al., 2012; Greenspan et al., 2016), collect in situ environmental data (Miller and Dowd, 2017; Gandra et al., 2015) and track the geographic movement of animals (Cain and Cross, 2018).
Devices are currently available that can sample fine-scale movement or GPS, but an open-source bio-logger has not yet been designed that incorporates both functions in a single unit. Data resulting from the combined functionality allows researchers, for example, to use accelerometer data to estimate energy expenditure (e.g. overall dynamic body acceleration, ODBA sensu Wilson et al., 2006) and activity budgets (Elliott et al., 2013; Fehlmann et al., 2017), magnetometer data to recreate the animal's path using dead reckoning (Bidder et al., 2015), and GPS data to geographically reference behaviors (Weimerskirch et al., 2009).
Our objectives were threefold: (1) to develop an open-source, affordable bio-logger that records high-resolution inertial movement and GPS; (2) to make the bio-logger designs and circuitry available publicly for wide-ranging application across systems; and (3) to create custom scripts that process raw data for use with freely available data analysis tools (e.g. tagtools package: http://www.animaltags.org).
MATERIALS AND METHODS
Components and assembly
The Tapered Wings Logger (hereafter TWLogger) was constructed with components from Adafruit Industries (New York, NY, USA), a company that produces low-cost, lightweight printed circuit boards (PCBs) with open-source design schematics and documentation. We selected the Adafruit Feather M0 Adalogger for the microcontroller, a PCB built around the 48 MHz Atmel ATSAMD21G18 ARM Cortex M0 processor, which includes a real-time clock with a 32 kHz crystal oscillator that has accuracy of ±20 ppm (i.e. ±10 min per year). The board has a set of built-in features that make it an ideal backbone for a bio-logging application, including a micro-SD card slot, multiple pins to attach peripherals, a lithium polymer battery connector and a micro-USB port for programming and battery charging.
We customized the Adafruit Feather M0 Adalogger, creating the TWLogger, by adding the Adafruit LSM303 Accelerometer+Compass Breakout board, an inertial movement unit (IMU, i.e. tri-axial accelerometer and magnetometer sensors) that also records temperature. The IMU's sensors are in orthogonal alignment in North, West, Up axis conventions enabling three-dimensional movement measurements. We then added the Adafruit Ultimate GPS Breakout board (GlobalTop Tech Inc.) with an internal patch antenna and position accuracy greater than 3 m (Table 1).
Software and output
We wrote the TWLogger software using the Arduino Integrated Development Environment (IDE), which runs on Windows, Macintosh OSX and Linux operating systems. The Arduino platform provides well-documented, easy-to-understand microelectronic resources and has an online global network of users who contribute tutorials and project ideas accessible to users of any experience level (www.arduino.cc). The TWLogger software was written in C++ and is commented to describe program flow and functionality and allow modification. For simplicity, we wrote the software as a continuous loop that executes instructions (e.g. reading and saving sensor values) until the logger is turned off or runs out of battery. To limit computation time and increase battery life, sensor data are stored as 12- or 16-bit integers.
Time is a critical component of any bio-logging system; thus, we used a metering function to maintain regular sampling rates. This controls for variability that may be introduced in the duration of a program loop (e.g. if GPS has difficultly acquiring a fix). The function dictates that if the program loop finishes prior to the end of the metered interval, the logger waits to begin the next loop, whereas if the program loop exceeds the metered interval, the logger continues without stopping. In the latter case, we addressed the resulting sampling irregularity post hoc in the data processing scripts.
With each program loop, sensor values are logged to a text file on the micro-SD card (see GitHub for a complete list of parameters logged: https://github.com/jamesfahlbusch/TWLogger). Files are stored as sequentially numbered, natural language (i.e. not binary) CSV files. File size is limited to a maximum of 900,000 samples, after which a new file is created. This allows each file to be opened by common spreadsheet viewers (e.g. Microsoft Excel). We provide processing scripts to combine multiple CSV files.
User interface
The TWLogger user interface is accessible through the Arduino IDE when the device is connected to a computer via a USB cable. After establishing a USB connection, the logger enters the setup state, in which users load the software and set sampling parameters. Once the software is loaded, the logger will remain programmed, enabling users to quickly set sampling parameters in the field. Within the setup state, users open a command window (i.e. serial monitor), which displays a settings menu that allows users to assign the tag number, set the clock, change sampling parameters (or retain default settings), confirm the GPS has a fix before deployment, and initiate logging. The TWLogger's default sampling parameters are 50 Hz for the IMU sensors and 120 s for the GPS unit. For practicality, temperature is permanently set to sample at 1 Hz, and therefore is not included in the settings menu. User-defined settings are saved to a text file on the micro-SD card under a filename that includes the tag number and date. Advanced users can enable an interactive display that plots sensor output in real-time, though this feature is not enabled by default. See https://github.com/jamesfahlbusch/TWLogger for a more detailed user manual.
After setting sampling parameters, the user selects the ‘Start Logging’ command to transition the device into the data-logging state. A red light-emitting diode will begin pulsing in 60 s intervals (i.e. at the top of every minute) to show that the device is logging properly. The logger has a default programming feature to begin logging after 300 s of inactivity while connected to a power source. This provides a safeguard against user programming errors or animal interference after the logger is deployed (e.g. if a bird bites the reset button).
Sensor calibration
Prior to deployment, users must initiate loggers and record reference values that will be used to calculate calibration values. The reference values will be applied to tag data during data processing to account for natural variation in sensor output (e.g. due to manufacturing effects and local magnetic field). Depending on field constraints (e.g. location, time, battery charging opportunities, battery duration needs), reference measurements can be taken at the field site either immediately prior to deployment or on a separate occasion (pre-deployment or post-retrieval).
To record reference values, we used default logger settings, initiated logging, and rapidly shook the TWLogger for 5 s to create a useful visual indicator for data processing. We then used a two-part spherical calibration method. For the accelerometer sensor, we slowly rotated the TWLogger 360 deg around each orthogonal axis to capture the absolute minimums and maximums of each axis (Laich et al., 2008). For the magnetometer, we first identified local magnetic north (https://www.ngdc.noaa.gov/geomag/calculators/magcalc.shtml), including inclination, then rotated each axis slowly through that point to again capture absolute minimum and maximum values for each axis (Williams et al., 2017). CSV files created while taking reference measurements (hereafter ‘reference files’) are used to calculate calibration values during data processing. For accelerometer calibration, the objective is to measure only gravitational force; therefore, it is critical to move slowly through the rotations to reduce measurements associated with linear acceleration. For applications requiring precise magnetometer measurements, reference measurements must be obtained at the field site, so calibration values can account for latitudinal variation in the Earth's magnetic field.
Data processing
To facilitate immediate data analysis, we developed a set of tools to allow users to process raw logger data. All processing tools are written in R (v.1.1.463), an open-source programming language. The toolbox includes scripts to import raw data, correct for variability in the sampling rates, calculate and apply calibration values, convert sensor values into standard units (e.g. m s−2), and save to a format suitable for analysis.
The raw data import script combines multiple CSV outputs and prepares data for processing. The processing script corrects for sampling rate anomalies, which for example can be caused by longer than average micro-SD card write times. Specifically, it does this by first counting observed sampling frequencies per second over the entire dataset and producing a table of occurrences for each frequency. From this table, users can determine the mode sampling rate (Hz) and use the mode to parameterize a function that will snip or interpolate values to ensure the selected sampling rate per second. Prior to this, a function informs users how many data points will be dropped or interpolated to achieve the user-selected sampling rate. The calibration script uses the tagtools package to transform tag data to axis conventions used by tagtools (i.e. North, East, Up), calculate calibration values from the reference files and apply calibration values to the tag data (see https://github.com/jamesfahlbusch/TWLogger for instructions).
Bench and field tests
We conducted bench and field tests to assess the performance and accuracy of the TWLogger. To bench test the TWLogger, we programmed devices to multiple parameter configurations of IMU (e.g. 10 and 50 Hz) and GPS (e.g. 2 and 60 min) and set them outside an open field with a clear view of the sky, allowing them to run through to battery depletion. Ambient temperatures ranged from 7 to 32°C. We assessed GPS accuracy by comparing the true coordinates (i.e. known location of the bench test) with those recorded by the loggers (Adams et al., 2013). We used Google Earth Pro to identify the true coordinate of the bench test, as Google Earth GPS accuracy is within 3 m (Goudarzi and Landry, 2017). We calculated fix time by finding the difference between subsequent time stamps and subtracting the programmed sampling rate.
To field test the TWLogger, we deployed the device on 13 striated caracaras, Phalcoboenus australis (Gmelin 1788), a medium-sized bird of prey (1660±215 g, mean±s.d.), on Saunders Island, Falkland Islands (51.37°S, 60.09°W) during two field seasons in 2018–2019. We programmed the TWLoggers to record tri-axial acceleration at 50 Hz and GPS positions every 2 min. Deployment temperatures ranged from −1 to 10°C. Prior to logger deployment, we performed a calibration procedure on each logger and saved these data for use during data processing. To waterproof the devices, we used two protective measures. We first created a removable protective shield by folding a piece of clear polyethylene terephthalate (PET-1) plastic (precut to fit the logger's dimensions) over the logger and used a heat gun to mold it into a permanent, though flexible shape. We then sealed the shielded logger into 3.8 cm adhesive-lined heat shrink tubing (Fry's Electronics, San Jose, CA, USA). The protective plastic shield reinforced areas of the heat shrink that would otherwise not have laid flat on the logger and would have been more susceptible to puncture.
We trapped caracaras using a mutton-baited monofilament noose carpet that snares the bird's metatarsus as it walks through the trap (Collister, 1967). We ensured the loggers were <2.5% of the bird's body mass (Gaunt et al., 1997; Phillips et al., 2003; Wilson et al., 2002) and then mounted the TWLoggers on the bird's two central tail feathers using Tesa 4651 adhesive tape (Norderstedt, Germany) (Wilson et al., 1997). After logger deployment, all instrumented birds resumed normal activity. TWLoggers were recovered within 4 days of deployment and data were processed using the TWLogger analysis toolkit. All data collection protocols for field tests (caracara capture, handling and instrumentation methods) were approved by San Jose State University Institutional Animal Care and Use Committee (IACUC; protocol number 1054) and complied with the conservation of Wildlife and Nature Ordinance of 1999, Section 9, License to carry out Scientific Research (permit no. R22/2015, Falkland Islands Government).
RESULTS AND DISCUSSION
Components for a single bio-logger were purchased for approximately 90 USD. Logger assembly required a minimal soldering station (e.g. soldering iron, lead-free solder, 26 AWG gauge wire, wire cutters, three table clamps and a heat resistant dish) and 2 h to build. The final product, including the 500 mA h battery, measured 23×52×17 mm and weighed 25 g (Fig. 1). When made watertight with heat shrink tubing, the TWLogger weighed 34 g and was still small enough to deploy on a medium-sized bird of prey (i.e. weighing less than 3% of a 1.5 kg bird; Fig. 1). Detailed TWLogger build instructions and circuitry diagrams, logger software, a step-by-step user-manual, the data processing scripts and sample data can be freely downloaded (MIT License) from GitHub (https://github.com/jamesfahlbusch/TWLogger).
Tapered Wings Logger (TWLogger) design and field deployment on a striated caracara. (a) The inertial measurement unit (IMU), (b) GPS module, (c) micro-USB port, (d) Feather M0 Adalogger, (e) location of the battery connector, (f) micro-SD card slot and (g) location of the 500 mA h battery. For field deployment, the TWLogger was taped to the two central tail feathers of the caracaras, just below the uropygial gland (white rectangle).
Tapered Wings Logger (TWLogger) design and field deployment on a striated caracara. (a) The inertial measurement unit (IMU), (b) GPS module, (c) micro-USB port, (d) Feather M0 Adalogger, (e) location of the battery connector, (f) micro-SD card slot and (g) location of the 500 mA h battery. For field deployment, the TWLogger was taped to the two central tail feathers of the caracaras, just below the uropygial gland (white rectangle).
The TWLogger met performance expectations in bench tests and field application (Fig. 2). During bench tests at default parameters (50 Hz IMU and 120 s GPS), battery duration was 31.8±2.2 h (n=6) with a maximum duration of 35.0 h. At 10 Hz IMU and 3600 s GPS, battery duration increased to 48.0±0.9 h with a maximum battery duration of 49 h. For comparison, field tests using default parameters had a battery duration of 30.3±2.8 h (n=13) with a maximum duration of 35.3 h.
Battery duration of bench and field tests. Data for bench tests (solid-line boxplots) and field tests (dashed-line boxplot) using two IMU settings (10 and 50 Hz) with 120 s GPS (white) and 3600 s GPS (gray). The lower boundary of the box indicates the 25th percentile, the line within the box marks the median, and the upper boundary of the box indicates the 75th percentile. Whiskers indicate 1.5× the inter-quartile range. Mean, s.d. and sample size are indicated above the box plots.
Battery duration of bench and field tests. Data for bench tests (solid-line boxplots) and field tests (dashed-line boxplot) using two IMU settings (10 and 50 Hz) with 120 s GPS (white) and 3600 s GPS (gray). The lower boundary of the box indicates the 25th percentile, the line within the box marks the median, and the upper boundary of the box indicates the 75th percentile. Whiskers indicate 1.5× the inter-quartile range. Mean, s.d. and sample size are indicated above the box plots.
At default settings, a complete battery cycle records approximately 375 MB of data. Both bench and field tests resulted in datasets that required minimal interpolation (i.e. 0.12% of the data) to ensure a regular sampling interval. Bench tests yielded a GPS accuracy of 10.9±13.6 m and a GPS fix time of 11.9±12.7 s.
We designed and implemented an animal-borne inertial movement archival bio-logger with GPS that enabled us to collect high-resolution data on a low budget over multiple seasons. While other manufacturers produce bio-loggers that are comparable to or exceed the sampling capabilities of the TWLogger [e.g. Axy-Trek Mini (Suzuki et al., 2019); e-obs GmbH (Weegman et al., 2017)], our objective was to provide biologists with a low-cost alternative that uses open-source hardware and software. The strengths of the TWLogger, therefore, are its affordability, replaceable battery, modular and expandable design, flexible sampling parameters and accessible software.
TWLogger tractability
The modular design enables users to easily replace components on their own and at low cost. This allows users to troubleshoot, repair and redeploy the same logger multiple times without needing to send the logger to a manufacturer for refurbishing. For example, when we suspected possible water damage after a field deployment, we disassembled the logger and replaced the microcontroller. Additionally, the replaceable battery means battery duration is not a limiting factor in the TWLogger's lifespan and smaller batteries can be used to reduce weight.
Because of the logger's modularity, advanced users can also expand functionality (e.g. by adding a pressure sensor or gyroscope). Additionally, Arduino PCB designs are published under a Creative Commons (CC) license; thus, researchers can tailor the PCB design to meet their specialized needs. Arduino and Adafruit both have a vibrant online community providing a wealth of examples and advice for how to understand and extend the logger's capabilities.
The easily accessible software allows users to adjust logger functionality to address issues specific to their application. When we learned that birds can reset the logger by biting the reset button, we adjusted the software to include a safeguard function that restarts the logger after 300 s of inactivity when connected to a power source (i.e. the battery during deployment). We also adjusted the logger assembly to include the plastic protective shield.
While other loggers exist that measure fine-scale movement or GPS, the TWLogger incorporates them into a single package. The positional data provide a biologically meaningful context, which facilitates the mapping of acceleration signals to animal behavior and landscape use. This can be particularly beneficial when researchers are unable to directly observe instrumented animals. In place of direct observation, by combining the GPS data and ecological knowledge of the study site, researchers can at minimum infer behaviors from the data to inform future research.
Further benefits of the TWLogger design include the onboard, removable data storage (i.e. the micro-SD card), which mitigates the opportunity for data loss in the event of unexpected logger damage. Many micro-SD cards are now capable of withstanding submersion in freshwater or saltwater, thus making it a robust and durable data storage option. Moreover, data storage is not a limiting factor of this design, as micro-SD cards now have a storage capacity that exceeds maximum logger file size of any TWLogger sampling configuration. We recommend a micro-SD card with high read and write speeds to avoid sampling delay (e.g. Speed Class 4+).
Bench and field testing
While bench and field test results for default settings were comparable, colder temperatures negatively affect the performance of lithium ion batteries (Ma et al., 2018); thus, field conditions should be considered and ideally tested before use. There can also be variability in cell capacity directly off the shelf. Furthermore, bench tests can control for GPS acquisition by maintaining a clear view of the sky for the duration of deployment, which may not be the case while deployed on a mobile animal. This should be considered when selecting sampling parameters for field deployment.
Bench tests revealed that decreasing the GPS sampling rate improved battery duration, likely due to the decreased occurrence of power-consuming satellite acquisition attempts.
We experienced one tag failure during field tests due to the logger being reset during deployment (presumably the wearer bit the restart button). Another logger had its watertight exterior punctured, although it still recorded data to the micro-SD card, which remained undamaged.
Limitations and future directions
The TWLogger's ease of use also creates limitations. For example, modular components increase logger size and weight and coding loops are battery inefficient. However, the open-source nature of the resources and microelectronics components create the ability for advanced users to make the TWLogger more efficient. Modifications could allow the microcontroller to interact more directly with the components (e.g. event-driven programming) or include a sleep-mode (e.g. the logger wakes at regular intervals to read sensors or write data); both are functionalities that would increase battery life. Alternatively, because the microcontroller is fully open-source, advanced users can adapt the original circuit board design (e.g. using EAGLE PCB Design Software) to incorporate sensors or include a USB-serial bridge (i.e. FTDI adapter; see Cain and Cross, 2018) to reduce the payload.
Future iterations could include a method to download the data via the micro-USB (i.e. precluding the removal of the micro-SD card for data download), which would allow researchers to encapsulate the tag in epoxy and make it entirely waterproof for marine deployments (Jeanniard-du-Dot et al., 2017; Laich et al., 2008; Ropert-Coudert et al., 2006), which would broaden the application of the TWLogger. In its current configuration, the TWLogger exists as an open-source solution for physiological ecology applications across systems.
Acknowledgements
We thank Hawk Mountain Sanctuary for providing logistical support for this study. We thank the Falkland Islands Government Environmental Planning Department for providing our permit and the Pole-Evans family for being gracious hosts during stays on Saunders Island. We thank Dr Birgitte McDonald, Moss Landing Marine Labs, CA, USA, for providing valuable feedback toward improving our manuscript. We thank Max Czapanskiy and Dave Cade, Hopkins Marine Station, CA, USA, for technical advice and feedback on our logger design, data processing tools and an early draft of our manuscript. We would also like to thank the editor and the reviewers for generously giving their time to provide critical comments and suggestions. This is Hawk Mountain Conservation Science Contribution No. 320.
Footnotes
Author contributions
Conceptualization: J.F., K.H.; Methodology: J.F., K.H.; Software: J.F.; Formal analysis: J.F., K.H.; Investigation: K.H.; Resources: J.F., K.H.; Writing - original draft: J.F., K.H.; Writing - review & editing: J.F., K.H.; Project administration: K.H.; Funding acquisition: K.H.
Funding
Financial support was provided by Hawk Mountain Sanctuary Association, Falklands Conservation and the Falkland Island Government Environmental Studies Budget.
Data availability
A subset of data from our field test is available for readers to practice using the processing scripts, along with TWLogger instructions: https://github.com/jamesfahlbusch/TWLogger
References
Competing interests
The authors declare no competing or financial interests.