How to Make a "Ghost Knocker"




Now you can buy the kit of this instructable from Jameco!

This project is named "Ghost Knocker". You will get the idea if you watch this movie.

It is an easy prototyping. You can use it on toilets, closets, or office doors.
Make your own, and make someone surprised and laugh!

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Check the Materials You Need.

Below is the list of stuff you need to make it:

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.

Step 2: Make the Knocker Hammer.

Make two holes in to servo horn.

Make the wire to be in hole and bend it to fix on the servo horn.

Bond the ball (or whatever you choose for hammer) to the wire.
Drill the hammer if you need.

Step 3: Mount the Breadboard and the Servo on the Battery Box.

Mount the breadboard to battery box with double-stick tape.

And make the RC servo fix on the battery box to move the servo horn can move.

Step 4: Wire the Circuit on the Bread Board.

Wire the circuit on the borad. It is a quite simple circuit. Check the circuit diagram.

Analog input is for the microphone, and Digital Output(PWM) for the servo motor.
The mic module needs the power at Vcc(3.3V) from arduino's Vcc pin.
The servo motor requires  5 to 6V to be driven, so you connect the battery power to it. 

What is the capacitor into VCC and GND? Because I have been suffered from the noise of microphone. The combination of the ECM module by Sparkfun and Arduino seems to be unstable. For instance, when I wrote serial communication code to monitor A/D value, it cause enormous noise and the A/D value keeps high. So the capacitor is to ease my mind.

Step 5: Download the Program.

Download the arduino program.

Program code for arduino:

It recognizes the knocking sound and counts them, and move the servo to mimic the knocks.

Step 6: Check and Adjust the Hammer Position.

You will need to make the position of hammer.
Bend the wire of hammer to make knock the door face properly.

Step 7: Finished!

OK, all done!

Now put it on the door face with double stick tapes.

It may help the prank to put  a sign "Knock please." on the other side of door.


Arduino Challenge

Participated in the
Arduino Challenge

Robot Challenge

Participated in the
Robot Challenge

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    26 Discussions


    Question 9 months ago

    Hi there,

    I've just seen this knocker and it's exactly what I've been looking for a long time.
    It's not possible for me to make it due to time constraints etc.
    Would you (or anybody) be prepared to make one of these units for me?
    Let me know. (cost, time-frame etc)




    3 years ago

    May you write here program code for arduino?

    thank you very much :D

    1 reply

    Reply 3 years ago

    because that code which have you given for us doesnt work((


    6 years ago on Introduction

    I managed to figure out the coding problem.It turns out something wrong with my computer. I used the computer and no error show. I'm using arduino pro mini. I already build the circuit according to the pic above but its not working. The servo motor give no reaction whenever I knock something. Also when I open the serial monitor it didn't print out anything. But from the coding given, there should be something printed out. I attached pic of the project so far.

    Thank you.

    1 reply

    Reply 6 years ago on Introduction


    At first, if you change my code to comment following lines in, you can see analog value from mic by using "serial monitor".

    //Serial.print (val);
    //Serial.print ("\n");

    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,



    6 years ago on Introduction

    Hye there. I tried to do this project for fun. I already got all the parts except the arduino coding. I already download it from the link attached but I can't open it with arduino software. This is error message when I tried to open it.

    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.


    2 replies

    Reply 6 years ago on Introduction

    Hmm, I tried the code with the newest arduino (1.0.4) on MacOS X, but no error to open. Which platform and version of the arduino are you using?

    I have to restart my Arduino after about 5 cycles or knocks. Why is that? Otherwise, I have gotten it working with a piezo disc and no capacitor. Still I need to adjust the input values a little to get it working well. Love it!
    Thank you!

    1 reply

    7 years ago on Introduction

    Good stuff!

    Just wodnering, is the capacitor value of 100uF important? How would a higher value affect this?

    1 reply

    Reply 7 years ago on Introduction

    Thank you! The capacitor value is not important. I'm not sure it is really needed. I encountered the problem the combination of sparkfun's MCM module and arduino board causes unstable output. I doubted the power quality from arduino, and added the capacitor. It seems help somehow.

    Sugoi! Imoshiroi Arduino no hatsumei!

    Anata no kodomo wa totemo kawaii! Nan sai desu ka?

    Gomenasai, sukoshi nihongo wo hanasemasu.

    (Instructable no website wa hiragana dekenai. Za nen.)

    3 replies

    Reply 7 years ago on Introduction

    Nice! Interesting Arduino invention!
    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


    Reply 7 years ago on Introduction

    I'm sorry, I only can speak a little Japanese. (I've forgotten so much since leaving.)

    (Good job.)


    7 years ago on Introduction

    Havent seen an Arduino Vs yet. Cool. Here is a picaxe Vs a few years back.

    1 reply