Maker Pro
Maker Pro

The Case of the Oscillating Comparator, Part II

W

Walter Harley

Jan 1, 1970
0
So, before throwing out the plugboard, I decided to try the circuit again,
with resistors a few orders of magnitude smaller than before: the voltage
divider to the + input was a 10k and a 10R, the resistor from the - input to
ground was a 10k, and the feedback resistor from output to + input was
either absent, 100k, or 10k. And... it still oscillates. Now, I know
there are parasitic capacitances and inductances in that plugboard, but I
don't think they're THAT big.

So, I did more or less as Mac suggested, and threw the ST Micro TS393
comparator into the trash.

Then, I tried the circuit again using an LP339 from TI. This is a
micro-power CMOS comparator, like the TS393, but it's a different
manufacturer (and it's a quad rather than a dual). I built the circuit with
the original high impedances, with the voltage divider being 3.3M and 3.3k,
feedback of 3.3M, and the - input being 10M to ground. On the plugboard,
mind you.

No oscillation. Dead stable, no matter what I threw at it. Does exactly
what I want.

Conclusion: I threw out all my other TS393's, too. Yay, TI! Boo, ST Micro!
 
T

Ted Wilson

Jan 1, 1970
0
Walter Harley said:
So, before throwing out the plugboard, I decided to try the circuit again,
with resistors a few orders of magnitude smaller than before: the voltage
divider to the + input was a 10k and a 10R, the resistor from the - input to
ground was a 10k, and the feedback resistor from output to + input was
either absent, 100k, or 10k. And... it still oscillates. Now, I know
there are parasitic capacitances and inductances in that plugboard, but I
don't think they're THAT big.

So, I did more or less as Mac suggested, and threw the ST Micro TS393
comparator into the trash.

Then, I tried the circuit again using an LP339 from TI. This is a
micro-power CMOS comparator, like the TS393, but it's a different
manufacturer (and it's a quad rather than a dual). I built the circuit with
the original high impedances, with the voltage divider being 3.3M and 3.3k,
feedback of 3.3M, and the - input being 10M to ground. On the plugboard,
mind you.

No oscillation. Dead stable, no matter what I threw at it. Does exactly
what I want.

Conclusion: I threw out all my other TS393's, too. Yay, TI! Boo, ST Micro!

And this notwithstanding the deleterious effect of hysteresis and the
oscillations it introduces - amazing! :)

Glad you got it sorted.

Ted Wilson
 
F

Fred Bloggs

Jan 1, 1970
0
Walter said:
So, before throwing out the plugboard, I decided to try the circuit again,
with resistors a few orders of magnitude smaller than before: the voltage
divider to the + input was a 10k and a 10R, the resistor from the - input to
ground was a 10k, and the feedback resistor from output to + input was
either absent, 100k, or 10k. And... it still oscillates. Now, I know
there are parasitic capacitances and inductances in that plugboard, but I
don't think they're THAT big.

So, I did more or less as Mac suggested, and threw the ST Micro TS393
comparator into the trash.

Then, I tried the circuit again using an LP339 from TI. This is a
micro-power CMOS comparator, like the TS393, but it's a different
manufacturer (and it's a quad rather than a dual). I built the circuit with
the original high impedances, with the voltage divider being 3.3M and 3.3k,
feedback of 3.3M, and the - input being 10M to ground. On the plugboard,
mind you.

No oscillation. Dead stable, no matter what I threw at it. Does exactly
what I want.

Conclusion: I threw out all my other TS393's, too. Yay, TI! Boo, ST Micro!

It has to be the inductance of the plug board- the TS393 should work
just fine soldered in place.
 
J

John Popelish

Jan 1, 1970
0
Fred said:
It has to be the inductance of the plug board- the TS393 should work
just fine soldered in place.

I think it is the capacitance between the output and the - input. If
you lift the output pin and solder on a short wire, so it can reach
over one row, and ground the row that would have been the output, I
think the symptoms would be much better. This shield between output
and input is easy to do with a through hole board, and can be done to
some extent on a surface mount board, also.
 
J

John Jardine

Jan 1, 1970
0
Walter Harley said:
So, before throwing out the plugboard, I decided to try the circuit again,
with resistors a few orders of magnitude smaller than before: the voltage
divider to the + input was a 10k and a 10R, the resistor from the - input to
ground was a 10k, and the feedback resistor from output to + input was
either absent, 100k, or 10k. And... it still oscillates. Now, I know
there are parasitic capacitances and inductances in that plugboard, but I
don't think they're THAT big.

So, I did more or less as Mac suggested, and threw the ST Micro TS393
comparator into the trash.

Then, I tried the circuit again using an LP339 from TI. This is a
micro-power CMOS comparator, like the TS393, but it's a different
manufacturer (and it's a quad rather than a dual). I built the circuit with
the original high impedances, with the voltage divider being 3.3M and 3.3k,
feedback of 3.3M, and the - input being 10M to ground. On the plugboard,
mind you.

No oscillation. Dead stable, no matter what I threw at it. Does exactly
what I want.

Conclusion: I threw out all my other TS393's, too. Yay, TI! Boo, ST Micro!
The Texas LP339 works cos' it's a different, much slower comparitor chip.
The problem is still there, it's just that the Texas chip isn't fast enough
to demonstrate it.
I do wish these companies would stop giving *different* chips the same part
numbers. I recently wasted an hour figuring out why a production PCB was
suffering a threshold shift. Eventually weaselled out one of these
bastardised Texas chips, that had been unwittingly fitted in place of a real
'393.
regards
john
 
W

Walter Harley

Jan 1, 1970
0
John Popelish said:
I think it is the capacitance between the output and the - input. If
you lift the output pin and solder on a short wire, so it can reach
over one row, and ground the row that would have been the output, I
think the symptoms would be much better. This shield between output
and input is easy to do with a through hole board, and can be done to
some extent on a surface mount board, also.

I dug the TS393's back out of the trash (at great personal hazard) and built
the circuit on a breadboard from OnePAS (PCB with layout sort of like the
plugboard). Wires all very short, careful attention to bypassing and to
keeping high-current and low-current parts of the circuit separate. Still
oscillates.

I haven't tried wiring the output as you suggest, though. I'll do that
next. And on Monday I'll order some other pin-compatible micropower
comparators and see if they behave the same. (I could just use the LP339,
but I don't need a quad comparator and I can't afford the current.)

Actually, another difference between the LP339 and the TS393, in addition to
them being just plain different, is that the LP339 pinout (compatible with
LM339, of course) has the outputs on the far side of the power supply pins
from the inputs. It didn't occur to me until just now how clever that is.
I wish the LM393 pinout was like that!

By the way, my AADE LC meter says that the capacitance between two adjacent
traces of plugboard is 2.0pF.
 
J

John Popelish

Jan 1, 1970
0
Walter said:
I dug the TS393's back out of the trash (at great personal hazard) and built
the circuit on a breadboard from OnePAS (PCB with layout sort of like the
plugboard). Wires all very short, careful attention to bypassing and to
keeping high-current and low-current parts of the circuit separate. Still
oscillates.

I haven't tried wiring the output as you suggest, though. I'll do that
next. And on Monday I'll order some other pin-compatible micropower
comparators and see if they behave the same. (I could just use the LP339,
but I don't need a quad comparator and I can't afford the current.)

Actually, another difference between the LP339 and the TS393, in addition to
them being just plain different, is that the LP339 pinout (compatible with
LM339, of course) has the outputs on the far side of the power supply pins
from the inputs. It didn't occur to me until just now how clever that is.
I wish the LM393 pinout was like that!

By the way, my AADE LC meter says that the capacitance between two adjacent
traces of plugboard is 2.0pF.

Now I have to hold my breath. ;-)
 
W

Walter Harley

Jan 1, 1970
0
John Popelish said:
Now I have to hold my breath. ;-)

But not for long: I just tried it, with the output pin air-wired to the
various things it's connected to. That is, instead of sticking into the
circuit board like all the other pins, I bent it so it's pointing straight
out, and soldered the other components straight to the pin. (I forgot to
ground the now-empty trace underneath.)

And... it works! No oscillation, or at least I haven't been able to
provoke any yet. Seems to do the trick nicely.

So, John, you win the prize. Must have been either the elitism or the
academia that helped, or maybe it was being one of the only two experts on
the planet. Oh, wait, that's a different thread ;-)

I'm impressed that even the capacitance between two 1/2" long PC traces is
enough to tweak this thing out. When I lay it out on a real PCB I'll put a
guard trace in between.
 
J

John Popelish

Jan 1, 1970
0
Walter Harley wrote:
....
And... it works! No oscillation, or at least I haven't been able to
provoke any yet. Seems to do the trick nicely.

So, John, you win the prize. Must have been either the elitism or the
academia that helped, or maybe it was being one of the only two experts on
the planet. Oh, wait, that's a different thread ;-)

I'm impressed that even the capacitance between two 1/2" long PC traces is
enough to tweak this thing out. When I lay it out on a real PCB I'll put a
guard trace in between.

I have been working around the limitations of these boards for quite a
few years. A few times, the length of the jumper that grounds the
metal back plane has made all the difference, but most of the time, I
can get around problems like yours by just grounding extra rows
between big signals and sensitive inputs.

This is just another reminder that circuit board layout is still and
art.
 
Top