comparator with two analog switches

Apr 25, 2025 Last reply: 1 year ago 8 Replies

Hi, I am building a little 70's style analog computer, mainly for learning purposes. For the most part I've been able to follow the Grappendorf project schematics, but that project does not include schematics for a comparator. I looked at the Anabrid THAT design schematics, and I was going to make something based off that; however, the Anabrid design uses Schmitt-Trigger inverters, which requires 5V supply, and I was hoping not to have to mess around with 5V, everything else in my system requiring only a +/- 15V. So, I was wondering if I maybe I could get rid of the Schmitt-Trigger inverters from the design and get by with just use op amps instead, like so:



formatting link
But when I try to build this, I've seen various strange results from the switches, like it getting stuck with seemingly one switch stuck open and one stuck close. I've done various bits of troubleshooting, but haven't got to the bottom of it yet. Is there something fundamentally wrong with the design? Maybe the Schmitt-Triggers are critical for some reason...? (Hysteresis?) I wonder if maybe I might have damaged the switches, so that might be it, but I can't afford to order more right now.


I would avoid using op amps as comparators. I found out the hard way a long time ago that TL082 would not work as a comparator. Whether TL3474 will, I do not know. If the purpose of the second op amp is just an inverter then depending on the required speed a single transistor might do the job fine. A more detailed schematic is needed, showing supply rail connections to the devices.

The op amps and switches are both +/- 15V supply. The switches have a GND pin also.

Some work nicely. It's best to try them.

My general gumdrop amp, OPA197, makes a nice RRIO comparator.

What's on pin 12 ?

Those DG212 switches have cmos control inputs which need driving to 0v and

5V and not allowed to float to intermediate levels. Those diodes prevent the inputs being driven negative but do not stop the input floating higher so really need a pulldown resistor. Alternatively just omit them and ensure the series resistor is high enough that when the op amps outputs hit either supply rail the current is limited through the DG212 input protection diodes. The device needs a 5V logic level supply but the current demand is very low and a simple resistor dropper from the system 15v rail with 5.1v zener should be enough. Comparators nearly always benefit from having hysteresis even if only a tiny bit. Not all op amps work as comparators.

Nothing wrong with 4000 series logic.

Pin 12 on the switches is for a logic power supply that was needed on the "original manufacturer's products" but is not needed on the Maxim chips.

Ok but it's hard to help if there is much we don't know about what you're using or what you're trying to achieve. If the original problem was not wanting to use 5V for a schmitt trigger then make one out of a couple of transistors or an op amp with positive feedback.

formatting link

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required