1 of 31

Intro to ECG Physiology and Circuit Design

ENGR 029

Spring 2024

Prof. Maggie Delano

2 of 31

Agenda

  • Introduction to the Electrocardiogram (ECG)
  • ECG front end design
  • Filters

3 of 31

Lab 2

  • For lab 2 you will be creating a heart rate monitor
  • Heart rate will be measured using the electrocardiogram (ECG)
  • You will:
    • Build an ECG measurement system, including all necessary filtering
    • Sample the ECG signal using an ADC
    • Learn how to detect peaks in software, and program a simple peak detector using MATLAB (in C++ for extra credit)

4 of 31

Electrocardiogram (ECG)

Uses of the ECG:

  • Detect and diagnose heart conditions:
    • abnormal heart rhythms (arrhythmias)
    • heart attacks (myocardial infarction)
  • Measure heart rate

5 of 31

Heart Anatomy

6 of 31

Measuring ECG

  • ECG is measured as a potential difference between two points using electrodes placed on the skin
  • A third electrode is used as a reference

7 of 31

Measuring ECG

Einthoven’s Triangle

Electrodes

ECG is measured as a potential difference between two points using electrodes placed on the skin

A third electrode is used as a reference

8 of 31

Measuring Heart Rate in Beats Per Minute

Instantaneous

Heart Rate

(IHR)

 

R

R

9 of 31

Measuring the ECG

There are a number of important aspects when measuring the ECG. Here’s what we care about for the lab:

10 of 31

Acquiring the ECG Signal (Instrumentation Amplifier)

Differential Amplifier

Input Buffers

Reference

(connected to half power

supply voltage in

single supply systems,

AND an electrode)

Electrode

inputs

 

11 of 31

Limitations of (most) analog circuitry

Instrumentation amplifiers and op amps can only output voltages that are within the range of their power supplies!

For us, this means no negative voltages…

12 of 31

The role of the reference voltage

 

Consider the instrumentation amplifier with the following transfer function. Assume we are powering the instrumentation amplifier with a 5V power supply and ground.

 

13 of 31

Another role for the reference voltage/electrode

  • Voltages of the body with respect to earth ground can vary widely, but circuitry can only tolerate a more narrow range of voltages
  • If the body isn’t connected to a known voltage, we can be out of range and at best not measure what we want, and at worst damage our electronics
  • A reference electrode connects the body to a known potential (in our case 2.5V)
    • (Due to a property of electrodes called a half cell potential, the body isn’t exactly the reference voltage, but it is sufficiently close)
  • To work, we need to connect the reference electrode to 2.5V AND to the reference of our instrumentation amplifier

14 of 31

Reference voltage example

100V �(to earth)

100.01V �(to earth)

95V �(to earth)

Our amplifier can handle �-40V to 40V with respect to its ground at its inputs. Assume the reference voltage is 2.5V with respect to the amplifier ground.

  1. What is the voltage at the inputs with respect to the amplifier ground if the reference voltage is connected to Earth ground?
  2. What is the voltage at the inputs with respect to the amplifier ground if the reference voltage is connected to the reference electrode?

2.5V

15 of 31

Noise and Interference in ECG Measurements

Noise: a random, probabilistic process

Interferer: Periodic, predictable, deterministic

Examples of noise/interference sources:

  • Circuits / electrical components (white/flicker noise)
  • Interferers (60 / 120 Hz)
  • Muscle artifacts (electrical signal!)
  • Motion artifacts (changing DC offset)

16 of 31

What to do about noise/interference?

  • Different types of noise/interference have different spectral content (i.e. frequencies)
    • White noise is flat (at all frequencies)
    • 60 Hz interference is always at 60 Hz!
    • Muscle artifacts are in the same range as ECG signal
    • Motion artifacts are low frequencies
  • What to do? Filtering!
    • Low pass filter
    • High pass filter
    • Notch filter (60 Hz)

17 of 31

18 of 31

19 of 31

Low and High Pass Filters

Vin

Vout

R

C

Low Pass Filter

 

Vin

Vout

R

C

High Pass Filter

 

20 of 31

Selecting R’s and C’s for Filters

Standard Resistor values

Standard Capacitor Values

General advice: pick the capacitor, then find the resistor that gives the closest result;

Iterate as needed until within 1-10%!

21 of 31

Design a 1 kHz Low Pass Filter

 

Consult the tables in order to design a 1 kHz low pass filter, assuming 5% resistors and 10% capacitors.

22 of 31

Design a 1 kHz High Pass Filter

 

How would we change our previous filter to become a high pass filter?

23 of 31

Low Pass Filter Frequency Response

When we say “bandwidth”,

we usually mean the cutoff

frequency / - 3 dB point

24 of 31

Incorporating Component Tolerance

We are using 5% resistors and 10% capacitors, which means that our actual cut-off frequencies will not be their nominal value. When designing our circuit, we need some tolerance that we will accept, and perform calculations to verify that we will be within spec even with worst case components.

25 of 31

Incorporating Component Tolerance

  •  

26 of 31

Putting it all together

Vecg

INA114

5V

GND

Vref = 2.5V

10kΩ

 

Vref

 

Gtot = G1G2≈ -1000

 

C1

Ri

Rf

 

GND

Rlpf

C2

5V

10kΩ

Vref = 2.5V

RG

GND

27 of 31

INA114

28 of 31

LM324

There are four op amps: you need to power Vcc+ and Vcc- always, then choose two op amps for the rest (3 pits each).

Out = output

Minus = negative input

Plus = positive input

29 of 31

Breadboarding

  • Great tutorial on breadboarding here
  • Power rails connect vertical
    • Don’t forget to connect power rails together
  • Rows connect horizontal

30 of 31

Breadboarding Tips

  • Use the power rails and be consistent
  • Follow common color conventions:
    • Red for power
    • Black for ground
    • Other colors: different colors for signals (e.g. one color for Vref)
  • Don’t make a rat’s nest:

31 of 31

Review lab setup and equipment