cardio disease detector

arduino / processing / electric circuit



This is a program that we use aduino Uno Board to make a system to detect human’s cardio disease. We use ECG Sensor AD8232 to detect the electrocardiogram and use code to form the database of wave data of the common cardio disease, so we can compare the electrocardiogram that has been detected by the AD8232 and inserted into the program as wave data with the database to check the abnormal data of the wave to make sure is there any disease.

We use AD8232 to read in the wave data of electrocardiogram, and put the data into a link list to compare. And first we need to find out the peak of every wave to fix the position.


This is what a electrocardiogram waveform looks like. First, we need to find out the highest
wave ,wave R, and then find the first low wave, wave Q. And the lower wave after wave R is wave S, the higher wave before wave Q is wave P.

Wave R is the highest wave in the electrocardiogram. In order to detect wave R, we need to calculate the slope of every point and to calculate the threshold value. To detect the wave R in the point the which its slope value is greater than the threshold value to avoid misrecognition of wave P and wave T as wave R. We use formula 4.1 to calculate the slope value.

Screen Shot 2018-06-27 at 1.07.12 PM.png

Second, we can find the maximum slope value of the first 250 point, to define the initial value of maxi. And after our experiment, when the thresh_param is 8 the value is the closest to the correct data.

Screen Shot 2018-06-27 at 1.07.17 PM.png

When there are two values of point which are greater than slope_thresh, it is the beginning to detect wave QRS. And the maximum wave that we find is wave R. We use the wave value of wave R and

the onset value of QRS into the formula 4.3 to calculate the value of first_max.

Screen Shot 2018-06-27 at 1.07.23 PM.png

When every wave R is detected, the maxi value need to update.

Screen Shot 2018-06-27 at 1.07.28 PM.png

This is the arduino Uno Board:


and this is ECG Sensor AD8232 that we used

0 UGE Heart Rate Monitor AD8232-b-500x375.jpg