Arduino Crop Protection Alarm with RCWL-0516 Radar and PIR Sensor
Build a night-time animal alarm for a field: a radar and a PIR must agree within 3 seconds before the siren and strobe go off, then a cooldown stops it counting one animal twice.

Your project challenge
Arm only in the dark: below 300 on A0 show ARMED, above 500 show DAY - OFF, in between keep the last answer. Armed, when the radar (D7) and PIR (D8) both trigger within 3 seconds, beep D9 and flash D10 for 2 seconds and add 1 to Count. Then ignore both for 4 seconds.
Components you’ll use
- Arduino Uno
- Radar Motion Sensor (RCWL-0516)
- PIR Motion Sensor
- LDR (Light-Dependent Resistor)
- Piezo Buzzer
- LED (Light-Emitting Diode)
- LCD 16x2 Display
What you’ll build
A night guard for a field. Wild boar, nilgai and stray cattle can eat a farmer’s crop in one night. Farmers buy solar alarms with a siren and a flashing light to scare them away.
How it works
The radar sends out microwaves and sees anything that moves, even through thin plastic. Its OUT stays HIGH for about 2 seconds after movement. The PIR sees warm bodies. The light sensor tells day from night. Use the buttons on each sensor to make something move.
The key idea
One sensor can be fooled. Swaying crop sets off the radar, and a warm gust can set off the PIR. An animal sets off both. Remember WHEN each one fired. If both fired within 3 seconds, it is an animal. Their HIGH signals do not need to overlap.
⚠ Watch out
After an alarm, wait 4 seconds before you listen again, or one animal is counted many times. Use two light lines, so dusk does not switch it on and off.
Make it yours: send the count by GSM SMS to the farmer each morning.
The editor has the wiring guide, the code and the simulator.
Build this project