Nowadays various kinds of code locks are available in the markets which are very costly. The Code lock described here is an electronic combination lock which can be used in daily life. The circuit is described here has following main advantages: You can use 16 switches or more to make it more confusing and people will think you have used a microprocessor, there is no need to amplify signals hence no need of transistor, low cost and small in size and switch has to be pressed in specific interval of time to open the lock.
The timer based code lock circuit is built around a single IC that is NE555 timer which works in mono-stable mode. In mono-stable mode IC is once trigged it will hold the output for a specific interval of time as defined by the timing component before returning to its original state. This property is used in our circuit. In this IC pin 2 is known as triggered input pin which is held below 1/3 of supply voltage and pin 6 which is a threshold pin is held higher than 2/3 of supply voltage, because of this output pin 3 is low.
To open the lock one has to press the switch S1, S2 and S3 in sequence. When S1 is pressed it causes the capacitor C3 to charge with the help of potential diver formed with resistor R5 and R3. When switch S1 is release capacitor starts discharging with the help of resistor R5. So care should be taken in selecting the value of resistor and capacitor. In this circuit it will take approx. 5 seconds to discharge the capacitor and if switch S2 is not pressed within this time period than our lock will not open.
When switch S2 is pressed within time period it causes the pin 2 to ground with the help of resistor R2 and switch S2 and timer IC NE555 is triggered. Because of this capacitor C1 starts charging with the help of resistor R1. As a result pin 3 goes high for specific duration as set by capacitor C1 and R1. You can calculate the time with the formula =1.1*R1*C1. And now within this time you have to press the switch S3 to open the lock.
If all three switches are pressed in allotted time, lock will open. In our circuit we have shown this with the help of LED. But for opening the door you have to connect a relay and through relay you have to connect a solenoid to open the door. If any of the switches between S4 to S7 is pressed it will ground the pin 4 and output will go low. You can increase the number of these switches to increase the complicity of the circuit.