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
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
Otherwise, if everything works fine and you are still alive, it looks like this:

Electric Guru: ECG
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 ?
@Radu: you might need to increase the conductivity of your skin, use lube or some water between your skin and the electrodes
I am looking for part numbers of those sensors used in the heart pulse..would you tell me any types?
Regards.
@Oscar: the electrodes for the ecg shield have this part number: SHIELD-EKG-EMG-PA. If you mean the project „heart pulse“: i don’t know.
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: I was just using the Olimex firmware so far. This should work
@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
@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.
I get nothing after starting the application
please help me to downlode arudino library 🙁
Dear SES,
Olimexino-328 has the USB output but the 3.5mm jack is not there in the Olimexino-328 board. May I know what should I include to give input to Olimexino-328 board through 3.5mm Connector.
Please Reply.
My Mail ID is kaviarasu.kk@gmail.com
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,
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!
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?