Here’s a fantastic project using an arduino, a motor, and a piezo sensor which allows you to both record and detect knocking patterns to unlock a door.  The video below does a fantastic job of demonstrating how it works: It’s completely mobile and can be suction cupped to any dead bolt. Press a button to record a new sequence.  Upon detecting the correct sequence of knocks, the motor turns the lock open.  Brilliant!

Components REQD.:


01) Arduino

02) Piezo speaker

03) High Torque Geared Motor (5V rated)

04) Pushbutton

05) LEDs (green & red)

06) npn Transistor (P2N2222A)

07) Rectifier Diode (1N4001)

08) Resistance 2.2 kOhm

09) Resistance 1 MOhm

10) Resistance 10 kOhm

11) Resistance 220 Ohm [x2]