GithubHelp home page GithubHelp logo

duecce / arduinohrvanalysis Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 32 KB

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: GNU General Public License v3.0

C++ 89.57% MATLAB 10.43%
arduino bioengineering biomedical-engineering fft-analysis heart-rate-variability

arduinohrvanalysis's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.