ECG: measure your heartbeat 14


Its pretty interesting to measure ones heart beat. A lot of fancy analog circuitry is needed for this. But fortunately there is a Arduino shield for this: the SHIELD-EKG-EMG from Olimex.

ECG wiring

ECG wiring

Hardware:

– EKG/EMG shield (price: ~24€), Manual: [Link]
-SHIELD-EKG-EMG-PA – passive electrode for SHIELD-EKG-EMG shield (price: ~12€)
-Olimexino-328 – Arduino Like Development Board (price: ~26€)
-some waterbased lube to improve conductivity with the electrodes

Software:

-Olimexino-Firmware: [Link], be sure to also install the libraries (TimerOne, FlexiTimer2), see manual for more information
-visualisation software – ElectricGuru: [Link]

Preparation:

-OLIMEXINO-328: remove the wire between the R6 pads, this is important, otherwise you will damage your ecg-shield!
-SHIELD-EKG-EMG: jumper settings
REF_E – closed
3.3V/5V – 5V position
D4/D9 – D9 position
ANI_SEL – 1 position (channel)

-connect the shield to the board
-connect OLIMEXINO-328 to the PC
-compile and upload the ShieldEkgEmgDemo.pde
-start the ElectricGuru software, open Preferences –> Serial Port, choose the Arduinos port; open Preferences –> Trace, select just channel 1 and maximize the height
-wire yourself to the electrodes: to your right arm, left arm and the DLR to your right leg
-connect the electrodes to the ECG-shield
-apply some lube to your arms and led between the electrodes and your skin
-ElectricGuru: click the Start EEG button

Results:

If the conductivity is bad, you might get a noisy image like this:

Electric Guru: noise

Electric Guru: noise

Otherwise, if everything works fine and you are still alive, it looks like this:

Electric Guru: ecg

Electric Guru: ECG


Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.

14 Gedanken zu “ECG: measure your heartbeat

  • Radu Caramaliu

    Hi ,

    I am using arduino uno and can’t get anything but noise . What might be the poblem . When u say lube , what do you mean ? is plain water good enough ?

  • Ren

    Hi …
    With this code, can i count de heart beats five in five seconds ? I’m using arduino uno and i made some codes but all codes not works for me …
    Regards

  • Ren

    @SES: Yes, i know the code that you used in the example. But with that code i can’t count the hearth beats. I’m trying to make a code that do that but i´m not getting.
    Thanks for your answer

    • SES

      @Ren: counting heartbeats with this sometimes very noisy signal can be tricky. if you just use some simple threshold descision, you might get false results as well. but this might be a good start.

  • Kiarash

    This is really impressive! I just had a quick question for you. Is there any way that I can save the waveform data to a CSV or other format so that I can process it somehow?

    Thanks,

  • joe50

    Yeah hi everyone especially SES,

    I was just wondering how you changed the measured bandwidth of frequencies in the ElectricGuru program. In your graph I see a width of 0-35Hz „Magnitude“ whereas my program shows 0-65Hz. If I could cut out at 49Hz, the background noise would be eliminated.

    Thanks for any help!

  • Kenn Stern

    HI – I’ve installed all needed libraries and code. Unfortunately, I’m not getting any kind of waveform. If I tap the sensors, it shows up in Electric Guru, but if I simply sit still I get nothing in the waveform. There does seem to be activity in the graphs in the lower portion of the presentation, but I am not a medical professional and cannot interpret those. I’ve defaulted all the Electric Guru settings, and I’m running on COM2.

    I’ve tried using both water and vaseline between skin and contact, but no luck. It’s almost as if it is not sensitive enough to pickup my heartbeat. Any suggestions?