In this tutorial, I will demonstrate how to create a 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.
Components Needed
Arduino Nano and USB connector
Externally Driven Buzzer
HC-SR04 Sensor
Wires
5v to 9v battery source
Enclosure of your choosing
Arduino IDE software
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
Unzip the file Ultrasonic_Music_Box_DIY.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
Connect the Buzzer
Be sure to use an externally driven buzzer
Connect the positive to pin D4
Connect the ground to GND
Step 3 - Connect the HC-SR04 Sensor
Connect Trig to Arduino D2
Connect Echo to Arduino D3
Connect Vcc to Arduino 5v
Connect Gnd to Arduino GND
Step 4 - Connect Battery Power
You can use any supply from 5v to 9v
Disconnect the USB cable
Connect the positive end of the battery to Arduino Vcc
Connect the ground end of the battery to Arduino GND
Notes About the Code
The code was written to detect distance by inches.
Default is 10 inches
You can change the distance by changing the line of code from 10 to desired distance (always in inches).
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
Final step is to put your board into an enclosure
Wooden boxes from a craft store are common
Comments