Design of heart rate measurement system for fitness equipment based on photoelectric tube

Publisher:RadiantJourneyLatest update time:2009-11-29 Source: 微计算机信息 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Abstract: This paper introduces the hardware and software system design of heart rate measurement based on photoelectric tube. By obtaining the blood concentration change signal of the earlobe located in the middle of the photoelectric tube, the heart rate signal is converted into a square wave signal that can be directly measured by the single-chip microcomputer after filtering, amplification and other signal conditioning. The heart rate measurement system introduced in this paper has been widely used in the fitness system developed by the author, and the application effect is ideal.

Introduction

Heart rate is an important feedback signal in the fitness system. It reflects people's physical condition during exercise and plays an important role in monitoring the human life system. The accuracy of heart rate measurement directly affects people's psychological state during exercise, so heart rate measurement is an important part of the fitness system. This paper uses photoelectric radiator to develop a heart rate measurement system based on blood concentration changes, and uses simple filtering and amplification circuits to make the heart rate measurement of the fitness equipment accurate and reliable.

1 Characteristics and application of photoelectric tube

Photoelectric tube is a device for photoelectric conversion. It can convert external light signals into voltage signals for easy system recognition. Therefore, photoelectric tubes are widely used in various occasions such as speed measurement, distance measurement, signal conversion, etc. Photoelectric tubes consist of two parts: a light-emitting tube and a receiving tube. In the application, an appropriate constant current can be added to the light-emitting tube to make it emit uniform and stable light. The receiving tube is connected in series with a suitable circuit, and the system can obtain a voltage signal from the receiving tube. When the light transmission condition between the light-emitting tube and the receiving tube changes, the current passing through the receiving tube will change.

This paper makes the photoelectric tube into a clip shape and clamps it on the skin surface such as earlobes and fingers. As the heart beats, the blood concentration in the blood vessels changes periodically. The change in blood concentration causes the light intensity received by the receiving tube to change, so that the system can collect the periodically changing pulsating signal. Use a suitable circuit to amplify, filter, and shape the signal, and then output a standard square wave signal to the microcontroller.

2Signal Analysis and Signal Conditioning Circuits

2.1 Signal Analysis

The signal received by the photoelectric emitting tube is very weak, and the collected heart rate signal changes by only 50mV, and has a certain voltage offset, and there is a lot of voltage noise. The signal waveform collected from point a in the circuit diagram shown in Figure 2 by an oscilloscope is shown in Figure 1.


2.2 Signal Conditioning Circuit

Since the signal received by the photoelectric receiving tube is extremely weak (the amplitude of change is between ±10mV), it is easy to be interfered by its peripheral circuits. Therefore, the system must provide power for the signal conditioning circuit separately. At the same time, the system's circuit board wiring will also have a greater impact on the signal. Therefore, when designing the circuit board, the design of the signal line and the power ground line should be focused. After the signal is amplified by the two stages of LM324, there is still a large bias voltage. Therefore, a filter capacitor must be added to the signal input end to filter out the DC component in the circuit and ensure that it does not affect the transmission of the AC signal. The photoelectric receiving tube collects the signal and the signal conditioning circuit is shown in Figure 2.


From the original signal waveform in Figure 1, we can basically see the overall trend of the waveform change, but there are strong clutter and interference signals. Therefore, the signal must be filtered after amplification. The signal after the first-stage amplification and shaping filter of LM324 is already very smooth. A good heart rate signal waveform can be collected through point b in the circuit of Figure 2. At this time, the signal change amplitude is 0.8V, but there is still a certain degree of voltage offset. After another stage of amplification shown in Figure 2, a 0-4V pulse signal is obtained. From point c in the circuit of Figure 2, it is measured that there is no interference in the signal waveform, the signal is relatively stable, and the voltage offset is also removed. After the signal is reversed by the Schmidt reverse trigger 74LS14, a standard square wave signal is obtained. The signal waveform measured from point d in the circuit shown in Figure 2 is shown in Figure 3. It can be seen from Figure 3 that the rising and falling edges of the signal are very good, and the voltage change is a standard 0-5V. At this time, a complete heart rate signal is obtained. This signal changes stably and is synchronized with the heart. It is a true reflection of the heartbeat. This signal is directly connected to the microcontroller to measure the heart rate signal.

[page]

3Heart rate algorithm and software programming

The system uses the AT89S52 microcontroller from ATMEL. The microcontroller has strong adaptability to various harsh working environments and has an internal watchdog. The heart rate signal is connected to the external interrupt INT0 port of the microcontroller, and the heart rate is calculated by calculating the time difference between two adjacent heart rates. The time difference T between two adjacent interrupts is obtained by timing the timer. The timer's timing unit is set to seconds, that is, the count byte increases by 1 per second. The relationship between the time between two interrupts and the counter n can be obtained by calculation: , and then according to the heart rate calculation formula: heart rate = heartbeats/minute, the calculation formula is as follows: The heart rate value per minute is obtained.

Part of the program flow chart is shown in Figure 4.


Some of the procedures are as follows:

Main program: ORG 0000H

AJMP MAIN

ORG 0003H

AJMP INTX

ORG 000BH

AJMP INTT0

ORG 0040H

MAIN:MOV SP,#60H

SETB OF

SETB EX0

SETB TR0

SETB IT0

MOV TH0,#0BEH

MOV TL0,#0E4H

MOV TMOD,#11H

MOV 30H,#0; the address where the heart rate is stored

MOV 31H,#0; Counter

[page]

MOV 32H,#0;

DISPLAY: •

• ; Display program

AJMP DISPLAY

END

In the main program, open the external interrupt, and set the external interrupt 0 to be valid on the falling edge. Every time the signal has a falling edge, the program will automatically enter the interrupt, read the data in the counter and clear the counter. Put the read data into the 30H address, 31H is the transfer byte for data storage, and display this data in the main program.

The subroutine for external interrupt is as follows:

INTX:MOV 30H,31H

MOV 31H,#0

RARELY

The interrupt subroutine of timer 0 is as follows:

INTT0:INC 31H

MOV TH0,#0BEH

MOV TL0,#0E4H

RARELY

4 Conclusion

The photoelectric tube-based heart rate measurement system described in this article uses ordinary photoelectric tubes to measure heart rate, which has high reliability and accuracy and has been widely used in a certain brand of fitness equipment developed by the author. Photoelectric tubes have a long service life, stable performance, and reliable application, which ensures that the heart rate measurement during the use of fitness equipment can be achieved, and it is a method worth promoting.

References

[1] He Limin. Microcontroller Advanced Tutorial. Beijing: Beijing University of Aeronautics and Astronautics Press, 2000.8;

[2] He Limin. MCS-51 Series Single Chip Microcomputer Application System Design. Beijing: Beijing University of Aeronautics and Astronautics Press, 1990;

[3] Li Hua. Practical Interface Technology of MCS-51 Series Microcontrollers. Beijing: Beijing University of Aeronautics and Astronautics Press, 1993.8;

[4] Yu Yongquan. Microcontroller Power Interface Technology. Beijing: Beijing University of Aeronautics and Astronautics Press, 1992.9.



Reference address:Design of heart rate measurement system for fitness equipment based on photoelectric tube

Previous article:Analog Devices Helps UTAS Improve Quality of Care with Medical Devices
Next article:A New Pulse Pressure Simulator Designed Based on LabView

Latest Medical Electronics 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号