Showing posts with label digital. Show all posts
Showing posts with label digital. Show all posts
Thursday, April 11, 2013
Two button Digital Lock
Now here’s a digital lock unlike any other, as it has only two buttons instead of the usual numeric keypad. The way it works is as simple as its keypad. Button S1 is used to enter the digits of the secret code in a pulsed fashion-i.e. the number of times you press the but-ton is determined by the digit to be entered. A dial telephone uses the same type of coding (now maybe there’s an idea?). Press four times for a 4, nine times for a 9, etc. Pressing button S2 indicates the end of a digit.
Two-button Digital Lock Project Image:

For example, to enter the code 4105, press S1 four times, then press S2, then S1 once, S2 once, then without pressing S1 at all, press S2 again, then finally S1 five times and S2 once to finish. If the code is correct, the green LED D1 lights for 2 seconds and the relay is energised for 2 seconds. If the code is wrong, the red LED D2 lights for 2 seconds, and the relay is not energised. To change the code, fit a jumper to J1 and enter the current code. When the green LED D1 has flashed twice, enter the new 4-digit code. D1 will flash three times and you will need to confirm the new code. If this confirmation is correct, D1 will flash four times. If the red LED D2 flashes four times, some-thing’s wrong and you’ll need to start all over again. To finish the operation, remove the jumper and turn the power off and on again the digital lock is now ready for use with the new code.
Two-button Digital Lock Circuit diagram :

The software can be found on the webpage for the project [1]. Don’t forget to erase the microcontroller’s EEPROM memory before programming it, so you can be sure that the default code is 1234 and not some -thing unknown that was left behind in the EEPROM. A little exercise for our readers: convert this project into a single-button digital lock for example, by using a long press on S1 instead of pressing S2 to detect the end of a digit.
Author : Francis Perrenoud - Copyright : Elektor
Source : http://www.ecircuitslab.com/2012/02/two-button-digital-lock.html
Wednesday, April 10, 2013
Low Cost Digital Code Lock
Many digital code lock circuits have been published in this magazine. In those circuits a set of switches (conforming to code) are pressed one by one within the specified time to open the lock. In some other circuits, custom-built ICs are used and positive and negative logic pulses are keyed in sequence as per the code by two switches to open the lock.
Digital Code Lock Circuit diagram :

A low-cost digital code lock circuit is presented in this article. Here the keying-in code is rather unique. Six switches are to be pressed to open the lock, but only two switches at a time. Thus a total of three sets of switches have to be pressed in a particular sequence. (Of these three sets, one set is repeated.) The salient features of this circuit are:
1. Use of 16 switches, which suggests that there is a microprocessor in-side.
2. Elimination of power amplifier transistor to energise the relay.
3. Low cost and small PCB size.
An essential property of this electronic code lock is that it works in monostable mode, i.e. once triggered, the output becomes high and remains so for a period of time, governed by the timing components, before returing to the quiescent low state. In this circuit, timer IC 555 with 8 pins is used. The IC is inexpensive and easily available. Its pin 2 is the triggering input pin which, when held below 1/3 of the sup-ply voltage, drives the output to high state. The threshold pin 6, when held higher than 2/3 of the supply voltage, drives the output to low state. By applying a low-going pulse to the reset pin 4, the output at pin 3 can be brought to the quiescent low level. Thus the reset pin 4 should be held high for normal operation of the IC.
Three sets of switches SA-SC, S1-S8 and S3-S4 are pressed, in that order, to open the lock. On pressing the switches SA and SC simultaneously, capacitor C3 charges through the potential divider comprising resistors R3 and R4, and on releasing these two switches, capacitor C3 starts discharging through resistor R4. Capacitor C3 and resistor R4 are so selected that it takes about five seconds to fully discharge C3.
Depressing switches S1 and S8 in unison, within five seconds of releasing the switches SA and SC, pulls pin 2 to ground and IC 555 is triggered. The capacitor C1 starts charging through resistor R1. As a result, the output (pin 3) goes high for five seconds (i.e. the charging time T of the capacitor C1 to the threshold voltage, which is calculated by the relation T=1.1 R1 x C1 seconds). Within these five seconds, switches SA and SC are to be pressed momentarily once again, followed by the depression of last code-switch pair S3-S4.
These switches connect the relay to out-put pin 3 and the relay is energised. The contacts of the relay close and the solenoid pulls in the latch (forming part of a lock) and the lock opens. The remaining switches are connected between reset pin 4 and ground. If any one of these switches is pressed, the IC is re-set and the output goes to its quiescent low state. Possibilities of pressing these reset switches are more when a code breaker tries to open the lock.
LED D5 indicates the presence of power supply while resistor R5 is a cur-rent limiting resistor.
The given circuit can be recoded easily by rearranging connections to the switches as desired by the user.
Source : www.ecircuitslab.com
Subscribe to:
Posts (Atom)