1

I'm working with a digital blood pressure meter using arduino nano. I need to display the pressure reading during inflation and deflation of the cuff instantly. And when an input signal applied to a particular pin during deflation, I need to print the pressure value at that time of input signal, to a display. How to code for this logic. I made the code for showing pressure value during inflation and deflation. But need to pause the value and display constantly the pressure value at the time of input applied to the arduino pin. How this pausing of value can be done?. Finally I need to print both the systolic and diastolic pressure value constantly as: 120/80 mmHg (systolic/diastolic mmHg) In this project, the systolic pressure is noted when there is an input at digital pin.

In the case of diastolic pressure, it is noted according to input pulse duration. That is, If the duration of pulse is greater than 50 milli-seconds, print the diastolic pressure as current pressure minus the pressure when pulse duration equal to 50 milli-seconds.

Below is the code I have written for printing the systolic and diastolic pressure instantly.

#include <LiquidCrystal.h>//Don't forget to enter this library
LiquidCrystal lcd(12, 11, 10, 9, 8, 7);
int analogInPin = A1; // Analog input pin that the pressure sensor output is attached to
int pressure = 0;
int sensorValue = 0; // value read from the pressure sensor via the amplifier stage
void setup() {
 Serial.begin(9600); 
analogReference(INTERNAL);
void loop() {
lcd.clear(); 
sensorValue = analogRead(analogInPin); 
pressure = sensorValue*(0.9226)-267.7; //Pressure value according to sensor value
 lcd.setCursor(0,1); 
 lcd.print("mmHg: "); 
 lcd.print(pressure); 
 delay(100); 
}

I'm using a different method to note systolic as well as diastolic pressure values, like the stethoscope doing the job in conventional measurement method. The dual microphone arrangement will capture the sounds( korotkoff ) of blood flow. This sounds are processed (independent to arduino) by the external analog circuitry which outputs a 5VDC at every noticeable instant of pulse(during blood flow). This signal is then fed to a digital pin of arduino. Here, when the 5V signal reaches at the digial pin first, we note the systolic pressure as the pressure at the instant when the 5V signal is generated first. In the case of diastolic pressure, the generated 5V signal from the circuit is compared with an externally given unit step 5V using comparator. This compared signal output is fed to another digital pin of arduino, where the diastolic pressure is noted according to the input 5V pulse signal duration( Eg: If the duration is greater than 50ms ), the diastolic pressure is the pressure at which the pulse duration which is equal to 50ms).

I'm totally frustrated with remaining parts of code as mentioned. Thank you in Advance..!!

asked Apr 6, 2020 at 17:24
13
  • the answer to your question is in your own code, right after delay(5000); Commented Apr 6, 2020 at 17:34
  • I need to print the two pressure values as Systolic/Diastolic with respect to the input signal to particular digital pins. And these values should displayed constantly as it is the final measurement value. Like: "Your Blood Pressure is: 120/80 mmHg" Commented Apr 6, 2020 at 17:39
  • The Systolic/Diastolic pressure is the two pressure levels noted at instant when the signals are reached by externally to any two digital pins at two different time Commented Apr 6, 2020 at 17:44
  • so, what is giving you the problem? .... you already have code for displaying data depending on pin input Commented Apr 6, 2020 at 17:59
  • your code is poorly formatted ... that makes it more difficult to see program flow and more difficult to determine where to insert additional code for expanded functionality Commented Apr 6, 2020 at 18:03

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.