Simple Analogue Electronic Key

Not rated 28,218

Circuit Image

This circuit utilizes two comparators configured as a window comparator. Resistors R2, R5, and R10 establish a voltage window within which the voltage at the junction of D2 and D6 must reside for the outputs of IC2.A and IC2.B to both be high simultaneously. Based on the resistor values, this window spans from 10/21 to 11/21 of the comparator supply rail (5 V). When both IC2.A and IC2.B outputs are high, transistor T1 is saturated through the AND gate formed by D3 and D4, energizing relay RE1 to activate the electric latch or any locking mechanism. The key is determined by the specific voltage at the junction of D2 and D6, which can be generated, for instance, by a stereo jack with resistors R4 and R8. Together with R1 and R9, they create a potential divider that must be calculated in conjunction with R2, R5, and R10 to ensure the key can unlock the device. The correct operation of this circuit relies on a stable supply voltage, regulated to 5 V by IC1. If R1 and R9 values were predetermined, all users of this circuit would have identical keys, which is not desirable. Therefore, it is necessary to independently select values for R4 and R8, which form the key, as well as R1 and R9 to customize the locking mechanism. The relationships between the resistor values R1, R4, R8, and R9 must be established to ensure the key can successfully unlock the device. It is important to note that these relationships consist of inequalities, resulting in two equations for four unknowns, providing a wide range of options for resistor values. It is recommended to set at least two resistors to preferred values, allowing for the calculation of the remaining resistors. If this does not yield preferred values, series or parallel combinations should be utilized to achieve the desired values, or different starting values should be selected to reach a better compromise.

The window comparator circuit operates by comparing the voltage levels at its inputs. The arrangement of resistors R2, R5, and R10 creates a defined voltage range that the input voltage must fall within for the comparators to output high signals. This functionality is critical for applications where precise voltage thresholds need to be monitored, such as in locking mechanisms. The use of transistors and relays allows for the control of higher power devices, such as electric latches, based on the comparator signals.

The potential divider formed by resistors R1, R4, R8, and R9 is integral to setting the correct voltage at the junction of D2 and D6. The careful selection of these resistor values ensures that the voltage remains within the defined window, allowing the circuit to function as intended. The flexibility in choosing these resistor values is advantageous, as it permits customization of the locking mechanism for different applications or security requirements.

Furthermore, the stability of the power supply is ensured by the voltage regulator IC1, which maintains a constant 5 V output. This stability is crucial for the reliable operation of the comparators and the entire circuit. Any fluctuations in the supply voltage could lead to false triggering or failure of the locking mechanism.

In summary, this circuit exemplifies a practical application of comparators in a security context, demonstrating how careful design and component selection can lead to effective and customizable electronic solutions. The relationships between the resistors provide a framework for users to tailor the circuit to their specific needs while ensuring reliable operation.This circuit uses two comparator that are combined in what is called a window comparator, i. e. resistors R2, R5, and R10 determine a voltage window within which the voltage applied to the junction of D2 and D6 must lie in order for the outputs of IC2. A and IC2. B to both be high at the same time. Given the value used for these resistors, this windo w is from 10/21 to 11/21 of the comparator supply rail (5 V). If IC2. A and IC2. B outputs are both high at the same time, transistor T1 is saturated via the AND gate formed by D3 and D4, and relay RE1 is energized to operate the electric latch or any other locking device. The key is defined by the generation of the specif ic voltage at the junction of D2 and D6, formed, for example, by a simple stereo jack containing the two resistors R4 and R8.

Together with R1 and R9, they form a potential divider that needs to be suitably calculated in conjunction with the values of R2, R5, and R10 so that the key can open the lock. Clearly, all this will only work correctly is the supply voltage to these two dividers is stable, which is ensured by IC1, regulating it to 5 V.

If we had set the values for R1 and R9, all the readers of this edition of Elektor would have had the same key, which is clearly not a good idea! So you need to decide for yourself not only R4 and R8, which form the key, but also R1 and R9 which let you customize the lock`.

1 Here are the relationships between the values of resistors R1, R4, R8, and R9 for the key to be able to open the lock: Note too that, as the relationships consist of inequalities, and that there are only two (un)equations for four unknowns, this leaves quite a wide choice for the resistor values. We advise you to set at least two of them to preferred values, which will then let you work out the others.

If, as is more than likely, this does not result in other preferred values, you`ll then need to use series/parallel combinations to obtain the calculated values or else choose different starting values in order to arrive at a better compromise. 🔗 External reference