keypad is used for inputing the code.
2. The code here comprises only two digits. For greater security, the circuit can be modified to accommodate up to nine digits.
However, this will require additional components.
3. The opener (operator) gets only two chances to input the code
number for opening a lock. However, there is no limitation on closing the lock.
4. Two separate relays are provided:
Relay A is used for opening the lock and relay B is used for closing the lock. The same code number is used for gaining
ac-cess to the circuit for acti-vating any of the relays.
Principle
When you press any key on the DTMF encoder, a DTMF signal is generat-ed, which is first converted into a 4-bit equivalent bi-nary/hexadecimal number by the DTMF decoder and then stored in a 4-bit latch. The two numbers generated due to pressing of two keys in sequence are stored in two different latches. The two latched numbers as a whole form the higher and lower nib-bles of an 8-bit number.
Using a magnitude comparator, the result-ing number is compared with another 8-bit number (code) applied to the com-parator through two thum-bwheel switches. If the two Fig. 2: Circuit of DTMF signal generator and transmitter
Fig. 1: Block diagram of remote-controlled sophisticated electronic code lock
numbers match, the result of comparison is logic 1, which would allow the operator to switch on a relay by pressing a par-ticular key from the keypad. The relay contacts would then activate a motor or a solenoid to open/close the door.
In case the numbers entered via keypad and thumbwheel switches don’t match, pressing that very key would only advance a counter to decrease the allowed number of maximum chances for input-ing the correct code. Once the maximum
number of allowed attempts is over, the chance counter disables the input system, so pressing any key doesn’t have any effect over the relays used for opening and clos-ing the lock until and unless the chance counter is reset and correct code is entered
Fig. 3: The receiver, chance counter and relay drive circuit
via keypad.
Circuit description
Fig. 1 shows the block diagram of remote-controlled sophisticated electronic code lock. The entire circuit can be divided into two sections:
1. DTMF signal generator and trans-mitter
2. DTMF signal receiver, comparator and output relay driver
The DTMF signal generator and trans-mitter section is shown in Fig. 2.
Telephone tone/pulse dialler IC UM91215B is used for generating the DTMF signals. A DTMF signal is the alge-braic sum of two different audio frequen-cies, and can be expressed as follows:
ƒ(t)=A.Sin(2pƒat) + B.Sin(2pƒbt)....(1) where ƒa and ƒb are two different audio frequencies, with A and B as their respective peak amplitudes, and ¦ is the resultant DTMF signal. ƒa belongs to low-frequency group and ƒb belongs to high-frequency group.
Each of low- and high-frequency groups comprise four frequencies. From the various keys present on the telephone keypad, two different frequencies, one from the high-frequency group and anoth-er from the low-frequency group, are used to produce a DTMF signal to represent the pressed key. The amplitudes A and B of the two sine waves should be such that:
0.7<(A/B)<0.9...(2)
The frequencies are chosen such that
these are not the harmonics of each other.
The frequencies associated with various keys on the keypad are given in Table I.
From Table I it is clear that if key 3 is pressed, 1477 Hz from the high-frequency group and 697 Hz from the low-frequency group produce the corresponding DTMF signal.
The DTMF signals generated due to pressing of different keys modulate the infrared (IR) rays generated by an IR LED. Transistor T1 (BC548) acts as the modulator. Normally, the LED is off. But
when a DTMF signal is applied at the base of the transistor, the LED starts emitting IR rays due to varying collector current of transistor T1.
Dialler IC UM91215B (IC1) needs only 3 volts for its operation, but at least 4 volts should stay across the IR LED for effective transmission. Hence a supply of 4.5 volts is used. Three pencil cells in series can provide the required voltage. The supply for IC1 is regulated by zener diode ZD1.
Fig. 3 shows the DTMF signal receiver, chance counter and relay driver circuit.
When Darlington phototransistor T2 (L14F1) receives the modulated IR rays from IR LED, it converts the IR pulse train into equivalent electrical signal and couples the same to DTMF decoder IC Fig. 4: Mechanical arrangement
Fig. 5: Connection of reversible motor
TabLe I
Frequencies associated With Various Keys on the Keypad High-frequency group
IC1 - UM91215B DTMF dialler
IC2 - MT8870 DTMF decoder
IC3 - 74LS00 quad NAND gate
IC4, IC5 - 74LS08 quad AND gate
IC6 - CD4017 decade counter
IC7, IC8 - 74LS75 4-bit bistable latch IC9, IC10 - CD4511 BCD-to-7-segment
decoder/driver
IC11, IC12 - CD4585 4-bit magnitude com-parator
IC13 - CD4033 7-segment decoder/
driver
IC14 - 7805 +5V regulator T1, T4, T5 - BC548 npn transistor
T2 - L14F1 phototransistor
T3 - BC547 npn transistor
ZD1 - 3.3V zener diode
D1 - 1N4148 switching diode
D2-D6 - 1N4007 rectifier diode DIS1-DIS3 - LTS543 common-cathode
7-seg-ment display
C1 - 220µF, 10V electrolytic C2 - 10µF, 10V electrolytic
C3 - 0.022µF ceramic disk
C4 - 0.1µF ceramic disk
C5, C6 - 10µF, 16V electrolytic C7 - 2200µF, 25V electrolytic C8 - 1000µF, 16V electrolytic Miscellaneous:
S1 - On/off switch
S2, S3 - Push-to-on switch LS1, LS2 - Microswitch TWS1, TWS2 - Thumbwheel switch RL1-RL3 - 12V, 200-ohm, 1C/O relay X1 - 230V AC to 12V-0-12V, 500mA
secondary transformer - Reversible motor ParTs LIsT
CM8870 (IC2). If the signal is of sufficient amplitude and duration greater than the length of time predetermined by R8-C4 time constant, IC2 detects the signal and outputs a high-going pulse (StD) at its pin 15. The outputs at pins 11 through 14 of IC2 are the hexadecimal equivalent of the detected signal. Different decoded 4-bit numbers that would be generated due to pressing of different keys are shown in Table II.
The decoded number is latched in IC7 or IC8 depending upon the conditions governed by the latch-enable and relay-select signal generator logic circuit built around IC3, IC4, IC6 and transistor T3.
The latched data from IC8 (74LS75) goes to BCD-to-7-segment decoder-cum-driver CD4511 (IC10). The decoded data at the
output of IC10 are also connected to 4-bit magnitude comparators IC11 and IC12 (each CD4585), respectively. Here, the combined output of the two latches is used as one of the two 8-bit numbers required by the magnitude compara-tor. Thumbwheel switches TWS1 and TWS2 are connected to comparators IC11 and IC12, respectively, for set-ting the 8-bit code. If the latched data inputs A0 through A7 from keypad and B0 through B7 from the thumbwheel switches are equal, the composite comparator outputs logic 1 at pin 3 of IC12. Output pin 3 is designated as A=B. When A=B is high, either relay A or relay B can be energised depending upon the signal from the relay-enable signal generator built around IC5.
The circuit is powered by 230V AC mains using switch S1. The AC mains is stepped down by transformer X1 to deliver a secondary output of 12V-0-12V at 500 mA. The transformer output is rectified by diodes D2 and D3 and smoothed by ca-pacitor C7. Regulator 7805 (IC14) provides regulated 5V supply, which is connected to the entire circuit via normally closed (N/C) contacts of limit microswitch LS2. Another limit microswitch LS1 is connected to the base of transistor T4.
The status of limit microswitches LS1 and LS2 depends upon the position of the door-locking plunger. In the unlocked condition, the plunger stays in its retarded state remote from limit microswitch LS2, and the N/C contact of LS2 allows current to the circuit. On the other hand, the N/C contacts of limit microswitch LS1 are
cut-off by the plunger and hence relay RL1 cannot be energised. However, relay RL2 can be energised.
If the plunger is moved forward to lock the door (using relay RL2), the plunger pushes limit microswitch LS2. When the plunger is completely advanced, it breaks the N/C contacts of microswitch LS2 and hence the connection of the circuit with +12V power supply. Being disconnected with the power supply, relay RL2, and consequently the motor/solenoid driving the plunger, goes off.
To resume the supply for unlocking, one has to press push-to-on switch S3.
Consequently, the relay RL3 gets sup-ply and pulls its armature. Even if S3 is released now, relay RL3 would still be in the energised condition, getting supply through its N/O contacts and providing supply to the circuit.
When the plunger is moved forward from its retarded position, microswitch LS1 frees itself and reconnects to the base of transistor T4, allowing relay RL1 to be activated. If the plunger is moved back to open the door (using relay RL1), limit mi-croswitch LS1 would again be pushed and disconnect from the base of transistor T4, stopping the supply to the motor/solenoid.
Thus the two microswitches also act as the limit switches for the motor.