Clear Sky Science · en
Design and predictive modeling of a veterinary drug detection sensor in paddy field water based on artificial neural networks
Why cleaner rice fields matter
Rice paddies do more than produce a staple food for billions of people—they also collect what flows off nearby farms and factories. Among the most worrying hitchhikers are veterinary drugs used to keep livestock and farmed fish healthy. These medicines can wash into irrigation channels and settle in paddy water, where they may harm ecosystems and contribute to antibiotic resistance. The study summarized here describes a new field sensor that can quickly measure several common veterinary drugs directly in paddy water, aiming to make such pollution visible in real time instead of hours or days later in a distant laboratory.

Hidden medicines in farm waters
Modern animal farming relies heavily on antibiotics and other veterinary drugs. Animals do not fully break down these compounds, so residues in manure, urine and unused feed can easily reach rivers, ponds and irrigation systems. Aquaculture adds to the burden when medicated water is discharged without proper treatment. Pharmaceutical plants that make these drugs can also leak residues if their wastewater is not carefully handled. Once in the environment, these chemicals can be carried into rice paddies, where they may reduce soil health, upset microbial communities, help disease-causing organisms evolve drug resistance and ultimately travel up the food chain to humans through rice and other crops.
From bulky lab tests to a pond-side tool
Conventional ways to detect veterinary drugs—such as chromatography and mass spectrometry—are highly accurate but slow, expensive and tied to specialized laboratories. They demand careful sample preparation and often take tens of minutes per sample, making them impractical for routine on-farm monitoring. The team behind this work instead turned to how water responds to electric fields. When veterinary drugs dissolve in water, they subtly change how its molecules and ions line up and move in an applied electric field, altering electrical properties that can be picked up by sensitive electrodes. This opens the door to a compact device that can sit in a rice field and test water on the spot with minimal handling.
A smart pole standing in the paddy
The researchers designed a solar-powered sensor that looks like a slim pole anchored in a flooded rice plot. Near the waterline, a protective filter holds a small “comb” of metal fingers called interdigitated electrodes. These act as both the transmitter and receiver of gentle electrical signals passed through the surrounding water. A microcontroller chip generates clean sine waves from 200 hertz up to 100 megahertz, sends them through the electrodes and records how strongly the signals are weakened and how much their timing shifts as they cross the water. The electronics also manage power, temperature measurement, display, and wireless links that push readings back to a base station using low-power radio and 4G networks, all while running for a week or more on a rechargeable battery and solar panel.

Teaching the sensor to read complex signals
Because different drugs affect the water’s electrical behavior in distinct ways, the device records rich “fingerprints” across hundreds of frequencies. Each test of a paddy water sample yields 507 data points describing the change in signal strength and timing. Rather than feed all of this directly into a model, the team first uses a statistical pruning method called competitive adaptive reweighted sampling to discard redundant or uninformative frequencies and keep only the most telling ones. They then train an artificial neural network—a software model inspired by the brain—to link these patterns to the actual concentrations of four target drugs: sulfamethazine, doxycycline hydrochloride, ofloxacin and tetracycline hydrochloride. The model accepts multiple signals at once and produces four concentration estimates in a single step, while also accounting for water temperature by switching or interpolating between models trained at ten different temperatures relevant to rice growth.
What the field tests revealed
Working with nearly 9,000 single-drug and mixed-drug samples of real or prepared paddy water, the researchers showed that the sensor could distinguish and quantify all four drugs at practical concentration ranges. They found that changes in signal timing (phase difference) carried more reliable information than changes in strength alone, giving the best balance of accuracy and robustness. For most drugs and temperatures, the phase-based models captured around 80 to over 90 percent of the variation in concentration, with prediction errors on the order of a few tens of milligrams per liter. Some compounds, especially sulfamethazine, proved harder to measure precisely because their molecular structure produced weaker electrical changes at the tested levels, but overall performance was strong enough for field screening and trend monitoring. Each full measurement—including signal scanning, processing and model prediction—took only 4–6 minutes, clearly faster than common laboratory methods.
From rice plots to smarter farming
For non-specialists, the core message is that this work turns an invisible threat into a number that can be checked right in the field. By combining cleverly shaped electrodes, low-power electronics, wireless links and a trained neural network, the researchers created a portable, non-destructive sensor that can watch veterinary drug levels in paddy water almost continuously. While the system still needs refinement—especially for very low concentrations, complex muddy water and harsh outdoor conditions—it already points toward a future where farmers and regulators can track drug residues in real time, respond quickly to pollution events, and better protect ecosystems and food safety without relying solely on slow, centralized laboratories.
Citation: Huang, J., Huang, B., Huang, S. et al. Design and predictive modeling of a veterinary drug detection sensor in paddy field water based on artificial neural networks. Sci Rep 16, 8826 (2026). https://doi.org/10.1038/s41598-026-38752-9
Keywords: veterinary drug residues, paddy field water, dielectric sensor, artificial neural network, water quality monitoring