DIY Propeller-based ECG

propeller_ecg

[Ray] likes to build all sorts of Propeller-based projects, but one of the more interesting items we came across was this DIY ECG. While we have covered other DIY electrocardiograms before, he left the breadboard behind and put together a nicely done PCB for his build.

The ECGs design should be pretty familiar to anyone that has seen our ECG coverage in the past. The user places his thumbs on the large built-in pads, which allow the circuit to sense the electrical signals produced by heart’s contractions. These small electrical impulses are then amplified using an AD627 instrument amplifier before being further amplified via a dual op-amp.

The amplified signal is filtered and then fed into the Propeller’s ADC, which displays the user’s heart rhythms via an LED. The data can also be fed into a computer via an optoisolated serial connection.

[Ray] lays out a litany of warnings and precautions that should be followed before downloading his schematics and firmware. We have to echo those warnings, as it doesn’t take a large well-placed shock to disrupt the heart.

18 thoughts on “DIY Propeller-based ECG

  1. Wow, really nice!The pads on the circuit board itself is a nice idea which simplifies things alot. The one bit I don’t understand is the warning about disrupting the heart at the bottom of the post, since its powered by a 9V battery isn’t the risk the same as just putting two fingers across the terminals of a 9V (none basically :P)?

    1. Through skin you are right. But safety costs nothing and saves a lot.
      A 9V Battery can kill. Say if you have an open wound on both thumbs, it is rumoured that the resistance of blood is low enough to allow 9v to come to a level where 9v will disrupt the heart. While i do not know the truth of this. It is possible.

  2. I got an email a few months ago about a portable ECG that connects to an iphone. I hope people keep in mind that this is only giving you a limited view of the heart, and can not detect acute myocardial infarctions(heart attacks), and
    many other arrhythmias. ECGs are a tool we use that is not complete with out medical training. I fear if they become too main stream people will use them as the deciding factor for if they call 911 or not. Keep in mind if I show up with my several thousand dollar 12 lead ECG even that only gives me a small piece of the information I need to properly treat you. I’ve had plenty of patients show a clean ECG, but when I get them to the ER and their cardiac enzymes are checked I find out they are in fact having a AMI(heart attack).

  3. I should also say nice hack, and thanks for sharing. I love these projects just hope everyone keeps in mind this is nothing more then a cool toy that will tell you nothing about your current or future health.

  4. I haven’t checked out the project yet, but I used to work at a company called “Healthdyne”, and they made baby monitors, for SIDs.

    One of their tricks to prevent shock (or ensure against it) was to use some sort of constant current, or current limiting diode. They couldn’t provide more than a few micro amps without blowing, so, problem solved.

    Another trick, was a simple DC/DC converter. In their case, it provided power, but it also provided a signal that had the ECG/resperation impressed upon it. The motherboard “decoded” that signal and separated the two out for amplification etc…

    So, like was mentioned, safety is easy.

  5. The funny thing about this is that the Propeller is perfectly capable of using the A/D data to generate a full video ECG reading and putting it up on a VGA or NTSC monitor. (Of course you’d have the voltage isolation issues with the monitor, but there are cheap turnkey solutions for that at least for NTSC.) Such an arrangement would actually answer isellens legitimate complaint that this isn’t much of a diagnostic tool. If all you want is pulse, you can get that with an IR LED and phototransistor beaming through a finger, and you don’t have the voltage isolation issues.

    1. Well my point is ECGs are really only useful in the hands of a trained professional. I can teach anyone to read ECGs its not difficult. Reading the ECG is just a small part of the diagnostic process. Also this is using a limb lead. It only views one part of the heart. Viewing it in real time on a monitor still wouldn’t make it any more of a diagnostic tool. I mainly use a limb lead during cardiac arrest. There are only a few other insistences that limb leads are really that useful. There is a lot about this that I can’t quickly explain in a post, but to make one more point the strip in the video has so much artifact (interference) it wouldn’t be of any use in the hands of a cardiologist, me, or any of you.

  6. Ok so I’m searching google for someone else in the medical profession (pref a doctor) that thinks these devices are a dangerous idea. A google search of “iphone ECG” just turns up thousands of news articles about how amazing and revolutionary the device is. Only doctor I can find giving his take on it is the quack that’s backing the thing who will profit monetarily from it. I can’t imagine I’m the only person who thinks this. Should be loads of doctors peeping up to warn this is not accurate, diagnostic, or any kind of a wise idea what so ever… If any MDs read hackaday I would love to hear what you think about patents running and interpreting there own ECG on an iphone.

  7. I had no idea that any e fields from the heart could be read from the fingers of only one hand, yet with muscle movement of the fingers etc. I hacked one of the battery operated ir ppg devices to close a dip relay on each beat. I can hook it up to anything without fear. Strobe light, kick drum synth etc.
    Yes a single cell can kill thru a catheter and some other internal point. When I was 8 I could taste-test flashlight batteries. Still ticking nominal.

  8. First, nice project that have been done there.

    Second, I think the reason as of why they are a good idea is that if there is someone or one self are having an hart attack, you can see if there is a pulse. Because if you just are using your fingers to take a pulse, then the changes that is your own pulse you detect. Then if you can use a device like that, then you eliminate one error and can begin to give the correct help before the hospital…. Well thats my two øre…
    And I wish everybody in here a good day (its morning where I am )

    1. Not true. First of all, if they are able to place their fingers on the pads they probably still have a pulse. If not, you have to press them and thus short the signal/ introduce your ECG onto them.
      But most importantly: You DO NOT CHECK FOR THE PULSE IN EMERGENCY SITUATIONS. You check for breathing! If there is no breathing their pulse will stop anyways. Therefore: No breathing–>CPR!

  9. Cool little device. Nice work.

    With regard to how much energy does it take to kill you, the numbers vary widely based on factors such as age, weight, body fat, skin conductivity, pressure, electrode shape & size, and a few dozen others I’m missing. All you have to do is interfere with the electrical signal in the heart that causes it to contract. If you disturb it, the heart can go into irregular beating (arrhythmia or fibrillation) and the patient dies if it is not corrected.

    Some numbers to put it in perspective:

    An internal defibrillator uses between 5-10 joules of energy, external starts at 150 and works up to 360 or so. A pacemaker uses on the order of 10 micro joules.

    1 joule = 1 watt second.

    A typical cardioversion shock (from a defibrillator or pacemaker) lasts 5-10 microseconds.

    1 red led is 20ma @ ~3v = 3*.020 = 60mw (consumed)

    Turning that LED on for one second consumes 60mw seconds >> 10 micro joules.

    Still think you can’t kill with a 9v battery? It is all a matter of placement. Sticking it on your tongue doesn’t kill you because the current/voltage never gets near your heart. Sticking it on your skin, even limb to limb doesn’t (usually) kill you because your skin (especially wet) conducts very well. Defib pads are placed on the chest so that some small amount of current manages to pass through the heart. Getting it just right, well, that’s actual science. :)

    So, net net, always play safe, use plenty of isolation, and if in doubt, don’t use something like this.

    There are plenty of commercial ‘at home’ products out there that will take your pulse, even graph your heartbeat, and have been through rigorous testing. But if you think you are having a heart (or any other medical problem), call the trained personnel and get it checked. They have advanced technology, training, and experience to make a determination.

    As an EMT, one of the leading contributors to death that I see is stubborn. Too stubborn to go to the Dr/ER. The number of deaths and MI’s I have attended that had been preceded by someone not feeling well for _days_ (and they almost invariably call us at 3am) is large. The other is stupid. Aside from the ‘Hold my beer and watch this’ crowd, are those who think they can’t get hurt by something. This falls into that category.

    1. *shrug*

      I’m not going to be any more concerned about the safety aspects of this hack than I would be of any other hack that operates at 9V.

      I mean, it’s interesting to see the power output of a pacemaker and all, but it is indeed all about placement. And it’s a long way from a pacemaker to a fingertip.

  10. I worked in a hospital and asked one of the biomedical engineers who maintained the OR equipment including ECGs about electrocution He said what’s really bad is when a shock is delivered during a very specific phase of the heart. I forget which phase, or if it was a specific part of the “QRS Complex” of the heartbeat, but basically it was a very brief period during which, if a shock were delivered, the heart would just shut off. I believe the guy because of his credentials, so thought I’d pass it along.

    He also said the heart’s electrical box “operated” at 60hz, which was a bad coincidence given that US wall current is at 60hz also, but maybe I misunderstood him.

  11. The phase you’re thinking of is when the ventricles are repolarising, demonstrated by a T-wave on the ecg, a round complex (usually) following the QRS complex. A shock to the heart at this point can make the ventricular activity choatic and extremely rapid (ventricular fibrillation) the heart is no longer an effective pump at this point and is rapidly fatal unless a very immediate shock is given.

  12. We call it “R on T” effect. In the Cardiac cath lab, they actually initiate an R On T to set the Patients heart into V-Fib to test a new implanted pacemaker/defib. Its quite interesting to watch, and quite literally, heart stopping!

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

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