DIY ECG EKG Portable Heart Monitor

Trying to capture a trace of my very occasional heart palpitation has proven to be nearly impossible. Being keen on electronics, I thought I would make my own ECG (ElectroCardioGram) monitor.
This is intended to be a fun project, not a replacement for a proper ECG. A hospital ECG will likely be a “12 lead” monitor (which actually only has 10 leads due to sharing). This monitor has just two leads, which are placed over bony areas of the chest (sternum and lower-left rib).
The project was fun - circuit design, PCB manufacture, Arduino coding, datalogging, LCD screen, 3D printing, data analysis, etc.
This is not intended to be a full, step-by-step guide. I think you really have to know a little bit about what you are doing in each area listed above. I will try to give enough information to give people the confidence to have a go. There is nothing particularly hard here. This is not a finished, polished piece of kit - more a fully-working prototype.
The finished project, consists of a portable plastic box, with a colour LCD screen which shows the live ECG trace. It has connectors for the electrodes and has a slot for a micro SD Card which stores the data. There are four AA cells inside the box - it is fully self-contained. It has a real-time clock so that the heart data can be labelled with time-of-day and date.
The SD Card holds the voltage data which forms the ECG trace. There is no indication of absolute voltage, but there is an accurate 1-second time-base embedded in the data. The data is stored as a plain text string of numbers, each on a separate line (ie CSV). It imports straight into a spreadsheet.
Safety is paramount, don’t put electrodes on your body when they are in electrical contact with ANYTHING connected to the mains (including the USB Arduino Programming lead). Be wary of similar projects which use a serial monitor to display the results - possibly connecting your body to the mains via a USB lead.
Disclaimer: Never connect this project to your body without having the finished project comprehensively checked by a fully-trained medical equipment technician. Ask him/her to issue you with an electrical safety certificate. “

Link