Window detector with latch output

Thread Starter

bosko47

Joined Mar 24, 2016
23
I'm trying to design a window detector with a latch output. The window range is 2.5 to 3.5 volts, outside this range I want the LED to light up and stay lid until reset. Am I using the latch setup correctly? I tried a simulation in Multisim but it didn't work correctly, not sure if it's a circuit error or simulation error.

window_detector.jpg
 

AlbertHall

Joined Jun 4, 2014
12,345
Your reset circuit is upside down. Connect the resistor to +5V and the switch to ground.
This circuit will only work correctly if you use open collector output comparators.
 

Thread Starter

bosko47

Joined Mar 24, 2016
23
I'm using LM339 comparators, which have open collector outputs, so all good there. I changed the reset circuit around. Now the LED lights up when the input is outside the window range, but it doesn't stay on when the input goes back inside the range...
 

crutschow

Joined Mar 14, 2008
34,285
not sure if it's a circuit error or simulation error.
It's a circuit error.
You need to use NAND gates for the latch instead of NOR gates to get the logic right.
(A NAND gate latch is triggered when the input goes low and a NOR gate latch is triggered when the input goes high).
LTspice simulation shown:

upload_2017-10-25_20-25-27.png
 

Thread Starter

bosko47

Joined Mar 24, 2016
23
Thanks that will work, but the only problem is I can only use a single 74LS02 quad NOR chip. Sorry I should have mentioned this.
 

AlbertHall

Joined Jun 4, 2014
12,345
If you simulate this circuit with the extra NOR as an inverter you will discover that there is a problem with the LED but it is easily fixed.
 
Top