Author Topic: Is this opamp impedance thing?  (Read 1745 times)

0 Members and 1 Guest are viewing this topic.

Online sw_guyTopic starter

  • Contributor
  • Posts: 40
  • Country: fi
Is this opamp impedance thing?
« on: December 14, 2023, 07:53:48 pm »
hello all,

May I ask probably a beginner question about opamps.
1953435-0

The diagram illustrates a circuit I have. V2 is 8kHz square wave and U4/U7 is MCP6024. ADC0/ADC1 is AD converter input. The diagram is slightly simplified version, but I think all the key components in terms of my question exist.
I am trying to measure peak voltage. Can't remember which video this was introduced by Dave, but the circuit if from one of the vblogs years ago. When R1 and R2 are <10k everything is fine. When R1/R2 are >50K, then ADC0 starts to fluctuate. Not much, but 10-20 bits using 15 bits AD converter. When R1/R2 are say 1k, the ADC reading is rock solid.
ADC reading fluctuate can caused by several reasons, but in this common issues like case supply voltage or ADC reference voltage seem not be issue. Fluctuating increases when R1/R2 are increased. Looking input impdedance 6024, it is very high. Should not be affected by 100k resistor the way connected on the circuit.

sw gyu
 

Online sw_guyTopic starter

  • Contributor
  • Posts: 40
  • Country: fi
Re: Is this opamp impedance thing?
« Reply #1 on: December 16, 2023, 06:02:16 am »
It was diode thing. I used MBR0520 and after a few attempts I tried 1N5819 and it works much better. Wondering if there is even better choice than 1N5819.... ::)

sw guy
 

Offline liaifat85

  • Regular Contributor
  • *
  • !
  • Posts: 172
  • Country: bd
Re: Is this opamp impedance thing?
« Reply #2 on: December 16, 2023, 07:26:50 am »
If you're looking for a better choice, you can try with some other  SCHOTTKY BARRIER RECTIFIERs.
 
The following users thanked this post: sw_guy

Online Terry Bites

  • Super Contributor
  • ***
  • Posts: 2399
  • Country: gb
  • Recovering Electrical Engineer
Re: Is this opamp impedance thing?
« Reply #3 on: December 16, 2023, 11:06:50 am »
Vcm for this opamp is 3.5V. The voltage at the top of R1 is 4.9V and U4 would have to swing its output to 4.9+Vf to operate correctly.
Even with an input of 3.3V to one of the opamps you're sailing pretty close to the wind.
I imagine that exceeding Vcm could cause excess current to flow into the opamp inputs.
I dont think Vcm is modeled
The input impedance will affect the magnitude the offset caused by a fault current.
This could appear as an offset with unknown drift.
Try potting down the inputs to get the amp in its Vcm comfort zone.
Its a good idea to use a leakage cancelation scheme. MOSFET resets are leaky.
Seen here on Daveview https://www.youtube.com/watch?app=desktop&v=jllsqRWhjGM
 

Offline Neilm

  • Super Contributor
  • ***
  • Posts: 1546
  • Country: gb
Re: Is this opamp impedance thing?
« Reply #4 on: December 16, 2023, 05:16:50 pm »
There is the possibility you are looking at the wrong thing. I have seen the input circuit of an ADC generate current pulses (due to the characteristics of the sample and hold circuit). The capacitor on the input to the ADC supplied this current pulse and lead to very weird oscillations in the reading
Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe. - Albert Einstein
Tesla referral code https://ts.la/neil53539
 

Online sw_guyTopic starter

  • Contributor
  • Posts: 40
  • Country: fi
Re: Is this opamp impedance thing?
« Reply #5 on: December 16, 2023, 05:42:39 pm »
Terry:
Thank you for the detailed answer. But isn't it 3V3 on top of the R1 (referenced to ground). 1.65V (referenced to ground) between resistors is virtual ground.

Neilm:
This was my first subject to investigate but couldn't find anything related. Fluctuation is smooth variation and I was now able to identify that it was coming occasional spikes seen on cathode side of the diode. Those spikes are much smaller now when I changed the diode.
At first I tried different combinations of resistor and capacitor in front of the ADC, but it didn't make any difference.

Thank you both for answers!

sw gyu
 

Online sw_guyTopic starter

  • Contributor
  • Posts: 40
  • Country: fi
Good diode for peak detector (was: Re: Is this opamp impedance thing?)
« Reply #6 on: January 28, 2024, 01:56:29 pm »
Surprisingly difficult to find a good diode. I have a few 1N5158 that work well. Unfortunately details and source unknown.
I bought/tried:

1N5819HW1-7-F (super barrier)
Fluctuates (so, not exactly the same version as the ones I already have)

SMD110PLQ-TP (schottky barrier)
Fluctuates.

MBR0520L-TP
Fluctuates.

Before I start brute-force method (=buying a punch of diodes and keep on trying until I find a good one), I appreciate to receive good known options to start with.

A
 

Offline Gyro

  • Super Contributor
  • ***
  • Posts: 9508
  • Country: gb
Re: Is this opamp impedance thing?
« Reply #7 on: February 03, 2024, 12:17:58 pm »
There's no need to use a Schottky diode - it doesn't look as if you need low Vf for headroom. Try an ordinary Silicon diode, eg 1N4148. It will have much lower reverse leakage current.
Best Regards, Chris
 

Offline ArdWar

  • Frequent Contributor
  • **
  • Posts: 373
  • Country: sc
Re: Is this opamp impedance thing?
« Reply #8 on: February 03, 2024, 12:35:32 pm »
Is your circuit even stable? Certain opamps really hate direct-driving capacitors, especially large one. Try adding some small resistance (10-100R or something) to isolate the cap.

That one specific diode may have just the right V-I curve to stabilize the circuit, but I won't bet on it being consistent across devices, temperatures or other operating conditions.
« Last Edit: February 03, 2024, 12:56:06 pm by ArdWar »
 
The following users thanked this post: Gyro

Online sw_guyTopic starter

  • Contributor
  • Posts: 40
  • Country: fi
Re: Is this opamp impedance thing?
« Reply #9 on: February 03, 2024, 12:54:35 pm »
>There's no need to use a Schottky diode - it doesn't look as if you need low Vf for headroom
This is what I've started to suspect as well. I thought that speed is a factor - and maybe it is - but not the way I assumed.

>Is your circuit even stable? Certain opamps really hate direct-driving capacitors, especially large one. Try adding some small resistance (10-100R it something) to isolate the cap.
I am, in fact, currently modifying the PCB to add resistors.

Thank you both!
 

Offline ArdWar

  • Frequent Contributor
  • **
  • Posts: 373
  • Country: sc
Re: Is this opamp impedance thing?
« Reply #10 on: February 03, 2024, 01:56:32 pm »
I somehow glossed over the fact that this is a nonlinear circuit for the lower half of the signal.

Yeah like said by others the most common problem for this kind of circuit is diode reverse current leakage. Your opamp is driven hard to the ground for any input that isn't the peak, making the leakage a bigger concern. For these reason you need to use lower leakage diode and maybe avoid using Schottky. Capacitor leakage and opamp input bias current is another thing to consider.

However I still can't quite figure out what kind of possible problem you actually have here, or any problem that would manifest from altering the other end of the input in general. This opamp don't even have the antiparallel input protection diode.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19537
  • Country: gb
  • 0999
Re: Is this opamp impedance thing?
« Reply #11 on: February 03, 2024, 03:40:52 pm »
The 1N5819 has a massive leakage current of up to 1mA and a capacitance of 110pF.
https://www.vishay.com/docs/88525/1n5817.pdf

As mentioned above, the voltage drop is a non-issue so use the 1N4148, which has  much lower leakage current and capacitance
https://www.vishay.com/docs/81857/1n4148.pdf
 
The following users thanked this post: MathWizard

Online sw_guyTopic starter

  • Contributor
  • Posts: 40
  • Country: fi
Re: Is this opamp impedance thing?
« Reply #12 on: February 03, 2024, 04:25:00 pm »
Great, great.. thanks. And the MBR0520L-TP has 170pF and it is the worse I tried. This clearly reflects the results.
Since 1N4148 has capacitance of 4pF can I even find a better candidate than that :-)
I changed C1 and C2 to 100nF MLCC ceramic and they worked better than 1uF ceramic. I also tried film capacitor (Panasonic    
ECP-U1C104MA5) it did not work well.

Will try 1N4148 next.

sw guy
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19537
  • Country: gb
  • 0999
Re: Is this opamp impedance thing?
« Reply #13 on: February 03, 2024, 07:47:26 pm »
Have you bench tested the circuit, or is it just simulation?

How about using a transistor for the diode? Try both the emitter-base and collector junctions, to see which is better.
 

Online sw_guyTopic starter

  • Contributor
  • Posts: 40
  • Country: fi
Re: Is this opamp impedance thing?
« Reply #14 on: February 03, 2024, 07:52:32 pm »
>Have you bench tested the circuit, or is it just simulation?
The circuit is in use and it works fairly well.

>Try both the emitter-base and collector junctions, to see which is better.
Really :-) I have never seen this... I guess any small signal transistor like BC547/2N2222 etc. will do the job(?)

sw guy
 

Offline Eraldo

  • Regular Contributor
  • *
  • Posts: 65
  • Country: it
Re: Is this opamp impedance thing?
« Reply #15 on: February 04, 2024, 10:15:50 am »
If you're going to buy diodes then just buy a couple Bav199 which are low leakage fast switching dual diodes used in multimeter input protection.

It has very low capacitance (2pF from one datasheet) and has max reverse voltage of 70V

Make sure you have a good capacitor too if you want a good peak detector.
 

Offline MarkT

  • Frequent Contributor
  • **
  • Posts: 367
  • Country: gb
Re: Is this opamp impedance thing?
« Reply #16 on: February 04, 2024, 06:16:04 pm »
The BAV199 is slow, and has very large reverse recovery (max 3µs @10mA).  Its described as "medium speed switching", which I think just means average.  1N4148 style signal diode is what you want for fast switching (max 4ns).  There are better circuits for precision rectification / peak detection that clamp the opamp output to stop it saturating (thus avoiding the large delay coming out of saturation).

There normally has to be a way to reset the peak detector too!
 

Offline Vovk_Z

  • Super Contributor
  • ***
  • Posts: 1419
  • Country: ua
Re: Is this opamp impedance thing?
« Reply #17 on: February 04, 2024, 10:17:05 pm »
If you're looking for a better choice, you can try with some other  SCHOTTKY BARRIER RECTIFIERs.
If he works with signals but is not designing a power rectifier then he needs small signal Schottky diodes?  :-BROKE
 

Online sw_guyTopic starter

  • Contributor
  • Posts: 40
  • Country: fi
Re: Is this opamp impedance thing?
« Reply #18 on: February 05, 2024, 04:52:10 pm »
Experiments:
I tried 1N4148. After connecting R2, output is not stable for a few seconds. After stabilized, small fluctuating exists. I added 25R resistors in front of capacitors, the circuit became stable. Fluctuating was not bad, but still worse than with unspecified 1N5819.

I tried MMBT3904 transistor (B-E) but it did not work at all. Probably it should, but I did not spend much time on this.

RC (=R3+C1 / R4+C2) of 5R+100nF stabilizes the circuit pretty well, but still the best known diode is not yet found. (25R+100nF works as well what comes to fluctuating, but takes much longer to find peaks naturally). I also tried 50R+10nF that should limit op amp current preserving behavior, but for some reason 5R+100nF is more stable than 50R+10nF.

In the end, with unknown 1N5819 + RC circuit added, ADC readings are rock solid. I know now what diodes I will buy and try to find as good candidate as orderable version.

sw guy
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19537
  • Country: gb
  • 0999
Re: Is this opamp impedance thing?
« Reply #19 on: February 05, 2024, 06:01:16 pm »
The fact it works better with the resistor is unsurprising. Adding series resistance is a well-known remedy for op-amp instability, whilst driving a capacitive load.

If the 1N5819 is working better than the 1N4148, it might be the leakage current which is increasing the stability, rather than reducing it. You could try the 1N4148 with a resistor in parallel with it, say 1M.
 

Offline Wallace Gasiewicz

  • Super Contributor
  • ***
  • Posts: 1185
  • Country: us
Re: Is this opamp impedance thing?
« Reply #20 on: February 05, 2024, 10:12:18 pm »
I have had a very hard time finding diodes with low leakage.  Even FETs used as diodes with low leakage. Many FETs have lower leakage across the junction than diodes but not low enough for my purpose.

I am currently evaluating 2N4118 FETs for use as a low leakage diode.  Just tie the source and drain together. 
Also notice this is s symmetrical FET, the Source and Drain are interchangeable.

https://www.interfet.com/jfet-datasheets/jfet-2n4117-2n4118-2n4119a-interfet.pdf

Please note that I am not stating this is your primary problem in the circuit.  Adding resistances to the inputs of OP Amps  is a good idea.
 

Online sw_guyTopic starter

  • Contributor
  • Posts: 40
  • Country: fi
Re: Is this opamp impedance thing?
« Reply #21 on: February 07, 2024, 03:16:45 pm »
So that was the case: adding a resistor in parallel made the circuit work with 1N5819HW1-7-F (also with 1N4148, but not as good). I tried 1M and 680k resistors and 680k is rock solid.
Presumable the old stock of 5819s have leakage current closer to 1mA while the 1N5819HW1-7-F has 500uA.

Thank you everyone!

sw guy
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf