Electronic – Design of Window Comparator Circuit w/ Mutually Exclusive LED Indicators

circuit analysiscomparatorled

The functionality I seek is as follows:

All LEDs off: Vsignal < 0.118VDC
LED1 fires: 0.118 < Vsignal < 0.1216
LED2 fires: 0.1362 < Vsignal < 0.146
LED3 fires: 0.151 < Vsignal < 0.1607
LED4 fires: 0.1853 < Vsignal < 0.1999

Between these firing windows, all LEDs should be off. The two ICs are an LM339 and a CD40147BE.

The noise from the signal voltage is <0.0002VDC. The accuracy should be to 0.001VDC.

I need to recalculate the resistor values for ref voltages, but I don't know how to connect multiple comparators together; all examples I've seen have been for a single window, not multiple.LM339 and CD40147

Best Answer

You need to make four window comparitors. Fortunately this is easy with the LM339 as it has open-collector outputs which can be joined together to form a wired AND function.

enter image description here

Figure 1. The internals of an LM339 comparitor. Note the open-collector output.

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 2. By wiring the outputs together as shown the LED will turn on when the voltage is inside the window set by VR1 and VR2.

How it works:

  • If both comparitor outputs are high their output transistors are off and the collector is floating. R1 will pass current to LED D1.
  • If the input voltage goes above the upper window voltage set by VR1 then CMP1 will turn off and short out LED D1.
  • If the input voltage goes below the lower window voltage set by VR2 then CMP2 will turn off and short out LED D1.

You need four of these circuits. I recommend 10-turn pots rather than a precision resistor divider chain. Add one more pot for calibration and it should be a simple job to set everything up.

Don't skip the decoupling capacitors on each chip.

Related Topic