Secret Clap Door Lock
A door lock which opens only when a particular pattern of claps are detected. An Arduino based system is created which hears the pattern of claps and compares it with the saved pattern. If both matches, the lock opens.
The pattern of claps is detected using a sound sensor module. It gives a LOW(False) when a clap is detected. I am using the time component to detect the pattern. The amount of time duration between two successive claps is measured and hence a pattern is formed. This pattern is then compared to the saved correct pattern.
Here I am using a LED instead of a lock for simplicity. A servo motor in the form of lock can be used. The LED glows when the pattern matches the correct pattern. If the incorrect pattern is detected, the LED remains dim and the program resets after 3 seconds and gets ready to take new pattern input.
Security is a major concern in our day to day life, and digital locks have become an important part of these security systems. This a simple example of the same.
Components :
Connections :
Code:
int motor_input1=11;
int motor_input2=10;
int motor_input3=5;
int motor_input4=6;
int L=2;
int R=3;
void setup() {
pinMode(L,INPUT);
pinMode(R,INPUT);
Serial.begin(9600);
pinMode(motor_input1,OUTPUT);
pinMode(motor_input2,OUTPUT);
pinMode(motor_input3,OUTPUT);
pinMode(motor_input4,OUTPUT);
}
void loop() {
if((digitalRead(R)==true)&&(digitalRead(L)==false)) {
Serial.println("LEFT");
analogWrite(motor_input1,200);
analogWrite(motor_input2,0);
analogWrite(motor_input3,200);
analogWrite(motor_input4,0);
delay(10);
}
else
if((digitalRead(L)==true)&&(digitalRead(R)==false)) {
Serial.println("RIGHT");
analogWrite(motor_input3,0);
analogWrite(motor_input4,200);
analogWrite(motor_input1,0);
analogWrite(motor_input2,200);
delay(10);
}
else {
Serial.println("Straight");
analogWrite(motor_input1,120);
analogWrite(motor_input2,0);
analogWrite(motor_input3,0);
analogWrite(motor_input4,120);
delay(10);
}
}
Hi! I am currently making a project just like yours (the deadline is on Wednesday) but the difference is my door lock would open and close with a clap. To be honest, I don't have any ideas about how will this work. May I ask if what are the changes in connections and components if I include closing the door lock. Thank you so much.
ReplyDeleteAnd also, how do I replace the LED with a door lock? Thank you for your time.
DeleteThanks for sharing such informative Blog. Composite doors are increasingly popular and provide an attractive alternative to front doors for houses and flats. Composite doors are made up of PVC, glass-reinforced plastic, wood and insulating foam that provides good weather resistance. Of course a high quality and reliable door lock must be used on your composite door to ensure your safety and security. “Locksmith York” is here to provide a range of locks. Visit our Site. composite door locks
ReplyDeleteYour blog is really attractive. I enjoyed seeing all the pictures and reading all the information. If you are searching for Cabinet Door Locks North Reading guide, then please consider us.
ReplyDeleteThank for sharing such Informative Article. Composite doors are increasingly popular and provide an attractive alternative to front doors for houses and flats. Composite doors are made up of PVC, glass-reinforced plastic, wood and insulating foam that provides good weather resistance. Contact us if need any help. People will gets benefits. If you needs more info please visit our site.
ReplyDeleteComposite Door Locks
Good information Thank you so much for sharing such updates. upvc door lock York
ReplyDeleteThank you so much for sharing such updates. Visit: York locksmith
ReplyDeleteGreat information.Thanks for sharing your information! Locksmith Clifton Great information.Thanks for sharing your information! Locksmith Clifton
ReplyDeleteThanks for sharing this great information with us. Locksmiths Leeds
ReplyDeleteThanks for sharing your information. This is very useful blog. uPVC door lock repair
ReplyDeleteNice article. Thanks for sharing such a great information. Door lock repair Leeds
ReplyDeleteThanks for sharing such a great information.This is very useful blog. Locksmith Horsforth
ReplyDeleteBorglocks offers high quality Hollow Metal Door Lock with fastest delivery and customer satisfaction. Due to the weight and hardiness of the steel doors, the keypad needs to be able to keep up so borglocks offers highest quality locks.
ReplyDeleteKEYINCODE growing range of electronic and mechanical access control products are designed to meet passage mode codes and standards for a range of security applications and needs.
ReplyDeleteInformative Blog on Door Lock. Thanks for sharing.
ReplyDeleteDoor Locks and Latches
Nice article.Thanks for sharing. Locksmith Leeds
ReplyDeleteBeautiful post. Thank you so much for sharing a Useful tips. Window Boarding Leeds
ReplyDeleteGreat post. Thanks for sharing this blog with us. Locksmith Services in York
ReplyDeleteThank you for sharing valuable post with us. It seems very informative for all readers. Thank you. Locksmith Los Angeles
ReplyDeleteWell done on creating such an amazing blog and thanks for sharing it with us. Locksmiths Break Into Your House
ReplyDeleteThanks for sharing this informative blog with us. The Benefits of Installing Anti-Snap Locks
ReplyDeleteThanks for sharing such a nice post with us. < ahref="https://www.drlocksltd.co.uk/home-security-get-your-home-secure-for-winter/"> Get Your Home Secure For Winter >
ReplyDeleteThanks for sharing such a nice post with us. < a href="https://www.drlocksltd.co.uk/"> Locksmith York >
ReplyDeleteThanks for sharing such a nice blog with us. Which Type Of Front Door Is Best?
ReplyDelete