Back
 OALibJ  Vol.7 No.12 , December 2020
Design and Research of Health Tester System Based on STM32
Abstract: In real life, we want to understand our own health status and prevent the risk of disease outbreaks. We need to monitor the physical signs in real time, store and analyze the data, and call the police in time if there is an emergency. According to this requirement, this article designed a multifunctional portable smart health tester based on STM32F407, with Cprtex-M4 32-bit high-performance STM32F407ZGT6 microcontroller as the control core, HP-6 heart rate and blood pressure detection module, LCD screen display module, GSM module, The voice broadcast module is composed of not only the function of checking the time and date, setting the alarm clock, but also the functions of heart rate and blood pressure detection, voice broadcast, SMS sending, etc., to provide safety guarantee for the user’s health monitoring, and to prevent diseases and dangers in time. The system can accurately detect heart rate and blood pressure in real time and display it on the LCD screen. It can send fixed text messages, play fixed voices, realize alarm timing and modify time functions, and meet the daily needs of users. The GSM short message notification module and voice broadcast module in the design can be manually turned off by the user and the heart rate and blood pressure detection module is controlled by buttons to achieve low power consumption and humanization. It is suitable for users of all ages, especially the elderly. The non-invasive health tester designed in this paper can monitor and diagnose for a long time, and provide help for general users’ treatment before entering the hospital and nursing after leaving the hospital, and the implementation of monitoring provides protection for the health of users.

1. Introduction

With the rapid development of modern science and technology, the progress of society is getting faster and faster, causing people’s pressure to increase. Many people have sub-health. Especially the elderly who have chronic diseases are prone to sudden onsets, because they can’t know the first time. After the best time to rescue, they lost their lives, leaving the family immersed in immense grief, which made people feel infinite regret. With the continuous improvement of living standards, more and more people gradually established the concept of focusing on health. Paying attention to health preservation and caring about physical health have become a conscious action of more people [1]. Wearable telemedicine instruments that can realize non-invasive, non-invasive, long-term monitoring and diagnosis of the human body will surely become important health monitoring, diagnosis and health care equipment under the new medical model. Its wide application will greatly promote my country the development of telemedicine system, home healthcare medical system and personal health monitoring system [2]. The prevention-oriented detection at any time becomes particularly important, so we need the smart health tester in our home to detect various data of the body and grasp our physical condition.

There are a variety of health testers in the market, but they are expensive, bulky, lacking in functions, or troublesome to operate, and they are difficult to meet the needs of most people. The intelligent health tester designed in this design is fully functional, reasonable in cost, small in size, easy to carry, simple in operation, reliable in function, and more humane and intelligent, which is easily accepted by the public.

2. Design of Health Tester System

At present, there are various smart health monitors on the market, which are far from satisfying the needs of the public. Most of the existing smart health monitors are bulky, expensive, and cannot be easily operated. An intelligent health detector should be intelligent, small in size, easy to operate, humanized, etc. Users can use it to detect their physical parameters at any time, understand their physical condition, and promptly remind themselves to have good healthy living habits. This article develops a health monitor system based on STM32 to realize the detection of human heart rate, blood pressure and other data. Experiencers can use the detector to complete their own needs, check the status of their body physiological index anytime and anywhere, and send alarm messages to alert patients when they encounter physical conditions beyond normal, thereby preventing the development of diseases.

2.1. Design of System Hardware Circuit

The control system can be divided into main control module, display module, heart rate and blood pressure acquisition module, alarm module and communication module. The main control module adopts STM32 single-chip microcomputer. The STM32 single-chip microcomputer has a large memory and can be connected to FLASH. The operation speed is extremely fast and it has more functions [3]. The display module adopts an LCD screen. The LCD screen is a touch screen that can realize key functions and display more content. The heart rate and blood pressure acquisition module adopt HP-6, the alarm module adopts MY1680U-12P, and the MY1680U-12P module can broadcast voice and adjust the sound level.

This article adopts embedded technology to design a portable and humanized intelligent health detector. The smart health detector uses STM32 as the main control chip and is composed of a heart rate and blood pressure sensor. The sensor detects and collects human physiological parameters that need to be detected, such as heart rate and blood pressure. The intelligent health detector is designed on the basis of STM32 single-chip microcomputer as the main control, and the entire system is designed in a modular manner. It mainly includes STM32 minimum system module, voice broadcast module, heart rate and blood pressure detection module, LCD display module, GSM module, etc. The structure of the entire system is shown in Figure 1.

In this smart health monitor system, the main controller STM32 chip is mainly used to control the operation and work of the entire smart health monitor system. Because STM32 provides multiple external interfaces for the entire system, the voice broadcast module, blood pressure detection module, LCD screen display module, and GSM module are connected to work. The HP-6 sensor collects heart rate and blood pressure, and then collects the collected data. The signal is transmitted to the STM32 MCU CPU for signal AD conversion and data processing. Control every work of the whole smart health monitor through programming code. When the heart rate and blood pressure are detected, the voice broadcast is performed, and a fixed text message can be sent to alert the family member or the attending physician when the physical condition is exceeded for 3 consecutive times. The detected data is displayed on the LCD screen in real time, so that the user can intuitively know the specific detection data [4].

The minimum system of a single-chip microcomputer is generally composed of a single-chip microcomputer chip and multiple auxiliary circuits, and the single-chip microcomputer composed of at least the components can ensure the normal operation of the system and the work. The minimum system of STM32 single-chip microcomputer is generally composed of single-chip microcomputer,

Figure 1. Structure diagram of the system scheme.

program memory, clock circuit, power supply circuit, BOOT startup circuit, debug interface circuit and reset circuit. Because STM32 single-chip microcomputer, there is a program memory on the chip, so the minimum application system must be connected to the clock circuit, power supply circuit, BOOT startup circuit, debug interface circuit and reset circuit. The core of the stm32f407zgt6 chip is an ARM Cortex-M4 high-performance core 32-bit microcontroller. The operating characteristic is a single-cycle SP instruction, the operating frequency is 168 MHZ, the operating voltage is 1.8 - 3.6 V, and the package is LQFP 144; there is 1024 KB of Flash for control and coordinate GSM module, heart rate and blood pressure module, display module, voice broadcast module [1] [5].

2.2. Heart Rate and Blood Pressure Sensor Circuit

The HP-6 sensor used in this design has its own heart rate and blood pressure algorithm, and the communication interface is an IIC interface. It supports reading the pulse waveform data for algorithm research, and can dynamically filter and amplify the pulse signal. The blood pressure and heart rate measurement of HP-6 module is obtained by photoelectric pulse wave. If both the heart rate sensor and the blood pressure sensor are used to realize the function of smart health detection and easy measurement of heart rate and blood pressure, it will not only increase the design cost, but also increase the area of the circuit board, so the overall area will increase, and the measurement error may increase. Its pins SDA and SCL are respectively connected to PC1 and PC2 of STM32 for data exchange; its pin 1 ground terminal is connected with the ground of STM32; its pin power supply terminal VCC and pin enable terminal EN are connected to the power terminal of STM32 Figure 2 is the pin connection diagram between HP-6 and the main control module STM32.

When the human heart rate and blood pressure value is measured, the module circuit sends the information to the STM32 system, displays it on the LCD screen, and triggers the voice broadcast signal. The STM32 main controller sends the command to the voice broadcast, and the voice broadcast broadcasts [6].

2.3. Voice and Alarm Circuit

The voice broadcast module uses MY1680U-12P, which uses serial communication, the communication frequency is 9600 HZ, the external speaker is 2.3 cm in diameter, the resistance is 8 Ω, and the power is 0.5 w. Its pins 1 and 2 are connected to an external speaker, pins 5 and 12 are connected to STM32 power and

Figure 2. HP-6 and STM32 connection diagram.

ground, and pins 7 and 8 are connected to the receiving and sending pins PA9 and PA10 of STM32 serial port 1. This system adopts GSM module to realize this alarm function, and can use UART asynchronous serial port to communicate with STM32 host MCU. GSM uses serial communication. TXD and RXD of SIM900A are respectively connected to PA2 and PA3 of STM32 to form a serial communication. If the data is abnormal for 3 consecutive times, it will send text messages to relatives, which can send emergency fixed text messages [7].

The display module adopts a 2.8-inch color LCD screen, which uses SPI communication, and FSMC can be used to speed up the communication rate; this display module is not only very small, suitable for carrying, low power consumption, and the use of the display is very simple, Using the 9341 driver. The display module can display body temperature, heart rate, blood pressure, time, date, pictures, etc., and use the touch screen function of the display to turn on or off the SMS function and voice function. The display module 2.8-inch LCD is connected to the TFTLCD port of the main control module; voice module MY1680U. The RX and TX pins of 12P are connected to the PA9 and PA10 pins of stm32; the HP-6 pins SDA and SCL are connected to the PC1 and PC2 pins of stm32; the SR and ST pins of GSM are connected to the PA2 and PA3 of stm32. The pins want to be connected; the power and ground terminals of each module are connected separately. The system integration is shown in Figure 3.

3. Software Design of Smart Health Tester

The development software designed in this system adopts Keil uVision5 from Keil Software in the United States. The development environment not only supports STM32 series chips, but also uses C language as assembly language. System programming main flow diagram is shown in Figure 4.

3.1. Main Program Design

The system mainly realizes heart rate and blood pressure detection, voice

Figure 3. The system integration.

Figure 4. System programming main flow diagram.

broadcast, short message notification, and display functions. The sensor continuously collects data, and at the same time processes and analyzes these data, and converts the detected data into heart rate and blood pressure for display on the LCD display. Let users know their physical parameters. The software design part is also designed in a modular way. After power-on, each module is initialized. The background of the display is a picture with the year, month, day, and hour, minute and second displayed on it and four icons on the bottom face the heart rate. Four subroutines: blood pressure, time alarm, sound, and text message. Click these four icons to enter the corresponding subroutine [8].

3.2. Software Design of Heart Rate and Blood Pressure Acquisition Module

Start the initial configuration, and judge whether it is a heart rate or blood pressure sentence by pressing the button. When the heart rate command is executed, the heart rate measurement is turned on, the heart rate measurement status is obtained, and the measurement is turned off. The heart rate value is displayed on the LCD, and the voice playback is normal. If the heart rate measurement result exceeds the normal heart rate range of the human body for three consecutive times, the user will be notified of the abnormal heart rate. When the blood pressure command is executed, the blood pressure measurement is turned on, the blood pressure measurement status is obtained, and the measurement is turned off. The blood pressure value is displayed on the LCD, and the voice playback is normal. If the blood pressure measurement result exceeds the normal blood pressure range of the human body for 3 consecutive times, the abnormal blood pressure content will be sent to notify the user. Click the main page icon when not in the measurement state to return to the main page. Because the screen is relatively small, the voice function is added. The voice broadcast MY1680U-12P uses serial communication with a baud rate of 9600. Here, serial 1 is used. TX and RX are connected to PA9 and PA10 respectively.

3.3. GSM Communication Module Software Design

The SMS sending alarm function realized by the system is to send AT commands to the GSM module through the main control STM32. The sending of short messages is achieved through string commands. The character string recognized by GSM has its specific format requirements. It must start with “AT” or “at” command, put the command content in the middle, and end with “\r\n”. Use the Chinese character UNICODE interchange tool to send the content, and convert Chinese characters and phone numbers into UNCODE to send Chinese text messages, and English text messages can be sent directly.

4. Experiment and Result Analysis

In order to test the performance of hp-6 sensor, the heart rate and blood pressure sensor are connected with STM32 and downloaded into the program. After power on, enter the heart rate and blood pressure test page, press the key 1 to test the heart rate, and press the key 2 to test the blood pressure. The test takes a long time and takes 60 seconds. The test will be displayed in the test. If the blood pressure test fails and no result is obtained, it will show that the test failed. If the blood pressure test is successful, the blood pressure value will be obtained. Heart rate and blood pressure test results: from the above results, we can see that there is a certain error in the heart rate and blood pressure module, the accuracy is more than 93%, which can accurately reflect the user’s heart rate and blood pressure value. During the test, the heart rate takes shorter time, the blood pressure takes longer, and the blood pressure exists the possibility of test failure.

In order to test the performance of the voice module, connect the voice module with STM32, download the program into the voice interface, power on, enter the voice interface, the default voice is on, GSM module test results: the SMS is turned on by default, the user can send fixed SMS to relatives, the user can automatically close the SMS module, after closing, cannot send SMS, SMS The module function is normal. When the whole machine is tested, it can send the heart rate and blood pressure status. In an emergency, the user can press the button 3 in the SMS module, whether the SMS is turned on or not, can send the emergency fixed SMS.

The function test of each sub module of the intelligent health detector is completed, and the whole machine is also tested. All of them can successfully detect the heart rate and blood pressure, modify the time, set the alarm clock and broadcast the voice, and finally display it on the LCD screen. If the heart rate and blood pressure are abnormal continuously, you can send short messages to relatives. The experimental test result is shown in Figure 5, and it works normally.

Figure 5. The experimental test result.

5. Summaries

In order to provide real-time physical sign monitoring data and improve the safety of users, a multi-functional portable smart health tester has been designed, which has perfect monitoring functions and timely alarm functions, which has a certain guiding effect on the estimation of disease and the development of the disease. Especially the alarm function in emergency situations can help users get timely treatment.

Cite this paper: Ma, Z.Q. and Zhi, Y. (2020) Design and Research of Health Tester System Based on STM32. Open Access Library Journal, 7, 1-8. doi: 10.4236/oalib.1106931.
References

[1]   Jia, Y.W. (2005) Long-Term Monitoring of Human Health by a Health Monitor. Western China Science and Technology, 6, 15.

[2]   Liu, J.X., Wang, L.Y. and Liu, B. (2015) The Development Trend of Smart Wearable Devices: Unified Standards and Market Segmentation. World Telecom, No. 12, 54-57.

[3]   Zhong, L.N., Wang, Z.L., Sun, X., Liang, G.L., Shi, J.J. and Yan, D. (2016) Small Multifunctional Smart Watch Based on STM32. Science & Technology Economic Guide, No. 34, 97.

[4]   Liang, J.Z. (2017) Research and Application of Health Monitoring System Based on Smart Watch. Hubei University of Technology, Wuhan.

[5]   Ding, J., Wang, N.L., Qin, Q., Lei, S.H. and Zhang, X. (2019) Design of a Real CS Countermeasure System Based on a Single-Chip Microcomputer. Electronic Testing, No. 17, 15-17+38.

[6]   Chen, W.C., Ge, D.J., Zhang, Q.Q., Hua, L. and Liu, M. (2018) Design of Heart Rate and Blood Pressure Detection System Based on HP-6 Sensor. China Instruments, No. 12, 59-63.

[7]   Zhi, L. (2019) Design of Intelligent Inspection Car Based on STM32. Proceedings of the 3rd International Conference on Computer Engineering, Information Science & Application Technology (ICCIA 2019), Nanchang, June 2019, 245-249.
https://doi.org/10.2991/iccia-19.2019.36

[8]   Huang, C.Z., Chen, X. and Zhou, Y.M. (2020) A New Generation of Long-Term Motion Positioning Track Recording Intelligence. Guangdong Science and Technology, No. 1, 66-68.

 
 
Top