This project was done in a maker group a couple of years ago. We resurrected it to share it with the wider audience.
It contains an IR sensor, 2x LEDs and speaker connected to Arduino. When the sensor detects someone in proximity, the Arduino will blink LEDs and turn on a nasty audio sound.
It is good enough to startle the little ghosts who come to get candy, but not to scare them.
• Capacitor is used to filter unnecessary noise.
• Some stones are placed at the bottom of the pumpkin to prevent it from being blown away by the wind.
Connect a 220Ω resistor to Pin 11.
Connect the other end of the resistor to long end of LED
Connect the other leg of LED to GND.
Connect another LED parallel to the first LED.
Connect the buzzer’s red wire to Pin 4.
Connect the black wire to GND.
Connect the yellow/white wire of the sensor to the 16K resistor.
Connect the resistor to a 1 µF capacitor.
Then connect the leg of the capacitor where the 16K resistor is connected to A0.
Connect the other end of capacitor to GND.
Connect the black wire of the sensor to GND.
Connect the red wire of the sensor to 5V.
If you like this project, please click the Respect button, share with your network and follow me.