-
1Choose your scary audio.
I have chosen mine by going through Pixibay, and chose Sound Effect by Charlie Raven from Pixabay.
-
2Use audacity to downsample audio to 8khz
You can use any audio processor but I used Audacity.
Step one:
Click Audio Set Up -> Select Audio Settings
In audio settings change project sample rate to 8000hz.Step two:
Export it as an MP3 and force export to mono
-
3Use an Audio Encoder made by High-Low Tech to create the Arduino variable
Found towards the bottom of this article http://highlowtech.org/?p=1963. That article is also a great resource for making projects like this so I would recommend reading the whole thing.
Copy the output of that encoder and paste it into the variable sample[] PROGMEM on line 4 of the program.
Photo of my terminal when running the encoder. -
4Wire the Arduino
Wire the circuit as shown in the picture.
Note that I showed three AA batteries, but used a 9V battery previously. The main thing is to ensure that the speaker is driven separately from the Arduino since it will need more power. It should also be pointed out that the Arduino should be powered through the USB port.
Also read the datasheet of the transistor used as some transistors have different pinouts than others. The transistor I used was the TIP 122 which has a pin out of BCE.
The wiring should follow as below:
Base: Pin 11 Arduino
Collector: Negative end of speaker
Emitter: Ground
-
5Program the Arduino
Program the Arduino with one of the examples in the arduino-examples folder in this github https://github.com/PhysicsUofRAUI/scary-sound-effects.
You can replace the variable contents const unsigned char sample with your own audio if you want.
-
6Put it in a door way.
Put it some place so that once it goes off it will scare people!
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.