Sound Card ADCs For Electrocardiograms

Every few years, or so we’re told, [Scott] revisits the idea of building an electrocardiogram machine. This is just a small box with three electrodes. Attach them to your chest, and you get a neat readout of your heartbeat. This is a project that has been done to death, but [Scott]’s most recent implementation is fantastic. It’s cheap, relying on the almost absurd capability for analog to digital conversion found in every sound card, and the software is great. It’s the fit and finish that makes this project shine.

The hardware for this build is simply an AD8232, a chip designed to be the front end of any electrocardiogram. This is then simply connected to the microphone port of a sound card through a 1/8″ cable. For the exceptionally clever, there’s a version based on an op-amp. It’s an extraordinarily simple build, but as with all simple builds the real trick is in the software. That’s where this project really shines, with custom software with graphics, and enough information being displayed to actually tell you something.

We’ve seen a number of sound card ADCs being used for electrocardiograms in the past, including some from the Before Times; it makes sense, sound cards are the cheapest way to get a lot of analog data very quickly. You can check out [Scott]’s demo video out below.

15 thoughts on “Sound Card ADCs For Electrocardiograms

  1. Shouldn’t there be some isolation between the ECG circuit and the sound card to prevent leakage current? Using a battery to power the ECG circuit is good, but plugging the thing into your desktop PC seems to be questionable.

      1. Safety comments about isolation are well founded. This is not an old metal encased drill you can just let go of if something goes wrong. This is connected directly to your body. There is a very good chance nothing will ever go wrong, but if something does, it was nice knowing you. There is a reason medical electronics are built the way they are.

        1. More than likely, the computer you use may be connected to a socket without a ground, or the grounding has failed, at which point the ATX power supply will leak some current through the microphone ground socket to your body to whatever you happen to touch.

          Normally, if you run your hand over a PC case in a non-grounded socket, you feel a slight tingle and maybe a little pinch. If you’ve strapped your chest and legs with wires and you run the same current through yourself, you may cause muscle spasms and injury.

      1. The other way around. Laptops are “safe” because their power bricks are galvanically isolated.

        Desktop machines are unsafe, because the grounding of the socket may have broken off, or the computer is connected to a non-grounded socket, or the house is wired incorrect (or old style) and there’s significant voltage differences between the ground pins of different sockets around the house (ground loops).

        The grounding in the socket is only meant to cause the fuses to pop when a device develops a fault to the chassis. If you connect yourself to the ground, you become a path to the ground and that’s a highly dangerous situation.

    1. How different is this from using a grounding strap to ground yourself to your computer chassis? …other than the ECG pads being connected through an extremely high impedance pathway, and the grounding strap seeming more dangerous?

  2. About medical equipment electrical isolation. This guy is a DMD (dentist) and is a neuro-research PhD. And the particular IC being used is designed to meet IEC60601-x stuff if you design per the IC application notes.

    Best practices would be to float the scope and computer with an iso transformer of very low capacitance, and use series impedance in signal lines to limit leakage to 10uA.

    And in case you do not remember, HaD is the land of the libertarian designer: let them eat cake, and those that live by the sword die by the sword. Have I missed a more appropriate metaphor or idiom or allegory?

      1. Isn’t that just the maker version of natural selection? ;-)

        Ok, it’s not perfect but explaining every possible danger at every opportunity is very impractical too and there is no definitive line drawn on how much knowledge needs to be conveyed…. (at least in this non-professional environment).

  3. Great project, video and details regarding. Now for Scott to heal up better than before and produce some more neat electrophysiological signals cost effective devices and other medical devices even. Awesome work!

    Cool to search the different electrophysiological signals devices on Hackaday also. This one modularized seems neat to and wondering if can be done more cost effectively?: https://hackaday.com/2014/08/13/an-open-hardware-platform-for-ecg-eeg-and-other-measurements/

    Thanks for sharing!

  4. Yes every test that you do on your body or someone else it should be done with the proper safety isolation equipment.
    But money is the prime thing behind the proper safety equipment.
    Me to get the proper isolation equipment would cost way way to much money that I would not have.
    So If you don’t have that extra 2 – 3 thousand dollars then I guess you should not be doing anything that you can not do safely isolate from the mains power..
    But I guess you could get away with connecting your scope and any other 120v – 240v device to a inverter connected to a 12v battery.

    I am a electrician and in the olden days here in Canada, And a long time ago ( Like around the 70s ) In some insalations of electric stoves they would connect a isolation transformer in front of the stove.
    And if you are thinking of using one of these old stove isolation transformer, I know I would not think that. That thing would be 30 to 50 years old.

    But we are hackers and we can only do what we can.

    Love the project. Keep up the good work.

    1. Re: The Stove transformer, as I am not a Canadian, expect that it was not an isolation transformer, but a step-up or step-down transformer. These are never isolated as it is not needed and expensive in the amount of copper needed.

Leave a Reply

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