Precision Livestock Farming: A Low-Power LoRaWAN System for Behavioral Monitoring

Category :

Hardware Design, Firmware Development, Cloud & IoT Integration

Client :

Department of Agriculture, Food and Environment - University of Catania

The Challenge

Improving Dairy Cow Health and Productivity

In partnership with the Department of Agriculture, Food and Environment of the University of Catania, we addressed a critical need in modern dairy farming. Advanced studies in dairy farms indicate a growing need for intelligent solutions to monitor and classify animal behavior. The primary objective is to promptly identify critical situations, such as the heat period (oestrus) or signs of discomfort, to allow for preventive intervention. The quality of life of dairy cows directly impacts both milk quality and reproductive capabilities. The challenge was to develop a smart, inertial solution capable of continuously monitoring and analyzing behavioral data from free-roaming cows to provide an index for the early and automatic identification of health states. The solution needed to be suitable for large, rural areas, demanding a low-power, long-range communication protocol and an exceptionally long battery life.

Our Solution

A Smart, Wearable Multi-Sensor Device

To meet these requirements, we developed a smart, wearable device designed for both foot and neck placement. The core of the solution is the RAK3172 SoC, which integrates an STM32WLECC microcontroller and a LoRa radio transceiver, in a compact, pre-certified module. The device is powered by a 3.7V, 2600 mAh rechargeable LiPo battery, with charging managed by a dedicated circuit via a standard USB Type-C connector.

The device integrates two primary sensing systems, where each of them was specifically addressing two different project scenarios:

Inertial Sensing: We chose a low-power, 3-axis accelerometer with 12-bit resolution and a ±8g range. This sensor is ideal for wearable applications that detect motion.
Environmental Sensing: To allow for environmental monitoring, an additional sensor was integrated. This enables the same design to be used for both behavioral tracking and environmental sensing when positioned in a fixed location where the animal resides.

The device's firmware was designed for energy efficiency and continuous operation. It samples acceleration data and processes it within 15-minute observation windows. During these periods, key parameters are extracted to classify behaviors like feeding, lying, or drinking. This activity summary is then transmitted as a compact data packet using the LoRaWAN protocol, selected for its long-range and low-power benefits. Average current consumption for the inertial sensing was 186 μA (with a 15 min telemetry interval), while for the environmental sensing only 20.18 µA (with a 5 min telemetry interval) as shown by the power profiler measures:

Inertial sensing average current consumption across all the working states.

Environmental sensing average current consumption across all the working states.

The network architecture, shown in the picture below, is built on LoRaWAN, making it suitable for large, rural environments. The system comprises end-nodes, gateways, and a network server. A solar-powered gateway was chosen for its energy efficiency, integrated 25Ah battery, and robust IP67-rated design. For the LoRaWAN Network Server, the Loriot.io commercial service was selected due to its scalability, reliability, and reduced operational costs. Finally, the open-source ThingsBoard platform was used for the backend and front-end, providing data storage, analytics, and user interfaces for data visualization.

Results

Validated Behavioral Classification and Exceptional Longevity

The project successfully delivered a comprehensive system for the early detection and classification of cow behaviors.

Early Oestrus Detection: The algorithm, based on published research, accurately calculated classification coefficients and determined the real-time probability of a cow being in heat. Farmers at the experimental site confirmed these identified events.
Behavioral Classification: The system effectively classified behaviors like drinking, feeding, and lying using accelerometer data. While the results showed fair effectiveness in behavior classification, areas for improvement were identified, especially for "standing" and "walking" behaviors.
Exceptional Battery Life: A significant achievement was the energy optimization of the device. The inertial application achieved an estimated battery life of 19 months, far surpassing the initial 6-month requirement. For environmental monitoring, the estimated battery life extends to over 10 years, demonstrating the solution's remarkable longevity and efficiency.

What’s involved: LoRaWAN, I2C, SPI, Cloud Integration, Driver Development, Circuit Design

Prev Project
ETASS