Window Comparator Operation
In this configuration, two comparators are utilized and combined to form a window comparator. The voltage window within which the junction of D2 and D6 must fall to trigger both IC2.A and IC2.B outputs to a high state is determined by resistors R2, R5, and R10. Specifically, these resistors set a voltage range from 10/21 to 11/21 of the comparator supply rail, which is 5 V in this setup. When both IC2.A and IC2.B outputs are simultaneously high, transistor T1 enters saturation through the AND gate established by D3 and D4. Consequently, relay RE1 is activated, enabling the operation of an electric latch or any other locking mechanism. The specific voltage at the junction of D2 and D6, defining the key condition, is generated using simple components such as resistors R4 and R8, typically found in a stereo jack.
Customizing the Potential Divider Network
In this setup, resistors R1 and R9, combined with R2, R5, and R10, create a potential divider crucial for the key’s functionality in opening the lock. The correct calculation of these resistors, along with the values of R2, R5, and R10, is essential. However, the effectiveness of this configuration relies heavily on the stability of the supply voltage to these dividers. IC1 plays a pivotal role here by regulating the supply voltage to a stable 5 V. It’s imperative to note that if fixed values were set for R1 and R9, every reader of this Elektor edition would possess an identical key—a situation clearly undesirable.
Hence, the onus falls on you to not only select appropriate values for R4 and R8, which form the key, but also to customize R1 and R9. These customizable resistors play a critical role in tailoring the ‘lock’ to your specific requirements. Below are the relationships between the values of resistors R1, R4, R8, and R9 that dictate the key’s ability to open the lock:
10 · R8 · R9 < 11 · (R1 + R4) · (R8 + R9)
10 · (R1 + R4) · (R8 + R9) < 11 · R8 · R9
Given the size of the window formed by R2, R5, and R10, 5 % tolerance resistors are adequate.
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. www.elektor.com/081177