Hi!

## Attachments

- Oscilloscope.PNG22.0 KB
- Circuit.PNG6.5 KB

No one else had this question

- 1 person found this helpful
Hi Claudio,

Your circuit is a Voltage Subtractor that follows this equation:

Vo = VINP + {(R5/R8)(VINP - VINN)} = VINP + 196.1(VDIFF)

It could only perform as a "comparator", HI-LO at certain VDIFF levels where the output will swing to either positive or negative rail. However, there will be voltage levels where the input is linear, where it follows the said equation. So to put it simply, the output will not settle to only VEE, VCC, and ZERO but at certain input levels, the output will transition between VEE to VCC until the output swings to either supply rail.

Regards.

Hi Claudio,

How about implementing a window comparator (see diagram below)? The window comparator will give you a logic output representing the 3-states you are looking for. From there, you can then use tristable logic devices or just discrete CMOS transistors to get your desired output voltages.

Please use caution when attempting to use opamps as comparators. In your case, I suggest using a dedicated comparator.

I recommend taking a look at AN-849 for more explanation.

Let us know if that makes sense.

Dave

- 1 person found this helpful
Allow me to clarify. The original image I posted with the two comparators and the AND gate was to illustrate a window comparator. It provides three logic outputs that represent the three states you are looking to detect. That circuit does not output the +5V, 0V and -5V. You would need to implement that separately. There are many ways.

Perhaps something like this diagram shown below might work for you. The switches shown are ADG1636. You'll need the resistors to be sufficiently large to limit the current.

Hi Claudio,

Your circuit is a Voltage Subtractor that follows this equation:

Vo = VINP + {(R5/R8)(VINP - VINN)} = VINP + 196.1(VDIFF)

It could only perform as a "comparator", HI-LO at certain VDIFF levels where the output will swing to either positive or negative rail. However, there will be voltage levels where the input is linear, where it follows the said equation. So to put it simply, the output will not settle to only VEE, VCC, and ZERO but at certain input levels, the output will transition between VEE to VCC until the output swings to either supply rail.

Regards.