Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

LM258 as comparator

Status
Not open for further replies.

TXRX

Full Member level 2
Full Member level 2
Joined
Mar 7, 2012
Messages
143
Helped
2
Reputation
4
Reaction score
5
Trophy points
1,298
Activity points
2,253
Hi,
I connect LM258 as comparator in a evaluation board:
VCC=+5VDC
GND
V(+) = +5VDC.
V(-)=+4.11VDC.

I suppose to receive around +3.5VDC at Output but i receive 0V, How can you explain ?
Thanks,
Doron
 

Hi,

Common mode input voltage range is limited to VCC-1.5V.
You go beyond this.

Why not use an OPAMP as an OPAMP and a comparator as a comparator?

Klaus
 

Thanks for your answer.
Because i have already this IC in the BOM
 

Thanks for your answer.
Because i have already this IC in the BOM
That‘s not a very good reason. What if you only had toilet seats in your BOM? (Ok, that’s a little extreme).

But you can make the LM258 work if you add some voltage dividers so that your signals are within the CM range, or raise your supply voltage.
 

We have a lot of problems to purchase IC in these days so if we have IC that already in BOM and available it will prefer.
I increase the VCC voltage from other regulator.
 
Last edited:

Hi,

but you see the OPAMP causes problems.

Sadly both opamp and comparator share the same schematic symbol. But they are designed differently.
Some differences:

OPAMP are designed to operate with
* close to zero differential input voltage (some even have limiting diodes, thus when you force higher differential voltage than 0.7V you may fry them)
* outputs never saturated close to supply rails
* limited dV/dt input

Comparator:
* allowed for high differential input voltage
* output saturated at supply rail, or HIGH-Z
* high dV/dt input


Klaus
 

This part also suffers from phase reversal problems (see section 2.2) -



Regards, Dana.
Note that when used as a comparator, only one input needs to be within the common mode range. The other input can be above the common mode range or above VCC and the output will be the expected VOH level (for Vin+ > Vin–) or VOL level (for Vin – > Vin+)

Phase Reversal occurs when the input of the amplifier violates the common-mode voltage range.
 
Last edited:
Hi,
Note that when used as a comparator, only one input needs to be within the common mode range. The other input can be above the common mode range or above VCC and the output will be the expected VOH level (for Vin+ > Vin–) or VOL level (for Vin – > Vin+)
I don´t think this is true.
You may experience phase reversal and you may kill the input protection as well.

Klaus
 

TXRX is correct.

From the TI ap note :

1650372258411.png


Regards, Dana.
 

Hi,

O.K.
So if we focus exclusively on the TI LM258 family OPAMPs, then the inputs may violate common mode voltage range to the positive supply. But still it suffers from increased overload recovery timing.

It does not work properly (phase reversal, input current..) when it violates to the negative common mode voltage range.

This is true for the this only TI LM258 family. This is not to apply to other families. Carefully reading the datasheets and application notes is neccessary .. and one has to accept the disadvantages.
Since this are not the "normal operating conditions" for an OPAMP, I guess this behaviour may be modified on later versions without notifications. I don´t say that this is likely.

There is no guarantee that other brand LM258 act the same as the TI ones.

******
Thus I stand by my opinion to use an OPAMP as OPAMP and a comparator as comparator.
I can´t find the common mode violation description in the ONSEMI datasheet.

******
I don´t know how experienced the OP regarding OPAMP and comparators is....
But especially newbies tend to avoid reading datasheets.

So again my warning: What is true for the TI LM258 OPAMP is not necessarily true for other brands or other OPAMPs.

*******
And for sure: If the OP wants to use the LM258.. then he/she should use it.

Klaus
 

Hi,

O.K.
So if we focus exclusively on the TI LM258 family OPAMPs, then the inputs may violate common mode voltage range to the positive supply. But still it suffers from increased overload recovery timing.

It does not work properly (phase reversal, input current..) when it violates to the negative common mode voltage range.

This is true for the this only TI LM258 family. This is not to apply to other families. Carefully reading the datasheets and application notes is neccessary .. and one has to accept the disadvantages.
Since this are not the "normal operating conditions" for an OPAMP, I guess this behaviour may be modified on later versions without notifications. I don´t say that this is likely.

There is no guarantee that other brand LM258 act the same as the TI ones.

******
Thus I stand by my opinion to use an OPAMP as OPAMP and a comparator as comparator.
I can´t find the common mode violation description in the ONSEMI datasheet.

******
I don´t know how experienced the OP regarding OPAMP and comparators is....
But especially newbies tend to avoid reading datasheets.

So again my warning: What is true for the TI LM258 OPAMP is not necessarily true for other brands or other OPAMPs.

*******
And for sure: If the OP wants to use the LM258.. then he/she should use it.

Klaus
Hi,
This is from LM258 ON-SEMI Data Sheet:
1650375995904.png
 
I think NSC originator of LM358. When Fairchild re-spun off NSC to ON good guess is
that part went to ON, as NSC continued to use ON as a fab.

"Normal" second source was to dissect die, and replicate devices sizes and geometries.
That was done to insure that end design characteristics used would be replicated. Not
always successful, that's why thru 70's, 80's, many end design teams / companies did their own
characterization of parts. Also some IC design teams "improved" parts under the same part
number designation, and developed successful products, other incidents of hosing end
customers because "improvement" was not an "improvement" in the legacy design.

Processes in many instances same across companies as available process machinery
common in industry. In fact many companies, for awhile, would tailor certain processes
to achieve a specific goal. Not so much anymore. Those days largely gone.

For sure no one can assume anything. Will the sun rise tomorrow, I have my doubts.

Lastly the phase issue first appeared, if I recall, in EDN disclosing the problem in an article, if my
crappy memory serves me. Then some manufacturers, over time, updated datasheets, some did not.
Like the more recent issue on input stage crossover distortion in RRIO OpAmps. Went undisclosed
for a long time. I would not be surprised we can still find many datasheets that still do not discuss
it.

So I totally agree. some multi source parts process and design equivalents, some not. One must
contact production EE assigned and or designer to be sure.


Regards, Dana.
 
Last edited:

OpAmps, DACs, A/Ds, Regulators, Muxes, Mixers, Transistors, Consumer, Logic,
interface, COM, some Micro...........nothing special

Regards, Dana.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top