ELECTRONIC MONITORING SYSTEM FOR MEASURING HEART RATE AND SKIN TEMPERATURE IN SMALL RUMINANTS

The electronic monitoring of physiological responses is essential for managing animal production systems considering market demands for animal welfare. The objective of this study was to design, build, and test an electronic monitoring system, with recording and wireless transmission capability, for measuring the heart rate and skin temperature in small ruminants. The system had two components: a mobile base unit, mounted on the animal under study, and a fixed base unit. Wireless communication between the mobile and fixed units was performed using a Xbee Series 2 radio frequency transceiver whereas data were recorded and transferred to a secure digital card in the mobile unit. The device was mounted in Santa Inês crossbred sheep using reference equipment while the animals were restrained in steel cages. Subsequently, the device was validated in free-living Dorper sheep in two collection periods (morning and afternoon). The results indicated that the monitoring system accurately measured physiological responses and efficiently recorded and transmitted data, particularly heart rate data. However, one of the limitations was low energy autonomy.


INTRODUCTION
With the increasing demands of the current market structure, the animal production system, production chain, and animal behavioral patterns cannot be analyzed without addressing animal welfare.The consumption of h ighquality products at the expense of animal abuse is unacceptable in some European Union countries (To ma et al., 2012).
There is no consensus on how to objectively measure animal welfare or the effects of a particular management practice on animal welfare (Ohl & Van Der Staay, 2012).However, behavior and physiological responses of farm animals provide reliab le in formation on the health status and welfare of the animals (Bond et al., 2012).
The measurement of physiological responses allows the integration of the informat ion obtained from the animals with changes in their needs as well as the realtime evaluation of an imal husbandry and the management of the microclimate inside facilities (Pandorfi et al., 2012).Therefore, electronic collection and monitoring are important and necessary strategies in animal husbandry (Berckmans, 2014).
Automatic electronic collection and monitoring systems may allo w the analysis of several variables, including physiological responses (Sendra et al., 2013, Quiza et al., 2012), behavioral and consumption parameters (Nad imi et al., 2012;Kashiha et al., 2013), and animal mobility (Mackay et al., 2012); (Almeida et al., 2004), in addition to the detection of diseases (McManus et al., 2016;Alsaaod et al., 2014;Mart ins et al., 2013).Moreover, monitoring animal responses allows a better assessment of the animal responses to environmental stress.
Therefore, the objective of this study was to design, construct, and test an electronic mon itoring system, with recording and wireless transmission capability, for measuring the heart rate and skin temperature in small ruminants.

System overview
The monitoring system had two components: a mobile base unit, mounted on the animal under study, and a fixed base unit (Figure 1).FIGURE 1. Diagram of the electronic system for monitoring physiological responses.
Wireless commun ication between the mobile base unit and fixed base unit was performed using a Xbee Series 2 radio frequency transceiver (Digi International Inc., M innesota, USA).The bidirectional nature of rad io signals allowed the remote control of the mobile base unit by changing the operating mode (recording or telemetry).Data were recorded and transferred to a secure dig ital (SD) memo ry card regardless of the telemetry mode.

Mobile unit
A block diagram of the mobile unit is shown in Figure 2. The unit consisted of an 8-bit PIC18F4620 microcontroller (M icrochip Technology Inc., Arizona, USA) with 64 KB of flash memory; 3,986 bytes of RAM memo ry; 1,024 bytes of EEPROM memory; 36 I/ O ports; 13 10-bit analog/digital converters; three timers; peripherals with a serial peripheral interface (SPI) communicat ion port operating with a universal synchronous asynchronous receiver/transmitter (USA RT) protocol; a Xbee Series 2 radio frequency transceiver (Digi International Inc., Minnesota, USA) with a 2.4 GHz-band IEEE 802.15.4 standard and baud rate of 250 kbps; and non-volatile memo ry consisting of an SD card with maximu m storage of 2 GB.Heart rate data were measured using a receiver and transmitter, consisting of a RE07S receiver board and a T31 coded transmitter belt, respectively (Polar Electro, Kempele, Finland).The T31 trans mitter detects each heart rate using two electrodes and transmits the signals wirelessly to the receiver v ia a lo w-frequency electro magnetic wave.The RE07S receiver receives the signals and retransmits a digital pulse corresponding to the heart rate to the microcontroller.The microcontroller calculates the heart rate by measuring the time interval between the pulses sent by the RE07S receiver.
Skin temperature values were obtained using an LM 35DZ PN junction sensor (Texas Instruments, Texas, USA).The output voltage of the sensor was 10 mV per °C.Therefore, an M CP602 operational amp lifier (Microchip Technology Inc., Arizona USA) with a non-inverting configuration was used, providing a gain of 6.6 times.

Mobile base unit firmware
The microcontroller manages all operations of the mobile base unit, including data acquisition, storage, and transmission.The software embedded in the microcontroller (firmware) was developed using the MPLA B v8.92 platform and a C18 co mp iler, both from Microchip Technology Inc. (Arizona USA ).
The firmware has all the hardware configurat ions, including the settings of the digital/analogic input and output pins, timers, interrupts, communication peripherals (SPI and USART), and A/D converters (Figure 3).
The heart rate signals were acquired using the external interrupt of the microcontroller.Each heart rate signal was transmitted by the T31 transmitter and was received by the RE07S receiver, and the latter sent a digital pulse to the microcontroller.The time between digital pulses sent by the RE07S receiver was analyzed by the timer and provided the time basis for calculating the heart rate.
The skin temperature values were acquired in the AN1 channel of the A/D converter of the microcontroller, and the conversion time was set to 1.6 µs, and the reference voltages were set to 5.0 V and 0.0 V.
Wireless data were transferred using a USART serial communication protocol.The USART peripheral was configured as asynchronous with a baud rate of 9,600 bps.Furthermore, data were stored in the SD memory card using the SPI communication protocol.
Once all the peripherals were configured and activated (SPI and USART co mmunication protocols, A/D converter, and interrupts), a text file was created, in which the name was defined in the firmware and physiological data were written to this file.During data acquisition and recording, it was possible to mon itor the data in real-time by enabling the user to activate the transmission mode by remotely controlling alphanumeric characters.The data were viewed using the Windows® HyperTerminal interface.Data acquisition, trans mission, and storage could be terminated remotely or by pressing a button on the mobile base unit.

Fi xed base unit
The fixed base unit was attached to the animal and received the data transmitted by the mobile base unit.It consisted of a Xbee Series 2 radio frequency transceiver (Digi International Inc., M innesota, USA) connected to a personal co mputer by a universal serial bus (USB) adapter.A virtual 'COM' port was created when the adapter was connected, allo wing the HyperTerminal software to communicate with the fixed base unit as if it were a standard RS232 serial co mmun ication.This software allo wed the real-time visualizat ion of physiological responses on the computer monitor and data storage in a local database.

Data measurement and vali dati on
The objective of data measurement was to compare the electronic monitoring system using Santa Inês crossbred sheep under standard sanitation conditions.The acquisition environment was a raised pen with clay t ile cover, and the animals were restrained in steel cages (0.60 m x 1.20 m x 0.80 m).The mean air temperature and relative hu mid ity at the time of data collection were 32.5 °C and 36.4%,respectively.
The control device for measuring the heart rate was a Smart ECG portable electrocardiograph model SE-1 (Edan Instruments Inc., Shenzhen, China) with four electrodes.For electrocardiographic examination, the electrodes were previously moistened with contact gel and fixed in the thoracic region of each animal.The animals were restrained in the cage because this equipment acquires data when the animal is in total rest.
An infrared thermo meter model 62 MAX (Flu ke Corporation, Washington, USA) and a thermal camera model T420 (FLIR, Oregon, USA) were used as reference equipment for measuring skin temperature.The following standard parameters were used: emissivity of 0.95, target object distance of 1 m; and inclination between the thermal imager and the animal of 0°.Data were collected fro m the upper left flank of the animal.
The mobile base unit was attached to the animal to record heart rate and skin temperature.The unit was placed in a bag and attached to the animal's back.For measuring heart rate, the transmitter belt was placed in the thoracic region, and electrodes previously moistened with contact gel were fixed in the animals for transmitting electrical impu lses.Skin temperature data were recorded after securing the sensor on the upper left flank of the animals.
After data measurement, validation was performed to assess the performance of the electronic monitoring system.Four Dorper sheep were used in standard sanitation conditions in two different data collection periods (morn ing and afternoon).The animals were unrestrained and were maintained in masonry pens with clay roof tiles.The mean air temperature and relat ive air humid ity were 27.3 °C and 43.5% in the morning and 28.4 °C and 41.8% in the evening.
The device was assembled and embedded in the animals fo llo wing the procedures described above.However, in this experiment, an FT1 cardiac monitor and coded T31 transmitter belt (Po lar Electro, Kempele, Fin land) were used for data monitoring and recording, and a T420 thermal camera (FLIR, Oregon, USA) was used in the default settings.The use of this equipment avoids the restraining of the animals, minimizing the effect o f the observer's presence and allowing a comparison with the test equipment.
After data measurement and validation, data were monitored and recorded for 10 min in each tested animal using the control equipment (ECG device, Polar ® heart rate monitor, infrared thermo meter, and FLIR® T420 thermal camera) and test equipment (mobile base unit + fixed base unit).The data were recorded after 10 minutes of fixing the equipment on the animals to acquaint them with the mounted apparatus and assess possible restrictions in animal movement.
After data acquisition using the test equipment (mobile base unit + fixed base unit) and control equipment, the above treatments were compared by measuring the central tendency (averages) and dispersion (standard errors of the mean and coefficients of variat ion) using the computational package Microsoft Excel 2013 (Microsoft, Washington, USA).

RES ULTS AND DISCUSS ION
The designed mobile base unit is shown in Figure 4.The unit was 10.0 cm in length, 8.5 cm in width, and 2.5 cm in thickness, and weighed 186 g.The size of the casing was approximately 121 g.These dimensions and mass preclude the use of this unit in small animals.However, the adequate use of this equipment does not require surgical or invasive procedures, which are necessary when using other equipment of this category (Harris et al., 2001), thus min imizing stress in the tested animals.The period of data acquisition was 1,446 days using a 2-GB memory card.The rate of data acquisition for both variables was two samp les per second.
The peak current used by the equipment was approximately 115 mA.This feature limits the choice of the power supply adequate to the equipment.Energy consumption increases significantly when the telemetry mode and recording mode are activated together, and increased energy consumption precludes data collection for long periods of time, i.e., a little more than two hours in our study.Lowe et al. (2007) solved this problem by establishing a longer data acquisition interval in the recording and wireless communicat ion modules.Harris et al. (2001) used a photovoltaic panel to recharge a battery and maintain the energy supply to the equipment.However, the same authors observed that the mass and size of the device was too large for small ru minants.Silva et al. (2005) addressed this problem d ifferently by using a standby mode in the communication protocol, in which all modules were inoperative to reduce power consumption to the maximu m.With this protocol, these authors achieved an autonomy of 160 hours using a 9.0 V-lithiu m battery.
One prominent feature of the designed model was the combination of data recording in memory and wireless communicat ion.The use of wireless connection to acquire physiological data eliminates the effect of stress caused by the measurement procedure because the animals are not restrained, thus improving data quality and allowing realtime data acquisition.However, in some environments, e.g., confinement cages, wireless connection is not possible because of technical limitations (Faraday cage and electromagnetic interference).In these cases, data recording is more appropriate.In addit ion, only a few commercially available products to date combine wireless communicat ion and data acquisition/recording (Lowe et al., 2007).
The means, standard errors of the mean, standard deviations, and coefficients of variation of heart rate data in the test equipment (mobile based unit + fixed base unit) and control equipment (ECG equip ment) in the measurement phase are shown in Table 1.139 ± 3 bpm 25 bpm 18 m (mean); s (m) (standard error of the mean); s (standard deviation); CV (%) (coefficient of variation).
There were no significant differences in the mean heart rate values between the data acquisition devices (Table 1).In addition, the heart rate values were higher than those considered normal (70 to 80 bpm).
The data collected in the test equipment (mobile based unit + fixed base unit) and control equip ment (Polar® monitor) in two collect ion periods during the validation phase are shown in Figure 5.There were no significant differences in the mean heart rates between the data acquisition devices and data collection periods.Heart rate values in production animals are highly variable because of the effects of different environmental factors and emotional status.Reefmann et al. (2009) evaluated the correlation of different physiological data, including heart rate, with the emot ional state of sheep and observed that positive emotional states led to lower heart rates.This result suggests that this variable is essential for assessing subjective states by allowing the identification of differences in cognitive responses to a particular environmental stimulus (Laister et al., 2011).Therefore, animal fear and an xiety may contribute to the higher heart rates observed in this study, particularly in the mo rning (Figure 5), because the animals were not accustomed to the human presence during adjustments of the test equipment, and the environmental conditions were milder.
The means, standard errors of the means, standard deviations, and coefficients of variation of skin temperature data measured in the test equipment (mobile base unit + fixed base unit) and control equipment (infrared thermo meter and thermal camera) during the measurement phase are shown in Table 2.There were significant differences in the mean temperature values between the data acquisition devices (Table 2).The mode of acquisition of skin temperature data by the test equipment was different fro m that of the infrared thermo meter and thermal camera.However, there were no significant differences in the mean skin temperature values between the latter two devices.
Different protocols are used for measuring body temperature in production animals.The mob ile base unit has a contact sensor that functions by conduction whereas the infrared thermo meter and thermal camera function by radio metry, wh ich transforms the infrared spectral range into temperature information.Therefore, in equipment with contact sensors, micro meteorological conditions (wind speed, solar radiation, and air temperature) affect measurements.In addition, in equipment with infrared sensors (infrared thermo meter and thermal camera), the effect of the emissivity of the measured material is predominant (Sellier et a., 2014).
The mean skin temperatures measured in the test equipment (mobile base unit + fixed base unit) and control equipment (thermal camera) in two data collection periods during the validation process are shown in Figure 6.There were no differences in the mean values between the data acquisition devices and data collection periods.Thermal images of the four animals used in the validation phase in two data collection periods (Figures 7 and 8).The skin temperature values in the validation phase were h igher in the morn ing than in the afternoon.This result may be due to peripheral vasodilation.Heart rate is correlated with peripheral vasodilation, in which increased blood flow to the body surface increases the surface temperature of the animal.The redirect ion of blood flow facilitates the dissipation of heat by non-evaporative mechanis ms (Souza et al., 2005).Therefore, the heart rate was higher in the morning because the skin temperature was higher in this period.
The skin temperature values measured in the test equipment were higher than those measured in the standard equipment in all cases (Figure 6).This result may be because some animals were wooled and the wool served as thermal insulation, contributing to the lower temperatures in the thermal infrared spectrum.

CONCLUS IONS
The designed electronic monitoring system was robust in recording and transmitting physiological data.However, one of the limitations of the system was low energy autonomy.
The designed device measured physiological responses accurately, especially heart rate values.

FIGURE 2 .
FIGURE 2. Block diagram of the mobile base unit.

FIGURE 3 .
FIGURE 3. Flowchart of the mobile base unit.

FIGURE 4 .
FIGURE 4. Design of the mobile base unit.

FIGURE 5 .
FIGURE 5. Means and standard errors of the mean of heart rate data measured in the test equipment (ET) and control equipment (EC) in two data collection periods (morning and afternoon).

FIGURE 6 .
FIGURE 6. Means and standard errors of the mean of skin temperature data acquired using the test equipment (ET) and control equipment (EC) in two data collect ion periods (morning and afternoon).

FIGURE 7 .
FIGURE 7. Thermographic analysis of the study animals in the morning period.

FIGURE 8 .
FIGURE 8. Thermographic analysis of the study animals in the afternoon period.

TABLE 1 .
Mean and variability of heart rate data during the measurement phase.

TABLE 2 .
Means and variability of skin temperature values in the measurement phase.