Step 1: Check the materials you need.
1. Arduino
I used an Arduino Pro Mini 3.3V. You also need USB-Serial tether to program it.
2. A battery box
I used a AA x 4 battery box with power line wires.
3. Breadborad
I used a mini breadboard by Sparkfun.
4. ECM (Electet Microphone) Module
I used an ECM module by Sparkfun.
5. RC Servo motor
I used a mini servo motor EK2-0508 by E-Sky.
6. Jumper wires
7. An Aluminum Electrolytic Capacitor
I used a 100uF capacitor.
8. A knocker hammer parts
I used a small wooden ball toy.
9. A flexible metal wire
It is for connecting the servo horn and the knocker hammer.
A steel wire 2mm in diameter will be suitable.
10. Double-stick tape
It is for making the parts bond, and for mounting the device on the door.


























Remove these ads by
















Visit Our Store »
Go Pro Today »




Thank you.
At first, if you change my code to comment following lines in, you can see analog value from mic by using "serial monitor".
If you can not see any message on the serial monitor, the arduino doesn't wrok correctly, and I have no idea what happens... Something wrong with the arduino or PC or the connection.
If you can see value between 0 to 100, it means the audio level of the mic.
Check the value when the mic in silence or knocked sound. If the value doesn't change, something wrong with the mic input. You may need to tune the gain of mic module (sorry I don't know anything about the module you are using).
If the value changes corresponding to the sound loudness, you are very close to the goal.
Change the value "silent_thre" as the output value gets higher than it when you make a knock sound.
And setting the value "debug" to 1 will help you to see what happens.
Good luck,
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 0
This is only part of the error message. Almost got it working except for the coding.
Thanks.
Thank you!
I didn't notice that problem. I'll check it later. Thanks!
Just wodnering, is the capacitor value of 100uF important? How would a higher value affect this?
Anata no kodomo wa totemo kawaii! Nan sai desu ka?
Gomenasai, sukoshi nihongo wo hanasemasu.
(Instructable no website wa hiragana dekenai. Za nen.)
Your kid is really cute? How old is he?
I am sorry, something about letting something go
(the instructable website doesn't have hiragana. Too bad.)
Was I close? :P
Yes.
I'm sorry, I only can speak a little Japanese. (I've forgotten so much since leaving.)
Yes.
(Good job.)
My son is 3 years old. He is enough brave to see a ghost ^^)