This project is electronic blood pressure monitor research platform with Oscillometric method, include SBP and DBP estimate algorithm, Atrial Fibrillation detection algorithm, calibration curve, GUI tool for fine-tune BP algorithm...etc, ofcourse, this is research use only.
The oscillometric method was first demonstrated in 1876 and involves the observation of oscillations in the sphygmomanometer cuff pressure which are caused by the oscillations of blood flow, It uses a sphygmomanometer cuff, like the auscultatory method, but with an electronic pressure sensor (transducer) to observe cuff pressure oscillations, electronics to automatically interpret them, and automatic inflation and deflation of the cuff. The pressure sensor should be calibrated periodically to maintain accuracy.
A new analysis of relevant anatomy, physiology and physics reveals the mechanisms underlying the production of cuff pressure oscillations as well as a way to extract systolic and diastolic pressures from the envelope of oscillations in any individual subject. Stiffness characteristics of the compressed artery segment can be extracted from the envelope shape to create an individualized mathematical model. The model is tested with a matrix of possible systolic and diastolic pressure values, and the minimum least squares difference between observed and predicted envelope functions indicates the best fit choices of systolic and diastolic pressure within the test matrix.
In practice the different methods do not give identical results; an algorithm and experimentally obtained coefficients are used to adjust the oscillometric results to give readings which match the auscultatory results as well as possible. Accurate extraction of systolic and diastolic pressures from the envelope of cuff pressure oscillations remains an open problem in biomedical engineering. Since many oscillometric devices have not been validated, caution must be given as most are not suitable in clinical and acute care settings.
via wiki.
- Blood Pressure Measurment - Systolic, Diastolic, Mean
- Atrial Fibrillation Detection - Irregular Pulse Peak , Irregular Heart Beats
- GUI Toos - Algorithm Finetune
- ADC Clibration to Mercury Manometer Pressure - Polynomial Curve Fit
- RAW Data Record
Project create is Eagle PCB 8.1.0 .
V2 version, D1(BAT20) should be replaced with zero ohm resistor.
- Electronics
- TB6612FNG (for PUMP and VALVE PID control)
- MPS-3117-006GC A2/A3(MEMS Wheatstone Bridge)
- Mechatronic
- 3V DC Air Pump Motor(JQB032-3A or DQB030-A-3V)
- 3V DC Electric Solenoid Valve(JQF1-3C1/DC3V Mini 10mm*15mm)
- Cuff and Tubing
- 2mm*4mm Silicone Rubber Tubing x 2(20cm~30cm, for wrist cuff input and output)
- 2mm*4mm Silicone Rubber Tubing x 3(5cm~10cm, for T Type connector)
- 2mm*3mm T Type Plastic Barbed Connector
- 2mm*3mm Straight Plastic Barbed Connector x 3
- Wrist Air Cuff Input/Output(2 pinhole 2mm~3mm)
- J1, J2 pin1 connect to pin2 - battery2 charge
- J1, J2 pin2 connect to pin3 - motor drive with independent power supply
- JP1 pin1 connect to pin2 - motor drive with VCC
- JP1 pin2 connect to pin3 - motor drive with independent power supply
- 1.cd src/BPM
- 2.make
- 3.load main.elf
PWM_Freq is DC Motor PWM frequency.
TIM_Prescaler = (168M/2)/1M = 84M
TIM_Period = TIMER_PWM_MAX/PWM_Freq = 1000
TIM = 84M / TIM_Prescaler = 1M
TIM = 1M / TIM_ClockDivision = 1M
1M / (TIM_Period + 1) = 1000Hz (1ms)
const uint16_t PWM_Freq = 1000;
ARR = TIMER_PWM_MAX;
CCR = 0 to TIMER_PWM_MAX = 0 to 100% PWM.
In this case, PID PWM step 1 to 100 mapped to 100000 to 1000000.
TIMER_PWM_33 and TIMER_PWM_40 is 33% and 40% PWM for calibration hand control.
const uint32_t PID_PWM_MIN = 1;
const uint32_t PID_PWM_MAX = 100;
const uint32_t TIMER_PWM_MIN = 100000;
const uint32_t TIMER_PWM_MAX; = 1000000;
const uint32_t TIMER_PWM_33 = 330000;
const uint32_t TIMER_PWM_40 = 400000;
This is PID parameter, you need to redefine in ResetMeasurementParameter() function.
Kp = 2, Ki = 0.3, Kd = 0.001; // for JQB032-3A
AC signal amplitude point of Systolic and Diastolic BP.
float as_am_value = 0.65f;
float ad_am_value = 0.7f;
Polynomial curve fitting is generated from 『Calibration ADC-DC to Mercury Manometer Pressure』, you'll need to create 『curve.csv』and execute PC-GUI software main.app or BPM.exe in the same folder, it will output the『equation.txt』.
e.g. degree = 2, equation.txt format is : (-1.0620516546)x^0+(0.1262915457)x^1+(-0.0000012119)x^2
float a[3] = {-0.0000012119f,0.1262915457f,-1.0620516546f};
If pulse_value_N / total_pulse_value_mean > IPP_Ratio, pulse_N is irregular pulse peak, and IPP ratio range 15%~25%.
If IPP number / total_pulse_number > IHB_Ratio, this measurement is irregular heart beat.
If two or more IHB of the three BP measurements, AF detected.
const float IPP_Ratio = 0.2f;
const float IHB_Ratio = 0.2f;
- Win10
- 1.Open BPM.sln
- 2.Rebuild
- Mac High Sierra
- 1.make
- Win10
- wxWidgets 3.1.2
- VS2017 - MSVC 10.0.17763-SDK
- Mac High Sierra
- wxWidgets 3.x
- g++
When burning the firmware for the first time, you must set the PID control and blood pressure algorithm parameters. After the PC-Host and VCP are successfully connected, select the Tuning menu to adjust the parameters.
Display the parameters that have been set. If the parameters are unset, the value is "0xFFFFFFFF" in sector11 of flash. The PID parameters shown in the figure need to be divided by hundred. (for example, P = 290, in firmware, P is 2.9 .)
- Menu Tools -> VCP is connect to device.
- "Ad/Am" and "As/Am" text box is Diastolic and Systolic BP Point of AC signal amplitude.
- "Measurment" button is BP measurment after VCP connected.
- "USB Mode" button is switch from "USB Mode"(Measurment) to "Calibration Mode", and vice versa.
- "Pressurize" and "Leak" button for control mercury manometer high and low in calibration mode.
The two chart below show AC signal types, all of types are correct.
Pressure calibration reference is Mercury Manometer(Sphygmomanometer) or Aneroid Sphygmomanometer, you can buy products from Yuwell, Welch Allyn...etc
- 1.Connecting device and PC-GUI software.
- 2.Click USB Mode button switch to Calibration Mode, after this, OLED display show you ADC0 value per-second.
- 3.Control Mercury Manometer high and low with Presurize and Leak button.
- 4.Record Mercury Manometer pressure point and OLED ADC0 value to 『curve.csv』file, at least 10-points and pressure range 0~250mmHg.
- 5.checking curve.csv is located in the same folder as the PC-GUI software.
- 6.Close PC-GUI software than reopen it, it will generate the『equation.txt』.
- 7.copy equation and replace firmware parameter 『float a[3]』 in main.c.
Column A is ADC0-value, B is Mercury Manometer mmHg pressure.
Below are a few real world cases of the AFib(for example PCV, PAC), envelope wave lost some peaks.
-
Kabutoya, T., Imai, Y., Hoshide, S., & Kario, K. (2017). Diagnostic accuracy of a new algorithm to detect atrial fibrillation in a home blood pressure monitor. The Journal of Clinical Hypertension, 19(11), 1143-1147.
-
Ogedegbe, G., & Pickering, T. (2010). Principles and techniques of blood pressure measurement. Cardiology clinics, 28(4), 571-586.
-
Babbs, C. F. (2012). Oscillometric measurement of systolic and diastolic blood pressures validated in a physiologic mathematical model. Biomedical engineering online, 11(1), 56.
-
Geddes, L. A., Voelz, M., Combs, C., Reiner, D., & Babbs, C. F. (1982). Characterization of the oscillometric method for measuring indirect blood pressure. Annals of biomedical engineering, 10(6), 271-280.
-
C++ Program for Polynomial Fit (Least Squares) : https://www.bragitoff.com/2015/09/c-program-for-polynomial-fit-least-squares/
MIT License
Copyright (c) 2019 Tony Guo
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.