Design of portable multifunctional real-time physiological parameter monitor based on single chip microcomputer

Publisher:幸福约定123Latest update time:2011-08-26 Source: EEWORLD Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Preface

With the development of integrated functions of single-chip microcomputers, their application fields have gradually expanded from traditional single control processing to control processing, data processing, digital signal processing, etc. Lingyang 16-bit single-chip microcomputers are designed to adapt to this development, and have become the choice of more and more single-chip microcomputer users with their excellent voice processing capabilities.

System hardware design

The system is based on a single-chip microcomputer and equipped with various integrated sensors. It is compact. The use of micro-packaged chips and components shortens the connection and reduces the number of communication interfaces, thus improving the reliability of the whole machine. The system hardware structure is shown in Figure 1.

SPCE061A MCU

SPCE061A is a 16-bit microcontroller chip in the 'nSPTM (Microcontroller And Signal Processor) series of products from Sunplus Technology. It has a built-in 32k flash memory. Its high processing speed enables the chip to process complex digital signals very easily and quickly, and is suitable for applications such as digital speech recognition.

Figure 1 System hardware structure diagram

DS18B20 Temperature Sensor

The DS18B20 temperature sensor uses a 12-bit digital representation corresponding to the stored temperature value, with a theoretical accuracy of up to 0.05°C. It can detect changes in human body temperature in real time and accurately, and can display the temperature on a liquid crystal display through a single-chip microcomputer.

Typical interface design between DS18B20 and single chip microcomputer

The power supply can be provided by two methods: external power supply and parasitic power supply (ie, power supply obtained from the data line), as shown in FIG2 .

Precautions for using DS18B20

(1) It takes a certain amount of time for DS18B20 to convert the temperature value into a digital value after the temperature measurement is completed. This must be guaranteed, otherwise it will cause conversion errors and the temperature output will always display 85°C.

(2) In actual use, it is found that the power supply voltage should be kept at around 5V. If the power supply voltage is too low, the measured temperature will be higher than the actual temperature. After testing, it is found that it is generally around 5V.

(3) Smaller hardware overhead requires relatively complex software to compensate. Since data is transmitted serially between DS18B20 and the microcontroller, the read and write timing must be strictly guaranteed when programming the DS18B20, otherwise the temperature measurement results will not be read.

(4) In the design of DS18B20 temperature measurement program, after sending the temperature conversion command to DS18B20, the program always has to wait for the return signal of DS18B20. Once the contact of DS18B20 is poor or the line is broken, when the program reads the DS18B20, there will be no return signal and the program will enter an infinite loop. This point should also be given certain attention when performing DS18B20 hardware connection and software design.

ZD-3 Micro Vibration Sensor

The ZD-3 micro-vibration sensor is an active, highly sensitive, micro-power consumption detection element that outputs in the form of a sine wave. It can be converted into a pulse wave using a 74LS14 Schmitt trigger and input into a single-chip microcomputer to detect a high level. It can record the number of steps of a runner or exerciser in real time, and then obtain the energy loss of the exerciser, so as to facilitate more effective exercise.

HK-2000A Pulse Detection Sensor

This product uses a highly integrated process to integrate force-sensitive elements (PVDF piezoelectric film), sensitivity temperature compensation elements, temperature sensing elements, and signal conditioning circuits into the sensor. It outputs a positive pulse once the pulse fluctuates. This product is used for pulse rate detection, mainly for heart rate testing in sports and fitness equipment.

OCM4X8C LCD Display Module

The OCM4X8C LCD module uses a 128×64 dot Chinese character graphic LCD module, which can display Chinese characters and graphics. It has a built-in GB2312 simplified Chinese character library (16×16 dot), 128 characters (8×16 dot) and a 64×256 dot GDRAM drawing area. It can be directly interfaced with the CPU and provides 8-bit parallel and serial connection to the microprocessor. The module provides users with the simplest solution for LCD applications. With one instruction, you can realize functions such as Chinese characters, pictures, English letters, and extra large and extra small numbers starting to display at any point on the LCD screen, flashing in any designated area, moving, and reverse display, which originally required users to spend a lot of time and energy to program. This greatly reduces the requirements for program storage space when users select CPUs. At the same time, the module has its own temperature compensation and power saving functions (microampere level), which is an excellent choice for users who require low power consumption or high and low temperature display effects, such as handheld terminals, power equipment, etc.

; Figure 2 Parasitic power supply alarm module

Respiratory air flow temperature detection module

In order to reduce the error caused by thermal inertia and accurately measure the change of respiratory airflow temperature, the thermal capacity of the thermistor should be as small as possible and its location should be at the place with the highest airflow velocity in the respiratory tract. Therefore, the BLTS101 PN junction temperature sensor (thermal response time τ<0.2s) is selected in the circuit. The constant current source provides a constant forward current of 100μA to the PN junction, and the forward voltage drop of the PN junction only changes with the change of temperature T. The voltage signal is amplified by the preamplifier, passed through a 4.84Hz low-pass filter, and then converted into a digital signal and sent to the microcontroller.

System software design

The software design adopts modular structure

The software is written in C61 (a programming language for Sunplus microcontrollers similar to C) and assembly language to display various physiological parameter data in real time on the LCD screen. Flash is used for data storage, so that data will not be lost when the instrument battery is replaced. Upper and lower alarm thresholds can be set for all measurement parameters. When any parameter exceeds the threshold, an audible and visual alarm can be issued. According to the design needs, the alarm can be stopped using the mute key. Since the respiratory impedance signal has a baseline drift phenomenon, a variable median detection method is used in the software design to correct the baseline. The specific method is to use the median point in the previous respiratory cycle as the detection point of this respiratory cycle, so as to overcome the missed detection caused by the baseline drift phenomenon within the normal detection voltage range.

Data collection part

Real-time data collection of physiological parameters is mainly carried out through sensors. When measuring human body temperature, since the temperature changes slowly during exercise, the software timer interrupt method is mainly used for detection. When detecting parameters such as step count and pulse, the frequency is mainly recorded. Software counting is sufficient. According to the high level detected, the counter performs self-increment operation to record the frequency.

Parameter threshold setting

Since the human body temperature is around 36.5℃ under normal circumstances, the initial value of the temperature threshold is set to 36.5℃, and the temperature can be increased or decreased by 0.25℃ with the up and down keys. Each time the key is pressed, it increases or decreases by 0.25℃ until the threshold that the exerciser wants to set is reached (between 35℃ and 42℃).

LCD driver design

The realization of the system display function is actually the driver programming of the OCM4X8C LCD module. According to the structured programming idea, this article uses C61 language to compile the up, down, return and confirm key functions into sub-functions, which is convenient for the main program to call. Due to space limitations, the LCD driver program is not described in detail here.

Conclusion

The successful research of this program makes it more convenient for people to exercise at home. At the same time, wireless transmission can be implemented to make the elderly and patients safer at home or in the hospital, and make their families more at ease.

Reference address:Design of portable multifunctional real-time physiological parameter monitor based on single chip microcomputer

Previous article:Single chip temperature recording system
Next article:ATmega48 sensor button design based on Atmel QTouch

Latest Industrial Control Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号