Next Article in Journal
Improving Safety in Food Allergen-Specific Oral Immunotherapy
Previous Article in Journal
Structural Health Monitoring of Concrete Bridges Through Artificial Intelligence: A Narrative Review
Previous Article in Special Issue
The Impact of Cloud Versus Local Infrastructure on Automatic IoT-Driven Hydroponic Systems
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Low-Cost IoT and LoRaWAN-Based System for Laying Hen Identification in Family Poultry Farms

by
Roberto Finistrosa
,
Carolina Mañoso
*,
Ángel P. de Madrid
and
Miguel Romero
Control and Communication Systems Department, Universidad Nacional de Educación a Distancia (UNED), Juan del Rosal 16, 28040 Madrid, Spain
*
Author to whom correspondence should be addressed.
Appl. Sci. 2025, 15(9), 4856; https://doi.org/10.3390/app15094856 (registering DOI)
Submission received: 27 March 2025 / Revised: 22 April 2025 / Accepted: 25 April 2025 / Published: 27 April 2025
(This article belongs to the Special Issue Technologies and Techniques for the Enhancement of Agriculture 4.0)

Abstract

:
In medium- and large-scale poultry farms, automated systems optimize key processes, from egg production and grading to environmental control, reducing manual labor and ensuring an optimal environment for the birds. However, these technologies remain largely inaccessible to small family farms due to high implementation costs. In particular, the selection of laying hens, an essential process for productivity, is still performed manually and requires considerable time and effort. This study presents the development of a modular, low-cost, and minimally invasive IoT system for the automatic detection of laying hens in family-run poultry farms. Additionally, the system enables environmental monitoring and utilizes LoRaWAN networks for efficient long-range data transmission. The collected data are stored on a centralized platform and integrated with web, mobile, and messaging applications to provide real-time access to information. The modular system architecture, developed using open-source software, ensures replicability, scalability, and adaptability to different production environments. The feasibility of the system has been validated through field trials in a real-world environment, demonstrating effective performance, low implementation costs, and high farmer satisfaction, with the user highlighting its positive impact on poultry farm management.

1. Introduction

The agricultural sector faces numerous challenges in the 21st century, including increasing food demand, environmental sustainability, resource optimization, and the ongoing decline and depopulation of rural areas [1,2]. In this context, the integration of advanced technologies such as robotics, the Internet of Things (IoT), artificial intelligence (AI), drones, machine learning, and Extended Reality (XR) and Virtual Reality (VR) has been recognized as a key strategy for enhancing the sector’s efficiency and productivity [3,4,5].
In contrast with the capacity of large-scale producers to invest in advanced technological infrastructures, small farms face significant constraints in implementing technological solutions due to the high costs associated with such investments. To address this challenge, the development of cost-effective solutions has emerged as a key area of focus. This includes the creation of low-cost Internet of Things (IoT) systems [6], long-range and low-power communication networks (Low-Power Wide-Area Network, LPWAN) [7], and open-source platforms [8]. These initiatives are crucial for democratizing access to these technological advancements [9]. In this regard, IoT with low-cost electronics enables the real-time acquisition of critical variables, supporting data-driven decision-making and automating agricultural processes. This, in turn, enhances efficiency and promotes more sustainable resource management [10]. Additionally, LPWAN networks have emerged as a promising alternative for connectivity in rural environments, allowing efficient long-range data transmission with minimal energy consumption. This technology has been applied in various agricultural applications, ranging from crop monitoring to environmental variable control in livestock farming [11]. The integration of these networks with open-source software and data analysis platforms enables the automation of critical tasks, reducing the need for manual intervention and enhancing the effectiveness of decision-making processes.
In the context of the agricultural sector, the present study focuses on poultry farms. In Spain, the regulatory framework for poultry farming is established by national legislation, which is based on various parameters, including the nature of the activity and the rearing system, among others [12]. Regarding farm size, the following classification is generally used:
  • Family or small-scale farms: These farms are run by a family or a small group of people and have a relatively limited production. They may house anywhere from a few dozen to a few hundred birds. They generally focus on production for family or local consumption. In addition, they often use organic or ecological production techniques and follow sustainable and environmentally friendly practices, such as using organic feed, providing outdoor access, and adopting more natural rearing systems.
  • Commercial or medium-scale farms: These farms are larger than family farms and are intended for commercial production. They may house a few hundred to several thousand birds, depending on the type of production (eggs, meat, or ornamental birds). They typically use more intensive production systems and modern technology to maximize efficiency and productivity.
  • Industrial or large-scale farms: These are the largest poultry operations and are highly mechanized and technologically advanced. They can house tens of thousands or even hundreds of thousands of birds. Their focus is on large-scale egg or meat production, and they are often vertically integrated with processing and distribution companies. These farms typically employ highly intensive production systems and may be subject to stricter environmental and animal welfare regulations.
In medium- and large-scale poultry farms, poultry houses are equipped with modern technology for egg collection and grading, ventilation and climate control, automated feeding systems, and monitoring and alert systems, among others [13,14,15,16]. These automated systems not only improve the efficiency and productivity of egg production but also help reduce manual labor and ensure an optimal environment for the hens [17]. From a technological perspective, a comprehensive review of these advancements can be found in [18], covering applications in 26 countries worldwide. These technologies have been categorized into five main areas: individual bird perception, behavior recognition, health monitoring, environmental monitoring, and poultry farming robots.
However, family poultry farms are generally not equipped with these advanced technological systems, as their implementation represents an investment that is not economically viable. The costs associated with automation are often prohibitive for these farm owners, particularly for those whose production is intended for self-consumption. Nevertheless, some initiatives have emerged to overcome these limitations, aiming to introduce cost-effective technological solutions in small-scale poultry farming. One such example is the cooperative company Voluta, which seeks to bridge the gap between rural and urban areas to combat rural depopulation, the digital divide, and the disconnect from nature. To achieve this, the company has developed a smart farming solution that integrates sensors and actuators, enabling remote chicken coop management via a Telegram group, where all members of a community can participate [19]. A similar effort is presented in [20], which developed an IoT system to automate the feeding and watering of poultry in small farms. Our study aligns with these initiatives, introducing the development of an IoT-based system integrating LPWAN networks. The proposed system is designed to be modular, low-cost, easy to maintain, and minimally invasive, making it adaptable to the specific needs of family chicken farms. The main contribution of the developed system lies in its ability to automatically detect laying hens—a functionality that, to the best of our knowledge, has not been thoroughly explored in previous research. In the field of chicken farming, selecting the most productive birds is a fundamental process, as they are directly responsible for egg production. This need becomes even more critical considering that a form of natural selection can occur within the chicken coop: laying hens tend to peck at or even eliminate weaker birds that do not produce eggs. Therefore, it is essential to systematically and continuously identify the most suitable hens for egg laying, ensuring both efficiency and animal welfare within the production system.
To carry out this process, poultry farmers employ manual handling and observation techniques. These assessments focus on various physical attributes, including the size and color of the comb, the shape of the cloaca, and the bird’s overall weight [21]. Another traditional method, although only feasible in small family farms, involves the use of nesting boxes with one-way doors. Once a hen enters, it cannot leave until manually released, allowing the farmer to identify it. This approach typically requires three daily visits to the chicken coop: in the morning to activate the one-way doors, at midday to identify and release the hens, and in the evening to repeat the process and deactivate the doors. Each visit may take 30 to 45 min, making the process time-consuming and physically demanding—especially in confined or poorly ventilated environments. Furthermore, data collection in such manual processes may lack consistency, as it requires meticulous discipline from the poultry farmer. The farmer must correctly identify the hen trapped in the nesting box (usually by means of prior tagging or marking), register the event (often in a physical notebook), collect the egg, and release the hen. This routine must be performed rigorously during each visit in order to ensure data reliability. Consequently, the accuracy and consistency of the records heavily depend on the farmer’s availability, attention to detail, and adherence to the protocol over time. According to European regulations [22], poultry farms must comply with specific animal welfare standards, particularly affecting large-scale operations. The Farm to Fork Strategy [23] promotes sustainable agricultural practices that enhance animal welfare and environmental responsibility. As part of this sustainability-driven approach, large-scale farms that confine hens in cages with limited mobility face increasing restrictions, whereas farms that provide hens with ground access and space for movement receive incentives. These new regulatory demands, combined with the variability in egg-laying locations and the limitations of traditional selection methods, highlight the growing need for automated solutions to identify laying hens.
In order to validate the novel function of automated laying hen identification within our system, a proof of concept (PoC) has been developed based on real-world requirements in small-scale chicken farming. The objective of the PoC is to demonstrate the feasibility of the concept, rather than to develop a final commercial product. The system is designed with a multi-layer architecture, incorporating low-cost electronic components that collect data from the nesting boxes to determine whether a hen has laid. Additionally, it gathers environmental data from the chicken coop, such as temperature and humidity. The system also integrates a low-power communication network (LPWAN) that transmits these data over the Internet and uses open-source software to process and present the information to users in a meaningful way.
The specific objectives of this study are as follows:
  • The development of a sensorized node prototype to detect laying hens—specifically, to determine whether a hen has laid an egg based on the duration of its stay in the nesting box—with laboratory and field testing to verify its functionality.
  • The development of a sensorized node prototype for capturing temperature and humidity data from the chicken coop, with laboratory and field validation.
  • The deployment of an LPWAN communication network will be undertaken, with laboratory and field verification of its performance.
  • The implementation of a web, mobile, and messaging application will allow users to interact with the system remotely, enabling real-time monitoring of chicken coop conditions from any location. This will significantly enhance system usability and accessibility.
  • Storage of collected data on a server, enabling subsequent analysis of behavioral patterns in hens, particularly those related to egg laying, such as estimating the number of eggs laid per hen or assessing the influence of temperature and humidity on egg production, among others.
Our work also aims to serve as a foundation for integrating technological solutions into family poultry farms. On the one hand, it introduces functionalities that, to the best of our knowledge, have not yet been implemented, such as the automatic identification of laying hens. On the other hand, it incorporates technologies suited to the specific conditions of these farms, primarily rural environments, including LPWAN communication infrastructure, which could be a shared and valuable resource for all poultry operations in these settings.

2. Materials and Methods

In the following, the requirements will be detailed according to different aspects that affect the choice of the technological tools used for the development of the work.

2.1. Requirements

This section describes the fundamental requirements that guided the system’s development, meticulously organized into discrete categories.
Functional Requirements: The high-level functional requirements that influenced the selection of technologies are as follows:
  • Individual identification of hens in mobility (i.e., not confined to cages) (for flocks ranging from 1 to 1000 hens);
  • Identification of nesting boxes (ranging from 1 to 100 nesting boxes);
  • Logging the duration of nesting box usage by each hen;
  • Monitoring of environmental variables such as temperature and humidity inside the chicken coop.
Connectivity: The system must be capable of operating in rural areas where cable or fiber-optic connectivity is limited, and mobile coverage is not guaranteed.
Energy: Due to the remote location of the nesting boxes, the devices must be autonomous and battery-powered. Minimizing energy consumption is a priority.
Processing and Storage: Assume a maximum of 1000 hens, 170 m2, and 150 nesting boxes and that each hen lays one egg per day (under optimal conditions, commercial laying hens are capable of laying about 300 eggs per year, free-range hens lay about 200 eggs per year, and finally, pure-bred hens lay about 100 eggs per year). Based on this scenario, the required capacity for message storage and data logging is low, and the system’s processing performance requirements are minimal. Consequently, it is viable to utilize a low-performance computer, such as a Raspberry Pi, to host the system’s application service.
Size, Shape, and General Characteristics: The IoT device to be installed in a node should be compact and low-profile in order to minimize spatial requirements and prevent obstruction of bird movement. Due to the potential for the nesting environment to contain moisture, dust, and fluctuations in temperature and humidity, the device should be resilient and well protected. It should also be safeguarded against damage from hens or external elements. The components should be efficiently integrated into the device design to optimize space and facilitate both installation and maintenance. Ease of access is also necessary. Although the device will be installed inside the nesting box, its components must remain accessible to facilitate initial setup, battery replacement (if necessary), periodic maintenance, and secure mounting. The device should be able to be securely mounted in the nesting box to avoid unwanted movement or damage.
Scalability: To ensure that the solution is as scalable as possible, the following factors have been considered in both its infrastructure and architecture:
  • The modular design divides the system into independent, well-defined modules, allowing each component to be scaled independently without affecting the rest of the system. This facilitates the addition of new features or the expansion of capabilities without having to redesign the entire product. This strategy has been applied to both hardware and software.
  • The utilization of open standards is essential for the seamless integration of systems and the adoption of novel technologies in a progressive manner. This approach employs standardized and widely accepted communication technologies and protocols for IoT, ensuring interoperability and facilitating the implementation of advanced functionalities as technological advancements evolve.
  • Distributed architecture: The system has been designed as a distributed architecture across multiple nodes or devices, avoiding reliance on a single central unit. This enables horizontal scaling by adding more nodes as required to accommodate larger workloads.
  • Our system has been developed for utilization as a cloud service, with the purpose of data storage, information processing, and communication management between devices. A key feature of cloud services is their capacity for automatic scalability, which enables them to adapt to fluctuations in demand in a dynamic manner, thus obviating the need for manual intervention.
  • A remote monitoring and management tool has been implemented, thereby enabling centralized monitoring and control of the system, even in instances of growth and increased complexity. This facilitates the process of troubleshooting and resolution, as well as the implementation of updates and improvements.
  • The hardware is designed with future expansion and upgrades in mind. For instance, the design incorporates space for the addition of sensors or communication modules, and the interfaces have been developed to be compatible with future hardware versions.
Security: Although this product does not require specific safety measures—since its operation does not pose risks to humans or animals—the following basic security protocols typical of standard IoT systems have been implemented:
  • Device security: All nodes have been designed to prioritize security, with a protective casing that is intended to prevent damage caused by hens pecking or scratching. Additionally, the device has been bolted to the floor of the nesting box to prevent accidental displacement.
  • Data security: End-to-end encryption is applied to protect data in transit. Secure communication between devices and servers is ensured using protocols such as Transport Layer Security (TLS), Secure Sockets Layer (SSL), and Hypertext Transfer Protocol Secure (HTTPS).
  • Message security: encrypted messages are used between nodes and the gateway. Network access control is facilitated by a network session key (NwkSKey), while application access control is managed through an application session key (AppSKey).
  • User security: User access to the system is provided through secure password authentication, two-factor authentication, and role-based access policies.
  • System security: the firmware and software used are updated to the latest versions to minimize the risk of security breaches and exposure to malicious software.

2.2. Technology Selection

This section analyzes the selection of technologies according to the specific requirements established for the development of the system.

2.2.1. Nodes

Two types of sensor nodes have been developed for the proposed system. The first one is the nesting box node, designed to detect the presence of laying hens inside the nesting box. The second one is the environment node, which is responsible for capturing environmental variables that may affect the animals in the chicken coop, such as temperature and humidity.
In order to design the nesting box node, several technologies for the identification function were evaluated [24,25]. Initially, image recognition technology was considered. This technology was ruled out due to its high bandwidth and processing requirements, which the node could not meet according to the established requirements. Another technology evaluated was the use of infrared temperature sensors and ultrasonic distance sensors. The use of sensor devices such as GY-906, MLX90614, and HC-SR04 was also ruled out, because they require a clear line of sight to the target, which is not guaranteed in the dusty and harsh environmental conditions typical of poultry farms. Furthermore, they demand specific sealing and maintenance conditions to ensure optimal performance, making them unsuitable for the intended deployment context.
The advantages of using wireless technologies for monitoring have been explored by various researchers, enabling low-cost and low-consumption developments in agriculture and the food industry [26]. Finally, we opted for RFID/NFC (Radio Frequency Identification/Near-Field Communication) technology as this high-frequency, short-range wireless communication technology is particularly well suited to the proposed system, as its limited range aligns precisely with the system’s operational requirements. NFC enables data exchange between devices using a reader, antenna, and either active or passive tags. In the context of this development, the constrained reading range of NFC proves advantageous, as it ensures that only hens entering the nesting box are detected. Therefore, NFC was deemed the most appropriate choice for implementing the individual identification mechanism.
The RC522 NFC reader, compatible with ISO/IEC 14443A/MIFARE tags, was selected for its low cost, extensive documentation, and superior performance in terms of range and accuracy during testing. For tagging, MIFARE tags by NXP Semiconductors were chosen due to their widespread adoption in contactless smart card applications. The selected controller for this node must be able to send messages using our chosen communication protocol (described in the next section) and to read MIFARE tags with an NFC reader. After comparative testing, Heltec ESP32 WiFi LoRa v2, equipped with a Semtech SX1276 (EU 868; 863~870 MHz) long-range transceiver, was selected for its integration capabilities and compatibility with low-power, long-range communication. From a practical perspective, one of the first challenges was to determine whether an NFC reader and a LoRa module could be operated on the same controller without interference or communication issues. According to [27], this integration is technically feasible when key aspects such as pin assignment, power management, and timing of read/write operations are properly handled. These considerations were crucial in choosing the Heltec controller, which allowed us to implement both NFC tag reading and LoRaWAN message transmission efficiently within a single compact node.
On the other hand, the adverse effects of high temperatures and humidity—commonly referred to as heat stress—are well documented, not only in terms of reduced egg production but also due to their negative impact on the immune function and overall health of laying hens, increasing mortality rates [28]. To address this issue, an additional node—referred to as the environment node—was integrated into the system to collect temperature and humidity data inside the chicken coop. This node is composed of the following components: an Arduino Pro Mini 328 microcontroller, an RM95 LoRa transceiver, and a DHT11 sensor for temperature and humidity measurements.
The Arduino Pro Mini was selected for the environment node due to its compact size, low power consumption, and cost-effectiveness—features that make it particularly well suited for battery-powered installations in rural settings. Its minimalist design, free of unnecessary components such as USB interfaces or integrated communication modules, enhances system stability for simple tasks such as environmental data acquisition. Moreover, it is fully compatible with low-cost sensors like DHT11 and shares the same programming environment as the other controllers used in the system, which simplifies maintenance and ensures architectural consistency. Its dedicated use for environmental monitoring offloads secondary tasks from the main node, contributing to a modular and scalable system design.
It is also important to note that the DHT11 sensor chosen in this system is a low-cost component with limited accuracy and slower response times, particularly in high-humidity environments. In this prototype, its role was limited to providing basic environmental context rather than precise control or critical monitoring. For future implementations—especially in scenarios where environmental conditions may play a decisive role in system behavior—the use of more accurate sensors and appropriate calibration protocols would be advisable.

2.2.2. Communications

The selection of the communication protocol is critical, as it determines the size, structure, and format of the messages to be transmitted. In this case, the system is in rural environments, typically located on the periphery of urban areas, where mobile network coverage and Wi-Fi access may be unreliable or unavailable. In terms of data volume, the messages will be of a limited size, transmitted at regular intervals in text format. The system must also be cost-effective and energy-efficient, especially in contexts where access to electricity is limited. In this context, LPWAN networks are the most appropriate solution, as they offer long-range communication, low data rates, low power consumption, and low deployment costs [29]. Furthermore, LPWANs are highly scalable, allowing the integration of a large number of devices without significant degradation in performance. Specifically, LoRaWAN has been selected as the most suitable communication protocol. It is an open communications protocol managed by the Lora Alliance. This choice is based on the proven effectiveness of LoRaWAN in providing connectivity in areas where other proprietary technologies have failed, especially in rural environments [30,31].
LoRaWAN operates in unlicensed frequency bands of the electromagnetic spectrum, with the specific frequency range varying by geographic region; in Europe, frequencies between 863 and 870 MHz are used. The capacity of this technology is mainly determined by the relative position of the gateway and of the associated LoRaWAN nodes. Under ideal line-of-sight (LoS) conditions, communication distances can reach up to 20 km. LoRaWAN is particularly well suited for applications that require the transmission of small amounts of data at low bit rates. The cost of deploying a LoRaWAN-based solution is largely defined by two elements: the gateway(s) and the end nodes. Notably, maintenance costs are very minimal as LoRaWAN nodes can operate for several years on battery power without requiring intervention.
The LoRaWAN gateway is an essential component in the system as it establishes the LoRaWAN wireless network, enabling communication with sensor nodes and receiving data from them. A single gateway can cover an extensive rural area, depending on environmental conditions and antenna placement. For this development, the MikroTik LoRa Gateway wAP LR8 Kit and the MikroTik 6.5 dBi LoRa Omni Antenna were selected.

2.2.3. Software

The software developed for the system is divided into two main categories: server-side software and user-facing applications.
The network server and application server are responsible for managing and processing the data transmitted by the nodes through the LoRaWAN gateway. Two platforms were selected for this purpose: The Things Network (TTS) as a cloud-based solution [32] and ChirpStack as an on-premise solution [33]. Both solutions allow integration with cloud platforms via MQTT to transmit data to the application server. MQTT (Message Queueing Telemetry Transport) is a standard messaging protocol that has gained significant popularity in an IoT environment. It facilitates the transmission and reception of data across networks characterized by constrained resources and limited bandwidth. In terms of infrastructure, this application server can be based on a virtual server in the cloud or a local server, such as a Raspberry Pi 4 Model B, a cost-effective and versatile single-board computer (SBC) commonly used in IoT applications.
The implementation of data flows between sensors and applications has been achieved through the use of Node-RED. It is a royalty-free open platform based on a visual flow programming tool that works natively with the MQTT protocol in IoT projects [34]. With Node-RED, boxes and lines are used to communicate with the user and sensors. Boxes represent actions that receive data from sensors, and the data are then transformed and passed to the next box, also called node. Node-RED is essential for making data control applications; it is easy to use, simplifies code, and reduces operations, and one does not require advanced coding skills to use it.
The user applications enable interaction with the system through a graphical interface that displays the processed data in a clear and user-friendly manner. Three applications have been developed for this purpose and are described below:
  • Web Application: The platform Grafana is used for the graphical visualization of data due to its high level of customization and its seamless integration with a wide variety of data sources.
  • Mobile Application: This application allows the poultry farmer to monitor data related to nesting box visits and receive notifications. It was developed for Android using Java, considering the user distribution in Spain and the comparatively lower development costs associated with Android versus other platforms such as Apple’s iOS.
  • Telegram Bot: A bot integrated into the Telegram messaging platform provides real-time notifications of hen visits to the nesting boxes. This offers a simple and effective means of receiving alerts without the need for additional applications.

3. System Design and Implementation

The Purdue model, originally proposed for manufacturing systems [35], has been adopted to design the system architecture, given its widespread use in Industrial Internet of Things (IIoT) environments [36]. The Purdue model is a structural model that concerts segmentation. It consists of several hierarchical levels, each with a specific function: LEVEL 4/5—enterprise or corporate, LEVEL 3—supervision or operation, LEVEL 2—control or communications, LEVEL 1—process devices, and LEVEL 0—field devices or physical process. This layered architecture provides a clear organizational structure that facilitates communication and integration across different levels of a control system. Additionally, it enhances system security and reliability by limiting access and interaction between the different layers. The system architecture is divided into the following two main layers:
  • OT (Operational Technology): Encompasses the devices that interact with the environment, such as sensors, controllers, and communication gateways (covering levels 0 to 2).
  • IT (Information Technology): Manages data processing, storage, and visualization tools to support decision-making processes (covering levels 3 to 5).
The system architecture following the layer distribution of the Purdue model is shown in Figure 1.
The system’s modular design facilitates a flexible and scalable architecture. It is based on open-source principles, with each component developed as an independent module that is interconnected using open standards. The microcontrollers employed in this project are Arduino and/or ESP32-based, chosen to facilitate hardware modularity. On the software side, the system uses a layered architecture, APIs, and open protocols to separate application logic into independent and reusable components. The main advantage of this modular design is that it allows the system to be easily adapted to changing requirements, extended with new functionalities, and scaled as needed.
Table 1 presents the selected technologies used in the developed system, organized according to the layers and levels of the Purdue model. The design and development of the system components are subsequently described following this OT and IT layer structure, beginning with the nodes and concluding with the applications.

3.1. OT Layer

The OT layer comprises the nodes (nesting box node and environment node) and the communication gateway.
Each nesting box node is equipped with the following components (see Figure 2):
  • ESP32 Heltec WiFi LoRa v2 controller (with SX1276) for LoRaWAN communication;
  • RC522 RFID reader for hen identification;
  • 3.7V 1200 mAh LiPo battery with power consumption optimization (battery connected to the red + and black − wires in Figure 2).
The environment node is integrated with the following components (see Figure 3):
  • DHT11 sensor for measuring temperature and humidity in the chicken coop;
  • Arduino Pro Mini 328 microcontroller optimized for low power consumption;
  • LoRa RFM95W module for transmitting environmental data;
  • Powered by two standard AAA alkaline batteries connected in series (battery connected to the red + and black − wires in Figure 3).
To protect the components from potential exposure to dust, humidity, and temperature fluctuations inside the chicken coop, all sensor nodes were enclosed in sealed protective casings (see Figure 2). This design choice ensured environmental resistance during field testing, contributing to the reliability and durability of the system in rural farm conditions.
Regarding power supply, the two nodes use different types of batteries depending on their energy demands. The nesting box node, which requires wireless communication and frequent readings, is powered by a rechargeable 3.7 V LiPo battery. In contrast, the environment node uses standard AAA alkaline batteries, which are sufficient given the lower energy demands of its periodic temperature and humidity readings. LoRaWAN was chosen for both nodes not only for its long-range capabilities but also for its low energy consumption.
Figure 2. Nesting box node components (bottom-left image). Nesting box node (bottom-right image) and its connection diagram (top image).
Figure 2. Nesting box node components (bottom-left image). Nesting box node (bottom-right image) and its connection diagram (top image).
Applsci 15 04856 g002
Figure 3. Environment node components (bottom image) and its connection diagram (top image).
Figure 3. Environment node components (bottom image) and its connection diagram (top image).
Applsci 15 04856 g003
Although formal battery life testing was not conducted, preliminary calculations and field experience suggest that the nesting box node can operate for approximately 2 weeks between charges, while the environment node may achieve even longer durations. Furthermore, since farmers visit the coop regularly to collect eggs, battery replacement or recharging can be integrated into their normal routine. The system’s modular design also allows for the integration of higher-capacity batteries.
The selection of LoRaWAN as the communication protocol was driven by its suitability for agricultural environments. As previously discussed in Section 2, LoRaWAN offers long-range coverage, low power consumption, and robust performance in the presence of moderately obstructed scenarios. In our deployment, the communication range of LoRaWAN significantly exceeded the dimensions of the farm. The nodes and the gateway were strategically positioned to ensure optimal signal reception, and their placement remained fixed throughout the trial, contributing to stable and reliable communication. As will be explained later, the system was tested over a 1-week period in a real farm under stable weather conditions. The objective of the test was to validate the proper functioning of the system, not to assess the behavior of the LoRaWAN communication layer under adverse climatic or topographic conditions. Nevertheless, no transmission errors or signal degradation was observed.
Regarding software, the nesting box node was programmed using the Visual Studio Code environment (version 1.87.2) with the PlatformIO extension, which facilitates embedded software development for the chosen microcontroller platform. The environment node, responsible for monitoring temperature and humidity, was programmed using Arduino IDE.
On the other hand, for long-range communication, the LoRaWAN gateway used was a MikroTik wAP LR8 Kit, equipped with an Omni LoRa 6.5 dBi antenna. MikroTik’s WinBox software (version 3.40 64bits) was used for the administration, configuration, and maintenance tasks of the gateway.
In this sense, for the field tests, the network was configured with a Spreading Factor (SF) of 7, which offers the highest data rate. This choice was appropriate given the favorable conditions of the test environment—short distances and no physical obstructions—and contributed to optimizing energy consumption. The Adaptive Data Rate (ADR) mechanism was also enabled, allowing the device to automatically adjust transmission parameters—such as the Spreading Factor (SF) and the Coding Rate (CR)—based on the signal quality received by the gateway. This ensures efficient communication, minimizing energy usage and reducing the likelihood of interference or packet loss. Under these conditions, all transmissions were carried out using SF7. Regarding the Coding Rate, since the signal quality was consistently good, the CR remained at lower values (e.g., CR 4/5 or CR 4/6), improving transmission efficiency by sending more compact data with less redundancy. In contrast, if the signal quality had been poor, the CR would have increased (e.g., CR 4/7 or CR 4/8), enhancing error correction and the likelihood of successful packet reception, albeit at the expense of energy and bandwidth efficiency. Moreover, transmission power was also managed automatically by the ADR mechanism, and no specific testing was carried out in this regard, as it was beyond the scope of this study. LoRaWAN devices can adjust transmission power across several levels, such as 14 dBm (25 mW) and 12 dBm (15 mW), down to 2 dBm (1.5 mW). In the EU868 frequency band, the maximum allowed transmission power is 14 dBm. Since the nodes were located near the gateway, only the minimum required power was used. As expected under these favorable conditions, the RSSI (Received Signal Strength Indicator) values recorded at the gateway were consistently close to –50 dBm, which is considered excellent for LoRaWAN communications.
Finally, the nodes were configured using Over-the-Air Activation (OTAA) and operated under the Class A specification, transmitting only when triggered and remaining in low-power sleep mode otherwise.

3.2. IT Layer

The IT layer consists of a set of software applications designed to support the poultry farmer.
The network server utilized is The Things Stack (TTS), an advanced version of the solution known as The Things Network. This server facilitates the management and monitoring of devices, gateways, and end-user applications, thereby ensuring the security, scalability, and reliability of data routing across the entire network. This is an open-source platform that continues to evolve through community contributions, thereby offering broad and expanding coverage.
In relation to the application server, it operates on a Raspberry Pi 4B, using Docker containers to facilitate both service management and system scalability. The following services have been deployed (see Figure 1):
  • PostgreSQL and pgAdmin 4: A PostgreSQL database has been employed to store messages received from the nodes. PgAdmin is used for database management. In addition, a Firebase Realtime Database has been used in the cloud. It is a database hosted in the cloud. Data are stored as JSON objects and synchronized in real time with each connected client.
  • Node-RED: It plays a pivotal role in the reception of messages from both the nesting box nodes and the environment node. This function is achieved through the subscription to the network server’s MQTT server, which facilitates the integration of these messages into both the PostgreSQL and Firebase Realtime Databases. Furthermore, Node-RED handles the transmission of real-time alerts to the user via the Telegram messaging application.
  • Grafana: Grafana has been employed to generate dynamic visualizations and graphs based on the data stored in the database.
The three user applications are shown in Figure 4. The applications were intentionally developed to be user-friendly, easily understandable, and equipped with an intuitive interface, thus reducing to a minimum, if not eliminating entirely, the need for initial training by the end user. Each was developed with a dedicated interface to provide the poultry farmer with information as follows:
  • Web application: The Grafana web application allows advanced graphical visualization of collected data. The dashboard developed as an example shows the following data: laying activity by hour, laying activity by day, laying hens, nesting box visits, etc.
  • Mobile application: A mobile application has been developed for the poultry farmer to view the status of the nesting boxes and receive real-time alerts about hen visits. Android Studio has been used as the development IDE. The application uses two data sources, an MQTT server and the Firebase Realtime Database. The mobile application has the following functionalities: present nesting boxes’ status information, receive alerts when a hen visits a nesting box, and present the data collected in the database. In this sense, once a visit is registered, it is maintained as long as successive positive readings are received at intervals of less than 10 s (a configurable threshold). If no readings are received for more than 10 s, the nesting box is marked as EMPTY. Daily visits are recorded, and the counter is automatically reset at the beginning of each day. The main screen of the application, which can be seen in the center of Figure 4, includes in a scrollable list (ScrollView) a card (CardView) for each nesting box, indicating its status (green = free, pink = occupied), the identifier of the nesting box, and the number of visits since the last reset of the counter.
  • Telegram Bot: A Telegram bot was developed using BotFather, Telegram’s official service for creating and managing bots. The bot receives messages from Node-RED and notifies the user whenever the NFC reader detects a tag, thereby registering a hen’s visit to a nesting box. Messages continue to be sent as long as the hen remains inside and is then continuously detected. Based on the duration of the received messages, it is possible to infer, with a low probability of error, whether the hen has laid an egg. Each message includes information on which hen has visited which nesting box.
Figure 4. IT layer user applications: web application with Grafana (left), Android mobile application (center) where messages like “CONECTADO MQTT” translate as “CONNECTED MQTT” and “DATOS” translate as “DATA”, and Telegram alerts (right), where messages like “Visita de gallina X a ponedero Y” translate as “Visit of laying hen X to nesting box Y”. Date format is YYYY-MM-DD (ISO Standard).
Figure 4. IT layer user applications: web application with Grafana (left), Android mobile application (center) where messages like “CONECTADO MQTT” translate as “CONNECTED MQTT” and “DATOS” translate as “DATA”, and Telegram alerts (right), where messages like “Visita de gallina X a ponedero Y” translate as “Visit of laying hen X to nesting box Y”. Date format is YYYY-MM-DD (ISO Standard).
Applsci 15 04856 g004

4. Results and Discussion

Once all components of the proof of concept (PoC) were implemented, the evaluation process was conducted in two phases: laboratory testing and field testing. Additionally, a cost analysis of the system was performed, along with an end-user satisfaction assessment, to evaluate the feasibility of the proposed solution.

4.1. Laboratory Testing

In order to validate the system’s proper functioning in a controlled environment, a simulated chicken coop was set up with two nesting boxes and five artificial hens, each equipped with NFC tags. The following components were installed in this environment:
  • Nesting box nodes with NFC readers;
  • One environment node with temperature and the humidity sensors;
  • A LoRaWAN gateway for data transmission;
  • A network server (The Things Stack) to manage communication;
  • An application server configured with Node-RED and PostgreSQL;
  • A mobile application and Telegram for receiving real-time information.
During operation, the system successfully detected the hens via NFC tags, and data transmission through the LoRaWAN network proved effective. Furthermore, the integration with the mobile application was successfully validated, as illustrated in Figure 5. The figure shows the application receiving data from Hen 2’s visit to Nesting Box 1. The pink color indicates that this box is currently occupied, while Nesting Box 2, marked in green, is available. The application also displays that Nesting Box 1 has received six visits, as reflected in the visit counter, which resets to zero at the beginning of each day.
In addition, the integration with the Telegram bot functioned as expected. As shown in Figure 6, the Telegram interface displays real-time alerts generated during the laboratory tests, specifically indicating visits from Hen 2 to Nesting Box 1 and Hen 4 to Nesting Box 2. While the hens remain inside the nesting boxes, the system continuously sends messages such as “Visit from Hen 2 to Nesting Box 1” and “Visit from Hen 4 to Nesting Box 2”.
These results confirm the system’s ability to operate reliably under controlled conditions, thereby supporting the transition to the next phase of testing.

4.2. Field Testing

Field tests were conducted in a real chicken coop to validate the proper functioning of the system’s hardware components and assess its feasibility in an operational environment. The primary objective was to confirm that both the sensor nodes and NFC tags performed effectively under real poultry farm conditions, thereby validating the proof of concept (PoC).
The following components were installed for these tests:
  • Five hens equipped with NFC tags for individual identification;
  • Two nesting box nodes with NFC readers;
  • One environment node with temperature and the humidity sensors;
  • A LoRaWAN gateway, facilitating data transmission;
  • The network server (The Things Stack) managing the LoRaWAN network;
  • An application server, integrating data via Node-RED and storing information in a PostgreSQL database;
  • A web application for recording data and mobile and Telegram applications for providing real-time notifications.
This infrastructure enabled the validation of the IoT system’s functionality and scalability in a real-world setting.
As illustrated in Figure 7, the first step of the testing procedure involved selecting the nesting box and installing a sensor node, as shown in the top-left image. A false floor was used to facilitate the installation of the sensor node. To ensure optimal detection, the NFC reader was installed at the entrance of each nesting box—with a slight inclination to facilitate egg collection—as depicted in the top-right image. This position was chosen based on preliminary tests that confirmed this location as the most effective point for tag recognition. The hens’ natural movement into the box guarantees sufficient proximity for successful reading. In addition, the system relies on multiple readings within short time intervals to confirm a visit, which mitigates the risk of missed detections due to temporary tag misalignment or brief signal loss. Once the sensor nodes were installed, NFC tags were attached to the hens, specifically on one of their legs, as illustrated in the bottom-left image. Finally, the bottom-right image shows a hen after laying an egg.
For a period of 1 week, the infrastructure remained operational in the designated chicken coop to collect relevant data. During this time, the system successfully recorded the hens’ interactions with the nesting boxes. The NFC tags attached to the hens were detected by the nesting box nodes, registering each visit. The collected data were then transmitted to the network server and securely stored in the database.
The data were visualized through the web application, as illustrated in Figure 8. This figure presents several charts that display the number of visits to the nesting boxes per hour, per day, and per hen, as well as the distribution of activity across the different boxes. This information could enable the identification of behavioral patterns in the hens, such as preferences for specific times of day or particular nesting boxes, as well as individual differences between birds. The graphical representation could also serve as a valuable tool for assessing the system’s performance and supporting daily decision making in poultry management.
Figure 7. Installation and testing of the sensor node (top images) and NFC tags (bottom-left image) during the field testing phase.
Figure 7. Installation and testing of the sensor node (top images) and NFC tags (bottom-left image) during the field testing phase.
Applsci 15 04856 g007
Figure 8. Web application interface displaying the recorded data: visits per hour, per day, and per hen on nesting box usage.
Figure 8. Web application interface displaying the recorded data: visits per hour, per day, and per hen on nesting box usage.
Applsci 15 04856 g008
In addition, the system sent real-time notifications via Telegram whenever a hen visited a nesting box, enabling remote monitoring of activity in the chicken coop. The mobile application also provided quick and convenient access to usage data.
To determine whether an egg-laying event has occurred, the system relies on the duration of the hen’s stay inside the nesting box, as recorded by repeated NFC readings: The system monitors egg-laying events by receiving messages triggered when hens enter the nesting boxes. These messages are received at s-second intervals for the duration of the hen’s stay. If the hen enters and exits without laying an egg, the system typically receives only one or two isolated messages. Conversely, if the hen remains in the nesting box for several minutes, the system receives m messages every s seconds during that time. In such cases, it is inferred that an egg-laying event has occurred, and the event is recorded accordingly.
According to poultry farming literature and the farmer who has participated in this study (an interview is shown in Section 4.4), the average time required for a hen to lay an egg ranges from 10 to 30 min, although this may vary depending on factors such as the hen’s age, health, and environmental comfort. Some hens may require longer periods, especially if they are inexperienced layers or stressed. It is important to note that these are living beings, and their behavior can therefore be variable and sometimes unpredictable. Based on this reference framework, the algorithm was configured to infer egg-laying events from the continuity and number of readings during the stay. Furthermore, the time threshold is fully configurable and can be adjusted to minimize false positives or negatives. Since each hen is individually identified, this parameter could potentially be customized per animal to improve the accuracy of event detection.
During the testing period, it was observed that some hens lost their NFC tags. Specifically, two tags were lost over the course of 1 week of continuous operation. In some instances, the tags were accidentally detached, while in others, the hens may have removed them themselves. Although this issue did not affect the stability of the overall system, it highlighted the need for a more robust tagging mechanism. To address this limitation, the use of ring-type tags—commonly employed in bird identification—is being considered as an alternative. These tags are slightly more expensive but offer a more secure attachment and improved durability and can be integrated into the system with minimal modification. Some commercially available models also provide increased reading distances, which could further enhance system performance and reliability in future implementations. An example of this solution is the use of RFID ring tags with ICODE SLIX chips operating at 13.56 MHz (ISO 15693 standard), commonly used for pigeon identification. These tags are compatible with the RC522 RFID reader, offer improved attachment security, and provide reading distances between 3 and 20 cm, depending on positioning and environmental factors. Their adoption could enhance robustness in field conditions, despite a slightly higher cost.
While the field testing involved a limited number of hens and nesting boxes, the primary objective of this phase was to validate the technical feasibility of the proposed system and evaluate its performance in a real-world small-scale poultry farm. The sample size allowed for the observation of key functional aspects under actual conditions. Although the results obtained from this proof of concept are not intended to be statistically generalizable, we confirm the feasibility of the proposed IoT solution within a real-world family farm environment, highlighting LoRaWAN network technology as an effective connectivity option for IoT-based applications in rural settings.
In comparison with the traditional method using one-way doors, during the field trial, the farmer’s routine was reduced to a single brief visit per day, thanks to the system’s automation capabilities. This observation, based on direct experience during system deployment, highlights the practical benefit of reducing time and physical effort. Moreover, while the conventional approach requires the farmer to manually identify hens, register each laying event, and do so consistently during three daily visits, this process is prone to human error, omissions, or inconsistency over time. By contrast, the automated system ensures continuous, objective, and timestamped data collection without interrupting the animals or overburdening the farmer. Finally, this contributes to improved traceability and reliability of the information gathered, and enhances the integration of digital tools in everyday farming practices.

4.3. Development Cost Analysis

As previously mentioned, the software used in this project is open-source and licensed under the GNU General Public License (GPL) or the GNU Lesser General Public License (LGPL).
Regarding the hardware, an initial fixed investment of approximately EUR 200 is required based on the cost of components for the IT layer (see Table 2) and the OT layer per zone (see Table 3). This cost is primarily due to the LoRaWAN gateway, which can be shared among multiple farmers in the area.
Additional expenses will depend on the size of the chicken coop. For instance, a coop with five nesting boxes and 35 hens would require an additional investment of approximately EUR 200.
Given this budget, while an initial fixed investment is required—primarily driven by the cost of the gateway, which can be shared—the overall cost is expected to remain affordable for small-scale poultry farmers, as the system can be gradually scaled over time. This further reinforces the feasibility of the proposed solution.

4.4. User Satisfaction Assessment

In addition, the feasibility of the developed product, the system implementation provided immediate operational benefits to the poultry farmer, particularly in terms of time savings and reduced manual effort in monitoring and identifying laying hens. By automating a key process that is traditionally performed manually, the system facilitated a more efficient daily routine and promoted engagement with digital technologies. These improvements, although not directly impacting the egg-laying rate, contributed to a more modern and manageable farm environment. In addition, the automation of data collection helped reduce the risk of human error and ensured greater consistency and traceability in the monitoring process.
Due to the exploratory nature of the study and the limited availability of comparable small-scale poultry farms for testing, it was not feasible to apply standardized evaluation tools, such as surveys based on the Technology Acceptance Model (TAM) [37]; instead, qualitative user feedback was collected through a semi-structured interview, using a predefined guide designed to explore multiple dimensions of the user’s experience with the deployed system.
The interview addressed some key aspects: the farmer’s motivation to participate, perceived benefits and challenges, the experience of collaborating with the developer, communication effectiveness, and potential for broader dissemination of the technology. Although limited in scope, this method provided rich and consistent insights into the system’s practical relevance and acceptance in a real-world context.
The main findings are summarized below, organized by thematic category:
  • Regarding the farmer’s initial motivation for participating in the testing phase: The primary incentive was the opportunity to incorporate technology to optimize a key activity in his chicken coop—the selection of laying hens. This innovation was seen as a means not only to improve efficiency but also to modernize daily farming practices.
  • Main perceived benefits: The farmer identified two primary advantages. First, they highlighted the learning experience gained through participation and the validation of the technological solution. In the interviewee’s own words, “The prototype we tested ultimately served to confirm the efficacy of the idea”. Additionally, the process encouraged reflection on their own farming activities and how technological solutions could be applied to agriculture.
  • Regarding collaboration with the developer: The experience was described as positive, as the exchange of knowledge and expertise fostered mutual learning. Specifically, the farmer gained a better understanding of how technology can be applied in agriculture, while the developer gained insights into key aspects of poultry farming. The farmer stated, “The experience has been positive. It has been an exchange of useful information for both parties, and it has helped me understand a bit more about how technology can be applied to agricultural activities”.
  • On the transferability of the technology: The farmer expressed a positive outlook, highlighting the potential for widespread adoption among other poultry farmers. He considered the transfer of this technology viable and promising, emphasizing its potential impact on similar farms by enhancing the selection process for laying hens. As he stated, “The possibility of sharing the application with other poultry farmers who aspire to enhance their laying hen selection process is eminently feasible”.
Finally, the farmer acknowledged that such innovations represent a significant shift in how emerging technologies like the Internet of Things (IoT) and the LoRaWAN protocol can be integrated into rural contexts. This development enabled him to envision new opportunities for improvement in other areas of his operation, fostering greater openness to technology adoption in the agricultural sector [38].
In light of these insights, the viability of the product is once again confirmed.

5. Conclusions

The present study has demonstrated the technical and economic feasibility of the system developed and presented in this work, which is based on Internet of Things (IoT) technologies, such as Near-Field Communication (NFC), and a LoRaWAN network, for the automatic identification of laying hens in family poultry farms. The system’s functionality has been validated under real-world conditions, confirming its ability to optimize poultry farm management by significantly reducing the need for manual intervention in comparison with the traditional method described. In particular, the system simplified daily routines by reducing the number of visits required to the coop and eliminating the time-consuming manual identification process. Furthermore, by automating the identification process, the system reduces the risk of human error and ensures more consistent, traceable, and objective data collection over time.
The implementation of message reception tools, such as Telegram and the mobile application, in conjunction with data visualization platforms like Grafana in a web application, has enabled detailed real-time analysis of the collected data, facilitating informed decision making.
The system’s cost-effectiveness makes it accessible to small-scale poultry farmers, allowing family farms to adopt advanced technologies that were previously exclusive to large-scale poultry industries. The use of shared LoRaWAN infrastructure provides a scalable and sustainable solution, encouraging collaboration among multiple producers in rural areas.
The successful implementation of the proof of concept (PoC) and the positive feedback from the participating farmer indicate that the system has significant potential for technology transfer and could evolve into a commercially viable product. Incorporating training programs for poultry farmers could facilitate adoption and maximize the system’s impact on the sector.
Field tests provide real-time data on hen activity. The analysis of this data, facilitated by Grafana, could support future studies on behavioral patterns, including the frequency and duration of nesting box usage and the influence of environmental factors (such as temperature and humidity) on egg laying. These insights could significantly contribute to the optimization of poultry production.
In conclusion, this study demonstrates that the implementation of IoT technologies in conjunction with LoRaWAN networks in family poultry farms can substantially enhance productivity and animal welfare, contributing to the sustainable development of organic poultry farming in rural environments.

Author Contributions

Conceptualization and methodology, R.F., C.M. and Á.P.d.M.; software, formal analysis, and data curation, R.F., C.M. and Á.P.d.M.; validation, R.F., C.M. and Á.P.d.M.; investigation, R.F., C.M., Á.P.d.M. and M.R.; writing—original draft preparation, R.F., C.M., Á.P.d.M. and M.R.; writing—review, editing and visualization, C.M. and M.R.; supervision and project administration, C.M. and Á.P.d.M.; resources and funding acquisition, C.M., Á.P.d.M. and M.R. All authors have read and agreed to the published version of the manuscript.

Funding

This work has been funded by the Control and Communication Systems Department of the Universidad Nacional de Educación a Distancia (UNED), Spain.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data sharing is not applicable to this article.

Acknowledgments

The authors would like to express their gratitude to Fernando García Greco, the poultry farmer, for his valuable collaboration in the implementation and testing of the system in a real-world environment. His collaboration was indispensable for the validation of this study and for gaining a more profound understanding of the needs of the family poultry farming sector.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Food and Agriculture Organization of the United Nations (FAO). The Future of Food and Agriculture: Trends and Challenges; FAO: Rome, Italy, 2017; Available online: https://www.fao.org/3/i6583e/i6583e.pdf (accessed on 25 March 2025).
  2. European Parliament. A Long-Term Vision for the EU’s Rural Areas. 2022. Available online: https://www.europarl.europa.eu/doceo/document/A-9-2022-0269_ES.html (accessed on 25 March 2025).
  3. International Telecommunication Union; Food and Agriculture Organization. E-Agriculture in Action. 2024. Available online: https://www.itu.int/en/ITU-D/ICT-Applications/Pages/e-agriculture-in-action.aspx (accessed on 25 March 2025).
  4. Nautiyal, P.; Rai, D.; Singh, Y.; Papnai, G.; Raghav, D. Smart Agriculture: Next-Generation Technologies for a Sustainable Future; Integrated Publications: Delhi, India, 2025; ISBN 9789358340716. [Google Scholar]
  5. Assimakopoulos, F.; Vassilakis, C.; Margaris, D.; Kotis, K.; Spiliotopoulos, D. AI and Related Technologies in the Fields of Smart Agriculture: A Review. Information 2025, 16, 100. [Google Scholar] [CrossRef]
  6. Farm Hack. Arduino-Based Tools. 2024. Available online: https://farmhack.org/tools (accessed on 25 March 2025).
  7. Chaudhari, B.S.; Zennaro, M.; Borkar, S. LPWAN Technologies: Emerging Application Characteristics, Requirements, and Design Considerations. Future Internet 2020, 12, 46. [Google Scholar] [CrossRef]
  8. RedHat. Farming for the Future. RedHat Open Source Stories. 2024. Available online: https://www.redhat.com/open-source-stories/farming-for-the-future (accessed on 25 March 2025).
  9. Purdue University (OATS Center). Open Ag Technology and Systems (OATS) Initiative. 2024. Available online: https://engineering.purdue.edu/OATSCenter (accessed on 25 March 2025).
  10. Tzounis, A.; Katsoulas, N.; Bartzanas, T.; Kittas, C. Internet of Things in agriculture, recent advances and future challenges. Biosyst. Eng. 2017, 164, 31–48. [Google Scholar] [CrossRef]
  11. Citoni, B.; Fioranelli, F.; Imran, M.A.; Abbasi, Q.H. Internet of Things and LoRaWAN-Enabled Future Smart Farming. IEEE Internet Things Mag. 2019, 2, 14–19. [Google Scholar] [CrossRef]
  12. Spain. Ministry of Agriculture, Fisheries and Food. Royal Decree 637/2021, of 27 July, establishing the basic regulations for poultry farms. Off. State Gaz. 2021, 90724–90759. Available online: https://www.boe.es/eli/es/rd/2021/07/27/637 (accessed on 25 March 2025).
  13. Thomas, D.A.; Reji, C.; Joys, J.; Jose, S. Automated Poultry Farm with Microcontroller-Based Parameter Monitoring System and Conveyor Mechanism. In Proceedings of the 2020 4th International Conference on Intelligent Computing and Control Systems (ICICCS), Madurai, India, 13–15 May 2020; pp. 639–643. [Google Scholar] [CrossRef]
  14. Teng, G.H. Information Sensing and Environment Control of Precision Facility Livestock and Poultry Farming. Smart Agric. 2019, 1, 1–12. [Google Scholar] [CrossRef]
  15. Singh, M.; Kumar, R.; Tandon, D.; Sood, P.; Sharma, M. Artificial Intelligence and IoT-Based Monitoring of Poultry Health: A Review. In Proceedings of the 2020 IEEE International Conference on Communication, Networks and Satellite (Comnetsat), Batam Island, Indonesia, 17–18 December 2020; pp. 50–54. [Google Scholar] [CrossRef]
  16. Astill, J.; Dara, R.A.; Fraser, E.D.G.; Roberts, B.; Sharif, S. Smart Poultry Management: Smart Sensors, Big Data, and the Internet of Things. Comput. Electron. Agric. 2020, 170, 105291. [Google Scholar] [CrossRef]
  17. Li, N.; Ren, Z.; Li, D.; Zeng, L. Review: Automated Techniques for Monitoring the Behaviour and Welfare of Broilers and Laying Hens: Towards the Goal of Precision Livestock Farming. Animal 2020, 14, 617–625. [Google Scholar] [CrossRef] [PubMed]
  18. Wu, D.; Cui, D.; Zhou, M.; Ying, Y. Information Perception in Modern Poultry Farming: A Review. Comput. Electron. Agric. 2022, 199, 107131. [Google Scholar] [CrossRef]
  19. VOLUTA Coop. Cooperativa VOLUTA. 2021. Available online: https://www.voluta.coop/openkiot-competencias-digitales/ (accessed on 25 March 2025).
  20. Batuto, A.; Dejeron, T.B.; Cruz, P.D.; Samonte, M.J.C. e-Poultry: An IoT Poultry Management System for Small Farms. In Proceedings of the 2020 IEEE 7th International Conference on Industrial Engineering and Applications (ICIEA), Bangkok, Thailand, 16–21 April 2020; pp. 738–742. [Google Scholar] [CrossRef]
  21. Damerow, G. Storey’s Guide to Raising Chickens, 4th ed.; Storey Publishing: North Adams, MA, USA, 2017. [Google Scholar]
  22. European Union. Council Regulation (EC) No 1099/2009 on the Protection of Animals at the Time of Killing. Off. J. Eur. Union 2009. Available online: https://eur-lex.europa.eu/legal-content/EN/TXT/PDF/?uri=CELEX:32009R1099 (accessed on 25 March 2025).
  23. European Commission. Farm to Fork Strategy. 2020. Available online: https://food.ec.europa.eu/document/download/472acca8-7f7b-4171-98b0-ed76720d68d3_en?filename=f2f_action-plan_2020_strategy-info_en.pdf (accessed on 25 March 2025).
  24. Zaninelli, M.; Redaelli, V.; Luzi, F.; Bontempo, V.; Dell’Orto, V.; Savoini, G. A Monitoring System for Laying Hens That Uses a Detection Sensor Based on Infrared Technology and Image Pattern Recognition. Sensors 2017, 17, 1195. [Google Scholar] [CrossRef] [PubMed]
  25. Nikhil, R.; Anisha, B.S.; Kumar, R.P. Real-Time Monitoring of Agricultural Land with Crop Prediction and Animal Intrusion Prevention Using Internet of Things and Machine Learning at Edge. In Proceedings of the 2020 IEEE International Conference on Electronics, Computing and Communication Technologies (CONECCT), Bangalore, India, 2–4 July 2020; pp. 1–6. [Google Scholar] [CrossRef]
  26. Ruiz-Garcia, L.; Lunadei, L.; Barreiro, P.; Robla, I. Review of Wireless Sensor Technologies and Applications in Agriculture and Food Industry: State of the Art and Current Trends. Sensors 2009, 9, 4728–4750. [Google Scholar] [CrossRef] [PubMed]
  27. Semtech Corporation. SX1276/77/78/79—137 MHz to 1020 MHz Low Power Long Range Transceiver. Semtech Technical Documentation. 2020. Available online: https://www.semtech.com/uploads/documents/sx1276.pdf (accessed on 10 April 2025).
  28. Mashaly, M.M.; Hendricks, G.L.; Kalama, M.A.; Gehad, A.E.; Abbas, A.O.; Patterson, P.H. Effect of Heat Stress on Production Parameters and Immune Responses of Commercial Laying Hens. Poult. Sci. 2004, 83, 889–894. [Google Scholar] [CrossRef] [PubMed]
  29. AXPESIT. Connected Objects (IoT) and Communication Protocols in Agriculture. 2023. Available online: https://www.aspexit.com/connected-objects-iot-and-communication-protocols-in-agriculture/ (accessed on 25 March 2025).
  30. Haxhibeqiri, J.; De Poorter, E.; Moerman, I.; Hoebeke, J. A Survey of LoRaWAN for IoT: From Technology to Application. Sensors 2018, 18, 3995. [Google Scholar] [CrossRef] [PubMed]
  31. Miles, B.; Bourennane, E.; Boucherkha, S.; Chikhi, S. A Study of LoRaWAN Protocol Performance for IoT Applications in Smart Agriculture. Comput. Commun. 2020, 164, 148–157. [Google Scholar] [CrossRef]
  32. The Things Network. The Things Network. 2024. Available online: https://www.thethingsnetwork.org/ (accessed on 25 March 2025).
  33. ChirpStack. ChirpStack, Open-Source LoRaWAN® Network Server. 2024. Available online: https://www.chirpstack.io/ (accessed on 25 March 2025).
  34. Aguirre, F.; Romero, M. An Internet of Living Things Based Device for a Better Understanding of the State of the Honey Bee Population in the Hive during the Winter Months. Comput. Electron. Agric. 2023, 212, 108026. [Google Scholar] [CrossRef]
  35. Williams, T.J. The Purdue Enterprise Reference Architecture. Comput. Ind. 1994, 24, 141–158. [Google Scholar] [CrossRef]
  36. Sanz, R.; Oñate, W. Analysis of Architectures Implemented for IIoT. Heliyon 2023, 9, e12868. [Google Scholar] [CrossRef]
  37. Davis, F.D. User Acceptance of Information Technology: System Characteristics, User Perceptions and Behavioral Impacts. Int. J. Man-Mach. Stud. 1993, 38, 475–487. [Google Scholar] [CrossRef]
  38. Kraft, M.; Bernhardt, H.; Brunsch, R.; Büscher, W.; Colangelo, E.; Graf, H.; Marquering, J.; Tapken, H.; Toppel, K.; Westerkamp, C.; et al. Can Livestock Farming Benefit from Industry 4.0 Technology? Evidence from Recent Study. Appl. Sci. 2022, 12, 12844. [Google Scholar] [CrossRef]
Figure 1. System architecture based on the Purdue model, illustrating the separation between OT and IT layers.
Figure 1. System architecture based on the Purdue model, illustrating the separation between OT and IT layers.
Applsci 15 04856 g001
Figure 5. Mobile application displaying real-time data during the laboratory testing phase. “Gallinero IOT” is the Spanish name of the mobile application. “Ponedero” and “Visitas” translate as “Nesting Box” and “Visits”, respectively. “CONECTADO MQTT” and “DATOS” translate as “CONNECTED MQTT” and “DATA”, respectively.
Figure 5. Mobile application displaying real-time data during the laboratory testing phase. “Gallinero IOT” is the Spanish name of the mobile application. “Ponedero” and “Visitas” translate as “Nesting Box” and “Visits”, respectively. “CONECTADO MQTT” and “DATOS” translate as “CONNECTED MQTT” and “DATA”, respectively.
Applsci 15 04856 g005
Figure 6. Telegram interface with real-time alerts received during laboratory tests, indicating hen visits to specific nesting boxes, where messages like “Visita de gallina X a ponedero Y” translate as “Visit of laying hen X to nesting box Y”.
Figure 6. Telegram interface with real-time alerts received during laboratory tests, indicating hen visits to specific nesting boxes, where messages like “Visita de gallina X a ponedero Y” translate as “Visit of laying hen X to nesting box Y”.
Applsci 15 04856 g006
Table 1. Selected software and hardware technologies.
Table 1. Selected software and hardware technologies.
LayerLevelFunctionItem
OT0SensorsRFID-RC522, DTH11
1ControllersHeltec ESP32 WiFi Lora v2, Clase A, OTAA
Arduino Pro Mini 386, Clase A, OTAA
2GatewayMikroTik wAP LR8 Kit
IT3Network ServerThe Things Stack, MQTT Server, ChirpStack
Application ServerRaspberry Pi 4 with Docker, Node-RED (v. 3.18), PostgreSQL (v. 16.2), Firebase Realtime, Grafana (v. 10.4.1)
4/5User ApplicationsAndroid App, Grafana web app, Telegram
Table 2. Cost estimation of the IT infrastructure.
Table 2. Cost estimation of the IT infrastructure.
IT Layer ComponentsQtyPrice (EUR)Description
Raspberry Pi140.00Application Server
Table 3. Cost estimation of the OT infrastructure.
Table 3. Cost estimation of the OT infrastructure.
OT Layer ComponentsQtyPrice (EUR)Description
Per Zone
Gateway wAP LR8 Kit1157.89Gateway LoRaWAN
Per Nesting Box Node
Heltec ESP32 Controller 123.50Arduino or ESP32-Based Controller
RC522–RFID/NFC16.50NFC Reader
Battery110.00LiPo 3.7 V 1200 mAh Battery
Total Price per Nesting Box Node40
Per Hen
TAG MYFARE 1K 13.56 MHz10.3NFC Tags
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Finistrosa, R.; Mañoso, C.; de Madrid, Á.P.; Romero, M. Low-Cost IoT and LoRaWAN-Based System for Laying Hen Identification in Family Poultry Farms. Appl. Sci. 2025, 15, 4856. https://doi.org/10.3390/app15094856

AMA Style

Finistrosa R, Mañoso C, de Madrid ÁP, Romero M. Low-Cost IoT and LoRaWAN-Based System for Laying Hen Identification in Family Poultry Farms. Applied Sciences. 2025; 15(9):4856. https://doi.org/10.3390/app15094856

Chicago/Turabian Style

Finistrosa, Roberto, Carolina Mañoso, Ángel P. de Madrid, and Miguel Romero. 2025. "Low-Cost IoT and LoRaWAN-Based System for Laying Hen Identification in Family Poultry Farms" Applied Sciences 15, no. 9: 4856. https://doi.org/10.3390/app15094856

APA Style

Finistrosa, R., Mañoso, C., de Madrid, Á. P., & Romero, M. (2025). Low-Cost IoT and LoRaWAN-Based System for Laying Hen Identification in Family Poultry Farms. Applied Sciences, 15(9), 4856. https://doi.org/10.3390/app15094856

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop