Unlocking a door with a key is so old fashioned, so I want change it with knocks to unlock my room door. I created a mechanism that unlock/lock my door from the inside after receiving a secret combination from the outside.
In this project, I used an arduino Uno, a piezo speaker, and a servo motor. If a piezo speaker hears the right number of knocks in the right cadence it triggers the servo motor to turn lock/unlock the door.
9v Battery: https://amzn.to/2wPmnSP
Jumper Wires: https://amzn.to/398mQhq
Male DC Barrel Jack Adapter for Arduino : https://amzn.to/2VwyKxx
Micro Servo 9g : https://amzn.to/38bLtrY
9v Battery Clip Connector : https://amzn.to/32D4R0b
Mini Breadboard : https://amzn.to/2JujS9e
1 Mega Ohm Resistor : https://amzn.to/2JYqHSY
Piezo Speaker : https://amzn.to/3b0kbaq
Ribbon Cable : https://amzn.to/3e9tGpH
Download the code and don’t forget to install servo library. Connect Arduino to your PC and upload the sketch.
Here's a look at a few bits of code if you're interested in tinkering:
int secretCode[maximumKnocks] = {100, 100, 55, 55, 100, 100, 100, 50, 40, 50, 30};
This is the default knock that it recognizes when you turn it on.
If you're having a hard time getting it to recognize my secret konck change this to {100, 100, 100, 0, 0, 0... and a simple sequence of 3 knocks will open it.
After you upload the code, follow the above diagram for wiring the components.
You can connect the GND pin on the servo motor to the GND on your Uno, the VCC pin to VIN, and Signal pin to pin 5.
The piezo buzzer is loaded with a 1MΩ resistor and connected to an Arduino ADC.
I placed the Arduino Uno and piezo speaker on the right side of my door close to the door security slide latch lock.
I mounted servo motor above the door security slide latch lock, so the servo motor can lock/unlock the door and I placed the 9 battery on another side of door so I can easily remove/change the battery.
Additionally, your piezo speaker needs to be close to the surface you're using to detect knocks from the outside.
Unlocking a door with a key is so old fashioned, so I want change it with knocks to unlock my room door. I created a mechanism that unlock/lock my door from the inside after receiving a secret combination from the outside.
In this project, I used an arduino Uno, a piezo speaker, and a servo motor. If a piezo speaker hears the right number of knocks in the right cadence it triggers the servo motor to turn lock/unlock the door.
9v Battery: https://amzn.to/2wPmnSP
Jumper Wires: https://amzn.to/398mQhq
Male DC Barrel Jack Adapter for Arduino : https://amzn.to/2VwyKxx
Micro Servo 9g : https://amzn.to/38bLtrY
9v Battery Clip Connector : https://amzn.to/32D4R0b
Mini Breadboard : https://amzn.to/2JujS9e
1 Mega Ohm Resistor : https://amzn.to/2JYqHSY
Piezo Speaker : https://amzn.to/3b0kbaq
Ribbon Cable : https://amzn.to/3e9tGpH
Download the code and don’t forget to install servo library. Connect Arduino to your PC and upload the sketch.
Here's a look at a few bits of code if you're interested in tinkering:
int secretCode[maximumKnocks] = {100, 100, 55, 55, 100, 100, 100, 50, 40, 50, 30};
This is the default knock that it recognizes when you turn it on.
If you're having a hard time getting it to recognize my secret konck change this to {100, 100, 100, 0, 0, 0... and a simple sequence of 3 knocks will open it.
After you upload the code, follow the above diagram for wiring the components.
You can connect the GND pin on the servo motor to the GND on your Uno, the VCC pin to VIN, and Signal pin to pin 5.
The piezo buzzer is loaded with a 1MΩ resistor and connected to an Arduino ADC.
I placed the Arduino Uno and piezo speaker on the right side of my door close to the door security slide latch lock.
I mounted servo motor above the door security slide latch lock, so the servo motor can lock/unlock the door and I placed the 9 battery on another side of door so I can easily remove/change the battery.
Additionally, your piezo speaker needs to be close to the surface you're using to detect knocks from the outside.