HRV Team Fall 2020

HRV Team Members: Maddie Gordon, David Bat, Harris Barton, Stella Nantale

The HRV team had the following semester goals:

  • I want the team to build the actual ECG from scratch(without the use of a Bitalino)
  • The next weeks should be taken to code the device, to turn the ECG into an HRV. Although we already have functional Matlab code, it requires us to use Excel as an intermediate, so we are trying to collect data with no “middle man”. We will do this coding in Python
  • After we get the code working, we want to briefly test the device before proceeding to make sure we can make corrections before making irreversible changes to the device. 
  • After testing, we want to go to the Hive to turn the circuit we made into a PCB to make it take up less space. This should take around two weeks. 
  • Finally we want to make a case for the device

During the course of the semester, we got the first three goals done. We were on track to get the last two goals done too as well, but COVID froze the team’s budget. Although we could have gotten PCBs printed by the HIVE, when we went to the Hive, they told us that the PCBs they make there are not as accurate as from ordering from a company. David has done research on the specific type of PCB we need-this can only be done next semester as BTAP’s budget is frozen right now.

Here is the circuit diagram for the HRV:

After researching areas for noise in the ECG, we determined that our cut-off frequencies for the low pass filter had to be 520 Hz and for the high pass filter had to be  75 Hz. To achieve this cutoff frequency, in the low pass filter, we used a 10kOhm resistor and a 220 microfarad capacitor.  For the high pass filter we used a 510 kOhm resistor and 103 zfarad capacitor.



As seen in the picture above the ECG leads are not placed in normal location. Usually there are two placed on the chest near the heart and one is on the hip bone. Following Einthoven’s Triangle as long as two leads are equidistant from the heart and the third lead is on bone, the ECG data should be gathered correctly. Ideally, to make the device more “invisible”, we would need longer ECG cables which would attach to each shoulder, however, we were unable to obtain these due to budget freezes. This will be a component of the device next semester.

After this device was done, the team worked on turning the Matlab code into Python code. While this sounds like a seemingly simple task, there’s a little more to it. In previous semesters, we had to save the data from the ECG into Excel and then use Matlab to analyze the data. This in our opinion, would be too inconvenient for a clinician, and as a result, we wanted to create code which could record data in real time. We used a Python script to automate the data parsing for us. Currently this still requires the clinician to run the code and have an IDE on their computer. The next step would be to create a website, maybe through Python Flask, which would allow the researches to collect and analyze all the data with simply the press of a button. This would completely automate the process and allow a clinician with 0 coding experience to analyze stress data with ease.

This code is written in the link below:

python

Future Work for Next Semester:

  • Order Printed Circuit Board
    • https://jlcpcb.com/
    • Cost is 5-10$
  • Order Longer Leads  so that device can easily be used on upper arm/ankle
    • https://www.amazon.com/Type-Data-Source-Cable-Wires/dp/B07RPGHBBN/ref=sr_1_4?dchild=1&keywords=ecg+leads&qid=1600383317&sr=8-4
    • Cost is 50$
  • We want to create a case for the device to give a more professional look and to shield the PCB from its surroundings
  • We want to carry out an actual statistical test for accuracy once campus is opened up and we have access to ECGs from a professor we had previously contacted
    • 1-way ANOVA test