Skip to content

Development of an embedded system based on Arduino microcontroller to analyse Heart Rate Variability and compute its Fourier transform. The FFT results are sent through the serial port and then read by Matlab, which estimates the Local Power Spectral Density.

License

Notifications You must be signed in to change notification settings

duecce/ArduinoHRVAnalysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ArduinoHRVAnalysis

Development of an embedded system based on Arduino microcontroller to analyse Heart Rate Variability and compute its Fourier transform. The FFT results are sent through the serial port and then read by Matlab, which estimates and shows the Local Power Spectral Density.

Authors: Andrea Arcangeli, Martina De Marinis

Hardware

This device uses the following components:

  • Arduino MKR1000 (MEGA/Uno/MKR1010 are equivalent)
  • AD8232: single lead heart rate monitor

The 3 electrodes connected to the AD8232 are placed on the right arm, the left arm and the right leg. ad8232

AD8232 -> Arduino pin mapping

  • AD8232 3.3V -> Arduino 3.3V
  • AD8232 OUTPUT -> Arduino A0
  • AD8232 GND -> Arduino GND

To read and show data on Matlab

To display the results on Matlab, the following steps must be followed:

  1. Connect the Arduino to the laptop
  2. Run Arduino IDE and open ad8232.ino
  3. Run Matlab and open ArduinoSerialConnector.mat script and edit this line:
arduinoObj = serialport("XXX", 115200); 

with the correct COM port ('if you are not using Windows operating system, enter the correct port name'), eg: With Arduino connected on COM10 port:

arduinoObj = serialport("COM10", 115200); 

So, in Arduino IDE:

  1. In the script ad8232.ino change (on line 87) bool enable_FFT = false; to bool enable_FFT = true;
  2. Upload the firmware to the Arduino
  3. Quickly go to Matlab and run arduinoSerialConnector.mat script

Wait a few tens of seconds to see the results...

Examples of displayed results

Subject status: rest fft_hrv_relax

Subject status: alert fft_hrv_alert

About

Development of an embedded system based on Arduino microcontroller to analyse Heart Rate Variability and compute its Fourier transform. The FFT results are sent through the serial port and then read by Matlab, which estimates the Local Power Spectral Density.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published