ECG Project

In an earlier post, I described some ECG signal processing. In fact, these recordings were from my own heart, and I had collected them using a homemade ECG. The following is a repost from my old site describing the device.

I assembled an instrumentation amplifier to measure cardiac potentials (i.e. an electrocardiograph (ECG)). The analog-to-digital converter of an ATmega168 microcontroller was used to convert the amplified potentials and transmit the values to a computer via a serial connection. The microcontroller can transmit up to 2.5k values per second, which is sufficient for cardiac potentials. The analog amplifier was a bit tricky to set up. I ended up purchasing the INA128 instrumentation amplifier after some unsuccessful trials with individual op-amps. The final amplifier circuit is given in the following diagram.

The diagram has the following components:

  • VCC - 5.0V regulated supply
  • GND - Ground
  • VCC/2 - 2.5V supply from a VCC voltage splitter
  • VCM - Common mode voltage, VCC/2 +- 0.5V
  • VOUT - Output voltage, connected to ADC of uC
  • RA - Right arm lead
  • LA - Left arm lead
  • LL - Left leg lead

The gain in this amplifier is set by the R_GAIN (47 Ohm) resistor, given by G = 1 + 50000 / R_GAIN. Hence, the gain of this circuit is about 1065V/V. Since cardiac potentials on the skin surface are in the region of 1mV-3mV, this gain should be sufficient. The inputs to the INA128 must be biased to within a small voltage (+-0.5V) of VCC/2, termed the common mode voltage (VCM). AC-coupling capacitors (C1 and C2) prevent the need to apply VCM to the limb electrodes, which could result in shock if the body is grounded to earth. The limb electrodes are instead biased to GND.

The RA and LA leads in this amplifier might also be connected to a piezoelectric transducer (electric buzzer) to record audio/vibrations. However, the frequency of recorded audio is limited by the A/D conversion and the serial transmission rates. That is, audio frequencies higher than about 1200Hz (See the Sampling Theorem) cannot be recorded with accuracy. It might be possible to connect VOUT directly to the 'line in' jack on an audio recording device, such as a computer sound card.

Disclaimer: I do NOT recommend the circuit above for ANY specific use, or guarantee its safety. Think carefully before attaching homemade electronics to your body.

2 thoughts on “ECG Project

  1. You might want to check OpenEEG, if you haven't already. They not only provide instructions on how to build your own EEG (or get it preassembled), but they also have some info on building an EEG that connects to a PC soundcard.

  2. Yes, that's really cool, and a much more difficult project, since EEG surface voltages are much smaller than ECG voltages.

Comments are closed.