This article introduces a heart rate and body temperature detection system based on a single-chip microcomputer. The circuit part of this design mainly includes: sensor measurement circuit, amplifier circuit, filter shaping circuit, AD conversion circuit, control circuit, power supply circuit, etc. The host computer is programmed through the VC interface.
Through the control of the host computer buttons, the weak signals input by PT100 and TCRT5000 are amplified and shaped, and finally AD acquisition conversion is transmitted to the microcontroller, and the relevant body temperature and heart rate information is displayed on the host computer interface.
1 Hardware Block Diagram Design
The heart rate and body temperature data acquisition device designed this time is based on STC89C52, so a temperature sensor and an infrared sensor for measuring human heart rate signals are required. The temperature sensor uses PT100 and amplifies the captured voltage through an amplifier circuit, and then performs AD conversion through ADC0804 and finally sends it to the 52 single-chip microcomputer.
Experiments have shown that if TCRT5000 uses a reflective connection, the changes in the human heart rate signal it obtains are relatively weak and the waveform is difficult to capture. Therefore, two TCRT5000s are used in the design to obtain the human heart rate signal by docking.
The weak heart rate signal obtained by the TCRT5000 receiving end is amplified by a secondary analog amplifier circuit, and then the waveform quality is improved by a filter circuit. Finally, the waveform is changed into a square wave circuit by a comparison circuit, and its amplitude is converted into a 5V standard digital level that can be recognized by the microcontroller, and output to the microcontroller for collection.
The host computer design uses 3 buttons in the design, which can be used to start and stop the test and control the system. The heart rate and body temperature values obtained are displayed through the host computer interface. The specific circuit diagram is shown in the appendix, and the overall framework diagram is shown in the figure:
Hardware design block diagram
2 Body temperature collection circuit design
The body temperature collection circuit is mainly composed of three parts: PT100 sensor circuit, signal amplification sampling circuit, and AD conversion circuit, and finally sends the signal to the microcontroller for processing.
2.1 PT100 sensor circuit
The PT100 sensor circuit mainly converts the resistance change of PT100 caused by temperature change into voltage change, which is convenient for the subsequent circuit collection. Since the resistance of PT100 is 100 ohms at 0 degrees, the corresponding voltage can be obtained by comparing with the resistance of 100 ohms. Part of the circuit is shown in the figure:
PT100 sensor circuit
2.2 Signal Amplification Circuit
Since the resistance of PT100 changes little with temperature, the voltage value obtained through the series circuit of 5V and 100 ohm resistor changes little. If it is obtained directly, there will be a large error, so signal amplification is required.
The amplifier circuit uses the differential method to filter out the error of the circuit itself, subtracts the reference voltage 2.5V from the standard 100 ohm, and amplifies the changing voltage through an adjustable resistor. Finally, the amplified voltage value is transmitted to the AD conversion chip through the subtraction circuit. The relevant circuit is shown in the figure:
Signal amplifier circuit
2.3 AD conversion circuit
AD0804 converts the amplified analog voltage value output by the signal amplifier circuit into 8-bit binary data and transmits it to the microcontroller. The reference power supply of AD0804 takes half of the maximum value of the input signal voltage. For example, when the input signal voltage range is 0-5V, the reference power supply is selected as 2.5V.
ADC0804 has a clock generation circuit inside. As long as a pair of resistors and capacitors are connected to the external clk1 pin and clkr, the clock required for AD conversion can be generated. Its oscillation frequency is fclk=1/1.1RC. Typical application parameters are: R=10K, C=150PF, fCLK=640KHZ, and the conversion speed is 100us. The specific connection method is as shown in the figure below:
AD conversion circuit
3. Heart rate signal acquisition circuit design
The heart rate acquisition circuit includes several parts such as infrared transmitting circuit, infrared receiving circuit, signal amplifying circuit, filtering circuit and waveform conversion circuit.
3.1 Infrared Transmitter Circuit
The infrared transmitting circuit mainly connects the transmitting end of the infrared reflective TCRT5000 to the corresponding power supply to generate an infrared signal. The specific circuit is as follows:
Infrared transmitter circuit
3.2 Infrared receiving circuit
The infrared receiving circuit receives the infrared signal from the transmitting end, and obtains the corresponding infrared signal value by obtaining the voltage of the receiving end C and E. Because the human heart rate signal is an AC signal, a capacitor is used to isolate the DC signal at the receiving end. The circuit is as follows:
Infrared receiving circuit
3.3 Secondary signal amplification circuit
The heart rate signal obtained from the receiving circuit is very small, so it needs to be amplified by an amplifier circuit. This time, the signal is amplified by the negative feedback reverse proportional amplifier circuit of the operational amplifier. The circuit is shown in the figure:
Secondary signal amplifier circuit
3.4 Filter Circuit
The amplifier circuit amplifies the required heart rate signal, and also amplifies some noise signals at the input end, generating some sharp pulses. Therefore, these noise signals need to be filtered out through a filter circuit. This design uses a 2-stage RC circuit for filtering. The specific circuit is as follows:
Filter circuit
3.5 Waveform Conversion Circuit
The waveform obtained from the filter circuit is analog, similar to a sine signal, with a relatively gentle rising and falling edge, and cannot be directly obtained by the single-chip microcomputer. Instead, this gentle waveform needs to be transformed into a relatively steep pulse signal in the form of a square wave, and the amplitude is a 5V level that can be recognized by the single-chip microcomputer. Therefore, the waveform transformation can be achieved through the comparator LM393. By setting a reference voltage value for comparison at the input end, a 5V high level is output when it exceeds this reference voltage, and a 0V low level is output when it is lower than this reference voltage. A pull-up resistor is connected to the output end to improve the output drive capability of the LM393. The specific circuit is as follows:
Waveform conversion circuit
4 Alarm circuit design
The alarm circuit mainly realizes that when the test is in progress, if the value obtained by the test exceeds the set range, the microcontroller controls the switch of the buzzer to alarm. The circuit is shown in the figure:
Alarm circuit
5 Software Programming
When powered on, the program initializes all parameters and the timer 2 working mode starts running. When receiving the key input of external interrupt 0, the key value pressed is saved and which key is pressed is determined. The host computer key controls the start and stop of the test. In the test state, the body temperature and heart rate are collected by delaying a certain time, and then the collected values are displayed and the alarm is determined. If it is not within the range, an alarm is issued.
Previous article:Course Design of Intelligent Temperature Meter Based on Single Chip Microcomputer
Next article:Design of automobile drunk driving monitoring system based on single chip microcomputer
- Popular Resources
- Popular amplifiers
- Mission-oriented wireless communications for cooperative sensing in intelligent unmanned systems
- Safe, Autonomous and Intelligent Vehicles (Huafeng Yu, Xin Li, Richard M. Murray etc.)
- Autonomous Vehicles Intelligent Transport Systems and Smart Technologies (Nicu Bizon, Lucian Dascale
- Application of radar remote sensing in intelligent transportation
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Detailed explanation of intelligent car body perception system
- How to solve the problem that the servo drive is not enabled
- Why does the servo drive not power on?
- What point should I connect to when the servo is turned on?
- How to turn on the internal enable of Panasonic servo drive?
- What is the rigidity setting of Panasonic servo drive?
- How to change the inertia ratio of Panasonic servo drive
- What is the inertia ratio of the servo motor?
- Is it better for the motor to have a large or small moment of inertia?
- What is the difference between low inertia and high inertia of servo motors?
- LVDS Receive
- [NUCLEO-L552ZE Review] + IoT application development: a few simple steps to the cloud
- Experiment and summary of using MSP430 status register SR
- Matrix keyboard problem
- TE Learning Center video training at your fingertips
- CH224 Circuit Design
- Principles and Applications of FPGA and Specialized DSP
- Circuit Analysis - What is the purpose of grounding the power supply FB pin?
- TI ACF Controller UCC28782 Detailed Analysis
- Can you help explain the following paragraph about anti-aliasing filter?