Triggering a comparator with a very slow RC circuit but needed fast slew on the output

Thread Starter

mike _Jacobs

Joined Jun 9, 2021
122
Im trying to use an LM139 that is drive by an RC circuit for a long duration delay of 5 seconds.
Its basically just a big cap in an RC circuit im using to create a delay for something. The issue i face is because the rise of the comparator input is so slow, the output slew is equally bad performing.

Any ideas on how to combat that?
 

dl324

Joined Mar 30, 2015
16,168
the output slew is equally bad performing
LM139 (why are you using a mil-spec part) should not have a slew rate problem because the input stage doesn't have to charge a capacitor. A slowly changing input can cause the comparator to oscillate.

A schematic would be helpful because your description is lacking details we need.
 

WBahn

Joined Mar 31, 2012
29,519
Im trying to use an LM139 that is drive by an RC circuit for a long duration delay of 5 seconds.
Its basically just a big cap in an RC circuit im using to create a delay for something. The issue i face is because the rise of the comparator input is so slow, the output slew is equally bad performing.

Any ideas on how to combat that?
What constitutes "equally bad performing"? Equal to what? Are you really saying that it takes the output 5 seconds to change states?

Do you even have a pullup resistor on it?

You really need to show a schematic, even it it's just something thrown together in Paint or a picture taken of something sketched by hand.

While a slow input signal can cause some oscillation as noise takes the signal back and forth across the threshold, the output should change states within about a microsecond even with just a few millivolts of overdrive.

To combat oscillation, use a Schmitt trigger configuration to incorporate positive feedback to quickly drive the threshold in the opposite direction that the input signal is changing.
 

MrAl

Joined Jun 17, 2014
10,920
Im trying to use an LM139 that is drive by an RC circuit for a long duration delay of 5 seconds.
Its basically just a big cap in an RC circuit im using to create a delay for something. The issue i face is because the rise of the comparator input is so slow, the output slew is equally bad performing.

Any ideas on how to combat that?
Hi,

In a word, positive feedback.
 

BobTPH

Joined Jun 5, 2013
8,120
To expound upon my brief answer, you need a resistor from the output to the + input. We need to see your circuit to size it.
 

Thread Starter

mike _Jacobs

Joined Jun 9, 2021
122
So that has been established.
Then do you know how to implement that in your circuit?
Not as of yet.

I am looking for an example but all i can find is schmitt trigger examples
I have a reference voltage threshold where as the schmitt trigger examples all seem to have the ref tied to ground.
 

Ian0

Joined Aug 7, 2020
8,949
There is something fundamentally wrong if the output of a comparator doesn’t have a fast slew rate, with or without hysteresis.
As the device has an open collector output, is the pull-up resistor missing?
 

AnalogKid

Joined Aug 1, 2013
10,792
I am looking for an example but all i can find is schmitt trigger examples
That is because a comparator with positive feedback is a classic example of a Schmitt Trigger circuit. There are many variations depending on the application. The reference input can be grounded, tied to a positive or negative voltage, or even be another signal. It is the positive feedback that makes it a Schmitt Trigger, not any one specific pin assignment.

As *everyone* has said, post your schematic. Without it, we have absolutely no idea of what your circuit is or why it is not behaving. Because we will be discussing individual parts, be sure to have a reference designator for each component.

Paraphrasing Rear Admiral Joshua Painter,

"Engineers don't take a dump, son, without a schematic."


ak
 
Last edited:

MrAl

Joined Jun 17, 2014
10,920
There is something fundamentally wrong if the output of a comparator doesn’t have a fast slew rate, with or without hysteresis.
As the device has an open collector output, is the pull-up resistor missing?
Hi there Ian,

This problem comes up now and then and is related to the input(s) changing very slowly as that plays with the finite internal gain of the op amp or comparator.

For example, for a 1 volt input change it is likely that the comparator slew rate is the only limiting factor in how fast the output changes, but for a 1 picovolt input change the internal gain becomes a big factor because the output follows the input times the internal gain. In theory, the internal gain is often taken to be approaching infinity, and that means that even a 1 picovolt input changes causes the output to slew up (or down) at the maximum rate. If the slew rate was 1v/us then it would reach 5v in 5us. In a real device though, the gain may only be 100000, and 1pv times 100000 is only 100nv, which means the output is not going to change much yet. As the input rises to 2pv, the output rises to 200nv fairly quickly, but because the input is changing so slowly, there is still no significant output change. In fact, to get the output to slew up to 5v we would have to see an input change of at least 5/100000 or 50uv. This is why we usually see tests that provide a given input step change when taking about some aspects of the response.
 

MrAl

Joined Jun 17, 2014
10,920
Not as of yet.

I am looking for an example but all i can find is schmitt trigger examples
I have a reference voltage threshold where as the schmitt trigger examples all seem to have the ref tied to ground.
Hello,

In most cases you have to have some resistance connected to the non inverting input to start with. If you do not have that, you have to add it.
For example, if you add a 1k input resistor and use a 100k feedback resistor, you get a 100 to 1 hysteresis level. If you add a 10k input resistor and use a 1Meg feedback resistor, you still get a 100 to 1 hysteresis level (although you also have to consider the input and output voltage levels).

You have to figure out the ratio you need in order to get that desired output snap action. Sometimes you just need a little hysteresis, sometimes more. You do have to pay attention to the input trigger points though as they will change. If you had it originally to trip at 2 volts, it may change to 2.02 volts or 2.05 volts or even 2.1 volts. To fix that you have to adjust the reference again. On the way down it will be a little lower, like 1.95 volts or something like that. So when the input level is rising it may trip at 2.05v but on the way down it may trip at 1.95v.
 
Top