# How does this voltage comparator work?

Can somebody explain to me, how the following voltage comparator works?

I believe to recognise U4A as an inverting Schmitt trigger, but how everything fits together escapes me...

Should the inverting input of U4A not always see Vtest? Given that Vtest is always greater than Vref, should the output not be constant irrespective of Vtest?

I would have expected the inverting input ot U4A to be connected to the centre tap of a voltage divider to bring Vtest into the range of Vref.

• That circuit is messed up. The resistor in series with U4A negative input makes not sense. It looks like the first stage is a inverting Schmidt trigger, and the second inverts that. It looks like it was designed by someone that didn't know what he was doing. Mar 27, 2012 at 13:16

As shown the circuit does not work [tm].

Overall, without intending to be rude, I'd say the circuit was "designed" by someone with a poor understanding of the task and also drawn incorrectly.

• BA10358 datasheet here - immensely detailed information but seems normal enough. 0.2 V/uS slew rate and 0.5 MHz "bandwidth".

As shown, U1A inverting input is at 11 to 14V and the non inverting input is at 5V plus whatever effect the hysteresis / +ve feedback via R2 - probably about +/1 1 Volt - see below. Consequently, U4A can never switch.

The most likely explanation is that the variable resistor is not connected as shown but has one end of the resistive track connected to input (as shown), the wiper connected to U4A inverting input (as shown) BUT the other end of the resistor track grounded. This is "quite a leap" but nothing else makes sense. With the change the input to the opamp can be varied from Vtest down to ground.

If opamp supply and max Vout was say +10V then the Schmitt trigger formed by U4A would switch at about 6V when the input was rising and about 4V when the inout was falling.

As I think you know - IF the circuit was arranged as above, U4A is a comparator configured as a Schmitt trigger due to positive feedback via R12. As R12 is 100k would have 10 times less effect in the trigger level than R1 does as R1/R12 = 19k/100k BUT opamp Vout max+ is say 10V so has 10V/5V = twice as much effect - so 1/10 x 2/1 = 1/5 as much effect overall. So as Vref = 5V the feedback moved the switching point by ABOUT 1V to 6V and 4V on rising and falling inputs respectively.

The circuitry around U4B (also) appears to have been designed by somebody who did not understand what they were doing. Apart from the effect if input leakage currents of U4b, the resistors R3 and R4 have no effect. U4 pins 3 & 5 are effecively at the same potential. U4 pins 1 & 6 are effectively at the same potential.

U4B seems to serve little function except to invert the polarity of U4A and PERHAPS speed up overall switching speed at the output.
When input is low U4B "sees" Vrfe +1V on +in and - Vmax_-ve_swing on -in. U4B output is low with Vin low.
When the Schmitt starts to switch with rising Vin both inputs of U4B fall but the -in from u4A falls further and toggles U4B. If anything this MAY slow down the switching action as both inputs track in the same direction, but one swings further, so there is negative reinforcement around the switching point.
Strange.

This opamp is cheap. Under \$US0.20 in manufacturinmg volumes. BUT here it is being used as a comparator and it is not well suited to that task. Slew rate is a miserable 0.2 V/uS and maximum frequency (whatever that spec means here) is 0.5 MHz.

• Thanks, I thought this might be something incredibly ingenious... :-)
– ARF
Mar 27, 2012 at 14:08
• Where did you see the circuit? Mar 27, 2012 at 14:27

At first glance I thought that the BA10358 must be a current differencing amplifier. But the Rohm datasheet describes the part as a normal op-amp, so you are quite correct. The circuit does not make sense.

I suspect that the wrong part number has been annotated on the schematic. A current differencing amplifier like the (obsolete) LM3900 was probably what was intended.