nonzero.ca

Previous: Currently Jan 18
Return to: Main
Next: Currently Feb 05 2006

February 05, 2006

Electrocardiogram

I spend so much time staring at my heart rate that I decided I wanted to have a more detailed look at it. I came across a couple of interesting websites describing little projects that people had done to produce their own ECGs. Some of these people had some crazy motivations, but mine was mainly because it was Sunday, it was raining, and I was bored.

Now, any doctor-types or electrical-engineer-types out there are going to laugh wildly at the complete hack-job I did of this and I must also put this warning out: This was a really stupid thing to try to do. In fact, I strongly recommend that you DO NOT do try this yourself at home. I hooked myself to three electrodes and then I connected those electrodes to a home built power supply, an oscilloscope, a complete hack-job circuit, and a personal computer. I was careful but you must remember that a tiny current can kill you and therefore a tiny screw-up can have very serious consequences. Professional ECG machines have all sorts of safeties built in that my homebrew circuit most certainly didn’t.

I managed to obtain some nice sticky 3M electrodes. These made things very easy. They stuck perfectly to my skin and conducted without the need for any type of conductive gel. In retrospect, I should have paid much more attention to the placement of the electrodes. The position has a large effect on the final reading that you get from your ECG. In the picture, you can see two electrodes on my chest. There is a third on my hand which acted as a ground point.

yo.JPG

The next picture shows my setup. It’s very rudimentary. Your heart produces a voltage somewhere on the order of 1 mV (a very tiny voltage). So to be able to read this voltage I put together an instrumentation amplifier that gave me a gain of about 1000. I fed the output of this amplifier to an oscilloscope for debugging and then once it was all working I hooked it up to an analog to digital converter (DAQ) which conveniently connected to my PC through USB. I had some old software I modified to read the DAQ at 1000Hz (way overkill).

work.JPG

There’s no doubt that I did things way too quickly and should have thought things through much more thoroughly. I used no filtering in the circuit; instead I post-processed the data in Matlab. Like I said before, I should have played around with the position of the electrodes to get a better signal.

So that is the output from my heart. You can look all over the web for information on how to interpret it if you’d like. All I can tell is that my heart is beating at about 72bpm which sounds about right considering. I think that the ECG output I got is all rather meaningless though because of the poor electrode positioning. The vertical axis does refer to a voltage, but it shouldn’t be compared to anything because of the gain used in the instrumentation amplifier and the filtering done to the signal.

At this point I have sort of given up on this project. I originally had lots of big ideas like hooking myself up to my homebuilt ECG while I was doing a power-output test on my home bicycle trainer. But, thinking about all those wires and then putting myself onto what is literally a static producing machine didn’t seem like such a good idea.

Posted by Alistair Howard at February 5, 2006 09:23 PM

Comments

Didn't shave that chest, first eh? Great post!

Posted by: Jeff Werner at February 5, 2006 11:45 PM

Sounds like a new instrumentation lab.

10/10!

Posted by: Dustin at February 6, 2006 08:57 PM

I'm impressed you had that much modivation on a Sunday. I find it hard enough getting out of bed!

Posted by: Dave at February 7, 2006 07:50 PM

Very cool. Careful with the alligator clips... much more painful than electricity.

Posted by: Shawn at February 8, 2006 12:02 AM