带有带有Python和和Arduino UNO的气压计(的气压计(ESP / ENG))-项目开发项目开发
Components and supplies
Arduino UNO
× 1
Resistor 100k ohm
× 2
Resistor 1 M ohm
× 4
MPX2050DP
× 1
Rotary potentiometer (generic)
× 1
Necessary tools and machines
inflatable armband
About this project
This project is a baunamometer made with an Arduino plate, a pressure sensor and Python, where the Arduino was used to receive the data thrown by the pressure sensor and
by means of Python analyze the data to shed both the diastolic pressure and systolic.
--------------------------------------------------------------------------------------
Se construyo un baumanometro digital con el uso de una placa arduino UNO, un sensor MPX2050DP y un amplificador operacional.Donde los datos se analizaron con un método
de pendientes para encontrar los picos máximos de pulsos en un intervalo de tiempo.
The Background:
The measurement of blood pressure is an essential element in medicine, whether for clinical studies of certain diseases, for the control of hypertension, or for the evaluation of
the state of patients within the intensive care units and operating rooms.
There are two fundamental ways to perform the measurement of blood pressure: The first is through intermittent methods, which provide specific pressures such as systolic
(PS), diastolic (PD) and average (PM), calculating in a period of time that covers more than one heartbeat. The second is through continuous methods, those that provide
punctual pressures beat by beat, or the shape of the continuous wave of blood pressure, or both.
Blood pressure can be measured in an invasive (direct) and non-invasive (indirect) way, with potentially more accurate invasive methods, but with the complexity and
inconvenience of its application, non-invasive methods are the most widespread. Non-invasive measuring devices are safer and easier to use than invasive ones and can be
used in situations where invasive measurement is not absolutely necessary.
--------------------------------------------------------------------------------------
La medición de la presión arterial es un elemento imprescindible en la medicina, ya sea para estudios clínicos de determinadas enfermedades, para el control de la
hipertensión, o para la evaluación del estado de pacientes dentro de las unidades de cuidados intensivos y salones de operaciones.
Existen dos formas fundamentales de realizar de realizar la medición de la presión arterial: La primera es mediante los Métodos intermitentes, los que brindan presiones
puntuales como la sistólica(PS), diastólica(PD) y media(PM), calculándolas en un periodo de tiempo que cubre más de un latido del corazón.La segunda es mediante los
Métodos continuos, los que brindan presiones puntuales latido a latido, o la forma de la onda continua de la presión arterial, o ambos.
La presión arterial puede medirse de forma invasiva (directa) y no invasiva (indirecta), siendo los métodos invasivos potencialmente más exactos, pero con la complejidad e
inconveniencia en su aplicación hacen que los métodos no invasivos sean por el contrario los más extendidos. Los equipos de medición no invasiva son más seguros y fáciles
de usar que los invasivos y pueden ser utilizados en situaciones en las que la medición invasiva no es absolutamente necesaria
The Project:
To measure the pressure using a pressure sensor, this sensor is a potential difference that is proportional to the pressure it measures, the potential difference that is too small
for the Arduino to detect it, due to this it has to use a operational amplifier, to amplify the voltage delivered by the sensor, once this took place, the output voltage was
connected to the terminal A0. To work, the sensor needs a power of less than 5 volts, this was obtained from the 5 volt port of the Arduino.
The pressure sensor has two inputs, one of which is inserted into a hose that the sale of the bracelet that is placed on the biceps, the other sensor input is exposed to
atmospheric pressure, when the bracelet is spoken, the sensor sends the voltage that is amplified. This voltage will subsequently become a unit of pressure, mm of Hg to be
exact.
After this, the output voltage is tested, amplified, changed, the cuff pressure is increased, a simple code is written, recorded, the Arduino and the tool are recognized. Test to
see if the sensor had enough resolution so that the pulses of blood are seen in the Serial Plotter of the Arduino, is in the form of peaks.
After doing all the necessary tests, now we proceeded to elaborate the code that could detect the observed peaks, which correspond to the pulse. The first pressure peak is
observed when the blood pressure is large enough to beat the pressure exerted by the cuff, this first peak corresponds to the so-called systolic pressure, so the code must
detect this first peak and convert it to mm of mercury, the posterior peaks correspond to pulses of blood, the diastolic pressure is supposed to correspond to the last pulse
peak, according to the manufacturers of digital baumanometers this is not taken so when a sensor is used, the diastolic pressure is taken when there is a peak at which its
height is 60% of the first peak, this is taken as the diastolic pressure.
To detect those peaks, a method is used that detects the change of sign on the slopes, the data that arrives at the Arduino is sent to python, once they reach python they
become pressure units (Hg mm), this It is done with a formula that was obtained by calibrating the sensor with a mercury manometer, the voltage that the sensor sent at
different pressures was measured, it was done several times and from there a statistic of the voltage value was obtained at each pressure. The specifications of the sensor say
that its variation of the voltage with respect to the pressure is of a linear form, so taking this into account and the data of the calibration, an adjustment was made to a straight
line, the line that was obtained was of the voltage in function of the pressure, clearing the pressure has the formula to convert the voltage to pressure.
With the data in mm of Hg, we proceeded to analyze them. The data is added to a list, these data can be plotted, the graph can be observed as there are peaks, when there is
a peak the sign of the slope changes, first it is positive and then it becomes negative, the program basically detects this, when the peaks are detected there is a drawback, the
program detects the changes of sign, but also between peak and peak the slope changes from negative to positive, so that the next part of the code is dedicated to detecting if
there is a maximum or a minimum, we are interested in the maximums, so that we keep them in a list and from there we obtain the values of the diastolic pressure and the
systolic pressure.
-----------------------------------------------------------------------------------
Para medir la presión se uso un sensor de presión, este sensor te da una diferencia de potencial que es proporcional a la presión que mide, la diferencia de potencial que
entrega es muy pequeña como para que el Arduino la detecte, debido a esto se tuvo que usar un amplificador operacional, para amplificar el voltaje entregado por el sensor,
una vez que se tuvo esto, se conecto el voltaje de salida a la terminal A0. Para funcionar el sensor necesita una alimentación de al menos 5 volts, esta se obtuvo del puerto de
5 volts del Arduino.
评论0