Collect and analyze ECG data

posted Aug 22nd 2009 12:00pm by
filed under: downloads hacks, Medical hacks, peripherals hacks

ecg

Although we’ve covered DIY ECGs before, [Scott Harden] sent in his version that gives an in-depth explanation of what to do with the collected data. He built a basic battery-powered op-amp-based ECG for under $1. The circuit just amplifies the signal from the chest leads and feeds it into a computer via the microphone port. He then used GoldWave to record, filter, and save the signal. From there, he used python to analyze the heartbeat and calculate his heart rate and further manipulate the data. His previous blog posts go into more detail on how the python code works and why he chose software over hardware filters.



14 Responses to Collect and analyze ECG data

  • Be VERY careful with this, you will have a really good electrical connection to some very expensive equipment that’s really hard to replace.

    For the dense of you: That means you could easily die from simple mistakes with this.

    Some opamps will output the supply voltage if ony one half of the powersupply is hooked up.

    If the PC is improperly grounded, you’ll get several hundred volt on the chassis.

    Safety is hard, you don’t want to be hooked up to an good path to ground if you happen to touch a live wire, but on the other hand you want to ensure that any nastyness coming in via the output isn’t allowed to flow into the test subject.

    I’d probably not feel safe unless:
    * The output was run though an optoisolator.
    * The inputs are all clamped to common using diodes, so it’s absolutely certain that the device can’t output more than 0.7 V even in the worst case failure mode.
    * The entire device should be packaged securely in an isolated case, so no lose wires can poke into it.

  • Badeye says:

    Dude, congrats…Very impressive!

  • strider_mt2k says:

    -and don’t forget fresh batteries in your smoke detector.

    -what?

  • sebastian says:

    I completely agree with Flemming Frandsen. Be carefull when trying something like this. With a device like this you intentionally create good conductive connection to a persons body. Don’t fool around with things like this if you don’t know what you are doing!
    A friend of mine and myself built something like this a while ago: http://www.soa-world.de/echelon/2008/12/simple-ecg-amplifier.html

  • Scott says:

    People tend to freak out about safety issues with this project. Being safe is good, but you have to be CONSISTENTLY safe! If I made a battery-powered tone generator circuit which outputted a sine wave to the microphone jack of the sound card, would people be jumping up and down warning people not to build it because if they touch the wrong locations they could die? The ECG functions fine using a light touch with a single finger of each hand (you don’t need high conduction chest leads). I fail to see a significant difference. If you’re obsessed with safety, more power to you! … but apply the same logic to all your projects

  • eric says:

    If you’re worried about the direct electrical connection to the PC, use an opto.

  • andrew says:

    optoisolator = problem solved.

  • snoop911 says:

    anyone know of a diy sensor that measures brain waves?

    Something like what’s used in sleep centers, or on the myzeo?

  • Scott says:

    Is this project more dangerous than plugging headphones into your PC and placing them on your head?

  • arnav says:

    dude this is best.
    :)

  • Dider says:

    Hi,

    Did somebody tried this?
    I had and i cant get it to work.
    I’m just getting a little noise and thats it!

  • Leave a Reply

    XHTML: You can use these tags: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

    Hack a Day serves up fresh hacks each day, every day from around the web as well as hacking related news.

    Send us your hacks










         




    Hacks

    Resources