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.
Output from the circuit was seen on the digital oscilloscope.
My 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.
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 email@example.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:
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.