Smart Traps: Empowering Precision Agriculture with Edge AI and Solar Harvesting
9829_Automated Pest Detection With DNN on the Edge for
This paper presents a solar-powered IoT smart trap for automated pest detection in apple orchards using Deep Neural Networks (DNN) on the edge. By utilizing a Raspberry Pi 3 integrated with an Intel Neural Compute Stick (NCS2), the system achieves long-term autonomous monitoring with on-board inference using optimized models like LeNet-5, VGG16, and MobileNetV2.
TL;DR
Researchers have developed an autonomous "smart trap" that uses Deep Learning to detect the Codling Moth directly in orchards. By performing all computations at the edge and harvesting solar energy, the device eliminates the need for manual inspection and cloud data transmission, offering a perpetual monitoring solution for precision agriculture.
Problem: The Cloud-Connectivity Gap in Farming
In modern agriculture, pest control remains a significant challenge. Pheromone traps are effective but usually require human experts to travel to orchards, collect samples, or manually review photos. While some IoT solutions exist, they typically upload massive image files to the cloud, which drains batteries rapidly and fails in rural areas with poor connectivity. The core bottleneck is creating a device smart enough to "see" and "think" locally while consuming so little power that it can run forever on a small solar panel.
Methodology: Intelligence at the Edge
The authors designed a custom hardware-software stack to solve this. The system uses a Raspberry Pi 3 as the brain, but the heavy lifting of AI inference is offloaded to an Intel Neural Compute Stick (NCS2).
1. The Detection Pipeline
The system doesn't just process the whole image blindly. It uses a region-based pipeline:
- Preprocessing: Color correction and noise reduction.
- ROI Extraction: Using sliding windows and edge detection to find potential insects.
- DNN Classification: Assessing if the insect is a target pest (Codling Moth).
2. Deep Learning Models
The study benchmarked three architectures:
- LeNet-5: Simple and fast, modified for modern classification.
- VGG16: Deep and accurate, but computationally heavy.
- MobileNetV2: Optimized for mobile devices via inverted residuals.

Figure 1: The schematic block overview showing the sensor, processor, LoRa transmission, and solar power unit.
Experiments & Results: Efficiency vs. Accuracy
The researchers highlights that while VGG16 reached a peak accuracy of 97.9%, the LeNet-5 model was the winner for long-term deployment. It consumed only 123.2 Joules per cycle, compared to 200.1 Joules for the most demanding setup.
Energy Neutrality
The most impressive feat is the energy balance. Even on a cloudy day (2000 lx), the solar panel can generate enough energy for a full detection cycle in just 23 minutes. On a sunny day, this drops to a mere 3 minutes. This ensures the battery remains charged indefinitely.

Figure 2: Performance comparison showing high Accuracy and F-scores across different architectures.
Critical Analysis & Conclusion
Takeaway
The synergy between Edge AI and Energy Harvesting is the future of sustainable farming. By reducing data transmission to just a few bytes of "threat notification," the system utilizes low-power LoRaWAN protocols effectively.
Limitations
While the results are strong, the system uses a Raspberry Pi 3/4, which still draws significant current during boot-up. Moving toward even more specialized "MCU-level" TinyML (e.g., using ARM Cortex-M4/M7) or dedicated AI-on-Silicon chips could further reduce the solar panel size.
Future Outlook
As pest patterns change with global warming, these autonomous networks provide the real-time data needed for "Targeted Pesticide Application," significantly reducing chemical use and protecting the ecosystem.

Figure 3: Visual confirmation: The system correctly identifies Codling Moths (red boxes) versus general insects (blue boxes).
