Author Topic: Instrumentation amplifier conundrum  (Read 6423 times)

0 Members and 1 Guest are viewing this topic.

Offline grumpydocTopic starter

  • Super Contributor
  • ***
  • Posts: 2906
  • Country: gb
Instrumentation amplifier conundrum
« on: May 11, 2013, 09:40:44 pm »
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 breadboard




The 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 follows



I 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)
« Last Edit: May 11, 2013, 09:42:38 pm by grumpydoc »
 

Offline jpb

  • Super Contributor
  • ***
  • Posts: 1771
  • Country: gb
Re: Instrumentation amplifier conundrum
« Reply #1 on: May 11, 2013, 10:15:43 pm »
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.
« Last Edit: May 12, 2013, 04:58:35 am by jpb »
 

Offline grumpydocTopic starter

  • Super Contributor
  • ***
  • Posts: 2906
  • Country: gb
Re: Instrumentation amplifier conundrum
« Reply #2 on: May 12, 2013, 04:33:25 pm »
Quote
My guess is that by grounding the non-inverting inputs you have a feedback path via ground from the output

Probably.

I guess it was a bit ambitious to have one stage with a 100x gain on a breadboard!

Quote
It was probably ok with the output of the signal generator because that is floating

It's a low impedance source so probably quashed any small feedback voltage.

Quote
It might also be a good idea to add capacitors to the power supplies of the op-amps to help prevent oscillation.

Yes, 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
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 28013
  • Country: nl
    • NCT Developments
Re: Instrumentation amplifier conundrum
« Reply #3 on: May 12, 2013, 04:49:50 pm »
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.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8550
  • Country: us
    • SiliconValleyGarage
Re: Instrumentation amplifier conundrum
« Reply #4 on: May 12, 2013, 05:22:33 pm »
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.
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline grumpydocTopic starter

  • Super Contributor
  • ***
  • Posts: 2906
  • Country: gb
Re: Instrumentation amplifier conundrum
« Reply #5 on: May 12, 2013, 05:41:40 pm »
Quote
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.

Thinking 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 hoped :(

I found this application note which 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.

 

Offline grumpydocTopic starter

  • Super Contributor
  • ***
  • Posts: 2906
  • Country: gb
Re: Instrumentation amplifier conundrum
« Reply #6 on: May 12, 2013, 07:09:16 pm »
Quote
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.

OK, 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 found this article which 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 :)
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8550
  • Country: us
    • SiliconValleyGarage
Re: Instrumentation amplifier conundrum
« Reply #7 on: May 12, 2013, 07:23:23 pm »
thats assuming both bias currents are the same as is the case with a real instrumentation amp. not so with homebrew...
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16363
  • Country: za
Re: Instrumentation amplifier conundrum
« Reply #8 on: May 12, 2013, 07:26:53 pm »
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.
 

Offline grumpydocTopic starter

  • Super Contributor
  • ***
  • Posts: 2906
  • Country: gb
Re: Instrumentation amplifier conundrum
« Reply #9 on: May 12, 2013, 08:16:19 pm »
Quote
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.

Yes, I probably will - it was just that 100nF was the largest non-polarised cap that I had two of.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf