Blood pressure development

Good day, the great people of this forum. I have trouble determining the systolic and diastolic pressure using a pressure sensor and Arduino. Please I need help with the source code. Thanks

Which pressure sensor are you using?

I am using mps20N0040D sensor with HX711 adc.

Is this a module or the IC? Have you tried searching the internet?

it is a module with built-in adc.
download

Try this internet site...

Thanks for your kind effort. I have done the calibration and the rest, but the issue is determining the systolic and diastolic pressure from the range of readings from the sensor. say 180mmHm to 60mmHg. That is my problem.

Post your code using code tags, we should be able to help you.

If you have access to a sphygmomanometer you could tee off the gauge and calibrate your sensor based on the gauge readings.

Or maybe you are asking how to determine from the pressure readings when the systolic and diastolic pressures have occurred. How are you detecting the pulse from the brachial artery?

I don't know about reading the BP but I know Arduino development has raised mine (:slight_smile:

1 Like

To calibrate the module, consider using

  1. a low pressure regulator (0mm Hg to 250Hg / 0 PSI - 5 PSI)
  2. an air reservoir (like a soccer football).

Thanks for your help, my issue is how to determine systolic and diastolic pressure. Below is the code I am using, I am stuck at the point where i suppose to determine the systolic and diastolic i don't know what next to do.


#include "HX710B.h"
#define DATA_ARRAY_SIZE 35
#define UPPER_THRESHOLD 170
#define LOWER_THRESHOLD 60
byte NO_TIMES = 10;
const int DOUT_Pin = 3;   //sensor data pin
const int SCK_Pin  = 4;   //sensor clock pin
const int pump_pin = 9;
const int valve_pin = 8;


float average;
float pressure_pascal;
float pressure_mmHg;
long READ_TIMES = 10;
long OFFSET = -540000;; // used for tare weight
float SCALE = 1;  // used to return weight in grams, kg, ounces, whatever
float RES = 2.98023e-7;

float pressure_data[DATA_ARRAY_SIZE];
float average_pressure(float pres[],  size_t size){
    int max_wave = 0;
    float avg_pres = 0;
    for(int counter=0; counter < size; counter++){
        if(pres[counter]>avg_pres){
//            max_wave = wave[counter];
            avg_pres = pres[counter];
        }
    }
    Serial.print("THE average_pressure IS ------------%f");
    Serial.println(avg_pres);
    return avg_pres;
}




HX710B pressure_sensor; 

void setup() {
  Serial.begin(9600);
  pressure_sensor.begin(DOUT_Pin, SCK_Pin,64);
   pinMode(pump_pin,OUTPUT);
   pinMode(valve_pin,OUTPUT);
}

void loop() {
  
  digitalWrite(valve_pin,HIGH);
  delay(500);
  unsigned long currentMillis = millis();
  if (pressure_sensor.is_ready()) {
    pressure_mmHg = ((pressure_sensor.read() - OFFSET)*RES) * 20 - 7.78 * 3.5;
    digitalWrite(pump_pin,HIGH);
    while(pressure_mmHg < UPPER_THRESHOLD ){
      pressure_mmHg = ((pressure_sensor.read() - OFFSET)*RES) * 20 - 7.78 * 3.5;
      
      Serial.println(pressure_mmHg);
      delay(10);
      
    }
    
    digitalWrite(pump_pin,LOW);
    delay(1000);
    for(int i = 0; i < DATA_ARRAY_SIZE; i++){
      pressure_mmHg =  ((pressure_sensor.read() - OFFSET)*RES) * 20 - 7.78 * 3.5;
      if(pressure_mmHg < UPPER_THRESHOLD && pressure_mmHg > LOWER_THRESHOLD){
        pressure_data[i] = pressure_mmHg;
  //    Serial.print("Pressure data in mmHg: ");
        Serial.println(pressure_data[i]);
         
        }
      delay(10);
      }
      
      
      
    digitalWrite(valve_pin,LOW);
    Serial.println("Done pumping.....");
 
    delay(50000);

// Check for the presence of Korotkoff sounds based on pressure changes
 

  } 
  
}

Checking for Korotkoff sounds based on pressure changes. This would require some signal processing or analysis of the pressure data to detect these sounds. You might need to implement algorithms for this purpose.

Ok, thanks for your response.

The first step is to determine exactly how those quantities are defined.

The next step is to determine what other people have done, for many decades now, to extract those quantities from blood pressure data.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.