Instrumentation amplifier conundrum - Page 1
Forum section: electronics / projects

author: grumpydoc
author_rank: Super Contributor
timestamp: May 11, 2013, 09:40:44 pm
content: I'm making a basic error here, I'm sure, but not sure what.I was thinking about how to measure ripple from a linear PSU - obviously, as Dave pointed out in his video, the problem with doing this is watching out for common mode signals which aren't coming from the power supply under test.I don't have a differential probe but I thought why not knock up a differential amplifier with an op-amp and try that. Thinking about it I decided to try the 3 op-amp "instrumentation amplifier" configuration. Partly because one advantage is just a single resistor adjustment to set the gain and partly because I haven't built one before.This is the circuit - entirely standard.and here is is on a breadboardThe left op-amp is used for the two buffers and the right for the difference amplifier. I used MC33072's because I had a few lying around. The 18k resistors are 1% metal film but hand picked for a group which are all 0.1% or better. The disadvantage of this configuration is that the CMRR is dependant on resistor matching which is why most of the time one would pick up a custom instrumentation amp IC rather than trying to build it from discreet components.In fact it works fine, so far - adjusting the trim pot for a gain of 100 and feeding in a 10kHz sine wave from a sig gen shows no problems.Channel 2 is the input signal at 10mV p-p and channel one the output at 1V p-p. Bandwidth could be better - about 100kHz - but I don't really need any more to look at 50Hz ripple. The lower (input) trace is a little noisy but that's the 'scope input amp.Now as I want to look at a power supply I don't just want to reject common mode AC signals but the DC from the supply itself as well, so I need the amp to be AC coupled. I intended to modify the input as followsI was going to use 1M resistors and 100n caps at the input. However as soon as I ground the non-inverting inputs of the two op-amps via a pair of 1Mh resistors I get an approx 20kHz square wave (with a lot of jitter) at the output as though the circuit were oscillating but I'm really not sure why."In theory there is no difference between theory and practice; in practice, there is"- Yogi Berra (perhaps)

author: jpb
author_rank: Super Contributor
timestamp: May 11, 2013, 10:15:43 pm
content: My guess is that by grounding the non-inverting inputs you have a feedback path via ground from the output which I think gives you positive rather than negative feedback so you'll have a pair of coupled comparators or something like that. It presumably oscillates because of phase shift and dependence on what the potential between the two halves floats at. (I'm assuming that the ground is not perfect so that there is some feedback from the ground at the output to the ground to which the 1M resistor on each side is attached).It was probably ok with the output of the signal generator because that is floating (I'm guessing here).I think that what you want to do is connect a single 1M resistor between the two non-inverting inputs.It might also be a good idea to add capacitors to the power supplies of the op-amps to help prevent oscillation.

author: grumpydoc
author_rank: Super Contributor
timestamp: May 12, 2013, 04:33:25 pm
content: QuoteProbably.I guess it was a bit ambitious to have one stage with a 100x gain on a breadboard!QuoteIt's a low impedance source so probably quashed any small feedback voltage.QuoteYes, I had 47uF at the point where the power supply was connected to the board and 0.1uF for each rail close to the op-amps.In the end I reduced the gain to 10x figuring if that was OK I could always use the spare op amp in the 2nd package to add another 10x stage. That more-or-less worked but the CMRR didn't seem too good - certainly less than I needed.Back to the drawing board."Any given circuit will oscillate - unless designed to do so"- Murphy

author: nctnico
author_rank: Super Contributor
timestamp: May 12, 2013, 04:49:50 pm
content: A good rule of thumb is not to put any components to ground at the inputs of a instrumentation amplifier. In other words: connect the 1M resistor between the inputs.

author: free_electron
author_rank: Super Contributor
timestamp: May 12, 2013, 05:22:33 pm
content: If you connect 1 megohm to ground at the input the bias current of the opamp creates a large enough offset voltage across that resistor to have the entire thing go wild.That opamp has between 100nA and 500nA bias current. in 1 megaohm that's 100mv to half a volt. your gain is 100 .. you bet that thing goes bonkers...Since they are not matched... one may be 100 the other 200... any fly buzzing above your noise breadboard sets that thing off...like nctnico said: resistor BETWEEN input. ( nothing to ground ! ) that way the thing will self-adapt. by forcing a midpoint ( ground) you deliberately pull it out of whack.

author: grumpydoc
author_rank: Super Contributor
timestamp: May 12, 2013, 05:41:40 pm
content: QuoteThinking about it I suppose that any slight difference in the CR values at the inputs is going to be very good at turning a common mode signal (which I want to get rid of) into a differential signal which we're trying to amplify. Coupled with a CMRR that's not all that great to begin with given that I'm trying to build the thing with discreet components (on a bread board yet!) and I can see this isn't going to work quite as well as I hopedI found thisapplication notewhich discusses building AC coupled instrumentation and difference amplifiers. Might try the last circuit using the spare MC33072 op amp to drive the reference input of the diff amp.

author: grumpydoc
author_rank: Super Contributor
timestamp: May 12, 2013, 07:09:16 pm
content: QuoteOK, thanks - very clear & useful explanation.I knew I was getting something basic wrong!Interestingly I looked up the configuration for AC coupling the input and foundthis articlewhich shows the configuration with resistors to ground for AC coupling.I suspect that the assumption was a much lower value, of course I happened to pick a 100nF cap and wanted the pass band to start significantly lower than 50Hz, hence the 1M resistor.I think this is a small amount of evidence as to why electronics is as much an art as a science

author: free_electron
author_rank: Super Contributor
timestamp: May 12, 2013, 07:23:23 pm
content: thats assuming both bias currents are the same as is the case with a real instrumentation amp. not so with homebrew...

author: SeanB
author_rank: Super Contributor
timestamp: May 12, 2013, 07:26:53 pm
content: Try a much lower value resistor and a bigger capacitor. 4u7 will work better with a lower value resistor, and is relatively easy to get in a film capacitor.

author: grumpydoc
author_rank: Super Contributor
timestamp: May 12, 2013, 08:16:19 pm
content: QuoteYes, I probably will - it was just that 100nF was the largest non-polarised cap that I had two of.