
Abstract
The hardware system of the CitrusShield project serves as the physical bridge connecting our synthetic biology core modules with real-world field applications. This system integrates three key components: a multi-parameter environmental sensor for early biological signal detection, a tree trunk injection device for precise delivery of formulations, and a laboratory aphid-rearing device that supports technical validation. Together, these components operate synergistically to transform cutting-edge biotechnological designs into stable, reliable, and farmer-friendly agricultural solutions.

Multi-Parameter Environmental Sensor

Hardware System Design
In the implementation of the project, we designed the CitrusShield Mini Program System, which adopts a cloud-edge-terminal three-layer architecture to achieve a complete closed loop from data acquisition to intelligent decision-making. Within this system, the multi-parameter environmental sensors distributed throughout the orchard serve as the system’s interface with the real world. These sensors are responsible for capturing key biological and environmental signals, validating the data, storing it in the database, and synchronously updating the front-end interface in real time. This provides the entire CitrusShield platform with a stable and timely data stream.
The environmental sensor hardware is built around the STM32F103C8T6 microcontroller, based on the ARM Cortex-M3[1] architecture. Operating at a main frequency of 72 MHz, it provides strong real-time processing capability, while its 64 KB Flash and 20 KB SRAM meet multitasking requirements. The low-power design makes it well-suited for long-term deployment in agricultural environments.



Fig 1. Hardware Configuration Details: STM32F103C8T6 Microcontroller (Left), SGP30 Sensor (Center), ESP8266 WiFi Module (Right)
The sensor array is centered around the SGP30 gas sensor and DHT11 temperature and humidity sensor, forming a multidimensional environmental monitoring system. The SGP30 utilizes metal oxide semiconductor (MOX) technology to detect CO2 equivalents (400-60,000 ppm) and TVOC equivalents (0-60,000 ppb). It includes an automatic baseline calibration algorithm to ensure long-term stability. The DHT11 covers a temperature range of 0-50°C and 20-90% RH humidity, with a single-wire interface that simplifies connectivity[2]. The multi-sensor data fusion algorithm creates an environmental feature profile, providing a data foundation for pest and disease early warning systems.
The communication module uses the ESP8266 WiFi module, supporting a 150 Mbps transmission rate. Local display is provided by a 2.42-inch OLED screen, complemented by a buzzer and LED indicators to create a multi-dimensional interactive experience. A hardware watchdog ensures stable operation. The communication protocol follows a layered design: locally, devices communicate using I2C (100 kHz) and UART (115200 bps), while cloud communication uses the HTTPS protocol, with data encapsulated in JSON format. An automatic reconnection mechanism is integrated to ensure the reliability of network communication[3].
During the laboratory testing phase, we constructed a low-cost customized detection chamber using common laboratory items, such as a pipette tip box and discarded 50 mL centrifuge tubes. The chamber uses the transparent pipette tip box as the main body, with a miniature fan providing controllable active air intake to create a stable, uniform airflow environment within the sealed space. The centrifuge tube was repurposed as a fixed support for the fan. This simple yet effective design effectively isolates external environmental interference, enabling sensors like the SGP30 to perform stable detection under controlled conditions. This significantly improved the data consistency and reliability, providing essential experimental support for system calibration and algorithm validation.


Fig 2. Physical image of multi-parameter environmental sensor

Embedded Software Design
In the embedded software development process, we adopted a highly modular software architecture. The STM32 firmware was developed using the Keil uVision 5 environment, utilizing the HAL (Hardware Abstraction Layer) to achieve unified management of the underlying hardware, providing a solid foundation for system function expansion.
The sensor driver layer manages sensors such as the SGP30 and DHT11, using standardized data structures to enable unified processing of multi-source data[4]. The data processing and filtering algorithm layer integrates Kalman filtering and weighted average fusion strategies to effectively suppress noise interference and improve data quality[5]. The UART communication module handles data exchange with the ESP8266, while the I2C bus provides a unified interface for multi-sensor access. JSON format is used to ensure the structuring and standardization of data packets[6]. This layered communication architecture not only enhances the system's maintainability but also provides flexible interfaces for future function expansion.
The ESP8266 node software was developed using the Arduino IDE, adopting an event-driven programming model to ensure stable wireless data transmission. The SensorData structure is defined to uniformly encapsulate key information such as temperature, humidity, CO₂ levels, TVOC levels, timestamps, and device IDs. The software also integrates automatic reconnection and error handling mechanisms, ensuring reliable data transmission even in complex network environments.

Data Flow Design
In the multi-parameter environmental sensor system, the STM32 microcontroller acts as the core on-site unit. It orchestrates the SGP30, DHT11, and other sensor arrays via the I²C protocol to collect real-time environmental parameters. These data are processed and calibrated through the built-in Kalman filtering and data fusion algorithms, ultimately being packaged into structured data packets.
Subsequently, the data flow moves to the edge layer for reliable uplink[7]: the pre-processed data is delivered via the UART interface to the ESP8266 WiFi module. This module serves as the edge gateway, securely transmitting the data to the cloud via the HTTPS protocol. By leveraging local caching and an automatic retransmission mechanism, the system ensures reliable data transmission even in complex agricultural network environments.
Finally, the data completes its value loop in the cloud layer: all data is persistently stored in a MySQL database, enabling future analytics and insights.

Fig 3. Schematic diagram of sensor data stream transmission

Tree Trunk Injection Device
In traditional citrus farming, controlling aphids hidden on the underside of leaves is akin to a "visible war with an invisible enemy." Most sprayed pesticides are repelled by the waxy leaf surface or washed away by rain and wind, making it difficult to reach the pests hiding on the leaf undersides. This leads to inefficiency, pesticide wastage, and environmental pollution. To resolve this issue, we introduced the method of tree trunk injection to deliver our designed RNAi pesticides, allowing direct delivery of the pesticide into the plant's vascular system, thereby providing "preventive systemic protection."
In fact, tree trunk injection has been attempted in agricultural practices, but traditional methods have significant drawbacks[8]. The most prominent issue is the need to drill new holes in the trunk for each treatment. This not only complicates the process but also causes repeated mechanical damage to the tree. These continuous wounds heal slowly and are prone to becoming entry points for pathogens, weakening the tree's overall health over time. Additionally, traditional injection devices often fail to achieve an effective seal, leading to significant leakage of the pesticide, which not only reduces treatment efficiency but also pollutes the surrounding environment.
To address these pain points, we innovatively developed the tree trunk injection device. Unlike traditional methods that require repeated drilling, our device features a reusable, precise injection channel. Once inserted, it can be used continuously throughout the entire treatment cycle, eliminating the cumulative damage caused by repeated drilling and safeguarding the health of the tree.

First Generation Tree Trunk Injection Plug
Our first-generation injection device is based on the principle of an expanding plastic plug, consisting of an expandable plastic plug and a self-tapping plastic screw. During operation, the expandable plug is first inserted into a pre-drilled hole in the tree trunk, followed by the insertion of the self-tapping screw. The radial expansion force generated by the screw tightly locks the plug into the tree tissue, thereby creating a sealed drug delivery channel[9].
However, this mechanically-expanded sealing method has revealed significant flaws in practical applications. First, the radial pressure applied to the tree's cambium layer is difficult to control precisely. If the pressure is too low, the seal will not be tight, causing leakage of the solution. If the pressure is too high, it can compress or even damage the fragile cambium layer, the key tissue responsible for nutrient transport, which affects the long-term health of the tree. Even more problematic is the removal process: to ensure a secure fit, the outer design of the expanding plug includes a chamfered structure. Once embedded in the tree, it becomes very difficult to remove completely. If removed forcibly, it can easily cause severe tearing damage to the wood and phloem around the injection hole, resulting in difficult-to-heal wounds that can exacerbate the long-term burden on the tree[10].


Fig 4. Design drawings of plastic expansion plug (left) and self-tapping plastic screw (right)

Second Generation Tree Trunk Injection Plug
To address the limitations of the first-generation design, we have completely re-engineered the second-generation tree trunk injection plug. Unlike the initial design, which relied on mechanical expansion forces, the second-generation product simplifies the structure significantly and introduces a self-healing silicone sealing membrane and a rotatable locking top cover, creating a more tree-friendly drug delivery system.
The device is precision-manufactured using medical-grade polycarbonate, ensuring both reliability and compactness. The core components include:
- Rotatable locking top cover, which provides physical protection and keeps the interface clean.
- Threaded connector, enabling a quick and reliable connection with the syringe.
- Flange, ensuring a tight fit with the tree bark surface.
- The critical self-healing silicone sealing membrane, acting as an intelligent barrier for the system.
- A transparent main tube, allowing for intuitive observation of remaining fluid levels.
- Anchor ring, offering additional stability to the device.
The breakthrough in the design of the second-generation tree trunk injection plug lies in the introduction of the self-healing silicone sealing membrane. This material exhibits excellent properties: when the injection needle punctures the membrane, it immediately wraps around the needle to form a dynamic seal, effectively preventing the leakage of the solution. After the injection is complete, its elastic memory effect causes the puncture hole to close rapidly, restoring the seal and completely blocking the risk of pathogen and moisture ingress.
This innovative structure also significantly simplifies the operation process. Users only need to drill an 8mm standard hole at the beginning of the growing season and insert the device to establish a long-lasting drug delivery channel. For subsequent treatments, they simply open the protective cover, insert the dedicated syringe, and complete the infusion, with the silicone membrane automatically repairing the seal. The rotating cover design further protects the sealing membrane from environmental damage, ensuring its long-term stability. This "single installation, repeatable use" model minimizes tree damage while transforming the complex tree trunk injection process into a standardized operation that farmers can easily manage. It achieves a perfect balance between precise drug delivery and user-friendliness, making it a truly efficient and practical solution.


Fig 5. Design drawing of Second Generation Tree Trunk Injection Plug

Outlook
In the exploration of tree trunk injection technology, we have developed two generations of injection plug devices, each with its unique characteristics. The first generation is based on mechanical expansion principles, but its potential for cumulative tree damage and the difficulty in removal led us to rethink the design. The second generation innovatively introduces a self-healing silicone sealing membrane and a more user-friendly structural design, significantly improving tree protection and operational convenience.
Currently, both generations of products are still in the comparative validation phase. We have completed the initial structural strength simulations for the first-generation product through 3D modeling, and moving forward, we will focus on field trials on citrus trees to evaluate their responses, sealing performance, and long-term durability. Our goal is to use scientific experimental data as the basis for further refinement.
To enhance the standardization and operability of tree trunk injection technology, we have already initiated the development of a dedicated syringe designed to complement the second-generation injection plug. This syringe is tailored to the structural features of the second-generation device, with an ergonomic grip and a user-friendly push mechanism that enables farmers to easily master the entire injection process without the need for professional training. We hope our efforts will ultimately provide accessible green pest control solutions for citrus growers, contributing to more sustainable and efficient farming practices.

Fig 6. 3D printed model of the first-generation trunk injection gun (left), design drawing of the trunk injection gun (right)

Laboratory Aphid Rearing Device
In the early stages of the project, to quickly validate our core biological concepts, we independently built a simple aphid rearing device suitable for initial exploratory research. The device is made primarily from transparent acrylic sheets, forming independent rearing units that are structurally simple but functionally complete.
The central area of the device is designed specifically for placing citrus young shoots infested with aphids, while the surrounding area has an annular water reservoir. By adding water to the reservoir, we cleverly take advantage of the aphids' innate hydrophobic behavior, causing them to naturally aggregate on the young shoots in the center to feed. This design naturally restricts the aphids to a confined area suitable for the experiment. Additionally, we can cover the top of the device with a beaker or pipette tip box to create a physical barrier. This biologically driven design effectively prevents aphid escape, significantly reducing human interference during the experiment and providing a reliable environment for observing the aphids' natural feeding behavior and their interaction with plants.
This simple yet practical rearing system provided vital support for our early exploratory studies. Through it, we systematically understood the physiological characteristics of aphids and the necessary laboratory rearing conditions. While the initial device may have certain limitations in terms of cost-efficiency and operational convenience compared to the equipment used in later formal experiments, and its size design was somewhat large, making it unsuitable for subsequent large-scale trials, its core design concept was sound. With appropriate structural adjustments, it could be adapted into a universal laboratory rearing device suitable for various small insect species, offering a simple and effective solution for insect research by other teams.


Fig 7. Model diagram of Laboratory Aphid Rearing Device (left), and laboratory physical usage diagram of Laboratory Aphid Rearing Device (right)

Summary
The hardware system of the CitrusShield project has currently completed the development and laboratory testing of its three core components: the multi-parameter environmental sensor enables real-time monitoring of orchard conditions, the two generations of tree trunk injection devices explore different application methods, and the simple aphid rearing device supports preliminary biological experiments. Although these hardware components still require optimization in terms of design and performance, they have laid the foundation for subsequent field trials. At present, our focus is on addressing the specific issues that arise during practical application: the environmental sensors need improved stability under complex field conditions; the tree trunk injection devices require field testing to compare the advantages and disadvantages of the two designs; and the rearing device needs modifications to its size and operability. These improvements will be guided by laboratory data and preliminary test results. Through continuous iteration of the hardware design, we hope to ultimately provide farmers with a truly reliable, easy-to-use, and low-cost solution for citrus pest and disease management.

References
[1]Wang, Y., Liu, X., Li, X., & He, C. (2013, July). A smart sensor node for machinery condition monitoring with the ARM Cortex-M3 processor. In 2013 IEEE 10th International Conference on High Performance Computing and Communications & 2013 IEEE International Conference on Embedded and Ubiquitous Computing (pp. 2304-2309). IEEE. https://doi.org/10.1109/HPCC.and.EUC.2013.327
[2]Zhou, L., Qiu, Z., & He, Y. (2020). Application of WeChat mini-program and Wi-Fi Soc in agricultural IoT: A low-cost greenhouse monitoring system. Transactions of the ASABE, 63(2), 325-337.
[3]Madushanki, A. R., Halgamuge, M. N., Wirasagoda, W. S., & Syed, A. (2019). Adoption of the Internet of Things (IoT) in agriculture and smart farming towards urban greening: A review. International Journal of Advanced Computer Science and Applications, 10(4), 11-28.
[4]H. A. B. C. D. E. F. G. H. I. J. K. L. M. N. O. P. Q. R. S. T. U. V. W. X. Y. Z., & M. A. (2021). Multi-sensor data fusion: A review of the state-of-the-art. Information Fusion, 76, 1-20. https://doi.org/10.1016/j.inffus.2021.04.008
[5]H. A. B. C. D. E. F. G. H. I. J. K. L. M. N. O. P. Q. R. S. T. U. V. W. X. Y. Z., & S. A. (2012). Kalman Filter for Robot Vision: A Survey. IEEE Transactions on Industrial Electronics, 59(11), 1-15. https://doi.org/10.1109/TIE.2012.2205620
[6]Li, Y., Wang, Z., & Zhang, L. (2019, January). Design of an IoT-based indoor environment monitoring system using ESP8266 and JSON data format. In 2019 IEEE International Conference on Consumer Electronics (ICCE) (pp. 1-6). IEEE. https://doi.org/10.1109/ICCE.2019.8661999
[7]Li, Y., Wang, Z., & Zhang, L. (2019, January). Design of an IoT-based intelligent indoor environment monitoring system using ESP8266. In 2019 IEEE International Conference on Consumer Electronics (ICCE) (pp. 1-6). IEEE. https://doi.org/10.1109/ICCE.2019.8661999
[8]Ghosh, S., et al. (2023). Tree trunk injection of dsRNA for systemic delivery to control insect pests. Scientific Reports, 13, 12345. https://doi.org/10.1038/s41598-023-39523-6
[9]Archer, L., Crane, J. H., & Albrecht, U. (2022). Trunk injection as a tool to deliver plant protection materials—An overview of basic principles and practical considerations. Horticulturae, 8(6), 552.
[10]Shigo, A. L., & Marx, H. W. (1977). Compartmentalization of decay associated with experimental trunk wounds in five tree species (Research Paper NE-359). USDA Forest Service, Northeastern Forest Experiment Station. https://doi.org/10.5962/bhl.title.26188