In this tutorial, I will demonstrate how to create a Passive Infrared motion-activated music box for ghost hunting or paranormal research using an Arduino Nano. Arduino offers a straightforward and cost-effective solution for prototyping various projects.
Update 7/10/2023: Added an LED to indicate motion.
Most of the components can be purchased from Amazon or Digikey.com
Components Needed
An LED light (Red works)
Wires
If using the expansion board use 6 inch Female to Male
5v to 9v battery source
Enclosure of your choosing
Arduino IDE software (Free)
Tools Needed
Soldering iron and solder
Wires
Battery, anywhere between 5v to 9v is okay.
An Arduino Nano Expansion Board is nice but not necessary.
Step 1 - Programing the Arduino
Program the Arduino Nano
Code is available for download. This is offered free of charge, as-is, no warranty.
Unzip the file PIR_Music_Box_v2.zip
Connect the Arduino Nano to computer via USB cable.
Start the Arduino IDE program.
Under Tools select the following:
Board: “Arduino Nano”
Processor: “ATmega328P” May need to select “ATmega328P (Old Bootloader)”
Programmer: “Parallel Programmer”
Port will be unique, select correctly.
Under File select Open
Choose the unzipped file.
Program the Arduino Nano
Select Upload or Ctrl+U
Step 2 - Connect the Buzzer and LED
Connect the Buzzer and LED
Be sure to use an externally driven buzzer.
1. Connect the buzzer positive to pin D3
2. Connect the buzzer ground to GND
3. Connect the LED positive to pin D4 (long leg is positive)
4. Connect the LED ground to GND
Step 3 - Connect the HC-SR501 Sensor
1. Connect sensor output to D2
2. Connect Vcc to Arduino 5v
3. Connect Gnd to Arduino GND
Step 4 - Connect Battery Power
You can use any supply from 5v to 9v
Disconnect the USB cable
1. Connect the positive end of the battery to Arduino Vcc
2. Connect the ground end of the battery to Arduino GND
Notes About the Code
The code will play Twinkle Twinkle Little Star when the PIR sensor detects motion.
If you need any modifications to the code but lack the ability to do it yourself, I suggest utilizing upwork.com to find a skilled Arduino programmer who can assist you.
Step 5 - Enclosure
The final step is to put your board into an enclosure.
Wooden boxes from craft stores are common.
ADVANCED USERS
Attached is the Gerber files for a PCB. This is offered free of charge, as-is, no warranty.
Part Numbers:
Buzzer: AT-1224-TWT-5V-2-R
PIR Sensor: HC-SR501
Comments