Intelligent bracelet based on 51 single-chip microcomputer
By designing a smart bracelet based on 51 microcontroller, integrating body temperature, heart rate and step detection modules, the existing smart bracelet has solved the problem of single functions and in real-time data acquisition, and achieved a comprehensive understanding of human body movement mode and real-time monitoring.
Patent Information
- Application Number
- CN202421375452.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2034-06-17
AI Technical Summary
The existing smart bracelets have problems such as single functions in detecting human body temperature, heart rate and steps, and not real-time data collection, making it difficult to fully understand the human body's movement mode.
A smart bracelet based on the 51 microcontroller is designed, integrating a body temperature detection module (DS18B20 temperature sensor), a heart rate detection module (pulse heart rate sensor), a step count detection module (ADXL345 inclination sensor) and a display module (OLED display). Through the STC89C52 microcontroller as the main controller, data acquisition and real-time display are realized.
Real-time detection and display of human body temperature, heart rate and step count are achieved, synergistically, a comprehensive understanding of human body movement patterns, and the data error is within an acceptable range.
Smart Images

Figure CN222853862U_ABST
Abstract
Description
Technical Field
[0001] The utility model belongs to the technical field of smart bracelets, and specifically relates to a smart bracelet based on a 51 single-chip microcomputer. Background Art
[0002] With the improvement of material living standards, people pay more and more attention to personal health issues. Smart bracelets are becoming more and more popular because they can accurately calculate the number of steps and calorie consumption, helping people to develop quantitative running plans to ensure health. Early smart bracelet designs used weighted mechanical switches to detect speed and remind users through simple prompts. When the device is shaken, you can hear the sound of a metal ball sliding back and forth, or the sound of a pendulum swinging left and right on a building block. Subsequently, people proposed the concept of electronic smart bracelets, and the idea is to use vibration sensors and electronic timers to count steps. When a person walks, as the center of gravity of the human body shifts left and right, the vibration sensor senses the person's movement state and uses an electronic timer to achieve the purpose of step counting.
[0003] With the development of technology, people began to use electronic accelerometers to realize the function of step counting. The main mechanism of the electronic accelerometer is: a small magnet is sealed in a plastic tube, and a current transformer is surrounded by the tube. When moving in the plastic tube, the small magnet will move in the opposite direction in the tube due to inertia, thereby cutting off the current transformer. In addition, due to electromagnetic induction, an output voltage will appear in the current transformer. Therefore, by detecting the changing frequency of the flat chord curve, the number of steps can be recorded and the distance can be calculated.
[0004] At present, accelerometer is the first choice for smart bracelets to realize the step counting function. In the domestic market, the more popular products are 3D electronic human health detection and management. It mainly uses electronic accelerometers to detect changes in body acceleration and uses software algorithms to judge health conditions. This application provides a smart bracelet based on 51 single-chip microcomputer to detect and display human body temperature, heart rate, and number of steps.
[0005] The information disclosed in this background technology section is only intended to increase the understanding of the overall background of the present invention, and should not be regarded as acknowledging or suggesting in any form that the information constitutes the prior art already known to a person skilled in the art. Utility Model Content
[0006] The utility model aims to provide a smart bracelet based on a 51 single-chip microcomputer to detect and display human body temperature, heart rate and number of steps.
[0007] In order to achieve the above purpose, the utility model provides the following technical solutions:
[0008] A smart bracelet based on 51 single-chip microcomputer, comprising:
[0009] The main controller uses STC89C52 single-chip microcomputer as the control core;
[0010] The body temperature detection module uses a DS18B20 temperature sensor and is connected to the main controller;
[0011] The heart rate detection module uses a pulse heart rate sensor connected to the main controller; the pulse heart rate sensor is connected to the STC89C52 microcontroller through an LM393 comparator;
[0012] The step detection module uses the ADXL345 inclination sensor and is connected to the main controller;
[0013] Display module, using OLED display screen, connected to the main controller;
[0014] The keyboard input module uses an independent keyboard and is connected to the main controller.
[0015] Preferably, the minimum system of the STC89C52 single-chip microcomputer includes: a reset circuit, a clock circuit and a power supply circuit; the reset circuit includes a reset button, a capacitor and a resistor; when the reset button is pressed, the capacitor discharges through the resistor to generate a falling edge used as a reset signal; the clock circuit includes a 11.0592MHZ crystal oscillator and two 30pF ceramic capacitors.
[0016] Preferably, the output end of the DS18B20 temperature sensor is connected to the P10 port of the STC89C52 single-chip microcomputer for data transmission; the first pin of the DS18B20 temperature sensor is grounded and the third pin is connected to a 3.3V power supply.
[0017] Preferably, the first pin and the third pin of the pulse heart rate sensor are respectively connected to the positive input terminal and the reverse input terminal of the LM393 comparator; and the output terminal of the LM393 comparator is connected to the P32 port of the STC89C52 single chip microcomputer.
[0018] Preferably, the clock signal line SCL and the data line SDA pins of the ADXL345 tilt sensor are respectively connected to the P12 and P13 pins of the STC89C52 single chip microcomputer.
[0019] Preferably, the SCL port of the OLED display is connected to the P24 port of the STC89C52 microcontroller, and the P23 port of the STC89C52 microcontroller is connected to the data line SDA of the OLED display; the reset pin RST and the data / command control pin DC of the OLED display are respectively connected to the P22 port and the P21 port of the STC89C52 microcontroller; the CS port of the OLED display is connected to the P20 interface of the STC89C52 microcontroller.
[0020] Compared with the prior art, the utility model has the following beneficial effects: the smart bracelet based on 51 single-chip microcomputer of the utility model adopts 51 single-chip microcomputer as the main controller to collect temperature information, heart rate information and step number information to detect the movement pattern of the human body, and can collect temperature information and heart rate information in real time and display them on the LCD screen, and can also accumulate steps by collecting step number information, thereby realizing the synergy between various functional modules. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 It is a system block diagram of the utility model;
[0022] Figure 2 It is the schematic diagram of STC89C52 microcontroller;
[0023] Figure 3 This is the circuit diagram of the body temperature detection module;
[0024] Figure 4 It is the schematic diagram of the shaping circuit;
[0025] Figure 5 This is the circuit design diagram of the ADXL345 tilt sensor;
[0026] Figure 6 It is the circuit diagram of the display module;
[0027] Figure 7 It is the main program flow chart of the system;
[0028] Figure 8 It is a flow chart of temperature detection;
[0029] Fig. 9 It is the heart rate detection flow chart;
[0030] Fig.10 It is a flow chart of step counting detection;
[0031] Fig.11 It is the flow chart of OLED display module;
[0032] Fig.12 It is a system principle diagram of the utility model. DETAILED DESCRIPTION
[0033] The following is a clear and complete description of the technical solution of the utility model patent. Obviously, the described embodiments are part of the embodiments of the utility model, not all of them. Based on the embodiments of the utility model, all other embodiments obtained by technicians in this field without creative work are within the scope of protection of the utility model.
[0034] In the description of the present invention, it should be noted that the orientations or positional relationships indicated by terms such as "center", "up", "down", "left", "right", "vertical", "horizontal", "inside" and "outside" are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the utility model.
[0035] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be a connection between two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0036] See attached Figure 1-12 , a smart bracelet based on 51 single-chip microcomputer, with STC89C52 single-chip microcomputer as the control core, and also includes: body temperature detection module, heart rate detection module, step detection module, display module and keyboard input module. The system block diagram is shown in the attached Figure 1 Among them, the body temperature detection module uses the digital temperature sensor DS18B20 to measure body temperature; the heart rate detection module uses a pulse heart rate sensor to convert the heart rate into a signal acceptable to the microcontroller. Each beat generates a pulse, which causes the microcontroller to generate an interrupt. Each interruption counts once, and samples and counts the heart rate once a minute; the step detection module uses the ADXL345 inclination sensor to collect step information; the display module uses an OLED LCD screen to display data; the keyboard input module uses an independent keyboard, and the threshold can be set by pressing keys.
[0037] The minimum system of STC89C52 single-chip microcomputer consists of three parts: reset circuit, clock circuit and power circuit. With these three circuits, the single-chip microcomputer can operate normally. The minimum system schematic diagram of the single-chip microcomputer is shown in the attached figure. Figure 2 .
[0038] VCC is the power pin of the microcontroller, which provides power for the microcontroller.
[0039] A reset circuit usually includes a reset button, a capacitor and a resistor. In this system, pressing button S1 will charge capacitor EC1 to form a delay; when button S1 is released, capacitor EC1 will slowly discharge through resistor R1, thereby generating a falling edge, which will be used as a reset signal. This manual reset method is usually used in debugging and testing processes. During power-on reset, since the pin state of the microcontroller may be unstable when it is powered on, it may cause the microcontroller to work abnormally. Therefore, the power-on reset circuit will automatically restore its pin state to a certain initial state when the microcontroller is powered on to ensure that the microcontroller can start normally.
[0040] The clock circuit is composed of crystal oscillator Y1 and ceramic capacitors C1 and C2, so that the digital circuit control chip can work properly. The clock circuit sends a signal of system time and provides it to the microcontroller, thus ensuring that the entire control system can work properly. In order for the system to work properly, a 11.0592MHZ crystal oscillator and a 30pF capacitor are usually used.
[0041] The body temperature detection module uses the DS18B20 digital temperature sensor to measure the body temperature. DS18B20 is a common digital temperature sensor, whose output signal is a digital signal. It has the characteristics of small size, low hardware cost, strong anti-interference ability and high precision. The DS18B20 digital temperature sensor is easy to wire and can be used in various occasions after being packaged. Its power supply voltage is 3V~5.5V, with adjustable temperature resolution and a measurement range of -55℃~+125℃.
[0042] The DS18B20 temperature sensor is connected to the microcontroller using a single-line interface, that is, when the DS18B20 is connected to the microcontroller, only one interface line is needed to achieve two-way communication between the microcontroller and the DS18B20. Connect the output end of the temperature sensor to the P10 port of the microcontroller for data transmission. The third pin and the first pin of the DS18B20 are connected to the 3.3 volt power supply and ground respectively. In addition, the 10K resistor is a pull-up resistor to ensure that the data reading of the DS18B20 sensor is more stable. The circuit diagram of the body temperature detection module is shown in the attached figure. Figure 3 shown.
[0043] The heart rate detection module uses a pulse sensor to measure heart rate using photoelectric capacitance. The pulse sensor is a photoelectric sensor that can measure the heart rate. It has built-in amplifiers, noise cancellers and other components to convert pulse information into electrical signals. The user only needs to place the fingertips on the sensor surface, and the photodiode next to it will produce light. Due to the beating of the heart, the blood volume of the arteries on the fingers and earlobes will change periodically, and the brightness of the finger will also change accordingly. In practical applications, the output of the pulse sensor can be directly measured by an oscilloscope.
[0044] Since the pulse heart rate sensor does not output a standard square wave, in order for the microcontroller to measure this signal more stably, it is necessary to use the LM393 comparator to shape the input waveform so that the output signal of the sensor is converted into a standard square wave. The first and third pins of the pulse heart rate sensor are connected to the positive input and reverse input of the LM393 comparator respectively. The output of the LM393 comparator is connected to the P32 port of the microcontroller, and the heart rate value is obtained after analog-to-digital conversion. Among them, the P32 port is triggered by the rising edge. When the pulse beats once, the P32 port detects the rising edge and enters the interrupt program; turn on the timer, and use the timer to calculate the duration of the high level until a falling edge is detected, then the interrupt program jumps out and the heart rate value is calculated. The schematic diagram of the shaping circuit is as shown in the attached figure. Figure 4 shown.
[0045] The step detection module uses the ADXL345 inclination sensor. The circuit design diagram is shown in the attached Figure 5 As shown. ADXL345 has the characteristics of small size, extremely low energy consumption, high resolution, and variable measurement range. The sensor has a physical resolution of up to 13 bits and a detection range of ±16g. The digital output data is in the form of 16-bit binary complement and supports SPI (3-way or 4-wire) or IIC digital interface access.
[0046] ADXL345 is powered by 5V voltage and can measure the acceleration values of the X, Y, and Z axes with a scale factor of 3.9mg / LSB. The directions of the X, Y, and Z axes are determined by the placement of the chip. The P12 and P13 pins of the microcontroller are respectively connected to the clock signal line SCL and the data line SDA pin of the inclination sensor. The access mode of the microcontroller message is IIC communication. The value of the ADXL345 sensor is read in accordance with the regulations of IIC communication access.
[0047] The display module uses a 0.96-inch OLED LCD screen to display data, powered by 5V voltage. Compared with other liquid crystal displays (LCD), OLED (organic light-emitting diode) has the advantages of being lighter and more energy-saving. It also has excellent characteristics such as self-luminescence, no need for backlight, high contrast, thin thickness, wide viewing angle, fast response speed, can be used for flexible panels, has a wide operating temperature range, and simpler structure and process.
[0048] The display module circuit diagram is as attached Figure 6 As shown. The microcontroller communicates with the OLED display screen through the IIC bus interface to transmit control instructions and data. Among them, the SCL port of the OLED is connected to the P24 port of the microcontroller, and the P23 port of the microcontroller is connected to the data line SDA of the display module. The start and end signals of the access are sent by the microcontroller. When SCL is at a high level and SDA is at a falling edge, data transmission is turned on. In addition, the reset pin RST and the data / instruction control pin DC of the OLED are connected to the P22 port and P21 port of the microcontroller respectively. The CS port is a chip selection port, which is connected to the P20 interface of the microcontroller.
[0049] The system main program flow chart is as attached Figure 7 After the system is powered on, the system clock, the IO port of the microcontroller, the corresponding timer and the serial port used are initialized first; secondly, the microcontroller obtains the data of the sensor and judges the data; finally, each functional subroutine is called according to the judgment result.
[0050] In body temperature detection, the microcontroller and the temperature sensor communicate via a single bus. The body temperature detection process is as shown in the attached figure. Figure 8 As shown. First, the MCU pulls the data line high for 500 microseconds; then, the MCU releases the data line; then, the MCU will wait for the pulse response signal of the DS18B20 temperature sensor. After the MCU receives the pulse response signal of the DS18B20, it initializes the DS18B20 and sends the ROM and RAM commands at the same time; then, it sends the temperature conversion command; after the DS18B20 data conversion is completed, the MCU reads the temperature data and displays it on the LCD screen.
[0051] In the heart rate detection, the timer in the microcontroller is used for timing, and the timer's timing duration is 5ms. At the same time, an external interrupt is used to trigger the calculation of the heart rate. First, the system is initialized; second, the heartbeat signal is detected through the heart rate pulse module. If a heartbeat signal is detected, an external interrupt is triggered, and the microcontroller calculates the time required for a single heartbeat; finally, the microcontroller displays the heart rate value on the OLED. The software program flow chart of the heart rate detection module is shown in the attached figure. Fig. 9 .
[0052] In the step counting detection, first, the microcontroller obtains the acceleration values of the X, Y, and Z axes through the ADXL345 inclinometer; then, it determines whether the bracelet is tilted based on the acceleration of the three axes; if the bracelet is tilted and the acceleration of the Y axis exceeds the threshold, the number of steps is increased by 1; finally, the microcontroller calculates the walking distance through the number of steps and displays the number of steps on the OLED.
[0053] Initialize the pins, P12 and P13 interfaces of ADXL345, and set the SCL clock data line and P13 interfaces on the P12 and P13 interfaces. When the SDA interface of ADXL345 has a falling edge, the information is read and the detected X, Y and Z three-axis acceleration values are stored in a register, and then the data in the register is converted into acceleration values through the standardized function L=3.9mg / LSB. Finally, the X, Y and Z three-axis acceleration values are obtained by using the transmission between the single-chip micro-machine and the tilt sensor information accessed in IIC. At the same time, it is also possible to evaluate whether the acceleration value in the Y-axis direction meets the set threshold and the tilt of the bracelet. If the above requirements are met, the number of steps can be increased by 1; or the number of steps can be kept unchanged and the number of steps can be calculated. Then the distance is measured using the number of steps and the distance is passed to the application, so that the acceleration value can be repeated continuously and the length is increased. The distance is the number of steps multiplied by the step length. The software flow chart of the step counting detection module is as follows: Fig.10 shown.
[0054] In the display detection, first, initialize the OLED liquid crystal display module; second, write data, display data, and control the module through the single chip microcomputer; finally, display the relevant information on the screen in real time, including temperature and its threshold, heart rate and its threshold, number of steps and other data. Fig.11 .
[0055] In this embodiment, the functions of the body temperature detection module, the heart rate detection module and the step detection module are also tested.
[0056] The body temperature detection module uses the DS18B20 digital temperature sensor, which is used to detect body temperature and set the temperature threshold. The threshold range can be set between -55℃ and 125℃ as needed. If the set threshold is exceeded, an alarm will be issued. This test measured two sets of data in total. The first set of data is the body temperature of the same person measured at different time periods using a mercury thermometer and the body temperature detection module of this design; the second set of data is the body temperature of the same person measured at different time periods using an electronic thermometer and the body temperature detection module of this design. Among them, the first set of measurement data is shown in Table 1, and the second set of measurement data is shown in Table 2.
[0057] Table 1 Body temperature detection module test 1
[0058]
[0059]
[0060] Table 2 Body temperature detection module test 2
[0061]
[0062] The heart rate detection module uses a pulse heart rate sensor, which is used to detect a person's heartbeat and set a threshold. If the threshold is exceeded, a buzzer alarm is sounded. Two groups of data were measured in this test. The first group measured the heart rate values of five people using a Huawei smart bracelet and the heart rate detection module of this design. The second group measured the heart rate values of five people using the hand pulse detection method and the heart rate detection module of this design. The first group of measurement data is shown in Table 3, and the second group of measurement data is shown in Table 4.
[0063] Table 3 Heart rate detection module test 1
[0064]
[0065] Table 4 Heart rate detection module test 2
[0066]
[0067] The step counting detection module uses an ADXL345 sensor. In this embodiment, the step counting is performed when the tilt angle of the board exceeds 30°. This test compares the actual number of steps and the number of steps measured by the step counting detection module 10 times. The test data is shown in Table 5 below.
[0068] Table 5 Pedometer detection module test
[0069] Serial number Actual steps Pedometer sensor measurement Absolute error Relative error 1 120 steps 120 steps 0 0% 2 150 steps 152 steps 2 1.3% 3 175 steps 174 steps 1 0.6% 4 200 steps 205 steps 5 2.5% 5 220 steps 220 steps 0 0% 6 125 steps 124 steps 1 0.8% 7 300 steps Step 301 1 0.3% 8 350 steps 350 steps 0 0% 9 275 steps 277 steps 2 0.7% 10 375 steps 375 steps 0 0%
[0070] It can be seen from Tables 1 and 2 above that the measurement error of the body temperature detection module is mostly within 0.8%. It can be seen from Tables 3 and 4 above that the measurement error of the heart rate detection module is mostly within 2.8%. It can be seen from Table 5 above that the error of the step detection module is mostly within 1.3%.
[0071] The smart bracelet based on 51 single-chip microcomputer of the present application is based on STC89C52, and realizes the synergy between various functional modules; the heart rate detection module is used to collect heartbeats, and the 51 single chip is used to count, and finally the heart rate value is converted; the DS18B20 temperature sensor is used to detect human body temperature; the acceleration of the three axes of X, Y, and Z is obtained by using the ADXL345 inclination sensor, and the number of steps and distance walked are obtained by calculation through the 51 single chip microcomputer. In addition, it can be seen from the test data that the smart bracelet based on 51 single chip microcomputer of the present application can control various test data within a small error range.
[0072] The foregoing description of specific exemplary embodiments of the utility model is for the purpose of illustration and illustration. These descriptions are not intended to limit the utility model to the precise form disclosed, and it is clear that many changes and variations can be made based on the above teachings. The purpose of selecting and describing the exemplary embodiments is to explain the specific principles of the utility model and its practical application, so that those skilled in the art can realize and utilize various different exemplary embodiments of the utility model and various different options and changes. The scope of the utility model is intended to be defined by the claims and their equivalents.
Claims
1. A smart bracelet based on 51 single-chip microcomputer, characterized in that: include: The main controller uses STC89C52 single-chip microcomputer as the control core; The body temperature detection module uses a DS18B20 temperature sensor and is connected to the main controller; The heart rate detection module uses a pulse heart rate sensor connected to the main controller; the pulse heart rate sensor is connected to the STC89C52 microcontroller through an LM393 comparator; The step detection module uses the ADXL345 inclination sensor and is connected to the main controller; Display module, using OLED display screen, connected to the main controller; The keyboard input module uses an independent keyboard and is connected to the main controller.
2. According to claim 1, the smart bracelet based on 51 single-chip microcomputer is characterized in that: The minimum system of the STC89C52 single-chip microcomputer includes: a reset circuit, a clock circuit and a power supply circuit; the reset circuit includes a reset button, a capacitor and a resistor; when the reset button is pressed, the capacitor is discharged through the resistor to generate a falling edge used as a reset signal; the clock circuit includes a 11.0592MHZ crystal oscillator and two 30pF ceramic capacitors.
3. According to claim 1, the smart bracelet based on 51 single-chip microcomputer is characterized in that: The output end of the DS18B20 temperature sensor is connected to the P10 port of the STC89C52 single-chip microcomputer for data transmission; the first pin of the DS18B20 temperature sensor is grounded, and the third pin is connected to a 3.3V power supply.
4. The smart bracelet based on 51 single chip microcomputer according to claim 1 is characterized in that: The first pin and the third pin of the pulse heart rate sensor are respectively connected to the positive input terminal and the reverse input terminal of the LM393 comparator; the output terminal of the LM393 comparator is connected to the P32 port of the STC89C52 single chip microcomputer.
5. The smart bracelet based on 51 single chip microcomputer according to claim 1 is characterized in that: The clock signal line SCL and the data line SDA pins of the ADXL345 tilt sensor are respectively connected to the P12 and P13 pins of the STC89C52 single chip microcomputer.
6. The smart bracelet based on 51 single chip microcomputer according to claim 1 is characterized in that: The SCL port of the OLED display is connected to the P24 port of the STC89C52 microcontroller, and the P23 port of the STC89C52 microcontroller is connected to the data line SDA of the OLED display; the reset pin RST and the data / command control pin DC of the OLED display are respectively connected to the P22 port and the P21 port of the STC89C52 microcontroller; the CS port of the OLED display is connected to the P20 interface of the STC89C52 microcontroller.