DoMoS − an open-source device for automated monitoring of endangered garden dormice (Eliomys quercinus)

Obtaining biological and behavioural data on wild animals in the field remains a challenging task. Data collection is either very labour-intensive or sometimes even proves impossible without special technical devices. This is especially true for small nocturnal mammals like the endangered garden dormouse (Eliomys quercinus). Here, we present a new device for automated small mammal monitoring, called DoMoS (Dormouse Monitoring System). It integrates the collection of individual hair samples for DNA analysis, a scale to measure body mass, and a camera trap to monitor activity. During a first field test with garden dormice, data on body mass and activity patterns and hair samples have been successfully collected. The system was designed as an open-source project and can thus be replicated and adjusted to other species’ monitoring needs and research questions. The DoMoS enables the study of various data, including the collection of DNA samples, without capturing the target species. Automatic data collection reduces stress for animals and researchers.


Introduction
The garden dormouse (Eliomys quercinus) is a rodent species endemic to Europe which has been overlooked in wildlife conservation for a long time. During the last 30 years, garden dormouse populations have declined more than any other rodent species in Europe and have lost about 50% of their former distribution (Temple and Terry 2007;Bertolino 2017). However, on the IUCN Red List, the garden dormouse is only listed as "near threatened" (Bertolino et al. 2008), a status that has lately been criticized and, consequently, a change to "vulnerable" has been proposed (Bertolino 2017). Correspondingly, the garden dormouse is listed as "critically endangered" on several national red lists (Germany, Meinig et al. 2020;the Netherlands, van Norren et al. 2020;Pucek 2001) or even as "regionally extinct" (Finland, Rassi 2010) or "extinct" (Juškaitis 2003;Slovakia, Žiak and Urban 2001). Reasons for this rapid decline remain obscure (Meinig and Büchner 2012;Bertolino 2017), while basic biological data on garden dormice, e.g., their reproductive timing, average litter size, food resources, threats, or genetic diversity in and between populations, is scanty (Fedyń et al. 2021). Considering the species' increasing range contractions, precise knowledge of such data is needed to identify appropriate conservation measures to preserve the species (Bertolino 2017). Obtaining biological and behavioural data in the field remains, however, challenging: as with many small mammals, due to the relatively small size of garden dormice and their mainly nocturnal behaviour, data collection is either very labour-intensive or sometimes even impossible without special technical devices.
Fortunately, several new technologies and increasingly affordable devices have complemented the monitoring options for small mammals during the last 20 years, such as movement-and/or heat-activated cameras, small passive integrated transponder (PIT)-tags with automatic readers, as well as automatic recorders for bioacoustics (e.g., Rovero and Zimmermann 2016;Ponchon et al. 2013;Di Cerbo and Biancardi 2013;Mills et al. 2016;Middleton 2020).
Automatic data collection provides several advantages when monitoring wild-living species. Firstly, it may reduce or even entirely avoid stress for the observed animals because direct handling of the individuals becomes unnecessary. Further, the combination of different technical modules for automated observations allows a new dimension of wildlife data collection, as it was shown for the red squirrel in a prototype of a so-called Small Mammal Monitoring Unit (Bosch et al. 2015). This battery-operated device integrated a bait station with automated video and sound recording to assess behavioural interactions and to potentially identify individuals and further carried out bodyweight measurements to assess age and condition of monitored individuals (Bosch et al. 2015).
The current study presents a refined and improved device based on the idea of Bosch et al. (2015) for automated small mammals monitoring, called Dormouse Monitoring System (DoMoS). It integrates the following features: (i) the collection of individual hair samples for DNA analysis, (ii) a scale to measure body mass of moving animals, and (iii) an automatic camera to monitor activity.
This paper shines a light on technical details, explains the results of a first field test, and offers options for future development.

Requirements
A device for automated small mammal monitoring has to meet various requirements concerning its experimental design in order to be practicable for field use.
Hair samples for DNA analysis need to be assigned to individual animals by taking simultaneous photographs to correlate the different data and if necessary to exclude hairs of non-target species.
Garden dormice have a body mass of 50 to 150 g in adult individuals and independent juveniles weigh from 35g upwards (Vaterlaus 1998;Fischer et al. 2018). To find a balance between accuracy, size of the scale, and energy demand, we decided that the body mass should be measured with an accuracy of ± 5 g (< 10% of adult body mass).
To allow for accurate allocation of the collected data, each piece of data should be time-stamped.
Since the device is designed for long-term outdoor use, the hardware engineering technical requirements have to match the prevalent conditions. Due to hibernation, garden dormice in Germany are usually only active when temperatures range between 5 and 40 °C. As a consequence, a monitoring device has to perform under such conditions. Additionally, the control system of the unit stands exposed to environmental influences, such as dust, humidity, and rain. Therefore, the construction of the device should be in accordance with IP protection class IP 54 (DIN EN 60529: protected against dust in damaging quantities, complete protection against contact; protection against splashing water on all sides). Further, it would be preferable to use prefabricated components, such as pipe systems and control boxes, because they are cheaper, do not need additional production tools, and easy to assemble. Finally, it is crucial to use rodent-proof cables and electronics.
Since garden dormice will be attracted by food in the device, the technology should keep working despite potential accumulation of urine and faeces during deployment. Generally, the device should be transportable and operable for a single person. Operation and maintenance of the device require a simple, modular system and straightforward training of the dedicated operating personnel.

Overview of the DoMoS
To make the device replicable, we made an effort to use mainly materials that are easy to buy (e.g., in hardware or electronics stores) and designed the associated software as open source (Suppl. 1).
Due to the requirements for cleaning and transport, a modular system represents a practical choice. The housing consists of PVC sewer pipes (110-mm diameter), fitted together with connecting sleeves and sealing elements (Fig. 1). The system contained the following modules: a hair collection module for non-invasive sampling of DNA, a weight module to measure the body mass of moving animals, a camera module to document the animal's movements inside the device, and an electronics module, where the most electronics are installed in an IP-protected plastic box, containing two microcontrollers, a motor shield, a real-time clock (RTC), a secured digital (SD) card memory unit, and two battery packs.
In order to be able to replace individual modules for maintenance, plug connections have been inserted in all cables connecting the modules. Weather protection is achieved with an additional small roof, which is supposed to protect against direct rain as well as falling branches or hail (not shown in Fig. 1).
Detailed descriptions of the devices' construction, a list with utilized materials, and the software code are available as supplementary material (Suppl. 1 and 2).

Weight module
The weight module measures the body mass of passing animals. A plastic base pipe with a maintenance hatch was used as the basis for the module. The measuring bar with a Plexiglas weighing plate is screwed into the lid ( Fig. 2A). The cables are led out of the interior through a hole on the side, meaning that urine or humidity from condensation can flow past them into the lowest part of the pipe section and do not affect the electronics. Strain gauges serve as weight sensors. They are installed in a bending beam which is connected to the lid of the maintenance hatch.
The bending beam reacts to pressure and torque, so the measured weight does not depend on the position of the  Opened hair module with rolls, gear wheels, and a tuned motor weight in relation to the point where it is fixed to the bottom of the pipe. The change of the resistance in the strain gauges changes the measured current by bending the bar. These differences in analogue signals are amplified and converted into a digital signal by an A/D converter.
The dynamic measuring of the body mass of passing or moving animals is partly ensured with a combination of a high sampling rate of 80 Hz and an algorithm to create a cleaned-up average. Currently, the algorithm is equipped with a threshold of 30 g to exclude measurements from smaller non-target species. The threshold of 30 g for scale activation was set close to the weight of an independent juvenile, leaving some margin for error; juvenile garden dormice can be active outside the nest and still weigh less than 30 g (unpublished data). The advantage of the trigger value is the reduction of data to be checked, as several data sets generated by mice are automatically excluded from data storage. If necessary, this trigger value can be adjusted and even data exceeding a certain maximum weight can be excluded via the software.
All values are stored in an array that is limited to 1000 values to limit the necessary computing power of the microcontrollers. A result is recognized when either these 1000 values have been recorded or when no significant values have been measured for 1 s, so it can be assumed that the weight module is empty. The following procedure smoothens the value: In the first iteration, an average value is calculated from all measured data. This average value is provisional and used for further approximation of the true weight. In a second iteration, all individually measured values are compared with the provisional average value. The algorithm only takes values into account for averaging if the individually measured values deviate less than 10%. The final result is the approximated body mass.
It is, however, not possible to weigh an animal correctly without full contact with the plate and some animals might jump on the plate, which creates a heavier weight. Such data has to be excluded manually by checking the images of the internal camera.

Hair sampling module
For hair sampling, the previously developed method of the Small Mammal Monitoring Unit (Bosch et al. 2015) was modified and refined (Fig. 2B). The automated unwinding of fresh tape and subsequent winding of the tape containing samples is conducted with two rolls and a precisely tuned motor, which is based on gear wheels. Moving the tape immediately after contact with an animal prevents crosscontamination. In order to distinguish different hair samples, a mechanical marking is applied to the tape with a puncturing device. Since a linear movement was required for puncturing, a rack and gear were used. After collecting the samples from the device (during regular maintenance intervals every two weeks), the adhesive tape used for hair collection (tesa ® flooring-tape, residue-free, removable) was stored in sealable plastic bags with silica gel bags to keep hair samples dry and to avoid DNA degradation.
The passage height in the hair sampling module was adjusted to the average shoulder height of garden dormice (approx. 2.5 cm) so that they come into sufficient contact with the tape, which ensures that enough hairs stuck to the tape.

Internal camera module and camera trap at the entrance
A TTL-Serial JPEG camera (Adafruit Industries, LLC New York) is used in the camera module. It was chosen because of its easy handling due to available software libraries, the robust design, a waterproof housing, and the internally controlled night vision function. The camera is mounted in a pipe cover within the pipe system. The camera base allows an easy screw connection. The camera data is stored on the SD card in the electronic module and can be assigned to the other data with a timestamp.
A second external camera monitors the entrance/exit of the DoMoS. We used a standard camera trap (Minox DTC 550, Minox, Germany) with partly covered flash, separate power supply, and data storage on a separate SD card.

Electronics module
The electronics module contains two microcontrollers, a motor shield, a real-time clock (RTC), an SD card memory unit, and two battery packs. A printed circuit board was developed to connect both board computers from Arduino (an open-source electronic prototyping platform) and the different shields (RTC, motor driver, SD card, and weight module amplifier). The advantages of this board are the reliability of the contact and the short time needed to assemble the components. The RTC provides the precise time for each timestamp and thereby helps to organize the data sets. A battery (button cell, CR1220) ensures keeping the correct time even if the device is powered off.
Since the processing of the camera data takes several seconds, no other tasks can be processed by the controller during this time. We have therefore used multithreading so that the individual modules can process their data independently before it is saved. In addition to parallel data processing, multithreading enables a unique software structure, by allocating the modules to separate parts of the software.
One of the microcontrollers on the board controls the hair removal motors. If the rollers are turned further to release a fresh adhesive surface, a signal is sent in a one-way communication to the other microcontroller. The microchip will signal the hair removal process to continue via the "High"

System optimization and study sites for the field tests
In the beginning, the separate modules of the device were tested in the lab without exposure to animals. After technical optimization, all modules were combined, and again underwent several trials. For instance, sensors and weight module had to be calibrated and the camera was adjusted to the conditions inside the tube unit. Also, the time between the sensor signal and the duration for the turn of the sticky tape inside the hair sampling module had to be defined. A first test in the field took place in October 2019 to check if garden dormice would enter the device and if all the components work in principle under field conditions. The test revealed potentials for improvement of the used materials (Fig. 3A). Garden dormice gnawed on the electronics and especially the urine of the animals caused unexpected electronic failures. Several optimizations were implemented after the trial to ensure a rodent-proof machine setup (cable and electronics protection, calibration in the scale). We chose three locations in Southwest Germany with well-documented garden dormouse presence for the field test in summer 2020 (Table 1). At each site, two of the improved devices were deployed to ensure continuous data collection, even in case one of them would fail. Garden dormice were baited with fresh and dried fruits like grapes, apricots, plums, apples, raisins, and oat flakes.
The DoMoS had to be maintained daily in the field (charging the batteries, replacing bait) and a full-service (cleaning, changing the adhesive tape) had to be done weekly or biweekly. All maintenance activities were carried out by specially trained volunteers (citizen scientists). Holiday breaks of the volunteers caused intermissions in the data collection.

Field data analysis
Data analysis started with meticulous checks of the camera images. Garden dormice are easily recognized due to their characteristic face mask. Only data collected during a visit of a garden dormouse was considered for further analysis while body mass and activity data of mice and voles were excluded. By comparing the images from the camera trap at the entrance with those from the indoor camera, the number of garden dormice that were in the DoMoS at a given time was determined. If more than one animal sat on the weight module at a time or animals were observed jumping around on the weight module, the body mass data were deleted. The body mass data of each animal was marked in relation to the timestamps from the weight module and the internal camera.
From the individually collected data of each animal, a comprehensive data set was manually formed, consisting of a picture, body mass information, and a hair sample. For the analysis, the timestamps of the camera trap images showing garden dormice were plotted against sunset and sunrise.
Before the genetic analysis of hair samples, the first step was to visually assess the adhesive tapes for the presence of garden dormouse hairs. We selected parts of the tape that contained several hairs that we visually assigned to be Eliomys topcoat with roots (≥ 20 hairs pointing in the same direction wherever possible; compare Fig. 3D), further reducing the likelihood of mixed samples. To remove the hairs from the tape, each piece of tape was rinsed with 96% ethanol which softens the glue and allows the hairs to be detached with clean forceps. Subsequently, DNA was extracted using the QIAamp DNA Investigator Kit (Qiagen) and samples were SNP genotyped using the microfluidic arrays of Fluidigm (96.96 Dynamic Arrays, Fluidigm; for a detailed description of the genotyping method, see von Thaden et al. 2017). The marker panel utilized for the present study encompassed 96 highly informative SNP markers for Eliomys (unpublished data), selected for individual identification and assessment of genetic lineages (following guidelines in von Thaden et al. 2020).

Results
All devices worked without problems during the whole field season. Garden dormice visited the DoMoS at sites 2 and 3 the night after deployment and continuously from then on (Fig. 3B). At study site 1, no garden dormouse entered the DoMoS placed on the ground during the first month, even though garden dormice were abundant at the study site. The devices were, however, visited by other small mammals, mainly yellow-necked mice (Apodemus flavicollis). Arthropods (mainly spiders and moths) also triggered the motion sensor resulting in pictures and activation of the hair sampling unit. The device was then moved from the ground onto a trestle near a tree trunk in 80-cm height, resulting in garden dormouse visits and fewer occupations by mice and spiders.
At site 2, garden dormice moved into the DoMoS after 5 weeks and used it as a nest box. Therefore, the monitoring had to be stopped at the beginning of August.
The internal cameras of the six units were operational in total on 217 days. Small mammal activities were detected on 117 days. In total, 4373 small mammal images were taken, 2243 images of garden dormice and 2130 of mice (Apodemus spp.).
Garden dormice were active inside the units nearly exclusively during darkness starting soon after twilight and finishing their visits before the break of dawn, with higher activities in the first half of the night (Fig. 4).
By comparing the images of the camera trap at the entrance and of the internal camera, we were able to identify 33 occasions where single garden dormice moved repeatedly over the weight module. In this way, we achieved up to 11 weightings of the same individual within up to 2 h. In these 33 cases, it was possible to calculate the accuracy of the scale measurements. The standard deviation of the measurements ranged from 1.1 to 13.0% of the animals' approximated body mass. High standard deviations could be connected to changes in body mass following repeated feeding from the bait (Fig. 5).
The hair sampling within the automated collection module worked as intended (Fig. 3C, D) and 11 pieces of tape, each containing several hair samples could be obtained and were stored for subsequent analyses. A subsample of 30 hair samples corresponding to different monitoring periods and locations was selected for genetic analyses. Twenty-seven of the samples could successfully be genotyped. With the help of the data collected with the internal cameras, the three samples that failed to amplify could later be assigned to have originated from non-target species (Apodemus spp.) that had entered the sampling module. From the 27 successfully genotyped samples, 11 individuals could be identified and reliably distinguished (site 1: five individuals; site 2: four individuals; site 3: 2 individuals; von Thaden in prep.). Some of the detected individuals were found multiple times over the field test periods, indicating that the animals were undeterred by the sampling and data collection inside the devices.

Discussion and future prospects
Handling wild living mammals to obtain data may result in stress for both the animals and the researcher. Derived from a concept for taking pictures of squirrels in combination with hair samples (Bosch et al. 2015), it is now a field-tested device with several combined features. It allows to easily obtain data sets on body mass, activity, and DNA samples without direct contact or interaction between the researcher and the study species.
Volunteers successfully took care of the devices in the field and contributed their ideas for improvements. This interaction between the technical engineers, biologists, and volunteers is not only in accordance with the principles for citizen science projects proclaimed by the ECSA (2015) but was a key to the successful development of the devices. The body mass and activity data gap in this technical study was not essential in the development of the device.
The technical part of developing the DoMoS was challenging despite a good example of the concept for squirrels (Bosch et al. 2015). The modular system allowed improvements to be implemented within the running season. Our results show that it was possible to measure precise body mass data resigned to individual animals when combining carefully reviewed images and the data from the weight module. The measured body mass data is in accordance with the known range of garden dormouse body mass (Storch 1978;Vaterlaus 1998;Fischer et al. 2018). Garden dormice need to accumulate fat reserves for hibernation in the northern part of their range (Storch 1978) and we were able to document this increase in body mass in preparation for the hibernation during the field test (Fig. 4). This data set shows the potential of the DoMoS to precisely observe animals in the field and collect their body mass data (as one indicator for their fitness) with very little or even no disturbance.
Using camera traps has become a standard method for many research questions in wildlife biology (Rovero and Zimmermann 2016). However, small mammals present particular challenges for the use of camera traps (Di Cerbo and Biancardi 2013;Littlewood et al. 2021;Mills et al. 2016). We successfully adjusted the cameras to small distances and light conditions inside a tube system. The results of the images with timestamps obtained during the field test already gave a valuable insight into the daily garden dormouse activity pattern at the study sites. The field test data is in line with the results by Mori et al. (2020) who stated that their observed Alpine garden dormouse population showed a strictly nocturnal behaviour, with an activity peak before midnight. Apart from insights into the activity patterns of garden dormouse populations, the combination of images from the internal camera and outside camera traps were used to assign data from the weight module to single dormouse individuals. Due to the modular nature of the device, specially adapted cameras could be added if necessary.
The collected hair samples allowed the investigation of several population-specific genetic parameters. In this study, we were able to distinguish several individuals by analysing a subset of the collected samples. Future studies with a standardized experiment design will be able to ascertain levels of genetic diversity and differentiation for local populations, which will be vital for effective conservation measures. When stored in a dark and dry place, the samples should be suitable for genetic analyses for years, so that analyses could also be carried out at a later point in time if necessary (Reiners et al. 2011).
The combination of pictures, body mass, and DNA samples allow insights into the current living conditions of small mammals like the appearance of juveniles, growth rates (shown in the body mass of juveniles), the preparation time for hibernation, and daily and yearly activity. Further, it will be possible to investigate relationships between individuals like paternity in juveniles or the number of individuals with DNA samples. While developing the system, we specifically decided to use open-source technologies, open software, and a modular system. Industrial solutions would probably work more stable, the open-source system and the open software, however, allow easy replication of the system and hopefully encourage further improvements by the scientific community. The modular system allows adjusting to other species and study subjects. Possible additional features could be a reader for RFID-chips, collection of faeces or urine samples or recording environmental data. Weight reductions and less energy demand are planned for future versions, aiming for better transportability and convenient use at remote sites.
A particular benefit of the DoMoS is that the target species do not necessarily have to be captured for sampling DNA and body mass. It can automatically collect data daily which could be otherwise highly stressful to animals and researchers. Thus, the DoMoS is a promising tool for the research of garden dormice and other small mammals' biology. It is also beneficial for PR-work thanks to the combination of a novel and fascinating technique with new insights into the biology of the target species.
Funding Open Access funding enabled and organized by Projekt DEAL. This project is/was funded by the German Federal Agency for Nature Conservation with resources from the Federal Ministry for the Environment, Nature Conservation, Nuclear Safety and Consumer Protection. It is part of a German wide project by Bund für Umwelt und Naturschutz BUND (Friends of the Earth Germany), Justus Liebig University Gießen, and the Senckenberg Gesellschaft für Naturforschung in the Federal Programme for Biological Diversity called "In search of the garden dormouse". Within the project, an effective conservation concept for the garden dormouse will be developed and implemented.

Declarations
Research involving human and animal participants During sample and data collection, wild animals were free to choose whether or not to enter the devices. No extra animal discomfort was caused for sample collection for the purpose of this study. Therefore, it was a non-experimental study in the sense of the German Animal Welfare Act ( § 7 para. 2) and approval by an ethics committee was not required. Advice provided by the Association for the Study of Animal Behaviour/Animal Behaviour Society Guidelines for the Use of Animals in Research (Animal Behaviour 2020) was followed.

Conflict of interest
The authors have no relevant financial or non-financial interests to disclose.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/.