Realtime ECG project

Help us grow. Share with your friends!

I have been working on a realtime ECG system for 6 months now. I spent most of the time to acquire information about building an ECG circuit, studying the effects of noise on the signal, filtering the signal and the list goes on. Finally, I constructed the ECG circuit and got it working.

The analog front end consists of an instrumentation amplifier INA128. I chose this one because it has a sufficiently high CMRR.

Gain = 26.

Then I found out that using just an instrumentation amplifier is not going to yield the ECG signal so easily. After a little research I came across the right leg drive system. This system takes the signal that you have fed into the instrumentation amplifier, inverts it and injects back into the body at the right leg. This system works because the inverted noise would cancel the noise present on your body. It won’t cancel it 100%, but surely is effective.

After this stage you would be getting a moderate noisy signal. You will be able to identify the PQRS peaks of the ECG signal, but it has some good deal of noise. You need a filter!

I used a bandpass filter having lower cutoff frequency at 0.5Hz and higher cutoff frequency at 35Hz. This is the frequency range used in realtime ECG systems. If you want it for detailed analyses then you would need to add a 50Hz notch filter and your bandpass filter should pass the frequencies from 0.05Hz to 150Hz or more.

Bandpass filter was built by constructing a second order high pass filter and a second order low pass filter. Passive filter topology used.

Passband gain = -3dB approx.

After the passive filtering stage, I added a non-inverting amplifier of gain 220.

circuit part1.jpg filter schematic.jpg

Output from the circuit was seen on the digital oscilloscope.

190079_1661183054849_1395375059_31625890_730571_n.jpgMy next plan is to feed this signal to a ADC and then transfer the data in realtime to a computer. the computer will then process the data to find out the heartrate. Additional filtering can be done as well.

Currently I am thinking of using an arduino microcontroller for doing such a job. The difficulty I am facing right now is the baseline wander.

Another difficulty I have right now is that the amplifier gets saturated at some instances. Before i could feed this signal to the ADC, i would need to get rid of these problems.

If you have any experience in serial port programming, then please contact me, as I need help in taking the data from the USB port and plotting it in real time. So far I have tried out Parallax DAQ which read the USB port data and plots it in excel in realtime. But i dont like it very much. What i want to do it, plot it in realtime as you see on a digital oscilloscope. The signal should be plotted from left to right, once it reaches the end, it should start over. I hope you get my idea.

TO SEE THE GRAPHS AND DETAILED DOCUMENTATION PLEASE CLICK  HERE

CLICK HERE TO DOWNLOAD RECORDED SIGNAL

I am selling the ECG circuit board completely ready for your use. All the components will be soldered on the board. 

Please contact me on salil2106@gmail.com OR comment below if you want to buy the ECG circuit board.

The ECG circuit board will cost 15$ + shipping.

If you need just the circuit board without components soldered, it will be available for 10$.

The circuit board:

Some of the help i got was from this awesome blog over here and some help i got from here

Here is a complete proper circuit diagram:

NOTE: Building your first ECG will get you confused about a lot of things. It is not easy to identify ECG waveform when you are doing it for the first time. A small reference book is highly recommended for you.

This book has a lot of great information and I found it really very useful in my project.

And there is this reference book which helps in analyzing the ECG waveforms. This book describes various symptoms that could be diagnosed after studying the ECG waveform. This book has made ECG diagnosis much simpler for those not having medical background.

 

Incoming search terms:

nuclearrambo

Salil is an electronics enthusiast working on various RF and Microwave systems. In his free time he writes on the blog, talks over ham radio or builds circuits. He has Yaesu FT2900R VHF transceiver, FT450D HF transceiver and a TYT UV8000E Handheld transceiver.

You may also like...

5 Responses

  1. Sid says:

    Hey salil,

    could you help with a homemade ECG machine that gives me an audio output?

    Thanks

  2. nirangana says:

    hi, can you tell me abut the electrode. is it non-contact type?

  1. May 13, 2011

    […] To find OUT ABOUT THE CIRCUIT please FOLLOW THIS LINK […]

  2. June 20, 2012

    […] REALTIME ECG […]

  3. May 6, 2014

    […] do no know about the basic building blocks of ECG circuit, then I suggest you to go back here and here to learn about it. We begin modifying the circuit shown in those previous […]

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.