Last summer, I tried building an instrumentation amp using the MCP6002 op amps and external discrete resistors, and ended up with an amplifier that had terrible common-mode rejection, which is why I decided to use the INA126P instrumentation amp chip for the Blinky EKG boards and for the instrumentation amp protoboards.

I think I’d like to revisit that idea though, to see if I can make a cheaper Blinky EKG. If I put together a Blinky EKG kit with the current design, the parts would cost about $9.30 (buying quantities of 100). The mist expensive single part is the instrumentation amp at $2.44. If I could get the 2-op amp instrumentation amp to work using discrete components, I might be able to save most of that. Replacing them MCP6002 dual op amp with an MCP6004 quad op amp and 4 more resistors would cost about 22¢ rather than $2.44, bring the parts cost down to around $7.07.

I could also reduce the price by using surface-mount devices (SMDs) instead of through-hole components. An instrumentation amp like the INA826 ($1.34 in 100s) would be a good choice if I went with SMDs. But if I used SMDs, the Blinky EKG would probably have to be a finished product rather than a kit, which would add substantial manufacturing costs, especially for things like a case, which could be omitted in a kit. The idea of a blinky board is to be an easy soldering project for beginners, so I’m not sure that a pre-assembled blinky EKG has much appeal for me (which is not to say there is no market for it, just that I’m not particularly interested in designing for that market).

I looked at my old post and realized that I had miscomputed the gain for the differential signal, and never computed the gain for the common-mode signal. If the resistors are perfectly matched, the common-mode gain is 0, but without the laser trimming that makes the instrumentation amp chips so expensive, we’re not going to get perfect matching. The classic approach of adding trimpots takes up too much space and ends up costing almost as much as using an instrumentation amp chip.

So the rest of this post is dedicated to better understanding the 2-op-amp instrumentation amp. I drew a schematic of a possible design, in order to have names for the parts and signals.

To analyze the circuit assuming ideal op amps (so the voltage difference between the two inputs of the op amp is 0), we need to look at the current through each resistor:

We also have that

and , by Kirchhoff’s current law.

We can add to get , which can be expressed as

If and , then we can multiply both sides by to get

,

or

.

For the values in the schematic above the differential gain is 6.6 + 112kΩ/Rgain.

To look at common-mode gain, it is best to solve the pair of equations for the currents I1 and I4. Being lazy, I used maple to do the algebra:

solve( { (vout-vp)/r1= (vp-vmid)/r2 + (vp-vm)/rgain, (vm-vref)/r4=(vmid-vm)/r3+(vp-vm)/rgain, \ vor=vout-vref}, {vout,vor,vmid}); simplify(taylor(subs(vp=vcomm+vdiff/2+vref, vm=vcomm-vdiff/2+vref, rhs(%[3])),vdiff));

which produced

vcomm (-r2 r4 + r1 r3) - ---------------------- + r2 r4 2 r1 rgain r4 + r2 rgain r4 + 2 r1 r2 r4 + 2 r1 r4 r3 + r1 r3 rgain ------------------------------------------------------------------- vdiff 2 r2 rgain r4

that is,

,

where , and

We can check for some copying errors by simplifying with and , where we get a common-mode gain of 0, and differential gain of . Note that the common-mode gain is independent of the value of Rgain, and depends only on the matching of the other resistors.

If R1 and R3 are 1% low, and R2 and R4 are 1% high, then the common-mode gain is 0.039. If R1 and R3 are 1% high, and R2 and R4 are 1% low, then the common-mode gain is –0.041. If you prefer thinking in decibels, the common-mode rejection with 1% tolerance resistors could be as poor as 27.8dB (compared to 80dB to 90dB for an INA126P chip).

I’ll have to make some measurements later this week to see how large the common-mode noise on the EKG signals really is. Of course, it is likely to be highly variable, depending on the electrodes and the wiring to them, but ball-park estimates would be useful.

If the AC common-mode voltage is ±200mV and we have worst-case resistor values, then we would have a ±8mV common-mode output from the instrumentation amp. With the lowest differential amplification (6.6 at Rgain=∞), a 1mV EKG signal would be smaller than the common-mode noise. Such a large common-mode voltage would easily justify the expense of the instrumentation amp chip. (Note: large DC common-mode voltages don’t matter, as the DC-blocking capacitor I used after the instrumentation amp can eliminate them.)

If the AC common-mode voltage is only ±1 mV, then the Blinky EKG could probably work even with very poor common-mode rejection in the instrumentation amp, and building it out of op amps and discrete resistors is feasible.

[…] in 2-op-amp instrumentation amp, I worked through the analysis of the differential gain and common-mode gain for an instrumentation […]

Pingback by 3-op-amp instrumentation amp | Gas station without pumps — 2013 July 8 @ 15:03 |

[…] 2-op-amp instrumentation amp, I […]

Pingback by Common-mode noise in EKG | Gas station without pumps — 2013 July 8 @ 18:00 |

[…] and discrete resistors was unlikely to be reliable. I discovered (after doing calculations for 2-op-amp and 3-op-amp designs) that 1% tolerance on the resistors would produce poor common-mode rejection. […]

Pingback by Some failed designs | Gas station without pumps — 2013 July 10 @ 12:22 |

[…] won’t repeat that presentation here (there’s a condensed, early version of it in a previous blog post). I’ve not actually lectured on the 2-op-amp design before the instrumentation-amp lab, in […]

Pingback by Instrumentation amp from op amps still fails | Gas station without pumps — 2014 June 26 @ 17:02 |