Wildlife and domestic animal intrusion into agricultural land is a well-known problem that causes real financial damage to farmers and their families. Traditional methods of deterring animal intrusion into crops via direct observation of the crop field, such as physical guarding or using static devices , are ineffective because the animals typically adapt quickly to repetitive patterns of deterrence use. To address this problem, we developed an autonomous smart scarecrow system that utilizes two smartphone cameras as visual sensor nodes for detecting animal presence in the crop field, a YOLOv3 deep-learning detector hosted on a laptop, analysing live feeds from both smartphone cameras overlooking the same field area (i.e. one image from each camera), a pair of ESP32-CAM modules serving as wireless bridges between the cameras and the host laptop, a Nexys FPGA board (Artix-7 xc7a100tcsg324-1) programmed with Verilog for performing OR-based decision logic, and an ESP32-Dev module driving a df mini player and speaker, delivering randomized predator audio alongside LED flashes directed at detected intruders. Operating through a Sense–Process–Act loop, the system functions, whereupon detecting an animal (i.e. bird, dog, horse, bear, etc.) in real-time and in the absence of any human in the field of view of the cameras, upon which the FPGA triggers a randomly chosen predator sound through the speaker together with randomized LED flash patterns to drive away the animal.With this setup, the system spots animals as they appear and scares them off right away without causing any harm, keeping the crops safe.
Introduction
This project presents a smart agricultural animal deterrence system designed to reduce crop damage caused by wildlife intrusion such as birds, wild boars, and other animals. Traditional methods like fencing and scarecrows are ineffective over large areas and become less reliable as animals adapt to them.
The proposed system combines deep learning (YOLOv3), IoT (ESP32 modules), and FPGA hardware acceleration for real-time detection and response. Two mobile phones act as IP cameras, streaming live video to a laptop where YOLOv3 detects animals. If an animal is detected without a human present, the system sends a signal through ESP32-CAM modules to an FPGA (Nexys board). The FPGA processes signals using simple OR logic in hardware for ultra-fast, delay-free decision-making.
When triggered, an ESP32-Dev module activates a DF Mini Player and LED system, playing randomized predator sounds (lion roar, thunder, etc.) to scare animals away. The FPGA ensures immediate hardware-level response, while Python and IoT modules handle detection and communication.
The system uses a layered architecture:
Sensing: IP-camera video feeds
Processing: YOLOv3-based animal detection
Signal routing: ESP32-CAM HTTP + GPIO communication
Decision-making: FPGA logic
Actuation: sound + LED scare system
Detection rules prioritize safety (human presence overrides alerts), and redundant signaling is minimized using state tracking.
Results show successful real-time detection and reliable FPGA-based triggering with minimal latency. The prototype demonstrates an efficient, low-cost, and scalable smart farming solution that combines AI vision with hardware acceleration to protect crops more effectively than traditional methods.
Conclusion
The system we have built provides a workable and modular design for smart crop protection. This is achieved with the use of the visual recognition system on a regular laptop, ESP32-CAM module to provide the signal between the Wi-Fi connection and the GPIO pins, an Artix-7 FPGA that takes care of the hardware-side logic and df mini player for audio deterrence through random selection of predator sounds. With basic OR logic coded in Verilog, the FPGA makes sure the deterrent response happens every single time to ensure that the deterrence is executed without any interruptions caused by software malfunctions. The randomisation of the sound through four different types of predator sounds guarantees that the animals will never get used to one single audio, —the principal weakness of conventional scarecrows.
Thekeyfeaturesthatweresuccessfullyachievedinclude:
1) Modulararchitecture:We can update one part without touching the rest.
2) Human-safedeterrence:If a farmer is in the picture, the system sees that and holds back the alarm.
3) Adaptivedeterrence:The sound selected randomly each time helps animals not to get habituated.
In the future, we plan to add a night-vision camera, SMS or mobile app notifications via the ESP32-Dev board and extension of FPGA logic to make decisions based on the identified species.