Graduation project - Title: human heart rate and pulse wireless monitoring system based on Stm32 single chip microcomputer Internet of things

1 Introduction

Hi, everyone, this is senior Dan Cheng. Today I'd like to introduce a single chip microcomputer project to you

It can be used in curriculum design or graduation design

Technical solutions, design help and problem opening guidance
print("Q 746876041") 

2 Introduction

2.1 subject background and purpose

With the development of modern science, more and more people begin to pay attention to their physical health. They often want to exercise themselves by means of fitness exercise in addition to their ability. You will find that in the gym, fitness experts or coaches will tell novices to pay attention to their heart rate rhythm. Generally speaking, people's intense exercise will cause the rise of heart blood pressure and the change of heart rate. The heart rate is exactly the warning and lighthouse for people's exercise. In the exercise state, the steady state of the heart rate and whether it is within the normal range are what fitness people should pay attention to. No matter what your fitness purpose is, it is more related to your own weight, system, etc. At the same time, the performance of heart rate can also enable people to find the abnormality of the body in time. Irregular heart rate often causes. Heart, cardiovascular and other diseases. But often such a deadly disease, the way to detect it is very simple. The role of heart rate detection is as a device for real-time monitoring and alarming you in critical times. From this, we can conclude that the role of heart rate detector is very important to people.

In an increasingly intelligent modern society, intelligent medicine has begun to step into ordinary people. For people, in the increasingly pursuit of quality of life, the need for physical health is also their just need. In the case of trying to solve the problem that it is easy to see a doctor and difficult to make an appointment in modern medicine, the portable household health medical equipment reflects its significance - it can easily achieve health detection and disease prevention without leaving home.

3 system design

3.1 system architecture

In addition to the STM32 based control board designed by the senior, another main part is how to collect samples of heart rate data.

Max31000 is widely used in simple heart rate detector. It is a high-quality heart rate monitor sensor. Max31000 uses its own LED and photoelectric detection terminal to detect the reception of signals to display heart rate data.

In addition, STM32 is the main microcontroller and data processor in the system; Using OLED screen to realize real-time monitoring of dynamic heart rate, that is, data display; Using Bluetooth serial port, data can be output and displayed. A 3.5v-8v power supply will be set for the power supply, and the power supply will be output to each module for use when the appropriate power supply voltage is selected.

3.2 key hardware parts

3.2.1 MAX301 00 heart rate and blood oxygen module

Max31000 is an excellent sensor after multiple optimization, which can measure various information such as heart rate. In terms of structure, max31000 includes detection module and data processing module. Under the detection module, there are LED, data receiver and other parts. The data processing part mainly includes register, data transmission and so on. In this system, max31000 is used to detect the heart rate of samples and process the data.

Physical drawing:

Circuit diagram:

The way to use this sensor is very simple. When your finger contacts the glass layer on the surface of the sensor, some infrared light that cannot be absorbed will be transmitted to the receiver, so as to calculate the heart rate data of the sample. In this process, the information of heart rate is converted from electrical signal to optical signal, and then converted into electrical signal through max31000, so as to make the data information into collected samples and store it.

3.3 key software parts

3.3.1 data reading process

Data reading basically triggers the interrupt of the main control chip by the interrupt pin. After the interrupt is triggered, the main control chip reads the interrupt register of max31000, so as to judge which is triggered. For example, if the temperature is interrupted, read the temperature value, send the acquisition temperature command after a period of time, and then interrupt after a period of time. This is repeated. Blood oxygen does not need to send instructions. When the FIFO data is almost full, it will send an interrupt to remind the MCU to read. Entering the standby and power saving mode will turn off these functions.

Try to set max31000 to HR mode and read the original IR data. After drawing, its appearance should be as shown in the figure

3.4 realization effect

3.5 some relevant codes

 Author: Dan Cheng senior, Q746876041

// Heart rate calculation
struct fifo_t {
uint16_t rawIR;
uint16_t rawRed;
dcFilter_t MAX30100::dcRemoval(float x, float prev_w, float alpha)
dcFilter_t filtered;
filtered.w = x + alpha * prev_w;
filtered.result = filtered.w - prev_w;
return filtered;

// Sensor data filtering

struct meanDiffFilter_t
float values[MEAN_FILTER_SIZE];
byte index;
float sum;
byte count;
float MAX30100::meanDiff(float M, meanDiffFilter_t* filterValues)
float avg = 0;
filterValues->sum -= filterValues->values[filterValues->index];
filterValues->values[filterValues->index] = M;
filterValues->sum += filterValues->values[filterValues->index];
filterValues->index = filterValues->index % MEAN_FILTER_SIZE;
if(filterValues->count < MEAN_FILTER_SIZE)
avg = filterValues->sum / filterValues->count;
return avg - M;

struct butterworthFilter_t
float v[2];
float result;
void MAX30100::lowPassButterworthFilter( float x, butterworthFilter_t * filterResult )
filterResult->v[0] = filterResult->v[1];
//Fs = 100Hz and Fc = 10Hz
filterResult->v[1] = (2.452372752527856026e-1 * x) + (0.50952544949442879485 *
filterResult->result = filterResult->v[0] + filterResult->v[1];

Space is limited, only part of the code is shown
 Author: Dan Cheng senior, Q746876041

4 finally

Technical solutions, design help and problem opening guidance
print("Q 746876041") 

Complete set of single chip microcomputer projects:

Tags: Single-Chip Microcomputer IoT stm32

Posted on Wed, 10 Nov 2021 00:12:25 -0500 by al3x8730