What do you do with an old Arduino Uno, small speaker and PIR sensor lying in your electronics dump? My family always thinks the wires and electronics stuff lying in the cupboard are a waste of space….š
I recently came across an article in make magazine which utilized the above items in a project, and I thought, it’s time to dust them out of my electronics dump and finally utilize them..
The project consisted of a PIR sensor coupled with an arduino to detect movement and trigger a capture of the person/moving object using a camera connected to a raspberry pi. Credit -Eben Kouao – Open Smart Cam Make Magazine — The step by step build is presented hereĀ https://www.youtube.com/watch?app=desktop&v=lFr-kprnpdA
*Functioning of PIR Sensor: A PIR sensor specifically used was HC-SR501 sensor. PIR Sensors are Infrared sensors used in various applications like Automatic floodlights; Automatic car park lights; CCTV cameras; They have an ability to detect motion even in complete darkness
The Passive infrared sensor works on heat signatures amplified with a lens; any movement even in dark is detected. There are 2 pyroelectric sensors next to each other… Any movement even in the dark would be detected by the difference in readings of the 2 sensors.
My problem statement:
I had some pigeons eat the plants in my mother’s place. Needed to scare them away, not capture these destructive moments !!
I decided to use part of the project – the PIR sensor coupled with an arduino and L293d driver shield to drive an annoying speaker … I thought, great, let me get this built… This could be done in a weeks time , or so I thought… I highly underestimated the project build š I ran into some issues which lead to missing the 1 week deadline
The Issue
When you couple L293D Driver shield with Arduino… the output signal to the buzzer seems okay.. but at the input side, the connection between the PIR sensor through the driver shield to the Arduino seems to get drowned in noise..The shield between the PIR sensor and the Arduino seems to corrupt the digital signal. This results in no obstacle detection and no buzzer…I was disappointed.. I had prepped for a week’s deadline hoping to finish the build and make it ready to save the plants…. now with no hardware solution, completing it in my parent’s place was tough

PIR Sensor+L293d shield with arduino and loudspeaker
Now back at my workplace, I thought about how to solve this issue. I experimented with PIR sensor directly connected to the arduino through a female-female berg connector… and it worked flawlessly to detect a moving object… I decided to remove the L293D driver shield board and go through with an external relay powering the loudspeaker module
This way the arduino to PIR sensor pathway was clear and also, I had the circuit powering the loudspeaker circuit isolated.
Block Diagram

Pigeon Scarer Block Diagram
The following are the steps followed
- Setup the arduino to receive a digital input from the PIR sensor- Test the human movement – simulating the pesky pigeon eating Ma’s plants
- write an if else statement to trigger the relay powering Loudspeaker when the pigeon is detected and turn off when no further movement is detected
The building of the Proof of concept

PIR Sensor embedded on PVC Pipe

Speaker inside PVC End cap tied with cable ties

Bottom view – speaker inside PVC end Cap
Complete Build

Working of Pigeon Scarer
Components to make the build
- PVC Pipe 63 mm diameter with end caps
- Arduino
- 5V relay board
- Couple of cable ties
- HC–SR501 PIR Sensor
- Small Loudspeaker
- Small switch – According to amazon its DPDT on off switch – small rocker boat switch
Room for improvement
Following are few areas you could consider to improve
- 5 V supply derived from the solar panel charging a Li-ion battery; Currently solution involves powering setup from a power Bank/ 5V
- Single source of power supply- Currently the Arduino powering the PIR and Relay board is powered by a rechargeable 5 V power bank; The Speaker is powered by a separate 9V battery; Eventually I would like the entire setup to be powered by a single 9V rechargeable battery from Solar
- To make this extra scary both in light and dark. Add a parallel LED, or just LEDs without the speaker to scare rats /cats underneath the car
- Need to actually test with a live pigeon/rat š

Great…DIY. True Engineer.
Great Idea
Excellent innovation.
An innovative solution to a day to day problem, Best wishes for many more !