# Comparator Output Unstable

I have designed a comparator with hysteresis using LT1719. When I apply no signal, at op_amp_2, I expect the output to be high. However I see a sine wave at the output. This is the schematic of the circuit:

This is snapshot of the PCB layout:

I initially thought that since the DC levels at + and - are very near, this could cause oscillation when there is no signal, so I changed R19 to 10 Kohm. At first it worked as expected (output high 4.8V) then I applied a signal (at op_amp_2) and on removal of signal, the output started oscillating.

Could anyone suggest how I can fix this?

• At first glance, it looks like it should be working. Can you say anything else about the oscillations? Frequency, Amplitude? Also, when you say you apply no signal, are you disconnecting the input, or applying some constant DC value (like GND or VDD)? – Essaim Jul 20 '17 at 22:11
• It's frequency is about 19.6 MHz. Yes left of C39 is just DC voltage set by previous stage. – Ash Jul 20 '17 at 22:31
• Can you double check that there are no solder bridges on the actual PCB and that the components were placed correctly? I had a little bit of difficulty reading the pcb, and if I were assembling it, there would have been a decent chance of me swapping a capacitor and resistor or two, especially C34 going in the place of R21 or C32 and R6. I'd suggest double checking the assembly. 10 Mhz seems like it could be reasonable with capacitors on the order of .1 uF – Essaim Jul 20 '17 at 22:51
• 1uF seems pretty big and so does your vref impedance. 600k feedback resistor is also pretty chunky. You may want to put capacitor in parallel of the feedback resistor to roll off gain beyond useful frequency (say, 200MHz) – Barleyman Jul 25 '17 at 1:24

You have a positive-feedback oscillator, because the +Vin (pin2) is routed directly under the Vout (pin7).

EDIT Also, the Rfeedback 604Kohm drives 5pf or more, what with 3 causes of capacity on Vin+ :::

1) the input capacity of the comparator

2) the side capacitance of that long Vin+ trace to the surround GND

3) the many bits of metal over that long Vin+ trace


EDIT The 604kohm is too large to quickly implement 15Kohm/600Kohm * 5v = 150 millivolt of hysteresis. Reduce your resistors on Vin+ by 10X, to 1.87K, 10.7K, 60.4K

Assume you have 2mm by 4mm area of coupling between pin7 and pin2, on pin7 side of the IC. With PCB thickness of 1/16". What is the capacity?

C = Eo * Er * area/distance = [9e-12Farad/meter * 5 * 4mm * 2mm / 1.5mm] * meter/1000mm

C = 9e-12 * 5 * 6/1.5 * 1/1000 = 180e-12-3 = 180e-15 = 0.18pF

Assume Cnode(pin2) is 3.6pF. The 5 volts output swing is attenuated by 0.18/3.6 or 1/20 thus V_injected_pin2 of 5/20 = 0.25 volts.

Place a scope probe on Pin2, and see that 0.25 volts (but will be further attenuated by 10pF or 15pF of the scope probe, to approximately 50 milliVolts).

The timeconstant on Vin+ is 0.18pF * 15Kohm or 3nanosecond feedback thru the parasitic cap I computed. There is also parasitic across the feedback R (604Kohm).

Cure? solder-tack a 10pF across the 604Kohm Rfeedback, to ensure the hysteresis is LARGE, and slowly decays. Use a 10pF leaded, to make it easy.

• Hi, @analogsystemsrf I will check with the probe, could you suggest anyway to mitigate this without PCB re spin? – Ash Jul 21 '17 at 6:22
• Doesn't look anywhere close to 2x4mm area thought. – Barleyman Jul 25 '17 at 1:27
• Try adding 10pF across the 604Kohm Rfeedback. – analogsystemsrf Jul 25 '17 at 4:02

These devices are really fast, and your impedances at the input pins are in the 10K range. Only a little parasitic capacitance will cause oscillations. When you remove the signal, tie the input to ground near the part. This is one way to lower the impedance on the minus input. You will have to also lower the impedance on the plus input by either adding capacitance or lowering the resistance. If you need the fast response, try for matched input impedance on the inputs with a value around a few hundred ohms or less. Your layout looks good. If you don't need single-digit nanosecond response, you could also try a more mundane comparator.

To get the impedance down, try adding a resistor between point op_amp_2 and ground near the comparator of 499 ohms (your input op amp will have to drive this load; if it can't, keep the resistance as low as you can.) This will probably keep you from oscillating when you remove the input. Then change R6 to 499 and adjust R21 and R5 to keep the same ratio.

• You won't get single digit anything through a 1uF cap unless you've got a serious amplifier driving the signal. – Barleyman Jul 25 '17 at 1:15
• @Barleyman yes, I have an op-amp (LT6200-10) driving this comparator. – Ash Jul 25 '17 at 17:13
• @Ash opamps don't like capacitive loads as a general rule. In this case the 1uF with that vref thevenin source might cause the input to oscillate. Something to check. – Barleyman Jul 25 '17 at 20:50
• @ Barleyman ----- the 1uF is in series, then into 10Kohm and 5pF on comparator input. The signal source thus sees the 10Kohm in parallel with 5pF. – analogsystemsrf Jul 27 '17 at 17:28

With parasitic LC, the schematic does not resemble the layout and your source and load impedances are mismatched and unlike better ECL comparators you are not operating in current mode, and with high impedance it is very sensitive to stray coupling. Your signal is also unbalanced and source impedance is undefined except 10k when disconnected and low when connected thus ground noise is critical with low hysteresis and it appears your noise coupling exceeds your ~5% hysteresis.

With 5ns prop delay in spec and half that for small swings, I would expect 20Mhz and your 10:1 probe probably also resonates at 20MHz with a 4" ground clip.

In effect you have a Relaxation Oscillator like a CMOS Schmitt inverter with R feedback and small C input to ground.

## High Speed Design Considerations

Application of high speed comparators is often plagued by oscillations. The LT1719 has 4mV of internal hysteresis, which will prevent oscillations as long as parasitic output to input feedback is kept below 4mV. However, with the 2V/ns slew rate of the LT1719 outputs, a 4mV step can be created at a 100Ω input source with only 0.02pF of output to input coupling. The LT1719’s pinout has been arranged to minimize problems by placing the sensitive inputs away from the outputs, shielded by the power rails. The input and output traces of the circuit board should also be separated, and the requisite level of isolation is readily achieved if a topside ground plane runs between the output and the inputs. For multilayer boards where the ground plane is internal, a topside ground or supply trace should be run between the inputs and the output.

## specs

It depends what you you want to do with your input signal thru the comparator in terms of dynamic range and bandwidth of signal and Noise, impedance range of source signal and noise on cable incl. gnd noise, asymmetry of output, prop delay. Until you define these or at least understand them a great design cannot be achieved.

I agree with @analogsystemrf for now a bandaid fix is to add more hysteresis with 10pF using 603 cap over R21.

Next layout consider my specs and the datasheet examples for 50 ~200 Ohm high speed comparators.

• Hi Tony Stewart, Thanks for your help. I do have a ground trace separating the input and output as suggested in the datasheet. Apparently I routed the plus input directly below the output and that might be causing the problem. – Ash Jul 26 '17 at 20:34
• you can also try X pf shunt and specify impedances better . use balun if necessary – Tony Stewart Sunnyskyguy EE75 Jul 26 '17 at 20:45

Layout is contributing part of the problem. Your circuit impedances are large, which means little energy is required to impose a signal. Can you scale your impedances down?