Gas station without pumps

2012 June 30

Instrumentation amp lab

I did some playing around with a simple op-amp amplifier to try to get an EKG signal, based on ideas like those in DIY ECG Machine On The Cheap, but I was unsuccessful in seeing anything other than 60Hz noise.  I decided that it would be worthwhile to try building an instrumentation amplifier.  Now, I can’t do as good a job at matching components as a laser-trimmed off-the-shelf instrumentation amp (like the TI INA126PA-ND, which costs $2.50 each in quantities of 10), but I’m more interested in concepts than high quality at the moment, and I have a bunch of MCP6002 op amp chips already.

I decided to use the microphone input scaled down as my input source, as I can get a reliable signal from that.  (The µV EKG signals are still eluding me.)  I first tried thinking about instrumentation amplifiers from first principles:  I knew that the input stages had to have no feedback to the input wires, and that the second stage had to do the differencing of the two inputs.  I was having a hard time figuring out a reliable way to reject the common-mode noise and get just the differential signal, particularly at high gain.  I finally broke down and read the Wikipedia article on instrumentation amplifiers.  In that article, they give a classic design for a 3-op-amp instrumentation amplifier:

I don’t have a particularly good assortment of resistors for my breadboard, but I managed to find enough pairs of resistors with nominally the same value to make a version of the circuit. I used a 10kΩ trimpot for the gain resistor, so I could adjust the gain. I initially set the trimpot to 2kΩ.  Wikipedia reports the gain for this circuit as \left(1+ \frac{2R_1}{R_{gain}}\right)\frac{R_3}{R_2}, which matches my analysis of the circuit.

Since I’m using single-power supply op amps, I also needed to make a bias voltage supply to act as “ground” for the feedback loop on the positive side of the differential amplifier. I’m wondering if we should have the students use a proper voltage reference (like the TI TL431ILP) instead of a voltage divider to get the bias voltage.  The adjustable voltage references aren’t any more expensive (12.4¢ each in quantities of 10) than Zener diodes (12.6¢ each in quantities of 10). For an EKG circuit, the bias voltage would have to be connected to the body.

Here is the final circuit as simulated and implemented:

Microphone signal source and instrumentation amplifier.
The signal source produces about a 140µV difference between Vin_plus and Vin_minus, which is nicely amplified.

The amplifier appears to be working, amplifying the 140µV input to a 200mV signal (with a fair amount of noise added). Of course, with this signal source, I can’t really see whether the output is really a result of amplifying the differential signal, or a lesser gain amplification of the common-mode signal (since the differential signal is just 1/700th of the common-mode signal).

The amplifier stops working if I set R_gain below about 1.8kΩ in this circuit. (I determined that by adjusting the potentiometer down to about 500Ω, seeing that the circuit produced no output, then gradually increasing the potentiometer until I got a signal again (albeit one that obviously had some clipping). If I want higher gain (which I probably do for an EKG), I’ll need to adjust the gain of the second stage, or add another stage. Hmm, if I swap the 24kΩ and 6.8kΩ resistors, I should be able to still set the trimpot to get about the same gain in the first stage and increase the gain in the second stage by a factor of 4.  I might try that. Update: 2012 June 30 16:19, I tried that swap and couldn’t get the amplifier to work—the 10kΩ pot is probably not big enough.

From a teaching standpoint, this instrumentation amplifier is relatively easy to construct and to understand, but for the students to test it reasonably we would need to use a signal source that has a low differential voltage and large common-mode signal. I think that the students would need a reliable source (not the rather iffy signal one gets from EKG, and not one cobbled together from a couple of benchtop signal generators).

I might also want to try a 2-op-amp design, like the one used in the the TI INA126 instrumentation amp:

Design for instrumentation amplifier used in the TI INA126 chip. Picture copied from data sheet MicroPOWER INSTRUMENTATION AMPLIFIER Single and Dual Versions SBOS062A – JANUARY 1996 – REVISED AUGUST 2005

I checked the gain for the 2 op-amp design using current flow equations for the two feedback inputs to the op amps, with R1 instead of 10kΩ and R2 instead of 40kΩ. It took me a while to fix all my typos, but I eventually got an old version (9.5) of Maple to agree with TI that the gain is (R_1+R_2)/R_1 + 2 R_2/ R_G.  I’ll probably buy a couple of the INA126PA amplifiers to experiment with—using one with a gain of 1000 followed by an op amp to increase the gain more may be the only way I’ll get an EKG working.

Update: 2012 June 30 16:20 I tried the 2-op amp instrumentation amp with feedback resistors of 24kΩ, 6.8kΩ, and R_G=330Ω, which should give a gain of about 150, but doesn’t seem to be.  Hmm—removing the entire V_{in-} part of the circuit, so that I just have an op amp with a 24kΩ feedback resistor,  has essentially the same result.  That is, I seem to be just doing a unity gain buffer of the V_{in+} signal.  That may have been all that was happening with the 3-op-amp instrumentation amplifier also.  Time for some debugging!

About these ads

4 Comments »

  1. [...] Instrumentation amp lab [...]

    Pingback by 2012 in review « Gas station without pumps — 2012 December 31 @ 11:18 | Reply

  2. [...] Instrumentation amp lab [...]

    Pingback by Post 1024 | Gas station without pumps — 2013 March 23 @ 19:59 | Reply

  3. […] Instrumentation amp lab […]

    Pingback by Blogoversary 3 | Gas station without pumps — 2013 June 1 @ 20:00 | Reply

  4. […] Instrumentation amp lab […]

    Pingback by 2013 in review | Gas station without pumps — 2013 December 31 @ 11:19 | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Rubric Theme. Create a free website or blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 266 other followers

%d bloggers like this: