• No results found

diGital ComBination loCk

In document ep25-ElectronicsProjectsVol25.pdf (Page 131-134)

SreeKuMar V.

W

e’ve seen in movies highly se- cured dens that require one to press certain number combina-tion to gain entry. These locking systems use expensive microprocessors and PCs, which a common man can’t afford.

Here is a digital combination lock using solidstate memory ICs that costs much less. As shown in Fig. 1, the system uses two key sets (user and security key sets), D-type flip-flops, comparators and solenoid. The user code comprising eight bits is compared with the preset security code of the same length (eight bits). If the user code matches with the security code, access is granted for opening the code lock by pressing an ‘Enter’ key. The lock can be closed/reset by using the reset key.

Circuit description

Fig. 2 shows the power supply circuit for the lock. The AC mains is stepped down by transformer X1 to deliver a sec-ondary output of 9V AC at 300 mA. The transformer output is rectified by a

full-wave bridge rectifier comprising diodes D1 through D4. Capacitor C2 acts as a filter to eliminate ripples. Regulator IC 7805 (IC9) provides regulated 5V power supply to the circuit.

Fig. 3 shows the circuit of the digital combination lock. The user key set com-prising switches is connected to D-type flip-flop 74LS74 ICs (IC1 through IC4), which act as the storage devices for the sequence entered by pressing push-to-on tactile switches S1 through S8.

Pressing any of the user keys results in logic 1 to be clocked to the ‘Q’ output of the respective flip-flop of IC 74LS74.

Else, the ‘Q’ outputs of the flip-flops of IC1 through IC4 remain at logic 0. The outputs of IC1 through IC4 are fed to ‘A’ inputs of two 4-bit magnitude comparator 74LS85 ICs (IC5 and IC6). The ‘B’ inputs of IC5 and IC6 are connected to the security key set (S9 through S16). Output pin 6 of IC5 (OA=B) and input pin 3 of IC6 (IA=B) are cas-caded to obtain the 8-bit sequence.

Output pin 6 of comparator IC5 goes high if the input bit sequence is the

‘Enter’ key (S17) causes a clock transi-tion at the input of IC7 and its Q1 output (pin 5) goes high. As a result, transistor T1 conducts and relay RL1 energises. At the same time, the solenoid connected to the relay contacts moves back to unlock the door.

In case the user input bit sequence doesn’t match with the preset security bit sequence, the output of IC6 remains low and therefore pressing ‘Enter’ key doesn’t activate the relay driver transistor. Con-sequently, the solenoid doesn’t move back to unlock the door.

Solenoid connections are shown in Fig. 4. Driving the solenoid with DC is very simple. Just switch on the DC sup-ply to it using a relay or transistor, and the solenoid operates. However, when the solenoid is driven, flywheel diodes are necessary. The large inductance of the coil can cause large voltage spikes to appear across the switching element (relay or Fig. 1: Block diagram of digital combination lock

Fig. 2: Power supply circuit

Parts List Semiconductors:

IC1-IC4, IC7 - 74LS74 dual D-type flip-flop IC5, IC6 - 74LS85 4-bit magnitude D1-D6 - 1N4001 rectifier diode Resistors (all ¼-watt, ±5% carbon):

S18 - Push-to-on tactile switch S9-S16 - SPDT switch

S19 - On/off switch PZ1 - Piezobuzzer

RL1 - 5V, 200-ohm 1C/O relay - Solenoid or equivalent

transistor doing the switching), unless the current flowing through the coil is allowed to dissipate slowly.

When relay RL1 energises, the cur-rent flowing down through the solenoid coil is limited by the resistance of the coil. The inductors tend to oppose the quick change in the current flowing

through them and generate a voltage of their own to stop this happening.

When relay contacts open, the inductor generates a voltage to make the current to continue down through the coil, and the current flows up through the diode and back into the inductor. This is the reason why a freewheeling diode (D6) is

Fig. 3: Circuit of the digital combination lock

Fig. 4: Solenoid connections

used here. The logic built around NAND gates N1 and N2 enables the buzzer when the sequence matches and ‘Enter’

key is pressed. Capacitor C1 prolongs the buzzer sound.

Operation

This circuit is designed for 8-digit binary codes and can be divided into two parts, namely, the user key panel and the security key panel. Switches S1 through S8 shown within the rectangular dotted lines form the user key panel. Similarly, switches S9 through S16 shown within another rectangular dotted lines form the security key panel.

Suppose you want to set the pass-word as ‘1578.’ For this, connect the first switch (S9), fifth switch (S13), seventh switch (S15) and eighth switch (S16) of the security key set to +5V and ground all the remaining switches. To open the lock, you’ll have to momentarily press the

first switch (S1), fifth switch (S5), seventh switch (S7) and eighth switch (S16) of the user key set to match with the preset code in the security key set and then press

‘Enter’ key (S17).

If the entered sequence matches with the preset sequence, the buzzer sounds to indicate the correct entry and LED2 glows to indicate that the lock has opened. If the sequence doesn’t match, the buzzer doesn’t sound and LED1 glows to indicate that the door is not opening. For the next trial, press reset key S18.

Pressing ‘Enter’ key obviates fool-ing of the system by random entries when someone is trying to open the lock.

With eight digits, up to 28 combina-tions are possible, which makes it very difficult for a person to keep on trying by pressing ‘Enter’ every time. After each entry, reset switch S18 should also be pressed to clear all the flip-flops (IC1 through IC4 and IC7).

Fig. 5: Actual-size, single-side PCB for digital combination lock Fig. 6: Component layout for the PCB

Fabrication

An actual-size, single-side PCB for the digital combination lock (including the user and security key sets) is shown in Fig. 5 and its component layout in Fig.

6. If you want to install the user and secu-rity key sets away from the gate, you can separate them from the main circuit by using extended wires. An electromechani-cal device such as relay, magnetic bell or solenoid can be used to open the lock. The power supply circuit can be easily wired on a separate general-purpose PCB.

Precautions

1. Use a TTL logic gate such as 74LS74, 74LS85 or 74LS00 to minimise power consumption.

2. The solenoid must move smoothly to lock and unlock.

3. Check the security key terminals using multimeter before connecting into the PCB board. q

H

ere is a low-cost, wireless lamp- brightness controller. It uses ul trasonic sound waves for remote control of the lamp’s brightness.

As with any other remote control, the system basically comprises a transmitter and a receiver circuit. Frequencies above 20 kHz are inaudible (ultrasonic). The transmitter circuit generates ultrasonic sound of 40-50kHz frequency. The receiver senses the ultrasonic sound from the transmitter and enables a unijunction transistor (UJT) based relaxation oscil-lator, which, in turn, controls the lamp

Fig. 1 shows the block diagram of the ultrasonic lamp-brightness controller.

The received signals are amplified and given to the comparator after rectification and filtering. The comparator provides clock pulse to the decade counter. The output of the decade counter enables the UJT oscillator to control the phase angle of the current through the load via the SCR.Fig. 2 shows the circuit of the ultra-sonic transmitter. The transmitter uses a free-running astable multivibrator built around NOR gates of CD4001B that oscillates at a frequency of 40 to 50 kHz.

An ultrasonic

230V, 50Hz AC mains. The AC mains is rectified by diodes D13 through D16 and limited to 9.1V by using zener diode ZD1.

Resistor R3 is used as the current limiter.

Capacitor C8 acts as a filter to eliminate Fig. 1: Block diagram of the ultrasonic lamp-brightness controller

Fig. 2: Circuit of the ultrasonic transmitter

Semiconductors:

SCR1 - TYN6004 silicon-controlled rectifier

D1-D12 - 1N4148 switching diode D13-D16 - 1N4007 rectifier diode ZD1 - 9.1V, 0.5W zener diode Resistors (all ¼-watt, ±5% carbon, unless men-tioned otherwise): VR1 - 47-kilo-ohm preset VR2 - 20-kilo-ohm preset VR3-VR12 - 2.2-mega-ohm preset Capacitors:

RX1 - 40kHz ultrasonic receiver - 230V, 60W lamp Parts List

December

In document ep25-ElectronicsProjectsVol25.pdf (Page 131-134)