Author Topic: Need help understanding this OpAmp behavior.  (Read 2576 times)

0 Members and 1 Guest are viewing this topic.

Offline WigoTopic starter

  • Contributor
  • Posts: 44
  • Country: at
Need help understanding this OpAmp behavior.
« on: July 09, 2019, 07:40:57 am »
Hello Community,

Yesterday i was doing a little bit of experienting and i ran into a behavior of an OpAmp that i do not understand. Maybe someone can explain it.

I use this circuit. (Second Image)

In short i try to compare the output of a piezo to a reference voltage. And the output of the piezo cannot exceed 4,7V.
If i set the reference voltage to 5V the OpAmp should not trigger at all. But i get this Output. (First Image, Channel 1 is the Output of the OpAmp, Channel 2 is the Input of the Piezo)

So my question why is the comparator triggering on the low negative voltages? Or have i messed up somewhere else?



 
« Last Edit: July 09, 2019, 07:42:44 am by Wigo »
 

Offline Nerull

  • Frequent Contributor
  • **
  • Posts: 694
Re: Need help understanding this OpAmp behavior.
« Reply #1 on: July 09, 2019, 07:54:30 am »
According to TI the input voltage should never go more than 300mV below the V- supply rail, and this may cause damage.

https://e2e.ti.com/support/amplifiers/f/14/t/559209

If you look in the datasheet under 'Absolute Maximum Ratings', you will see -0.3V listed as the minimum input voltage, with 0V as the recommended minimum input voltage. This would be relative to the negative rail.
« Last Edit: July 09, 2019, 07:59:21 am by Nerull »
 

Offline WigoTopic starter

  • Contributor
  • Posts: 44
  • Country: at
Re: Need help understanding this OpAmp behavior.
« Reply #2 on: July 09, 2019, 08:02:57 am »
Thanks, i totally missed that point.  :palm: Good that i have a few of them to test.

So the "inverted" output could be from a damaged OpAmp?
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4700
  • Country: au
  • Question Everything... Except This Statement
Re: Need help understanding this OpAmp behavior.
« Reply #3 on: July 09, 2019, 09:13:25 am »
Use a second op amp to create a virtual ground, at 2.5V, have the piezo and resistor connected to there, instead of ground, and instead use back to back diodes to clip its amplitude to always be in the op amps common mode range

I suppose the last part comes down to what your hoping to accomplish with the circuit, if you want to measure any deviation from a set point, a window comparitor may be then better suited to trip on both positive and negative deflection.

Edit: something like this, if you want the window comparator version drawn up just ask
« Last Edit: July 09, 2019, 09:28:36 am by Rerouter »
 
The following users thanked this post: Wigo

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Need help understanding this OpAmp behavior.
« Reply #4 on: July 09, 2019, 09:30:26 am »
An op amp is not a comparator! Comparators are designed to not do strange things when there's a large voltage difference between the +/- inputs.
.  That took much longer than I thought it would.
 
The following users thanked this post: Wigo

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19939
  • Country: gb
  • 0999
Re: Need help understanding this OpAmp behavior.
« Reply #5 on: July 09, 2019, 09:52:21 am »
According to TI the input voltage should never go more than 300mV below the V- supply rail, and this may cause damage.

https://e2e.ti.com/support/amplifiers/f/14/t/559209

If you look in the datasheet under 'Absolute Maximum Ratings', you will see -0.3V listed as the minimum input voltage, with 0V as the recommended minimum input voltage. This would be relative to the negative rail.
If the current is limited to a safe level, the LM358 should be fine. The PN junctions of the input transistors (Q1 and Q4) will just start to conduct, like diodes.
http://www.ti.com/lit/ds/symlink/lm358-n.pdf

An op amp is not a comparator! Comparators are designed to not do strange things when there's a large voltage difference between the +/- inputs.
Yes, use the LM393 with suitable pull-up resistors on the output, instead of the LM358.
 

Offline WigoTopic starter

  • Contributor
  • Posts: 44
  • Country: at
Re: Need help understanding this OpAmp behavior.
« Reply #6 on: July 09, 2019, 12:55:10 pm »
All this is related to this https://www.eevblog.com/forum/projects/piezoelectric-sensors-fm-trancievers-and-more/msg2512266/#msg2512266 topic.


I hit a brickwall there and realised i need to learn more and get a better understanding of how it all works. And in the long run find a better suited solution.


I found the attached PDF of TI on signal conditioning , laong with various other sources, and i want to try this out. Currently i am waiting for the specified OpAmps to arrive.
In the meantime i wanted to do a little bit of experimenting.


Basically i want to detect if the Voltage created by the Piezo exeeds a certain treshhold. I tried a Peak Detector Circuit and while it worked it worked too good. So i went back to see if the comparator works without the amplification of the signal in the first place. Thats when i encoutered the behavior in the OP.


I will have a look at the dedicated comparators and if i can implement them.
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Need help understanding this OpAmp behavior.
« Reply #7 on: July 09, 2019, 03:28:34 pm »
All this is related to this

I remember, it's a pain when something very related gets spread over more than one thread because vital bits of info gets left behind.

"Basically i want to detect if the Voltage created by the Piezo exeeds a certain treshhold."

I think you need a very good idea of what "a hit" looks like coming out of the piezo, especially the minimum peak-peak voltage values you want to detect as a hit, and how long the target resonates so that it doesn't get counted as 2 hits. It's probably worth doing some simulation!

If the minimum peak-peak hit out of the piezo is >100mV it should be easy to convert that into one pulse. I drew this weeks ago during the other thread.

.  That took much longer than I thought it would.
 
The following users thanked this post: Wigo

Offline WigoTopic starter

  • Contributor
  • Posts: 44
  • Country: at
Re: Need help understanding this OpAmp behavior.
« Reply #8 on: July 09, 2019, 04:35:52 pm »
All this is related to this

I remember, it's a pain when something very related gets spread over more than one thread because vital bits of info gets left behind.

"Basically i want to detect if the Voltage created by the Piezo exeeds a certain treshhold."

I think you need a very good idea of what "a hit" looks like coming out of the piezo, especially the minimum peak-peak voltage values you want to detect as a hit, and how long the target resonates so that it doesn't get counted as 2 hits. It's probably worth doing some simulation!

If the minimum peak-peak hit out of the piezo is >100mV it should be easy to convert that into one pulse. I drew this weeks ago during the other thread.

My appologies on that. I hate it myself if something related gets spread out over various threads. I was just an idiot  :-[

Back to topic. Thanks for your reply @StillTrying. I am working om a test mechanism that i can simulate hits at home.
I will post in the other thread if it works.

For me this is marked as answered and everything regarding the other thread will be posted there.


 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Need help understanding this OpAmp behavior.
« Reply #9 on: July 09, 2019, 07:07:53 pm »
I am working on a test mechanism that i can simulate hits at home.

It's essential, have you tried the piezo directly connected to a scope probe on X10, sharp taps should give volts or even 10s of volts and no amplification needed, just a good detection circuit.
.  That took much longer than I thought it would.
 

Offline L_Euler

  • Regular Contributor
  • *
  • Posts: 86
  • Country: us
Re: Need help understanding this OpAmp behavior.
« Reply #10 on: July 09, 2019, 10:41:15 pm »
Are you sure the reference voltage pot is turned to 5V and not zero.
There's no point to getting old if you don't have stories.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17147
  • Country: us
  • DavidH
Re: Need help understanding this OpAmp behavior.
« Reply #11 on: July 10, 2019, 03:10:22 am »
The 324/358 is subject to phase reversal if the negative common mode limit is exceeded:

If either input or both inputs are lower than –0.3 V with respect to the negative supply, excessive input current can flow and the output may display phase reversal, also called inversion.

http://www.ti.com/lit/an/sloa277/sloa277.pdf
 
The following users thanked this post: Wigo

Offline WigoTopic starter

  • Contributor
  • Posts: 44
  • Country: at
Re: Need help understanding this OpAmp behavior.
« Reply #12 on: July 10, 2019, 05:03:12 am »
The 324/358 is subject to phase reversal if the negative common mode limit is exceeded:

If either input or both inputs are lower than –0.3 V with respect to the negative supply, excessive input current can flow and the output may display phase reversal, also called inversion.

http://www.ti.com/lit/an/sloa277/sloa277.pdf

Thanks a lot. So all runs down to RTFM 😉 i should have known.
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4700
  • Country: au
  • Question Everything... Except This Statement
Re: Need help understanding this OpAmp behavior.
« Reply #13 on: July 10, 2019, 05:21:48 am »
The clipped circuit I posted earlier will still work with both types of op amps. If your sensitivity is still too high you can use a resistor divider to the op amp input.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17147
  • Country: us
  • DavidH
Re: Need help understanding this OpAmp behavior.
« Reply #14 on: July 11, 2019, 03:15:13 am »
Thanks a lot. So all runs down to RTFM i should have known.

Most early JFET operational amplifiers also suffer from the same problem.

Like the susceptibility of a General Products hull to damage from antimatter, the phase reversal "feature" was not widely advertised.
 
The following users thanked this post: newbrain

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11713
  • Country: my
  • reassessing directives...
Re: Need help understanding this OpAmp behavior.
« Reply #15 on: July 11, 2019, 06:16:00 am »
The 324/358 is subject to phase reversal if the negative common mode limit is exceeded:

If either input or both inputs are lower than –0.3 V with respect to the negative supply, excessive input current can flow and the output may display phase reversal, also called inversion.

http://www.ti.com/lit/an/sloa277/sloa277.pdf

this... please do take this advice seriously. some jellybean opamp doesnt have to go -ve on its input to phase reverse, i also suggest you characterize your opamp, to see when phase reversal happened. attached are example of knock off brand of NE5532 setup as buffer or voltage follower its +ve input feed from function generator (blue and pink traces = voltage rails, yellow = input, cyan = output). the 1st is really bad china knock off where reversal happened near zero (but still +ve) input, the second and third pictures are mexico knock off batch of NE5532 which can take some -ve input abuse before reversal occured. also note the clipping on the output on both +ve and -ve rail due to non rail to rail behaviour, so it cant follow the input on those extremities fwiw...
« Last Edit: July 11, 2019, 06:17:51 am by Mechatrommer »
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline WigoTopic starter

  • Contributor
  • Posts: 44
  • Country: at
Re: Need help understanding this OpAmp behavior.
« Reply #16 on: July 12, 2019, 08:36:40 am »
The 324/358 is subject to phase reversal if the negative common mode limit is exceeded:

If either input or both inputs are lower than –0.3 V with respect to the negative supply, excessive input current can flow and the output may display phase reversal, also called inversion.

http://www.ti.com/lit/an/sloa277/sloa277.pdf

this... please do take this advice seriously. some jellybean opamp doesnt have to go -ve on its input to phase reverse, i also suggest you characterize your opamp, to see when phase reversal happened. attached are example of knock off brand of NE5532 setup as buffer or voltage follower its +ve input feed from function generator (blue and pink traces = voltage rails, yellow = input, cyan = output). the 1st is really bad china knock off where reversal happened near zero (but still +ve) input, the second and third pictures are mexico knock off batch of NE5532 which can take some -ve input abuse before reversal occured. also note the clipping on the output on both +ve and -ve rail due to non rail to rail behaviour, so it cant follow the input on those extremities fwiw...

@Mechatrommer
Wow thanks for that explanation and meassurments. That clarifies a lot.

I had not have time to do some more testing, but i will perform the recomended tests on my OpAmps as i have the time to do so.

@All
Thanks a lot for your help and the indepth explanations. I appreciate it and it helped a lot to gain more understanding on the hidden traps that lie within those ICs.
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Need help understanding this OpAmp behavior.
« Reply #17 on: July 14, 2019, 02:44:18 pm »
I had not have time to do some more testing,

Make some. :)
Have you checked what actually comes out of the piezo yet. I've since done some tapping on a bare 25mm piezo disk. Finger taps can easily give 10Vp-p and tapping it with a plastic pen can easily be 50Vp-p or more, even when driving a 10k load as well as the scope probe. I'll add a scope shot from a few days ago, when/if I find the memory stick...

...Finger tap in Blue, plastic pen tap in Yellow.
« Last Edit: July 19, 2019, 01:17:23 am by StillTrying »
.  That took much longer than I thought it would.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf