An opamp with characteristic close to ideal transferring behavior

Thread Starter

PersianEngineer

Joined Aug 15, 2013
19
Hi guys.
I need an opamp as a comparator that would be able to switch directly from high level to low level or vice versa, without changing gradually. Refer to the below picture.

Which micro or nano power op amp do you recommend?
Thanks!
 

pwdixon

Joined Oct 11, 2012
488
All amplifiers will have some slope no matter what their gain. You should really try telling us why you want this and what the application is instead then someone may be able to help you.
 

GopherT

Joined Nov 23, 2012
8,009
Hi guys.
I need an opamp as a comparator that would be able to switch directly from high level to low level or vice versa, without changing gradually. Refer to the below picture.

Which micro or nano power op amp do you recommend?
Thanks!
It takes some time to rise. Look in at the speed on the Datasheets, volts/microsecond is the common unit of measurement. The better question is, how fast do you need it to change? Most op amps will go from 0 to a logic high in 1 microsecond. Many will do it in 0.1 microseconds and a few in 0.01 microseconds.

If you need micropower, the speed is generally slower 10 microseconds for the transition or less. There are a few good, modern micropower op amps that are faster.

Most importantly, the graphs you show appear slow but no timescale. Don't let the lack of scale fool you that an op amp is slow. Note that a microsecond is one millionth of a second (0.000001 seconds).

Let us know what you are doing with it.
 

pwdixon

Joined Oct 11, 2012
488
It takes some time to rise. Look in at the speed on the Datasheets, volts/microsecond is the common unit of measurement. The better question is, how fast do you need it to change? Most op amps will go from 0 to a logic high in 1 microsecond. Many will do it in 0.1 microseconds and a few in 0.01 microseconds.

If you need micropower, the speed is generally slower 10 microseconds for the transition or less. There are a few good, modern micropower op amps that are faster.

Most importantly, the graphs you show appear slow but no timescale. Don't let the lack of scale fool you that an op amp is slow. Note that a microsecond is one millionth of a second (0.000001 seconds).

Let us know what you are doing with it.
You seem to interpreted the OPs graph as a time based graph rather than an input voltage graph, as yet the OP hasn't really said time is an issue, though that might well be what he was really asking about, who knows only the OP himself.
 

MrChips

Joined Oct 2, 2009
30,618
All good answers.

@OP - You have to specify a time scale for your switching times otherwise there is no way to compare. There is no such thing as zero switching time.

@OP - Choose a comparator instead of an opamp. And read the datasheets. Every opamp and comparator datasheet will quote switching times, rising and falling, under various conditions.
 

pwdixon

Joined Oct 11, 2012
488
All good answers.

@OP - You have to specify a time scale for your switching times otherwise there is no way to compare. There is no such thing as zero switching time.

@OP - Choose a comparator instead of an opamp. And read the datasheets. Every opamp and comparator datasheet will quote switching times, rising and falling, under various conditions.
Again with the time. All the OP needs is a very high gain amp to match his 'ideal' he hasn't said anything about slew rate or switching time.
 

ErnieM

Joined Apr 24, 2011
8,377
Since both scales on the graph seem to be in the units of volts, this graph has nothing to do with slew rate but instead shows the gain of the device.

ALL real world op amps have a finite gain.

Deal with it. The rest of us do.
 

MikeML

Joined Oct 2, 2009
5,444
If you put just a little bit of hysteresis around a comparator, you get something that behaves as though it has infinite gain, and slews at a rate limited only by the switching speed of the device and parasitic capacitances...
 

MrAl

Joined Jun 17, 2014
11,342
Hi,

There is no device that can switch from one distinct state to another in zero time. All you can do is select a device that switches in a time that, relative to the other times in your application, is short enough to make the application work with an acceptable error.

For example, if your application can work well enough with a 1us rise time then you have a practical goal to seek now, and you can try to find a device to match or slightly better.

The most important specification of an op amp or comparator that relates almost directly to rise time is the slew rate. The slew rate is the maximum ramp time that the device can change in when moving from one level to the next. It is usually specified in volts per microsecond, which in more basic units of volts per second means that it will be able to change by a given voltage in a given amount of time.
So for example, if you find a device that has a slew rate of 1 volt per microsecond, that means the output can change by a voltage of 1 volt in one microsecond, or 2 volts in 2 microseconds, or 3 volts in 3 microseconds, etc. This means if your output has to change from 0 to 10 volts, it will take 10 us to achieve that.
If that is too slow, then you look for a faster device, which means a higher slew rate. For example, a device that has a slew rate of 5v/us can do the same thing (go from 0 to 10v) in only 2us, and with a device that has a slew rate of 20v/us can do it in 0.5us,
So you can start to see how this works, it's not too hard to do.

One caution here though is that the normal slew rate when the device is more or less in the linear mode already may be faster than the slew rate when it is taken out of it's linear mode of operation, so the slew rate would look much slower than the data sheet indicates under this condition. This varies a lot with device, so you may actually have to test each device. This is also where comparators should come in faster than op amps, because they are made to operate in the non linear region. Be aware though that there will also be a sort of minimum input change to get the full slew rate, and that might have to be tested for also although sometimes you can find this on the data sheet too.
 

Thread Starter

PersianEngineer

Joined Aug 15, 2013
19
Dear friends, thanks for your replies and discussion about it.
Actually now I am using MCP6231 as comparator to switch on and off a PNP BJT transistor. The problem is when the input voltage passes the reference voltage, the output is not exactly in logic high or ground but it gradually goes to ground or high by increasing the difference between two inputs. It doesn't have any deal with time but as the graph shows the X axis is input voltage and the point that the graph goes high indicates the reference voltage which is connected to the other input of op/amp.
This sytem is used for switching between solar panel and a battery.
According to your replies, I think I should search among comparators. Is there and specific categories of comparators that do what I need? For example percision type? Any charateristic that I should check for that (not slew rate, I don't need to be very very fast)?
Thanks!
 

MrChips

Joined Oct 2, 2009
30,618
LM339 is a popular quad comparator, quad meaning there are four comparators in a 14-pin package. The response time is 1.3μs.

As with most comparators, it has open-collector output. Put a 4k7Ω pull-up resistor from the output to Vcc.
 

crutschow

Joined Mar 14, 2008
34,201
The open loop gain of an op amp is very high so it takes much less than a mV difference between the inputs to go from saturated high to saturated low. So if the circuit appears to take a significant voltage to switch then something is wrong with the circuit. It could be oscillating at a high frequency if you don't have any hysteresis feedback which could cause the mushy characteristic you are observing.
 
Top