Skip to content

Measure an electrocardiogram (ECG) with an Arduino Uno and an Olimex-EKG-EMG-Shield and calculate the heart rate variability afterward.

License

Notifications You must be signed in to change notification settings

Yleisnero/olimex-arduino-ecg-and-heart-rate-variability

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Measure an ECG with an Arduino Uno and the Olimex-EKG-EMG-Shield and calculate the heart rate variability

For the measurement of the heart-rate-variability it is necessary to measure an ECG first. This is done with three electrodes attached to the left arm, the right arm and the left foot. Those electrodes are the inputs for the Olimex-EKG-EMG-Shield, which is used as a hat for the Arduino Uno Rev3.

how-to

  • Put the Olimex-EKG-EMG-Shield on top of the Arduino

  • Attach the Arduino Uno to the computer

  • Upload the olimex-shield-data-collector.ino to the Arduino

  • Plug in the electrodes and attach them to the subject

  • Run the data-receiver.js inside a node.js project

    npm install serialport
    node data-receiver.js
    
  • Check if the port is specified correctly in the data-receiver.js script

  • An output txt file will be generated

  • Use the file as input for displayData.m

(simpler version of a ecg plotter: olimex-serialplotter.ino

ecg signal

hrv-bar

heart-rate-variability

hrv-bar

hrv-bar

iir-notch-filter

hrv-bar

r-peak-detection

hrv-bar