Fundamentals of Electrical Engineering and Simple combination lock
11,557
This experiment can be constructed using a single 8-position DIP switch, although utilizing two switch assemblies may facilitate a better understanding of the concept. One switch assembly is designated to hold the correct code for unlocking the lock, while the other serves as the data entry point for the individual attempting to unlock it. In practical applications, the switch assembly containing the "key" code must be concealed from the individual trying to access the lock, necessitating the use of two separate switch assemblies. However, if the concept is clearly comprehended, a functional circuit can be created with just one 8-position switch, where the left four switches are used for data entry and the right four hold the "key" code. This circuit demonstrates the use of XOR (Exclusive-OR) gates as bit comparators. Four XOR gates compare the corresponding bits of two 4-bit binary numbers, each entered into the circuit via a set of switches. If the two numbers match precisely, the green "Go" LED will illuminate when the "Enter" pushbutton is activated. Conversely, if the two numbers differ, the red "No go" LED will light up upon pressing the "Enter" button. Given that four bits yield only sixteen possible combinations, this lock circuit lacks sophistication. In real-world applications, such as home security systems, the "No go" output should be connected to an alarm device to deter unauthorized attempts at code entry, as it would be relatively quick to cycle through all combinations (0000 to 1111) to find the correct one. This experiment does not cover the integration of this circuit into a comprehensive security system or lock mechanism; it solely focuses on recognizing a pre-set code. The "key" code for the data entry switch array should remain concealed. In a practical security system, the data entry switch assembly would be positioned outside the door, while the key code switch assembly would be located behind the door with the remaining circuitry. In this experiment, it is likely that the two switch assemblies will be placed on separate breadboards, but it is feasible to construct the circuit using a single 8-position DIP switch assembly. The primary goal of the experiment is to introduce the principle of XOR gate code comparison. An XOR gate outputs a "high" (1) signal when its input signals differ in logic state. The outputs of the four XOR gates are connected through a diode network that functions as a four-input OR gate; if any XOR gate outputs a "high" signal, indicating a mismatch between the entered code and the key code, a "high" signal will be transmitted to the NOR gate logic. If the two 4-bit codes are identical, none of the XOR gate outputs will be "high," and a pull-down resistor connected to the common side of the diodes will create a "low" signal state for the NOR logic. The NOR gate logic serves a straightforward function: it prevents either LED from illuminating unless the "Enter" pushbutton is pressed. Only when the pushbutton is activated can either LED be energized. If the Enter switch is pressed and all XOR outputs are "low," the "Go" LED will light up, signaling that the correct code has been entered. If the Enter switch is pressed and any XOR output is "high," the "No go" LED will illuminate, indicating an incorrect code entry. In a practical security system, it would be prudent to ensure that the "No go" output triggers a deterrent to prevent unauthorized individuals from discovering the correct code through trial and error.
The circuit design incorporates an 8-position DIP switch configured to facilitate binary code entry, utilizing the leftmost four switches for user input and the rightmost four switches to store the "key" code. This arrangement allows for a clear visual distinction between the code entry and storage functions. The XOR gates are pivotal in comparing the two sets of binary inputs, providing outputs that determine the state of the LEDs. The integration of diodes in the output stage ensures that the circuit can handle multiple signal inputs without interference, effectively allowing for a single "high" output to trigger the NOR gate. The NOR gate's role in the circuit is crucial; it acts as a control mechanism, ensuring that the LEDs only respond to the input from the "Enter" pushbutton, thereby preventing false activation. This design emphasizes the importance of logical circuitry in creating functional and secure electronic systems.This experiment may be built using only one 8-position DIP switch, but the concept is easier to understand if two switch assemblies are used. The idea is, one switch acts to hold the correct code for unlocking the lock, while the other switch serves as a data entry point for the person trying to open the lock.
In real life, of course, the switch a ssembly with the "key" code set on it must be hidden from the sight of the person opening the lock, which means it must be physically located elsewhere from where the data entry switch assembly is. This requires two switch assemblies. However, if you understand this concept clearly, you may build a working circuit with only one 8-position switch, using the left four switches for data entry and the right four switches to hold the "key" code.
This circuit illustrates the use of XOR (Exclusive-OR) gates as bit comparators. Four of these XOR gates compare the respective bits of two 4-bit binary numbers, each number "entered" into the circuit via a set of switches. If the two numbers match, bit for bit, the green "Go" LED will light up when the "Enter" pushbutton switch is pressed.
If the two numbers do not exactly match, the red "No go" LED will light up when the "Enter" pushbutton is pressed. Because four bits provides a mere sixteen possible combinations, this lock circuit is not very sophisticated.
If it were used in a real application such as a home security system, the "No go" output would have to be connected to some kind of siren or other alarming device, so that the entry of an incorrect code would deter an unauthorized person from attempting another code entry. Otherwise, it would not take much time to try all combinations (0000 through 1111) until the correct one was found!
In this experiment, I do not describe how to work this circuit into a real security system or lock mechanism, but only how to make it recognize a pre-entered code. The "key" code that must be matched at the data entry switch array should be hidden from view, of course.
If this were part of a real security system, the data entry switch assembly would be located outside the door, and the key code switch assembly behind the door with the rest of the circuitry. In this experiment, you will likely locate the two switch assemblies on two different breadboards, but it is entirely possible to build the circuit using just a single (8-position) DIP switch assembly.
Again, the purpose of the experiment is not to make a real security system, but merely to introduce you to the principle of XOR gate code comparison. It is the nature of an XOR gate to output a "high" (1) signal if the input signals are not the same logic state.
The four XOR gates` output terminals are connected through a diode network which functions as a four-input OR gate: if any of the four XOR gates outputs a "high" signal - indicating that the entered code and the key code are not identical - then a "high" signal will be passed on to the NOR gate logic. If the two 4-bit codes are identical, then none of the XOR gate outputs will be "high, " and the pull-down resistor connected to the common sides of the diodes will provide a "low" signal state to the NOR logic.
The NOR gate logic performs a simple task: prevent either of the LEDs from turning on if the "Enter" pushbutton is not pressed. Only when this pushbutton is pressed can either of the LEDs energize. If the Enter switch is pressed and the XOR outputs are all "low, " the "Go" LED will light up, indicating that the correct code has been entered.
If the Enter switch is pressed and any of the XOR outputs are "high, " the "No go" LED will light up, indicating that an incorrect code has been entered. Again, if this were a real security system, it would be wise to have the "No go" output do something that deters an unauthorized person from discovering the correct code by trial-and-error.
One of the simplest methods of metal detection is through a beat frequency oscillator. The circuit consists of two balanced oscillators: one provides a reference signal, while the other acts as the detector element. The frequency of the reference...
A low-cost, simple radio circuit schematic using an operational amplifier. This radio circuit diagram consists of a sensitive audio amplifier that receives strong signals.
The presented radio circuit schematic utilizes an operational amplifier (op-amp) to create a cost-effective and straightforward...
U2 is a decade counter/divider, U1 is used as a switch debouncer. For a self-generating system, connect a resistor between pins 2 and 3 of U1, value that should be between 10 KOhm and several, depending on desired frequency....
The diagram illustrates a block diagram for an agenda alarm and agenda thermometer system. It includes one temperature sensor, a real-time clock (RTC), a microcontroller (PIC), an EEPROM, a 7-segment display, and a keyboard. The EEPROM is utilized to...
Originally, the tank cost around Php 400 but was later sold for approximately a hundred pesos less. Recognizing a great deal, the decision was made to purchase the toy. Opening the toy proved to be somewhat challenging. The track...
The circuit for the RS232 serial interface exhibits mild complexity. The primary components of the circuit include the 18F4520 microcontroller, MAX233A level shifter, and a DB-9 connector. This circuit utilizes a basic +5V power regulator to supply the digital...
We use cookies to enhance your experience, analyze traffic, and serve personalized ads.
By clicking "Accept", you agree to our use of cookies.
Learn more