2015-11-03 08:13 AM
We have an extra op amp in the quad package that we'd like to use as a comparator to save cost. Any recommendations? I'm a little concerned about stability and oscillations.
2015-11-03 08:23 AM
Hello,
You're right that you can perform a comparator fonction with an opamp. If you are concerned about oscillations, it may mean that you have an input signal that is a little bit slow, thus it will lead to different toggling due to noise on the input signal. In order to avoid it, I would recommend to add an external hysteresis based on two resistors. We developed on application note that highlights the main points on comparators. You can have a look at the section 4.2, page 17, that deals with the external hysteresis. This application note is available here : Regards, Sylvain2015-11-03 08:39 AM
Yep, we'll definitely be using hysteresis in the manner you described. I'm more referring to using an op amp as a comparator instead of a dedicated comparator IC, and any recommendations that ST might have on avoiding misbehavior. The possibility for misbehavior is described in section 1 ''Comparator substitution by an op amp'' of the app note you provided.
Thanks2015-11-03 11:18 PM
Hello,
I understand your point, but the main thing you should take into account is the external hystereis. You definitely have the possibility to use an op-amp as a comparator (wherease it is not possible to use a comparator as an opamp). The trade-off is that for a similar current consumption between an op-amp and a comparator, you will have a better speed (propagation delay and slew-rate) with a comparator. But if the slew-rate of the opamp is enough in your application you can use the unsued channel as a comparator to save space and money. Moreover, regarding the possiblity of misbehavior, the external hysteris will avoid oscillations and will provide you with a robust design. Regards, Sylvain2015-11-04 07:22 AM
Got it, thanks for the feedback (no pun intended).
2015-11-05 07:07 AM
Hello,
Note that the LMV324 has a Vid limitation. It means that if there is an input voltage difference between the inputs bigger than 1V, there will be a current that will go thru the internal diodes. Thus it is recommended to add a resistor in-series with the input in order to limit the current that is going thru the back to back diodes. To highlight it, you can find here below a simplified schematic of the op-amp (the ESD diodes are included inside the opamp)