Overview
Nothing says “There’s something valuable here!” than the sight of a lock. But what if the lock was invisible and the unlocking key could be transmitted through solid matter? No one would even know there was a lock, much less how to pick it. That’s what he does. It hides all of the lock mechanism away and can only be unlocked by something you know: a secret pattern of knocks.

Tools Used
- A Sound Sensor circuit using IC LM 393 and a mic.
- Microcontroller Arduino Nano Atmega 328.
- Motor Driver L293D.
- Solenoid Lock.
- 12 V Lipo battery.
- Transparent Acrylic sheets
- 7 resistors of 330 ohms, a motor, a fan, 6 leds of various colors, a button
switch, jumpers, nuts and bolts, etc.

Approach
- Everything is initialized, and the appropriate input & output pins are set.
- After everything is initialized the code listens for a spike on the mic of the sound sensor.
- The analog input in the form of a sound will be converted to its corresponding digital input and registered as a knock on the basis of the threshold set, i.e. when it’s above a certain threshold, it counts as a “knock”, and then transmitted to the microcontroller through the sound sensor circuit.
- When it hears a knock it notes the time of the timer and then listens for more knocks.
- When it gets another knock it saves the time between knocks to an array.
- When there are no more knocks (i.e. if there is a time lapse of 3 seconds without a knock) it terminates the array and checks to see if the sequence is correct. (The pattern of knocks is checked with the initially recorded pattern in EEPROM which is saved using the steps from 2 to 5 by the owner.)
- It does this by normalizing/mapping the time between the knocks, i.e. making them relative to each other and not the exact milliseconds between them. So the longest time between knocks becomes 100, half that time becomes 50 and so on.
- It compares these values to the stored knock. If they match, (or nearly match, taking into account the margin for human error) the microcontroller sends a high value to the motor driver circuit which controls the solenoid lock, and the latch retracts for a couple of seconds and then goes back to its initial state. If the knock doesn’t match, it blinks a light for failure and then goes back to #2.
- In the VERSION 2, as soon as the normalized/mapped array of relative time between the knocks is generated, the code compares it with the various stored patterns of knocks in EEPROM assigned for different functions, and then performs the function corresponding to the input through the various output devices which are connected with the associated pins in the microcontroller.
Block Diagram

Impact on society
The idea of using a completely different mechanism for unlocking a door, where there is no need for a visible lock or its key which is required to be kept safe in order to open the lock, could shift the mindset of the people of our society from following an old- conventional approach to a more technology-based approach.
The purpose of technology which is to make human life easier, more comfortable and luxurious can be seen achieving through a new way of home-automation that we have implemented in the version #2, where a particular pattern of knocks can be used as a REGULATOR to control the speed of the fans in the house and also as a specialized CONTROL BOARD to switch on/off the various electronic devices of the house, without even getting up!
Applications & Future Scopes
- The speed of any fan, the brightness of any light and the switch of any electronic device in the house can be controlled simply through a specific pattern of knocks. Multiple appliances like lights, fans, TV, refrigerator, washing machine, PlayStation, sound systems, emergency alarm, etc. can be controlled independently or in combinations which are frequently used with each other simply through a specific pattern of knocks.
- Using a more economical microcontroller and enabling a sleep mode for better battery life.
- Making the whole package small enough to fit inside the door.
- Storing several knocks so several people can have their own private knocks.
- Adding a real-time clock and using different knocks for different days of the week or times of the day.
- Listening for doorbell presses rather than door knocks.
- Adding a servo or solenoid powered knocker to provide feedback through the door. It could then offer a challenge-response security where the door starts a knock sequence and the user has to finish it correctly.
- Rather than listening for knocks, putting a photoresistor in the peephole and detecting flashes of light from a pocket flashlight or simply by placing your hand over the peephole. Or an infrared receiver and use special key presses on a remote control.
- Build an android app which can directly send notifications on the cell phone of the owner, when an intruder, unidentified or unauthorized person tries to open the door and then take control of the further action of the lock i.e. whether to open the solenoid lock or keep it closed, using the concepts of IOT.
Team
- Kauser Husainee (ECE)
- Anchit Raut (MEC)
- Kaustubh Thakre (MME)
Mentors
- Vedant Ranade
- Divya Musapeta