📜 ⬆️ ⬇️

STM32. Medical application. Tonometer. Introduction and hardware

One of the interesting profiles of the use of modern MK, of course, is medicine. The range of devices here is quite wide, ranging from simple thermometers, where you can use a simple STM8L with an LCD screen, ending with sophisticated cardio monitors, ECG meters, holters with the capabilities of remotely collecting and sending information via eusernet or wirelessly from the beds of patients directly to the doctor’s office. . Today we will talk about the possibility of using MK STM32 for non-invasive measurement of blood pressure using the oscillometric method. I ask all interested under cat.

Introduction


Today, the “gold standard” of blood pressure measurement is considered to be the method “tones of N.S. Korotkova ", recognized by the World Health Organization. However, one should not forget that this is an indirect method for measuring blood pressure. Of course, the measurement of blood pressure occurs with a certain error, determined by the elasticity of the walls of the arteries and soft tissues, the amplitude and shape of the pulse wave and other factors that are individual for each person. If we reject rounding and precisely use the price of dividing the pressure gauge, we will see the difference between adjacent measurements and when using a mechanical device. Reading the readings of the gauge by ear is also performed with some error, depending on the individual human characteristics - quickness of reaction, availability of skills, etc. As a result, the error of hand-held tonometers consists of three components: the method itself, the accuracy of the gauge and the error in determining the moment of reading. In fact, its value can be up to 15 mm Hg. Art! The measurement results are also influenced by the rate of air injection into the cuff, the rate of bleeding and the amount of pressure created in the cuff. If we add the natural variations in blood pressure, the difference between the two adjacent measurements can be even greater.

The electronic tonometer, in principle, should have been deprived of all these shortcomings, since tones are measured using the cuff itself, and processing is carried out using a number of patented algorithms and techniques. However, practice shows that in a number of cases the electronic tonometer gives a steady discrepancy with the readings of the manual tonometer. As a result, today people have a persistent opinion: “electronic blood pressure monitors lie — no one will measure a doctor with a mercury pressure meter!” Experiments have shown that a large measurement error is caused solely by the inability of an ordinary man in the street to use this device, namely, to wear a cuff correctly . A well-dressed cuff is the key to getting a good envelope of Korotkov’s tones and successfully finding characteristic points on the envelope.

Where to dig


There are quite a lot of literature on the method of finding blood pressure by the tonal envelope on the Internet [1], [2], [3], [4], [5]. Freescale even has a good appnote, where it is popularly described how to measure Korotkov tones in a cuff. But! How exactly to analyze the resulting envelope - there is practically no information anywhere. Each manufacturer of tonometers sculpts in its own way, although the general method is clearly visible. Just go to freepatentsonline.com and type in a search for non invasive blood pressure, and you will get enough information to write a tonometer blank. But! Further worse. Extrasystoles, artifacts, and other scary words get in the way of accurate oscillometry results ...
')

Assembling the measuring stand


If the desire to collect your blood pressure monitor still did not disappear, then proceed.

... We had two cuffs, a handful of operational amplifiers, several pressure sensors, a pair of valves, and a microcontroller. My only concern was that MEMS pressure sensors. I knew that sooner or later we will move on to this rubbish ...

What is required for measuring blood pressure:
1) Board with MK STM32F1xx (suitable STM32 VL Discovery with STM32F100RBT6 on board);
2) MPXV5050GP pressure transducer (model taken from Freescale BPM Application Note, in your case, we can use another model);
3) Integrated Shelter LM358 (LM324) (it is better, of course, to take Rail-Tu-Rail);
4) Any indicator - on what to show pressure (if there is no indicator - you can watch the results in watch while debugging);
5) Pump with a motor from a Chinese tonometer or a pear from a grandmother's tonometer;
6) If, after all, you have taken a pump with a motor from the tonometer, you will also need a slow-bleed valve from the same tonometer;
7) Emergency valve (to taste - needed for quick bleeding of air residue in the cuff after the measurement);
8) Tonometric cuff;
9) SD card with card reader (or microSD with an adapter, which is not too bad for soldering).

image
Figure 1 - Scheme pneumotrack to measure blood pressure

Let's try to figure out what we have just gathered. Pneumatic circuit is very simple. The pump serves to pump the cuff, after which the air begins to slowly bleed off with an unregulated valve with a very small orifice. It should be noted that the emergency valve must be closed - otherwise you will not pump anything up! Upon completion of the pressure measurement, you can open the emergency valve and quickly release the residual pressure in the cuff.

Next, you need to collect the electrical circuit to control our pneumatic control. The scheme consists of a Korotkov tone extraction unit, a pump control unit, and an emergency bleed valve control unit. The pump and valve control schemes are very simple and consist of virtually one NPN transistor (each), which are controlled by the logic level of the microcontroller (... any GPIO). Let us consider in more detail the scheme for the selection of tones according to Korotkov. The circuit is implemented on the General Use Op amp LM358, and is an amplifier with a band-pass filter. The task of this cascade is to isolate the DC component and select the so-called. Korotkov tones - pulsations of blood in the artery while reducing the heart muscle. So The analog inputs of the microcontroller are fed directly from the analog pressure sensor and the signal from the op amp. To summarize: the signal from the pressure sensor consists of a “beat” and a constant pressure component in the cuff. So on the first channel of the ADC MK, we apply a slowly relieved cuff pressure, with an operational amplifier we catch the variable component of the Korotkov tones and feed them to another channel of the ADC MK.

image
Figure 2 - Electrical schematic diagram of the measuring part and control

Figures 3 and 4 show oscillograms at the outputs, directly from the pressure sensor (Fig.3) and at the output of the evolving OU (Fig.4). In Figure 4, arrows show the “characteristic” points on the envelope of Korotkov’s tones. SBP - Systollic Blood Pressure - Systolic Blood Pressure (upper pressure), MBP - Mean Blood Pressure - average arterial pressure, DBP - Dyastollic Blood Pressure - Diastolic Blood Pressure (lower pressure). How to find these points and, therefore, determine blood pressure will be discussed later.

image
Figure 3 - Voltage at the output of the pressure sensor (air pumping cycle, bleeding cycle)

image
Figure 4 - Voltage at the OU output. Highlighted tones according to Korotkov

Summarize. We assembled the pneumatic section, made the electronics for its maintenance. In the next part we will talk about how to connect to this whole MK with a display and an SD card and begin to “listen” to the forearm. The result should be the data on the SD card, which we visualize in Excel and try to process using the simplest algorithms for calculating blood pressure.

image
Figure 5 - Data from sensors recorded on an SD card during measurement

Figure 5 shows:
- in this embodiment, my graft is graded;
- Korotkov's tones (pressure pulsations in the cuff) are recorded in full.
- on the fly, the maximum amplitude of Korotkov tones is calculated.

Why exactly graded etching? The fact is that with step bleeding, we get a bunch of bonuses for measuring. For example, we can measure two tones for one step of the pressure value in the cuff, i.e. filtering extra systole. Or, if the envelope is problematic, jump to the area of ​​interest to us and measure the tones on it again. This is a fitcha cardiac monitor. You can generally implement a measurement on the upstream portion of the pressure in the cuff (pumping):

1) Close the valve;
2) Make a pumping 50 units;
3) Try on Korotkov tones;
4) At point 2, until we measure the whole envelope, otherwise at point 5;
5) Calculate SBP, DBP, based on envelope parameters
6) Display the result.

image
Figure 6 - The result of calculating the values ​​of SBP and DBP

Explanations for Figure 6:
1) Series 1 - signal directly from the pressure sensor - pressure level in the cuff (phase of slow bleeding);
2) Row 2 - Calculated Systolic BP;
3) Row 3 - Calculated Diastolic blood pressure value;
4) Row 4 - Envelope of Korotkov tones (not the tones themselves, but the values ​​of the amplitudes of the peaks).

In the course of numerous experiments (which last to this day), it turned out that the calculation of the peak value of the Korotkov tone is key in the entire cycle of blood pressure measurement. The better you measure the envelope - the more accurately you know the value of blood pressure.

I will cite a few videos explaining the whole process. In all videos, a device appears, to which the developed tonometer is connected - “a person’s simulator with a given blood pressure”. Pressure can be selected from presets. Then the device simulates the heartbeats (Korotkov tones), and the tonometer measures the envelope. In the second video (Part 2) I drove the tonometer through all the main modes of the simulator. In hypertension, the algorithm makes the pumping up, everything is as it should be! The third video (Part 3) presents the measurement cycle on a real person (on me).


Video 1 - Patient simulator, Korotkov tones on an oscilloscope


Video 2 - Tonometer run on all limits of blood pressure on the simulator


Video 3 - Measuring blood pressure in a person

Literature:


[1] Non-uniform pressure decrementing steps. (US Patent No. US5170795);
[2] Determination of oscillometric blood pressure by linear approximation. (US Patent No. US5577508);
[3] Method and apparatus for measuring blood pressure by the oscillometric technique. (US Patent No. US6719703);
[4] Oscillometric determination of blood pressure. (US Patent No. US6893403);
[5] Oscillometric determination of blood pressure. (US Patent No. US7311669).

Source: https://habr.com/ru/post/250455/


All Articles