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
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 3.3V -> Arduino 3.3V
- AD8232 OUTPUT -> Arduino A0
- AD8232 GND -> Arduino GND
To display the results on Matlab, the following steps must be followed:
- Connect the Arduino to the laptop
- Run Arduino IDE and open ad8232.ino
- 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:
- In the script ad8232.ino change (on line 87)
bool enable_FFT = false;
tobool enable_FFT = true;
- Upload the firmware to the Arduino
- Quickly go to Matlab and run arduinoSerialConnector.mat script
Wait a few tens of seconds to see the results...