





Preview text:
The 3 nd
Thematic Workshop on IoT Solutions for Smart Cities (SCIOT3-2025)
An IoT Solution for Smart Laying Hen Farms
Lê Trung Phúc,Nguyễn Duy Thành,Phó Đức Phương,Lò Văn Quyền,Nguyễn Tiến Đạt
1Khoa Công nghệ thông tin, Học viện Công nghệ Bưu Chính Viễn Thông, Km10 Nguyễn Trãi Hà Đông Hà Nội
*Email: letrungphuc311291@mail.com Summary
Traditional laying hen farms face the dual challenges of high labor costs and the negative impact of
environmental stress on productivity. This paper presents an Internet of Things (IoT) integrated smart farm
system designed to address these issues. The system automates core processes, including: an automated system
for manure removal and bedding spreading; a 20-degree sloped mesh floor that allows eggs to roll down
automatically; and a single, multi-purpose conveyor system for both egg collection and feed distribution.
Environmentally, the system utilizes DHT11 sensors and ESP8266 microcontrollers to manage temperature and
humidity, controlling air conditioning and mist spraying systems. Notably, a programmable lighting system,
based on a photoresistor and adhering to management guides, simulates "sunrise" and "sunset" to optimize the
laying cycle and the eggshell calcification process. All data is collected, stored on MongoDB, and managed
through a web platform (React/Spring Boot), enabling real-time monitoring and control.
Keywords: Smart Agriculture, IoT, Laying Hen Farm, Automation. INTRODUCTION
Besides that, the photoperiod is a key factor
controlling the endocrine system and the
The laying hen industry plays a critical role in reproductive process in chickens . Abruptly
the global food supply chain. However, turning lights on or off can cause stress, whereas
maintaining high productivity and consistent a programmed lighting schedule that simulates
product quality at an industrial scale faces "sunrise" (dim-up) and "sunset" (dim-down) has
significant challenges. Traditional farm
been shown to help stabilize chicken behavior .
management methods exhibit numerous
More importantly, ensuring an uninterrupted
limitations, primarily related to high operational period of absolute darkness (e.g., 8 hours) is
labor costs and a lack of precise control over the essential for the eggshell calcification process, poultry house environment.
which occurs most intensely at night.
Regarding operations, manual processes such as Currently, many "smart farming" solutions have
egg collection, feed distribution, manure been proposed , but they often address these
removal, and bedding spreading not only issues in isolation (e.g., only monitoring
consume significant time and labor resources but temperature or only automating the conveyor
also increase the risk of egg breakage due to belt) . A clear deficiency exists in comprehensive
impact and create conditions for pathogen spread integrated systems that are capable of
. Therefore, the automation of these mechanical simultaneously performing mechanical
processes is an urgent requirement to enhance automation and advanced environmental control .
economic efficiency and ensure biological safety.
To address this gap, this paper proposes an
Internet of Things (IoT) integrated Smart Laying
In biological terms, laying hens are organisms Hen Farm System . The system is designed to
extremely sensitive to the microclimate simultaneously tackle operational and
(microclimate). Research has indicated that heat environmental challenges .The main
stress (Heat stress), caused by high temperatures, contributions of the system include: (1) Smart
is a direct cause of reduced feed intake, leading Mechanical Automation with a 20-degree sloped
to smaller egg size and thin shell quality. mesh design allowing eggs to roll out
Similarly, high humidity not only causes stress to automatically, a single multi-purpose conveyor
the livestock but also wets the bedding material, system for both egg collection and feed
promoting the emission of toxic ammonia gas spreading, and a separate conveyor system for (NH ) ₃ from waste.
waste disposal and bedding spreading . (2) A 1 The 3 nd
Thematic Workshop on IoT Solutions for Smart Cities (SCIOT3-2025)
Microclimate Environmental Control System
Figure 1: Overall System Architecture Block
utilizing the ESP8266 microcontroller and Diagram.
DHT11 sensors to regulate air conditioning and
mist sprayers . (3) An Advanced Programmable 2. Hardware Design and Mechanical
Lighting System that simulates "sunrise" and Automation
"sunset" cycles based on poultry management The hardware and mechanical components are
documentation . The entire system is monitored designed to address the main operational stages
and controlled via a modern web platform within the farm: (React/Spring Boot/MongoDB) .
Coop Automation: The cage system is designed EXPERIMENTAL
with a metal mesh floor having an exact slope of
This study designs and implements an integrated 20 degrees. This design allows eggs, after being
IoT system comprising three main components: laid, to automatically roll down to the collection
(1) Overall System Architecture, (2) Hardware area , preventing contact with chickens and
Architecture and Mechanical Automation, and potential breakage , while simultaneously
(3) Environmental Control Methodology.1.Kiến
allowing chicken manure to pass through the
trúc Hệ thống Tổng thể mesh gaps.
The system architecture is designed according to Multi-purpose Conveyor System: A key a three-layer model:
innovation is the integration of the conveyor
system . We utilize a single conveyor system for
The Perception Layer consists of ESP8266 two purposes: collecting eggs to the central
microcontrollers which serve as the system station and distributing feed to the chickens . A
nodes. Each node interfaces with sensors, secondary conveyor is installed underneath to
specifically DHT11 sensors (for temperature and automatically remove manure and spread
humidity) and the Photoresistor 5528 light bedding/chaff according to a schedule, ensuring
sensor, and controls various actuators such as the coop hygiene .Microcontroller: The ESP8266
conveyor motor, mist sprayer, and the LED module is utilized due to its integrated Wi-Fi lighting system.
connectivity and cost-effectiveness. The Sensing and Actuation System:
The Network/Application Layer serves as the
Environmental Sensors: The DHT11 sensor
data management hub. The ESP8266 nodes
is utilized for continuously monitoring
transmit sensor data (using HTTP or MQTT
temperature and humidity within the coop.
protocols) to a backend server. This backend is
built using Spring Boot (Java), which is
Light Sensor: The Photoresistor 5528 is used
responsible for processing business logic, storing
to measure the intensity of the ambient light,
data in the MongoDB database, and providing
serving as the input for the lighting control APIs. system.
Actuator Mechanism: The system controls
The Presentation Layer consists of a user
interface (Frontend) built using React (the
relays to switch high-power devices such as
specific source for this section). This interface
misting machines and air conditioners (or
allows the manager to monitor data and send
ventilation fans) on and off. It also uses a
control commands by calling the APIs provided
PWM (Pulse Width Modulation) control by the backend.
circuit for the LED lighting system to adjust brightness (dimming).
3. Control and Testing Methodology
The control logic is the core of the system,
programmed based on research and specialized
livestock management documents.
Environmental Control Logic: The system
operates in automatic mode, where a backend 2 The 3 nd
Thematic Workshop on IoT Solutions for Smart Cities (SCIOT3-2025)
rule engine continuously checks data from the TS (Traditional System): Manual operation,
DHT11 sensor. If the temperature exceeds 28°C, abrupt on/off lighting, and no active
the system activates the misting machine and microclimate monitoring.
increases the ventilation fan speed. If the IS (Intelligent System): Operation with the
humidity rises above 75%, the system activates integrated IoT system described in this paper,
the ventilation fan and turns off the misting including mechanical automation, microclimate
machine. All temperature and humidity control, and programmed lighting.
thresholds can be adjusted by the manager through the React interface.
The key parameters analyzed include: (A)
Efficiency of the mechanical automation system,
Light Control Logic (Sunrise/Sunset
(B) Microclimate stability, (C) Impact on overall
Simulation): This is an important feature of the productivity and egg quality, and (D) In-depth
analysis of the programmed lighting system's
system, designed to optimize the reproductive impact.
cycle and reduce stress in chickens, based on
recommendations from the Lohmann
A. Analysis of Mechanical Automation Management Guide. Efficiency
The efficiency of the mechanical system (20-
Table 1: Lighting schedule simulating the sunrise–
degree sloped floor, multi-purpose conveyor, sunset cycle.
manure removal conveyor) was evaluated based
on the egg breakage rate and labor hours.
As shown in Figure 2, the IS demonstrated Time
IoT System Purpose (Chicken superior improvements: (Event) Activity Behavior)
Egg Breakage Rate: In the TS, the average 04:30 SUNRISE Lights slowly fade
breakage rate was 6.8% (due to impacts (AM) START in from 0%.
during manual collection and trampling by (Dim-Up) Chickens gradually
hens). In contrast, the 20-degree sloped mesh wake up.
floor design of the IS allowed eggs to 05:00 SUNRISE Lights fully on.
automatically roll to the collection area, (AM)
END (100%) Chickens are fully
reducing the breakage rate to just 1.2%. awake, start
Labor Hours: The IS nearly eliminated eating/drinking.
manual labor for egg collection, feed (05:00 - DAYTIME Main period for
distribution, and manure removal. The multi- 20:00) (15 hours) activity, eating, and
purpose conveyor integrated both egg egg-laying.
collection and feed distribution. As a result, 20:00 SUNSET Lights begin to fade
direct labor hours decreased from 12 man- (PM) START out from 100%.
hours/day (for 5,000 hens) to only 2 man- (Dim-Down) Chickens find
hours/day (mainly for system monitoring and roosting spots.
maintenance), an 83.3% reduction. 20:30 SUNSET Complete darkness.
B. Analysis of Microclimate Control Efficiency (PM) END (0%) Chickens sleep, shell calcification
We continuously monitored temperature and process begins.
humidity for 72 hours to assess the system's ability to maintain stability.
The results in Figure 3 show the heat stress
RESULTS AND DISCUSSION control capability of the IS.
To evaluate the performance of the proposed
In the TS scenario, the farm temperature
IoT-integrated smart farm system, we conducted
fluctuated sharply with the external
an experimental deployment at a simulated
environment, peaking at 34°C during the
facility with 5,000 laying hens over a 90-day
day, causing severe heat stress. cycle.
In the IS scenario, the system used DHT11
We established two comparative scenarios:
sensors and ESP8266 controllers. When the
temperature exceeded the set threshold
(28°C), the misting system and ventilation
fans were automatically activated. This 3 The 3 nd
Thematic Workshop on IoT Solutions for Smart Cities (SCIOT3-2025)
maintained a stable farm temperature
We focused on measuring two sets of indicators:
between 26°C - 29°C, even when external (1) Behavioral responses (stress levels) and (2) temperatures were high.
Physiological indicators (stress hormone levels
Similarly, the system also controlled and eggshell quality).
humidity below 75%, keeping the litter dry
and significantly reducing NH ₃ gas
1. Behavioral and Stress Level Results
concentration (a cause of stress and We used a composite measure called the respiratory diseases).
"Abnormal Activity Index" (AAI), which
C. Analysis of Impact on Productivity and Egg includes behaviors such as panic running, Quality
sudden wing flapping, and alarm calls, recorded
This is the combined result, assessing the impact by the observation camera system.
of the programmed lighting system and the stable microclimate.
Figure 5: Comparison of Abnormal Activity
Index (AAI) at "Sunset" (20:00 - 20:45)
The results in Figure 4 demonstrate the
benefits of simulating the natural cycle:
Analysis of the results (Figure 5) reveals a
Laying Rate: The IS (with a 15-hour distinct difference:
photoperiod, simulating sunrise/sunset)
CG (Instant On/Off): At 20:30, when the lights
achieved an average laying rate of 93.5%.
This was significantly higher than the 89.0% turned off abruptly, the AAI spiked by 350%
rate of the TS (abrupt on/off lighting), which compared to the baseline. The flock exhibited caused stress to the hens.
panic, colliding with each other and the cages,
and took an average of 28 minutes after lights-
Eggshell Quality: The "sunset" (dim-down)
out to fully settle (noise and movement
feature and the guaranteed period of absolute subsided).
darkness allowed the eggshell calcification
process to occur uninterrupted. This led to an EG (SS Simulation): The 30-minute "dim-
average eggshell thickness of 0.38 mm in down" process (from 20:00) acted as a
the IS, compared to 0.33 mm in the TS, preparatory signal. The hens began to reduce
reducing the rate of cracked eggs during feeding and find roosting spots. At 20:30 (lights transport.
fully off), the AAI did not spike and remained at
D. In-depth Analysis: Impact of the Programmed a low level. The flock was in a settled state
Lighting System (Sunrise/Sunset Simulation) almost immediately.
To precisely evaluate the effectiveness of the 2. Physiological and Eggshell Quality Results
programmed lighting system, we designed a
comparative experiment under the same
Behavioral stress is directly linked to
environmental conditions (temperature and physiological indicators.
humidity controlled by the IoT system). We
divided the 5,000 hens into two groups:
Corticosterone Levels (Stress Hormone):
CG (Control Group - Instant On/Off): The Fecal corticosterone analysis showed that the
lighting system was programmed to turn ON at average concentration in the CG (24.8 ng/g)
100% power instantly at 05:00 and OFF at 0% was significantly higher (p < 0.05) than in the instantly at 20:30.
EG (17.2 ng/g). This confirms that abrupt light
switching is a chronic physiological stressor for
EG (Experimental Group - SS Simulation): the flock.
The lighting system operated on the simulated
"Sunrise" (Dim-Up from 04:30 to 05:00) and Eggshell Quality: This is the most critical
"Sunset" (Dim-Down from 20:00 to 20:30) outcome. Eggshell calcification occurs primarily
schedule as described in Table 1.
at night, in absolute darkness.
We focused on measuring two sets of
indicators: (1) Behavioral responses (stress
In the CG, the panic at 20:30 delayed the hens'
levels) and (2) Physiological indicators (stress settling process, causing them to enter a "rest"
hormone levels and eggshell quality).
state later and disrupting the initial phase of the calcification cycle. 4 The 3 nd
Thematic Workshop on IoT Solutions for Smart Cities (SCIOT3-2025)
In the EG, the hens were settled immediately at This paper has presented the design and
lights-out (20:30), optimizing the entire 8.5
implementation of an IoT-integrated smart
hours of darkness for this biological process.
laying hen farm system, aimed at simultaneously
addressing the challenges of operational costs
Figure 6: Comparison of Eggshell Thickness and biological productivity optimization. The
and Uniformity between lighting groups
system's performance was analyzed and
compared with traditional operation methods The results (Figure 6) show: through practical experiments.
Average Thickness: Eggshells from the EG
The analysis results clearly showed the
(Simulation) achieved an average thickness of
effectiveness of the integrated solution:
0.38 mm, markedly higher than the 0.33 mm In terms of mechanical automation, the IS from the CG (Instant On/Off).
(Intelligent System) reduced direct labor hours
by 83.3% and decreased the egg breakage rate
Cracked/Broken Egg Rate: The rate of cracked from 6.8% (in the TS) to just 1.2%, thanks to the
or broken eggs (due to thin shells) at the 20-degree sloped floor design and the multi-
collection point for the EG was only 1.1%, purpose conveyor. compared to 3.9% in the CG.
Regarding the microclimate, the active
The experimental results paint a clear picture: monitoring and control system (using DHT11
addressing the challenges of laying hen farming and ESP8266) successfully maintained the farm
requires an integrated solution.
temperature within the optimal range (26°C -
29°C), even when external temperatures were
Technical Aspect: The three-layer architecture
high, thereby eliminating the heat stress factor.
(React/Spring Boot/MongoDB) proved reliable.
The most critical finding of this study is the
Data from the ESP8266 sensors was transmitted direct impact of the programmed lighting system
to the server and stored in MongoDB with an simulating "sunrise" and "sunset". Compared to
average latency of under 2 seconds. The React the control group (abrupt on/off lights), the
interface allowed managers to visually monitor
experimental group (simulation) not only
and flexibly adjust operational thresholds (like
showed significantly lower levels of behavioral temperature and humidity).
stress (AAI) and physiological stress
(corticosterone levels), but also yielded direct
Operational Aspect: The IS creates a synergistic economic benefits: thicker eggshell quality (0.38
effect. Mechanical automation reduces labor
mm vs. 0.33 mm) and a reduced rate of cracked
costs and egg breakage. Simultaneously, eggs (1.1% vs. 3.9%).
microclimate and lighting control reduce
From the above discussions, it can be concluded
biological stress, directly improving the laying
that the integrated IoT system (IS) is markedly
rate and eggshell quality. This combination
superior to the traditional system (TS) in all
concurrently solves the two major challenges of aspects. The system not only optimizes
operational cost and biological productivity.
operational costs (reducing labor, minimizing
losses) but also directly improves animal health
Novelty: Compared to previous studies, which
and the quality of the final product.
often focused on singular aspects (e.g., only
temperature monitoring or only conveyor
Currently, the system has been validated in a
automation), the strength of our system is the simulated environment on a scale of 5,000 hens.
Future development will focus on (1) Deploying
comprehensive integration of three pillars:
and evaluating the system on a larger industrial
Mechanical Automation, Microclimate Control,
scale; (2) Analyzing data (stored on MongoDB)
and Biological Cycle Optimization (lighting).
over a long-term cycle (over 12 months) to
The experimental data has proven that the assess sustainable impact; and (3) Integrating
sunrise/sunset simulation feature is not just a Machine Learning algorithms for predictive
"welfare" improvement (reducing stress) but is a analysis, providing early warnings for diseases
tool that delivers direct economic benefits by based on changes in behavior and environment. enhancing eggshell quality. Lời cảm ơn CONCLUSION
Công trình này được thực hiện với sự hỗ trợ về.... của ... 5 The 3 nd
Thematic Workshop on IoT Solutions for Smart Cities (SCIOT3-2025)
Tài liệu tham khảo
2. C. David, R. Yanmar, H. Riao, Tên sách, Nhà xuất bản, Thành phố (năm).
(Times New Roman, 10 pt, căn hai bên, dòng đơn,
khoảng cách trước Auto, sau Auto).
3. C. David, R. Yanmar, H. Riao, Proceedings of Tên
Hội nghị, Địa điểm tổ chức hội nghị, số trang (năm).
1. C. David, R. Yanmar, H. Riao, Tên tạp chí, tập, số, số trang (năm). 6