top of page
Search

DIY Motion Activated Music Box

Updated: Jul 10, 2023

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

Ultrasonic_Music_Box_DIY
.zip
Download ZIP • 2KB

  1. Connect the Arduino Nano to computer via USB cable

  2. Start the Arduino IDE program

  3. Under Tools select the following:

    1. Board: “Arduino Nano”

    2. Processor: “ATmega328P” May need to select “ATmega328P (Old Bootloader)”

    3. Programmer: “Parallel Programmer”

    4. Port will be unique, select correctly

  4. Under File select Open

    1. Choose the unzipped file

  5. Program the Arduino Nano

    1. Select Upload or Ctrl+U


Step 2 - Connect the Buzzer

  • Connect the Buzzer

    • Be sure to use an externally driven buzzer

  1. Connect the positive to pin D4

  2. Connect the ground to GND

Step 3 - Connect the HC-SR04 Sensor

  1. Connect Trig to Arduino D2

  2. Connect Echo to Arduino D3

  3. Connect Vcc to Arduino 5v

  4. 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 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

806 views0 comments

Comments

Rated 0 out of 5 stars.
No ratings yet

Commenting has been turned off.
bottom of page