A Window Comparator Can Create The Simplest Electronic Key

Oct. 18, 1999
Today’s digital technology has given birth to many systems that are useful for electronic key applications. Some utilize digital keyboard access, serial burst data sent via radio, and other...

Today’s digital technology has given birth to many systems that are useful for electronic key applications. Some utilize digital keyboard access, serial burst data sent via radio, and other elegantly digital and highly secure schemes. But for some applications, reverting back to the analog world yields a refreshingly simple and easy to build solution: a window comparator, used to read the value of one or more resistors, which then drives a relay.

The window comparator is built with two linear LM311 ICs (see the figure). The LM311’s output has an NPN transistor (pin 7 = collector, pin 1 = emitter). The output transistors of the two LM311s (Q-U1 and Q-U2) are connected in series to create a logical AND. Therefore, the relay is driven and the user contacts are closed only when both transistors are in conduction, enabling the electronic key function. U1 has its (+) input connected to VIN (the input jack) and its (−) input connected to VTH1. U2 has its (−) input connected to VIN, and its (+) input connected ad VTH2.

The two threshold voltages (VTH1, VTH2) are obtained from the divider formed by RY1, RY2, and RY3. In the prototype, these values are 10k, 1k, and 10k, respectively, resulting in an upper threshold (VTH1) of 6.3 V and a lower threshold (VTH2) of 5.7 V.

Only when VIN is 6 V (or more precisely, if 6.3 V > VIN > 5.7 V) will the window comparator trip and the coil of relay be energized. To create this unlocking condition, a special jack must be plugged into J1. The jack must contain a two-resistor divider (RX2, RX3) with the correct values to generate the required 6-V output.

There are many values of RX2-RX3 that will produce the proper output. But, the selected resistor values need to be high enough to reduce the current, yet low enough to reduce impedance and the risk of RF-noise disturbances (i.e., low kilohm values). The value of C2 can be increased to create a delay in the “unlock” function, to make “lock picking” more difficult.

The size of the window depends on the RY2 value in conjunction with RY1 and RY3 (see the table). To calculate the resistor values yourself, the formulas are determined simply by Ohm’s law as follows:

Vth1 = 12 / (RY1 + RY2 + RY3) *
   (RY2 + RY3)

Vth2 = 12 / (RY1 + RY2 + RY3) *
   RY3

VIN = 12 / (RX1 + RX2 + RXXX) *
   RXXX

where

RXXX = 1 / \[(1/RX3) + (1/RX4)\]

Sponsored Recommendations

The Importance of PCB Design in Consumer Products

April 25, 2024
Explore the importance of PCB design and how Fusion 360 can help your team react to evolving consumer demands.

PCB Design Mastery for Assembly & Fabrication

April 25, 2024
This guide explores PCB circuit board design, focusing on both Design For Assembly (DFA) and Design For Fabrication (DFab) perspectives.

Unlocking the Power of IoT Integration for Elevated PCB Designs

April 25, 2024
What does it take to add IoT into your product? What advantages does IoT have in PCB related projects? Read to find answers to your IoT design questions.

Near- and Far-Field Measurements

April 16, 2024
In this comprehensive application note, we delve into the methods of measuring the transmission (or reception) pattern, a key determinant of antenna gain, using a vector network...

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!