EEVblog Electronics Community Forum

Electronics => Beginners => Topic started by: electrolust on June 23, 2017, 01:54:23 am

Title: op amp intentional clipping
Post by: electrolust on June 23, 2017, 01:54:23 am
Is it ok to operate an op amp to intentionally clip your signal?  I wonder if there are power consumption problems, heat dissipation, or whatever.

I have 2 things I think I need to solve here.

1. I have a very wide [sine wave] input signal range.  I haven't fully quantified it yet, but my belief is that if I amplify the smallest signal to my desired output level, then the largest input signal will get clipped for the same gain.  This is ok for the end result as I'm not looking for signal fidelity, just presence.

2. I have a single-ended DC power input and it will save me very precious board space if I don't have to bias the input signal or split the power supply into pos/neg rails.  By having the signal ground be at the same potential as the negative rail, I'll clip half the signal (the negative going half) at all times.  Fine for my design goals.
Title: Re: op amp intentional clipping
Post by: Audioguru on June 23, 2017, 02:42:21 am
1) It does not harm an opamp for its output to be clipping. It actually runs cooler when it is clipping.
2) If your opamp has a single-ended power supply and no input bias then negative voltage swings at the input will destroy the input. The input voltages of most opamps must never exceed the positive or negative (0V in your single-ended supply) supply voltages.
Title: Re: op amp intentional clipping
Post by: Zero999 on June 23, 2017, 07:54:58 am
Yes it will work and won't damage the op-amp, but whether it's a good idea or not depends on what you're doing.

The exact clipping voltage depends on the power supply, current draw and op-amp output stage, the latter may vary across the same part number and manufacturer. It may also take awhile for the op-amp to recover from clipping, which may not be a problem for very low frequencies.

There are better ways to do this which don't rely on the op-amp clipping the signal.
Title: Re: op amp intentional clipping
Post by: electrolust on June 23, 2017, 02:37:52 pm
There are better ways to do this which don't rely on the op-amp clipping the signal.

Can you make a suggestion?  Ultimately, I'm taking an ASK analog signal and making it into a digital pulse.
 The duty cycle is quite low, 1%.
Title: Re: op amp intentional clipping
Post by: edavid on June 23, 2017, 04:03:29 pm
Can you make a suggestion?  Ultimately, I'm taking an ASK analog signal and making it into a digital pulse.
 The duty cycle is quite low, 1%.

You want a comparator, not a clipper.
Title: Re: op amp intentional clipping
Post by: electrolust on June 23, 2017, 06:25:28 pm
My signal is in the mV range.  Knowing nothing about comparators, wouldn't I need to amplify it first?
Title: Re: op amp intentional clipping
Post by: Zero999 on June 23, 2017, 06:32:20 pm
My signal is in the mV range.  Knowing nothing about comparators, wouldn't I need to amplify it first?
How many mV is it exactly?

What's the frequency?

Don't know anything about comparators? Then now is the time to learn.

What output voltage do you need?
Title: Re: op amp intentional clipping
Post by: AndyC_772 on June 23, 2017, 06:57:00 pm
One possible 'gotcha' is that, for some op-amps, there's a limit on the voltage difference that there can be between the two inputs.

Normally, this difference is kept at zero by the action of negative feedback, but if you're clipping the signal, then this isn't the case.

Often there's a pair of back-to-back diodes (or something electrically equivalent) between the two inputs, so if you get more than about half a volt between them, the input current will increase sharply.
Title: Re: op amp intentional clipping
Post by: edavid on June 23, 2017, 08:27:18 pm
My signal is in the mV range.  Knowing nothing about comparators, wouldn't I need to amplify it first?

Maybe, but you can certainly have a preamp driving a comparator.
Title: Re: op amp intentional clipping
Post by: jpanhalt on June 23, 2017, 08:38:30 pm
It is common to operate op-amps as comparators. 
http://www.analog.com/media/en/technical-documentation/application-notes/AN-849.pdf (http://www.analog.com/media/en/technical-documentation/application-notes/AN-849.pdf)

Comparators are usually open collector output; op-amps are not (https://electronics.stackexchange.com/questions/125998/why-do-they-usually-make-comparators-open-collector (https://electronics.stackexchange.com/questions/125998/why-do-they-usually-make-comparators-open-collector) ).

Be aware of that difference and move on.

John
Title: Re: op amp intentional clipping
Post by: electrolust on June 23, 2017, 11:16:36 pm
My signal is in the mV range.  Knowing nothing about comparators, wouldn't I need to amplify it first?
How many mV is it exactly?

What's the frequency?

Don't know anything about comparators? Then now is the time to learn.

What output voltage do you need?

Actually (after some testing) it's much less than 1mV.  At G=101 (with an LM741 for breadboard testing; but I only have +3.3V in my current PCB design), I can resolve an output signal just over my measurement noise, which is 10mV.  So I know for sure I need to see a 10uV p-p input signal, and I wouldn't be surprised if I factor out the measurement noise that my circuit can see a 1uV input signal.

At the other extreme, the largest signal I captured is 2V output; /100 = 20mv input.  So, a range of 1uV-20mV, a factor of 10,000 at least.

I need a 3.3V CMOS logic output, so 2.4V I guess.  I could do 5V instead if it helps the situation.
Title: Re: op amp intentional clipping
Post by: BrianHG on June 23, 2017, 11:44:15 pm
In the past, when using an op-amp in such an instance, I would use a series resistor at the opamp inputs with back-2-back signal diodes on the +&- to prevent over driving them too far apart.  Some op-amp already have these diodes internally, so you just need the series resistors.

Again, it depends on the op-amp and if it is specified to allow the wide differential swing at the inputs without latching up.

Also, as long as your inputs don't exceed the supply lines, it should be safe, even if the op-amp latches up as it does recover once your inputs swing back into range.
Title: Re: op amp intentional clipping
Post by: electrolust on June 23, 2017, 11:45:56 pm
At the other extreme, the largest signal I captured is 2V output;

Maybe more?  It is large enough that the output DC offset flips polarity.
Title: Re: op amp intentional clipping
Post by: edavid on June 24, 2017, 12:09:04 am
Actually (after some testing) it's much less than 1mV.  At G=101 (with an LM741 for breadboard testing; but I only have +3.3V in my current PCB design), I can resolve an output signal just over my measurement noise, which is 10mV.  So I know for sure I need to see a 10uV p-p input signal, and I wouldn't be surprised if I factor out the measurement noise that my circuit can see a 1uV input signal.

At the other extreme, the largest signal I captured is 2V output; /100 = 20mv input.  So, a range of 1uV-20mV, a factor of 10,000 at least.

Sounds like you need a tuned amp with AGC (like a radio receiver), not a broadband op amp stage.
Title: Re: op amp intentional clipping
Post by: Zero999 on June 24, 2017, 01:19:10 pm
My signal is in the mV range.  Knowing nothing about comparators, wouldn't I need to amplify it first?
How many mV is it exactly?

What's the frequency?

Don't know anything about comparators? Then now is the time to learn.

What output voltage do you need?

Actually (after some testing) it's much less than 1mV.  At G=101 (with an LM741 for breadboard testing; but I only have +3.3V in my current PCB design), I can resolve an output signal just over my measurement noise, which is 10mV.  So I know for sure I need to see a 10uV p-p input signal, and I wouldn't be surprised if I factor out the measurement noise that my circuit can see a 1uV input signal.

At the other extreme, the largest signal I captured is 2V output; /100 = 20mv input.  So, a range of 1uV-20mV, a factor of 10,000 at least.

I need a 3.3V CMOS logic output, so 2.4V I guess.  I could do 5V instead if it helps the situation.
I hope you're aware that the LM741 will not work at 3.3V.

Did you AC couple the input signal to the LM741 amplifier?

What frequency is the signal of interest?

Unless the noise is on a different frequency, than the signal of interest or the signal is repetitive, then the signal has to be significantly stronger than the noise to pick it up.
Title: Re: op amp intentional clipping
Post by: BrianHG on June 24, 2017, 02:58:37 pm
If you want to operate at 3.3v, or even 5v, single supply, these are the only opamps you can effectively use for your project:

https://www.digikey.com/products/en/integrated-circuits-ics/linear-amplifiers-instrumentation-op-amps-buffer-amps/687?FV=a4c00cb%2Ca4c00f8%2Ca4c00fd%2Ca4c00fe%2Ca4c010f%2Ca4c0022%2Cffe002af%2Cmu250kHz|658%2Cmu7MHz|658&mnonly=0&newproducts=0&ColumnSort=1000011&page=1&stock=1&pbfree=0&rohs=0&k=opamp&quantity=&ptm=0&fid=0&pageSize=500&pkeyword=opamp (https://www.digikey.com/products/en/integrated-circuits-ics/linear-amplifiers-instrumentation-op-amps-buffer-amps/687?FV=a4c00cb%2Ca4c00f8%2Ca4c00fd%2Ca4c00fe%2Ca4c010f%2Ca4c0022%2Cffe002af%2Cmu250kHz|658%2Cmu7MHz|658&mnonly=0&newproducts=0&ColumnSort=1000011&page=1&stock=1&pbfree=0&rohs=0&k=opamp&quantity=&ptm=0&fid=0&pageSize=500&pkeyword=opamp)

I like the TI's TLV2362, 7Mhz, RR output, larger than RR input.  Available in Dip/SOIC8/SOT23-5 & it will make you a digital 0v to 3.3v output.
Title: Re: op amp intentional clipping
Post by: electrolust on June 28, 2017, 04:34:50 am
Thanks everyone.  I think I have a good handle on this now.  One more question, re: comparator.  My signal is AC.  Wouldn't a comparator give me a square AC wave?  Whereas what I want is a positive logic 1 while the signal is present.  So I would need to rectify it and then implement some kind of delay (peak detector kind of circuit I guess).  So assuming I took the minimal signal, amplified it enough to meet the comparator detection threshold/resolution, rectify+delay, then I could feed it to a comparator.  That seems like a reasonable approach but probably consumes more board space so I think I may as well just drive my signal to clipping.
Title: Re: op amp intentional clipping
Post by: danadak on June 28, 2017, 10:36:26 am
Be aware that some OpAmps experience phase reversal when inputs
driven outside their CM input limits. So as previous poster discussed
clamp inputs so that none of them goes outside their range.

Not all datasheets mention this so you cannot tell except by testing
if the OpAmp will phase reverse. Also CMOS OpAmps can experience
destructive latchup -


http://www.ti.com/lit/an/slya014a/slya014a.pdf (http://www.ti.com/lit/an/slya014a/slya014a.pdf)


https://www.researchgate.net/publication/3139610_Catastrophic_latchup_in_a_CMOS_operational_amplifier (https://www.researchgate.net/publication/3139610_Catastrophic_latchup_in_a_CMOS_operational_amplifier)




Regards, Dana.
Title: Re: op amp intentional clipping
Post by: Zero999 on June 28, 2017, 03:29:22 pm
Thanks everyone.  I think I have a good handle on this now.  One more question, re: comparator.  My signal is AC.  Wouldn't a comparator give me a square AC wave?  Whereas what I want is a positive logic 1 while the signal is present.  So I would need to rectify it and then implement some kind of delay (peak detector kind of circuit I guess).  So assuming I took the minimal signal, amplified it enough to meet the comparator detection threshold/resolution, rectify+delay, then I could feed it to a comparator.  That seems like a reasonable approach but probably consumes more board space so I think I may as well just drive my signal to clipping.

Power the comparator with 0V for the negative rail (the positive rail isn't critical) and connect the output to the logic supply with a suitable pull-up resistor.

Bias both of the comparator's inputs to half the supply voltage and AC couple the input signal, via a suitable capacitor.
Title: Re: op amp intentional clipping
Post by: schmitt trigger on June 28, 2017, 03:42:23 pm


 (with an LM741 for breadboard testing; but I only have +3.3V in my current PCB design),

I need a 3.3V CMOS logic output, so 2.4V I guess.  I could do 5V instead if it helps the situation.

Other topics you need to fully understand related to opamps are; input common mode range, output voltage swing and how the rail-to-rail opamp varieties solve these constraints.
Title: Re: op amp intentional clipping
Post by: electrolust on July 01, 2017, 12:19:34 am
Thanks everyone.  I think I have a good handle on this now.  One more question, re: comparator.  My signal is AC.  Wouldn't a comparator give me a square AC wave?  Whereas what I want is a positive logic 1 while the signal is present.  So I would need to rectify it and then implement some kind of delay (peak detector kind of circuit I guess).  So assuming I took the minimal signal, amplified it enough to meet the comparator detection threshold/resolution, rectify+delay, then I could feed it to a comparator.  That seems like a reasonable approach but probably consumes more board space so I think I may as well just drive my signal to clipping.

Power the comparator with 0V for the negative rail (the positive rail isn't critical) and connect the output to the logic supply with a suitable pull-up resistor.

Bias both of the comparator's inputs to half the supply voltage and AC couple the input signal, via a suitable capacitor.

Maybe I don't understand the comparator.  I thought its output signal was logic 1 if IN+ > IN-, and logic 0 otherwise, with some hysteresis.  So presumably I use IN- as SGND (ie, the biased signal ground level).  When there's a signal present, don't IN+ and IN- swap levels at the frequency of my signal?  And thus the comparator output is a square wave representation of my input signal -- biased to VCC/2 of course.  I'm not sure I understand how this helps as it seems this just is the same as squared-off open loop gain of my input signal.
Title: Re: op amp intentional clipping
Post by: Zero999 on July 01, 2017, 05:02:05 pm
Thanks everyone.  I think I have a good handle on this now.  One more question, re: comparator.  My signal is AC.  Wouldn't a comparator give me a square AC wave?  Whereas what I want is a positive logic 1 while the signal is present.  So I would need to rectify it and then implement some kind of delay (peak detector kind of circuit I guess).  So assuming I took the minimal signal, amplified it enough to meet the comparator detection threshold/resolution, rectify+delay, then I could feed it to a comparator.  That seems like a reasonable approach but probably consumes more board space so I think I may as well just drive my signal to clipping.

Power the comparator with 0V for the negative rail (the positive rail isn't critical) and connect the output to the logic supply with a suitable pull-up resistor.

Bias both of the comparator's inputs to half the supply voltage and AC couple the input signal, via a suitable capacitor.

Maybe I don't understand the comparator.  I thought its output signal was logic 1 if IN+ > IN-, and logic 0 otherwise, with some hysteresis.  So presumably I use IN- as SGND (ie, the biased signal ground level).  When there's a signal present, don't IN+ and IN- swap levels at the frequency of my signal?  And thus the comparator output is a square wave representation of my input signal -- biased to VCC/2 of course.  I'm not sure I understand how this helps as it seems this just is the same as squared-off open loop gain of my input signal.
Yes, I thought that's what you wanted? Signal in: a 0 to +5V square-wave on the output.
Title: Re: op amp intentional clipping
Post by: electrolust on July 10, 2017, 08:54:37 am
Nope, sorry I wasn't clear.  The signal is a 1-bit ASK sine wave.  So, no detectable signal = 0, detectable sine wave signal = 1.  The output of the gain stage needs to be just 1 (not square wave) whenever the sine wave is present, not just when it is positive.  Given that, can you consider my reply #16 again?  In that post I was thinking of a simple half-wave rectifier but as I look into it some more, I think I'd use a bridge rectifier with a smoothing cap and feed that to the comparator.  For my needs, I think simply driving an op amp to clipping will be an overall better solution.
Title: Re: op amp intentional clipping
Post by: Zero999 on July 10, 2017, 10:00:55 am
Nope, sorry I wasn't clear.  The signal is a 1-bit ASK sine wave.  So, no detectable signal = 0, detectable sine wave signal = 1.  The output of the gain stage needs to be just 1 (not square wave) whenever the sine wave is present, not just when it is positive.  Given that, can you consider my reply #16 again?  In that post I was thinking of a simple half-wave rectifier but as I look into it some more, I think I'd use a bridge rectifier with a smoothing cap and feed that to the comparator.  For my needs, I think simply driving an op amp to clipping will be an overall better solution.
Can't you simply put the squarewave through a retriggerable monostable such as the 74HC123? That would give a high when the signal is present and low when it isn't.
Title: Re: op amp intentional clipping
Post by: electrolust on July 10, 2017, 06:37:38 pm
That looks very promising.  I will probably still need a preamp in front of it.
Title: Re: op amp intentional clipping
Post by: Zero999 on July 10, 2017, 10:38:04 pm
That looks very promising.  I will probably still need a preamp in front of it.
Why? The output of the comparator should be 0V to 5V, which should trigger the monostable with no preamplifier.
Title: Re: op amp intentional clipping
Post by: electrolust on July 11, 2017, 08:54:38 am
My input signal is on the order of 10uV pp.  I just guessed that there would be some minimum hysteresis but looking at spec sheets now I see that "internal" hysteresis is in fact a special feature and that many comparators can change states on just uV difference on inputs.  (Correct me if wrong.)

Cool, this is probably a much better solution!