Need help understanding this OpAmp behavior. - Page 1
Forum section: electronics / beginners

author: Wigo
author_rank: Contributor
timestamp: July 09, 2019, 07:40:57 am
content: 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?

author: Nerull
author_rank: Frequent Contributor
timestamp: July 09, 2019, 07:54:30 am
content: 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/559209If 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.

author: Wigo
author_rank: Contributor
timestamp: July 09, 2019, 08:02:57 am
content: Thanks, i totally missed that point.Good that i have a few of them to test.So the "inverted" output could be from a damaged OpAmp?

author: Rerouter
author_rank: Super Contributor
timestamp: July 09, 2019, 09:13:25 am
content: 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 rangeI 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

author: StillTrying
author_rank: Super Contributor
timestamp: July 09, 2019, 09:30:26 am
content: 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.

author: Zero999
author_rank: Super Contributor
timestamp: July 09, 2019, 09:52:21 am
content: Quote from: Nerull on July 09, 2019, 07:54:30 amIf 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.pdfQuote from: StillTrying on July 09, 2019, 09:30:26 amYes, use the LM393 with suitable pull-up resistors on the output, instead of the LM358.

author: Wigo
author_rank: Contributor
timestamp: July 09, 2019, 12:55:10 pm
content: All this is related to thishttps://www.eevblog.com/forum/projects/piezoelectric-sensors-fm-trancievers-and-more/msg2512266/#msg2512266topic.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.

author: StillTrying
author_rank: Super Contributor
timestamp: July 09, 2019, 03:28:34 pm
content: Quote from: Wigo on July 09, 2019, 12:55:10 pmI 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 itshouldbe easy to convert that into one pulse. I drew this weeks ago during the other thread.

author: Wigo
author_rank: Contributor
timestamp: July 09, 2019, 04:35:52 pm
content: Quote from: StillTrying on July 09, 2019, 03:28:34 pmMy appologies on that. I hate it myself if something related gets spread out over various threads. I was just an idiotBack 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.

author: StillTrying
author_rank: Super Contributor
timestamp: July 09, 2019, 07:07:53 pm
content: Quote from: Wigo on July 09, 2019, 04:35:52 pmIt'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.

author: L_Euler
author_rank: Regular Contributor
timestamp: July 09, 2019, 10:41:15 pm
content: Are you sure the reference voltage pot is turned to 5V and not zero.

author: David Hess
author_rank: Super Contributor
timestamp: July 10, 2019, 03:10:22 am
content: 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

author: Wigo
author_rank: Contributor
timestamp: July 10, 2019, 05:03:12 am
content: Quote from: David Hess on July 10, 2019, 03:10:22 amThanks a lot. So all runs down to RTFM 😉 i should have known.

author: Rerouter
author_rank: Super Contributor
timestamp: July 10, 2019, 05:21:48 am
content: 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.

author: David Hess
author_rank: Super Contributor
timestamp: July 11, 2019, 03:15:13 am
content: Quote from: Wigo on July 10, 2019, 05:03:12 amMost 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.

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 11, 2019, 06:16:00 am
content: Quote from: David Hess on July 10, 2019, 03:10:22 amthis... 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...

author: Wigo
author_rank: Contributor
timestamp: July 12, 2019, 08:36:40 am
content: Quote from: Mechatrommer on July 11, 2019, 06:16:00 am@MechatrommerWow 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.@AllThanks 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.

author: StillTrying
author_rank: Super Contributor
timestamp: July 14, 2019, 02:44:18 pm
content: Quote from: Wigo on July 12, 2019, 08:36:40 amMake 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.