# Sensor Systems

### Sidebar

methods:bioamp:bioamp_main

# A Biopotential Amplifier for Bipolar ECG and EMG

This page presents a reference design for measuring differential electrophysiological potentials. It is optimised for EMG and bipolar ECG, but can be adapted freely to other modalities. Basic functionality is included, like a low pass filter, active shielding and driven right leg. The electric safety is guaranteed by means of high resistive coupling and a low-voltage design. What is not included is loose electrode detection (impedance measurement).

This design is partially developed in a student project.

## What is a Bio Amplifier?

Bio Amplifiers are differential amplifiers optimised for measuring surface potentials. The essential function is to take a weak electric signal of biological origin and increase its amplitude so that it can be further processed, recorded or displayed1). The basic requirement is in the high imput impedance in order to load the source a minimally as possible. In addition, the amplifier has to protect the human or animal under test against electric hazards of connecting electronic circuits.

## Specifications of the presented implementation

• Differential (bipolar) measurement
• Single sided power suppy of $+5V$
• Driven Right Leg electrode
• Ground electrode and active shield
• $250 Hz$ second order low-pass filter
• Prepared as Arduino shield
• Amplification $10x$, $100x$, $1000x$ (either one, can be changed with resistor value)
• Analog out
• Pin-compatible regular instrumentation amplifier

## Research on electronic implementations

Inspiration was obtained from:

• One of the IEEE “Real World Engineering projects”2)
• Texas Instruments E2E community, the page on ECG signal acquisition systems3)
• Texas Instruments, Medical Application guides 4)
• Analog Devices article on ECG Front-End Design5)
• Freescale Semiconductor Application note AN4323, Freescale Solutions for Electrocardiograph and Heart Rate Monitor Applications6)
• Circulation articale on standardization of ECG amplifiers7)

The circuit is more or less the common denominator of the example circuits in typical instrumentation amplifier datasheets. The datasheets that were used were selected on simplicity, low voltage asymmetrical power supply and the availability of a DIL packaged chip:

of which only the INA826 is not available in a DIL (PDIP) housing and has a different pin-out as well.

Later on, I found other interesting sites explaining bio amplifier circuits8)9).

## The circuit

A schematic representation of the ciruit is shown in figure 1.

Fig. 1: Block schematic of the circuit

### The amplifier

The gain of the INA121 instrumentation amplifier (but the others are similar) is defined by

$$G=1+ \frac{50k \Omega}{R_{G}} \label{eq:InstrumentationAmplifierGain}$$ with $R_{G} = R_{4} +R_{5}$. This results into $G=10.3$ for $R_{4}=R_{5}= 2.7 k\Omega$. Other gains can be made according to table 1.

$R_{4}=R_{5}$ $G$
$2k7\Omega$ $10.3$
$100\Omega$ $251$
$47\Omega$ $533$
$27\Omega$ $927$
Tab. 1: Resistor values for setting the gain

### Driven Right Leg

The driven right leg circuit is a method to control the reference voltage and to implement an extra safety level10). When the driven right leg circuit has a gain of $g_{DRL}$ we can calculate the effective resistance of the right leg to $V_{Ref}$. If the common mode voltage of the person under test is $v_{cm}$, the common mode potential of the right leg lead is $v_{cm}$ and the middle branch of $R_{G}$ is $v_{cm}$ as well (taking into account that an instrumentation amplifier has a gain factor for common voltages of one). Assume a current through the body of $i_{d}$, then

$$v_{cm}=R_{Z}i_{d}+g_{DRL}v_{cm} \label{eq:DRL}$$ so the resistance $R_{RL}$ from the right leg to ground is equal to $$R_{RL}=\frac{v_{cm}}{i_{d}}=\frac{R_{Z}}{1-g_{DRL}}. \label{eq:DRL2}$$ Because $g_{DRL}$ is a negative large number, the $R_{Z}$ will be effectively reduced.

In case of a transient disturbance, in which the driven right leg circuit clips to the positive or negative power supply, the $R_{RL}$ is equal to $R_{Z}$, so very high. This introduces a safe grounding when needed.

In our practical implementation $R_{Z}=100 k\Omega$ which is reduced to $100 \Omega$ by $g_{DRL}=-R_{9}/R_{8}$. In fact, the $g_{DRL}$ is frequency dependent by means of $$g_{DRL}\left ( j \omega \right )=-\frac{R_{9}}{R_{8}}\frac{1+j \omega R_{13} C_{5}}{1+j \omega \left ( R_{9} +R_{13} \right ) C_{5}} \label{eq:DRLgain}$$

which gives a gain of $-1000$ for frequencies below

$$\frac{1}{j \omega \left ( R_{9} +R_{13} \right ) C_{5}} \approx 1.59 Hz \label{eq:DRLgain2}$$

and a gain of $-1$ for frequencies above

$$\frac{1}{j \omega R_{13} C_{5}} \approx 1.59 kHz. \label{eq:DRLgain3}$$

### The Low-pass filter

A 2nd order active low pass filter can be found in many implementations and many filter polynomials. For the circuit a version is taken from an OpAmp collection of National Semiconductors11).

Assuming that $R=R_{3}=R_{11}$ and $C=C_{9}=C_{10}=C_{11}$, the cut-off frequency is defined by $$f_{cut-off}=\frac{1}{\sqrt{2} \pi RC} \label{eq:ActiveLowPass}$$ which becomes approximately $252.6 Hz$ for $C=33nF$ and $R=27 k \Omega$.

### Asymmetrical power supply

The circuit is intended to use the power supply of an Arduino microcontroller. This means that the power supply is asymmetrical and only $5V$. A reference voltage of $2.5V$ is created by the volage divider $R_{2}/R_{12}$ from the $5V$ power supply. This can be done by two simple resistors because the only usage of this voltage is by two high impedant OpAmp inputs.

The reference voltage is used by the integrator $IC4C$ to define the reference input of the instrumentation amplifier $IC3$. The integrator time constant is $$\tau=\frac{1}{2 \pi R_{1}C_{1}} \label{eq:Integrator}$$ which is about $0.339Hz$ for $R_{1}=470k\Omega$ and $C_{1}=1 \mu F$.

### The complete circuit

The total circuit is represented in figure 2.

Fig. 2: Complete circuit, including connectors to Arduino

### Printed Circuit Board

A printed circuit board is designed, but not yet realized and tested. Fig. 3: PCB Design for the BioAmp

## Simulations

In figure 4 a simulation is shown for a gain of $G=10$. The input signal (differential) has a frequency of 5Hz and an amplitude of 10mV from peak to peak. At $t=3 sec$, a 50V common disturbance for $1 sec$ is given. At $t = 6 sec$ the same is done for a differential disturbance. In both cases, the reference voltage of the instrumentation amplifier and the signal itself recover well.

Fig. 4: Simulation with two transient disturbances

## Experiment

A prototype was assembled using a gain of $G=251$. It was tested with a Fluke PM3394 digital oscilloscope and a $5V$ laboratory power supply. The three electrodes were ECG conductive adhesive Ag/AgCl foam electrodes type MediTrace 133 of the brand Kendall. Two were placed diagonally on the chest at a distance of $10cm$ above the heart, the driven right leg electrode was placed on the lower right abdomen. There was no casing around the experimental prototype board, probably explaining the high susceptibility for $50Hz$ noise.

A normal ECG can be seen in figure 5. In figure 6 the chest muscles are contracted such that an EMG signal can be seen between the heartbeats. This is an indication the samen circuit can be used to measure EMG.

Fig. 5: Measurement of ECG on chest

Fig. 6: Measurement of ECG on chest with chest muscles activated

## The Software

To sample with $500Hz$ using an Arduino board was demonstrated in the PPG set-up. The same code can be used as was described for the pulse sensor in oscilloscope mode. The digital pulse sensing mode (using hardware interrupts to determine the pulse to pulse interval) does not work straight away, because the analog ECG signal is $2.5V$ on average and the T-peaks can not create interrupts because the levels are not compatible. A quick fix can be to use the ATMEGA328 analog comparator interrupts.

File Program Version Description
BioAmp board for Arduino.sch Eagle 7.5.0 2.1 Schematic for Arduino shield with bio amplifier
BioAmp board for Arduino.brd Eagle 7.5.0 2.1 Board design for Arduino shield with bio amplifier
1) , 10)
John G. Webster (editor), Medical instrumentation, application and design, second edition, Houghton Mifflin Company, 1992
2)
Dr. Alfred Yu, IEEE Real World Engineering Projects: Electrocardiogram Amplifier Design Using Basic Electronic Parts, 2011
3)
Texas Instruments E2E Community: ECG Signal Acquisition Systems
4)
Texas Instruments, Medical application guides
5)
Enrique Company-Bosch, Eckart Hartmann, Analog Dialoque, Volume 37 – November 2003: ECG Front-End Design is Simplified with MicroConverter
6)
Jorge González, Freescale Solutions for Electrocardiograph and Heart Rate Monitor Applications, Freescale Semiconductor, Application Note Document Number:AN4323, Rev. 1, 04/2013
11)
National Semiconductors Op Amp Circuit Collection, AN 31, September 2002