Portable human body gait motion parameter detection device and use method thereof

By using a portable human gait motion parameter detection device, employing a low-power Bluetooth module and a thin-film pressure sensor, combined with an STM32F411CEU6 chip and software, the problems of large device size, high price, and complex operation in existing technologies have been solved. This device achieves low-cost and highly portable gait detection, which is suitable for the needs of rehabilitation training patients.

CN121015178APending Publication Date: 2025-11-28HENAN NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511274852.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-08
Publication Date
2025-11-28

AI Technical Summary

Technical Problem

Existing gait detection technologies suffer from problems such as large equipment size, high price, complex operation, and low data acquisition and processing efficiency, making it difficult to meet the needs of rehabilitation training patients.

Method used

A portable human gait motion parameter detection device was designed. It adopts a low-power Bluetooth module, a thin-film pressure sensor and a high-performance STM32F411CEU6 chip, and combines STM32CubeMX, KeilMDKARM and MITApp Inventor software to realize a low-cost, small-size and low-power system. The pressure detection module monitors the plantar pressure distribution in real time and transmits the data to a mobile APP via Bluetooth for gait parameter analysis.

Benefits of technology

It achieves low-cost, small-sized, and highly portable gait detection, accurately identifying steps, calculating gait frequency and gait stages, making it suitable for rehabilitation training patients and helping them understand their gait status in real time and develop exercise plans.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121015178A_ABST
    Figure CN121015178A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of embedded development and rehabilitation medicine, and relates to a portable human body gait motion parameter detection device and a use method thereof. The device is low in cost, small in size, convenient to wear, capable of functionally and accurately recognizing the step number, calculating the step frequency and the gait stage and stable in data transmission, especially suitable for patients in rehabilitation training, and capable of helping the rehabilitation patients and old people to know the gait state of themselves and check motion data in real time and improving the rehabilitation training efficiency. Rehabilitation patients are helped to formulate reasonable exercise plans, and healthy exercise habits are cultivated. The innovation of the invention lies in that the system design is low in cost, light in weight and low in power consumption, so that the equipment is convenient to carry and use for a long time.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of embedded development and rehabilitation medicine, and relates to a portable human gait motion parameter detection device and a use method thereof. BACKGROUND

[0002] Gait analysis technology has gradually developed from simple measurement methods to modern high-precision measurement systems. Existing gait detection technologies include IMU-based detection technology, plantar pressure monitoring systems, and vision-based gait analysis technology. These technologies have their own advantages and disadvantages. Gait analysis technology is involved in disease diagnosis and treatment, rehabilitation training, sports training, film and television entertainment, health detection, and smart home, and many other fields. In the field of disease diagnosis and treatment, diseases such as stroke, Parkinson's disease, and spinal cord injury can affect a patient's gait, and gait analysis can provide key evidence for early diagnosis, disease assessment, and treatment effect monitoring of these diseases. The device of the application embeds a thin film pressure sensor in the shoe sole or insole, monitors the plantar pressure distribution in real time, analyzes and processes the plantar pressure to obtain the human step count, step frequency, and gait phase parameters, and transmits the gait parameters to the user's mobile phone through Bluetooth data transmission. The user can view their gait motion parameters on the APP on the mobile phone.

[0003] Currently, there are some problems in the design of human gait analysis systems, such as large device size, high price, complex operating system, and problems with data acquisition and processing accuracy and efficiency. Therefore, the application provides a portable human gait motion parameter detection device to solve the above problems. The device has the advantages of low cost, small size, and low power consumption, and meets the needs of rehabilitation training patients and other groups of people, and has important application value and broad market prospects. The use of a low-power Bluetooth module, a thin film pressure sensor, and a high-performance STM32F411CEU6 makes the entire system smaller, more portable, and less expensive, and meets the needs of rehabilitation training patients and other groups of people, and the use duration is also correspondingly increased. In addition, the designed application software is also simple and easy to operate. SUMMARY

[0004] In view of the problems of the existing technology, the application provides a portable human gait motion parameter detection device.

[0005] To achieve the above purpose, the application is implemented by the following technical solutions:

[0006] A portable human gait motion parameter detection device, the hardware part includes a main control module, a pressure detection module, and a Bluetooth communication module. The software part is realized by STM32CubeMX, KeilMDKARM, and MITApp Inventor.

[0007] The main control module is an STM32F411CEU6 minimum system, including an STM32F411CEU6 chip, a clock circuit, an SW debugging download interface, a reset circuit, a BOOT setting circuit, an LED indicator lamp circuit, a key control circuit, a Type-C interface, and a 5-3.3V power conversion circuit. The clock circuit includes a high-speed external oscillator and a low-speed external oscillator, the high-speed external oscillator adopts a 25MHz crystal oscillator, and the low-speed external oscillator adopts a 32.768kHz crystal oscillator. The SW debugging download interface connects an ST-link through SWDIO and SWCLK interfaces of the STM32F411CEUX chip to program the chip. The working principle of the reset circuit is that when the NRST pin level is pulled low, the single-chip microcomputer enters a reset state, and the reset circuit is composed of an RC reset circuit and a manual key reset. The RC reset circuit is composed of a pull-up resistor and a capacitor, when the system is powered on, the capacitor charges through the resistor, the capacitor will be short-circuited, a low pulse will be formed, the NRST pin is grounded, the MCU enters a reset state, and after about 5 milliseconds, the voltage of the NRST pin approaches 3.3V, the reset process is completed, and thus the automatic reset when the single-chip microcomputer is powered on and started is realized. The manual reset is that the NRST pin is suspendedly connected with the GND through a key, when the key is pressed, the NRST pin is grounded, and the manual reset is realized. The BOOT setting circuit sets the starting mode of the chip by configuring the BOOT0 and BOOT1 pins of the STM32F411CEU6. The LED indicator lamp circuit is used to judge whether the power supply of the system is normal and whether the running state of the system is stopped. The function of the RED LED is to detect whether the power supply of the system is normal, and the function of the BLUE LED indicator lamp is to display the running state of the system, the high and low levels of the PC13 pin controlled by the STM32F411CEU6 are used to control the on and off of the LED lamp. The key control circuit is used to control the start and pause of the system, when the KEY key is pressed, the PA0 pin is grounded. When the system detects that the PA0 pin changes from a high level to a low level, the system determines that the key is pressed, and the working state of the system will change. The initial state of the system is off, when the key is pressed and more than three seconds, the working state of the system will change to start working. When the key is pressed again for more than three seconds, the working state of the system will change to off, and thus the key controls the start and pause of the system. The Type-C interface and the 5-3.3V power conversion circuit are used for the power supply of the system.

[0008] The pressure detection module is composed of two identical pressure sensors, each of which is composed of an FSR402 thin film pressure sensor and a signal conversion module. The system uses two identical FSR402 flexible thin film pressure sensors, which are arranged at the heel position of the left and right insole. In order to facilitate subsequent program writing, the FSR402 flexible thin film pressure sensor at the heel of the left insole is referred to as FSR402-1, and the FSR402 flexible thin film pressure sensor at the heel of the right insole is referred to as FSR402-2. H1 connects the FSR402 flexible thin film pressure sensor. The internal structure of FSR402 is actually a pressure-sensitive resistor. When the sensor is not pressed, the resistance is very large. If the pressure is greater, the resistance will be smaller. When the FSR402 flexible thin film pressure sensor is not pressed or the pressure is less than the starting voltage, the voltage at the IN / A+ port is greater than that at the IN / A- port, and the OUT / A port outputs a high level, and the LED2 is in an extinguished state. When the pressure exceeds the set threshold, the voltage at the IN / A+ port is less than that at the IN / A- port, and the OUT / A port outputs a low level, and the LED2 is in a bright state. The voltage at the IN / A- port can be adjusted by the VR1 potentiometer, thereby changing the threshold. The system uses the ADC1 port on the STM32F411CEU6 to collect data and read the voltage change at the OUT / A port of the pressure sensor module. The analog voltage signal is converted to a digital signal by the ADC, and the detected ADC value is used to determine whether the FSR402 flexible thin film pressure sensor is pressed, so as to identify and record the step count, step frequency and determine whether the current gait phase is a support phase or a swing phase.

[0009] The Bluetooth communication module is an HC-05 Bluetooth module responsible for data communication between the system and the mobile device. The system sends data through the serial port PA9(TX) of the STM32F411CEU6 single-chip microcomputer, and receives data through the serial port PA10(RX). The UART_TX of the HC-05 is connected to PA10, the UART_RX is connected to PA9, the VCC is powered by 3.3-6V, and the GND is the ground pin for module grounding. The parameters of the HC-05 and the serial data format of the STM32F411CEU6 must be kept the same. The serial ports PA9 and PA10 are also configured in STM32CubeMX. The baud rate is 9600bit / s by default, 8-bit data bits, 1-bit stop bit, and no parity bit.

[0010] The STM32CubeMX in the software design mainly completes the configuration of clock, ADC, USART and GPIO. The high-speed external oscillator of STM32F411CEU6 used by the system is 25MHz, and the configuration is according to M: 25, N: 168, P: 2, PLLCLK open, frequency is 84MHz. Two same FSR402 flexible thin film pressure sensors are used in the system, so two ADC channels are used to detect whether the sensor is pressed. The HC-05 Bluetooth module is used for communication, the serial port needs to be configured, the baud rate is 9600bit / s, 8-bit data bit, 1-bit stop bit, no parity bit, and the data format of the HC-05 Bluetooth module needs to be kept the same, otherwise the data transmission cannot be carried out. PA0 and PC13 are the KEY button module pins and LED working state indicator pins of the system.

[0011] The KeilMDKARM mainly completes specific functions to be realized by the system, and is divided into three parts of a main program, data collection and processing, and data transmission. The main program includes starting and pausing the key control system, and first initializes STM32F4XX and a system clock, initializes system GPIO, ADC1, USART and other peripherals. In order to prevent false touch keys, frequent accidental operation and system start and stop, the system is set to long press 3 seconds to change the system state. The system is in the initial state of the working state of the closed state, and the system judges the long press of the KEY key for 3 seconds. If the key is pressed for more than 3 seconds, the working state of the system changes from the closed working state to the starting working state. At this time, the system is turned on, the BLUE LED indicator light is turned on, the data is collected and processed, and then the processed data is sent to the HC-05 Bluetooth module through the serial port. The mobile phone enters the Android APP to connect the Bluetooth device, and the gait data can be viewed in real time. When the system recognizes that the KEY key is pressed again for more than 3 seconds, the system will change the working state to the closed state again, and the BLUE LED indicator light is turned off. Thus, the working and pausing of the key control system are realized. The data collection and processing program includes starting to read sensor data, processing sensor state, judging gait phase, recording step count, calculating step frequency, and sending data through the serial port, so as to realize real-time monitoring and analysis of gait. The data collection mainly relies on two FSR402 thin film pressure sensors of the pressure detection module. The voltage signal is converted into a digital signal through the ADC. The system respectively judges whether the FSR402-1 and FSR402-2 thin film pressure sensors exceed the set threshold value. If the set threshold value is exceeded, the system determines that the FSR402 thin film pressure sensor is subjected to pressure. The system analyzes whether the current gait phase is left support (right swing phase), right support phase (left swing phase), double support phase or double swing phase according to the pressure received by the left and right feet. In the process of movement, the STM32F411CEU6 single-chip microcomputer analyzes the data detected by the FSR402-1 and FSR402-2 thin film pressure sensors to calculate the step count and step frequency. If the value of the pressure received by the FSR402-1 thin film pressure sensor exceeds the set threshold value, it is determined that a step is taken in the current movement state. The system records the step count once, and the sum of the left and right foot step counts is the total step count (step) in the movement process. When the system starts to work, the step count in every 60 is counted in real time, and this data is recorded as the step frequency (step / min). The data transmission program is that the system detects the data through the FSR402 thin film pressure sensor, processes the data, stores the processed data in the format of "step count, step frequency, gait phase", and sends the data to the HC-05 Bluetooth module through the serial port.Mobile device can receive and send data through the connection of Bluetooth module, and can view the relevant data in real time on the developed Android app.

[0012] The MITApp Inventor is used for software design, which displays the data transmitted by the human gait motion parameter measurement system through Bluetooth. The topmost is the name of the system "human gait motion parameter measurement system". The software needs to use Bluetooth client and timer to realize the selection of Bluetooth device, connection of Bluetooth device and data receiving through Bluetooth. The selection of Bluetooth is realized by a list selection box to display the Bluetooth address and name searched by the Bluetooth client, and the connection can be realized by clicking HC-05. The connection of the device can be disconnected through a button. The state of Bluetooth connection is displayed below the system name. A 2x4 table is also designed to display the human gait motion parameters: step count, step frequency and gait phase.

[0013] A use method of a portable human gait motion parameter detection device, comprising the following steps:

[0014] Firstly, two FSR402 thin film pressure sensors are placed in the corresponding positions, FSR402-1 is placed and fixed at the left heel, FSR402-2 is placed and fixed at the right heel, and an STM32F411CEU6 minimum system development board and an HC-05 Bluetooth module are placed in a pocket or fixed at the waist.

[0015] Secondly, the STM32F411CEU6 minimum system development board is connected to the power supply, and a USB Type-c data line is used to connect a 5V power output for direct power supply. At this time, the system power indicator light is on, and the red LED light is always on.

[0016] Thirdly, the device name of the portable human gait motion parameter detection system is selected on the Android APP of the mobile phone, and when the Bluetooth connection state displays "Bluetooth connected", the system LED working indicator light is turned on by manually pressing the KEY button for more than three seconds. The FSR402 thin film pressure sensor starts to detect gait data, and transmits the data through the HC-05 Bluetooth module. The data received by the mobile phone is displayed in the step count, step frequency and gait phase list respectively.

[0017] Fourthly, when the user wants to pause and rest during the rehabilitation training or daily exercise, the KEY button is manually pressed for more than three seconds, the system LED working indicator light is turned off, and the system will be paused.

[0018] Fifthly, when the system appears an error, the reset button can be pressed to make the system run again. At this time, the third step operation needs to be repeated to connect the device and make the system start working again.

[0019] The beneficial effects of the present application are as follows:

[0020] The present application realizes low cost, small size, convenient wearing, accurate identification of step number, calculation of step frequency and gait phase, stable data transmission, and is especially suitable for patients in rehabilitation training, can help rehabilitation patients and the elderly to understand their gait state in real time, view exercise data, help rehabilitation patients to develop reasonable exercise plan and cultivate healthy exercise habits. The innovation of the present application is that the system design is low cost, light weight and low power consumption, so that the device is convenient to carry and long time use. BRIEF DESCRIPTION OF DRAWINGS

[0021] Figure 1 It is a system wiring diagram;

[0022] Fig. 2(a) is a schematic diagram of FSR402 thin film pressure sensor;

[0023] Fig. 2(b) is a schematic diagram of signal conversion module;

[0024] Figure 3 It is a thin film pressure sensor circuit diagram;

[0025] Fig. 4(a) is a real object diagram of HC-05 Bluetooth module;

[0026] Fig. 4(b) is a circuit diagram of HC-05 Bluetooth module;

[0027] Figure 5 It is a reset circuit;

[0028] Figure 6 It is a KEY button circuit;

[0029] Figure 7 It is a LED indicator lamp circuit;

[0030] Figure 8 It is a SW debugging download circuit;

[0031] Figure 9 It is a system clock configuration;

[0032] Figure 10 It is a whole pin configuration diagram of STM32F411CEU6;

[0033] Figure 11 It is an APP interface design diagram;

[0034] Figure 12 It is a start page initialization;

[0035] Figure 13 It is a preparation of selecting Bluetooth device list;

[0036] Figure 14 It is a selection of Bluetooth device completion;

[0037] Figure 15 to disconnect the button;

[0038] Figure 16 to define global variables;

[0039] Figure 17 to display gait data. DETAILED DESCRIPTION

[0040] In order to further explain the technical solutions of the present application, the present application will be described in detail below in conjunction with the accompanying drawings.

[0042] As shown in the system wiring diagram, the hardware part of the human gait motion parameter detection device mainly consists of an STM32F411CEU6 minimum system, an HC-05 Bluetooth module, and two FSR402 thin film pressure sensors, wherein the STM32F411CEU6 minimum system includes an STM32F411CEU6 chip, a high-speed external oscillator 25MHz crystal oscillator, a low-speed external oscillator 32.768KHz crystal oscillator, a USB Type-c power supply, a reset button, a BOOT0 button, a KEY button, a power indicator, an LED working indicator, an SWD download port, and the HC-05 Bluetooth module as shown in the figure, including a master control chip, a power supply circuit, a serial communication circuit, a button circuit, and an indicator. The FSR402 thin film pressure sensor consists of an FSR402 sensor and a signal converter, the FSR402 sensor is a pressure-sensitive resistor, and the signal converter consists of a dual-channel voltage comparison circuit.

[0043] High-speed external oscillator 25MHz crystal oscillator provides clock signal for STM32F411CEU6, so that each module of the driving system in the main control chip STM32F411CEU6 can work normally, and the low-speed external oscillator 32.768KHz crystal oscillator is not enabled. USB Type-c power supply provides power for the whole system, which is powered by directly connecting external power supply. The reset circuit is controlled by the NRST pin, when the NRST pin level is set to zero, the system will enter the reset state, and the internal register and data will be reset. The reset circuit is composed of RC reset circuit and manual key reset, the RC reset circuit is composed of a pull-up resistor and a capacitor, when the system is powered on, the capacitor charges through the resistor, the capacitor will appear short circuit, a low pulse will be formed, the NRST pin is grounded, the MCU enters the reset state, about 5ms later, the voltage of the NRST pin is close to 3.3V, the reset process is completed, so that the automatic reset when the single-chip microcomputer is powered on is realized. Manual reset is to suspend the connection of NRST pin and GND through the key, when the key is pressed, the NRST pin is grounded, manual reset is realized. BOOT0 key is not used in this device. When the KEY key is pressed, the PA0 pin is grounded. When the system detects that the PA0 pin changes from high level to low level, the system determines that the key is pressed, and the working state of the system will change. The initial state of the system is off, when the key is pressed and more than three seconds are detected, the working state of the system will change to start working. Press the key again for more than three seconds, the working state of the system will change to off, so as to realize the key control of starting and stopping the system. The power indicator is used to judge whether the power supply of the system is normal, according to the one-way conductivity of LED diode, when the power is turned on, the RED LED is on, which represents that the power supply of the system is normal. The LED working indicator is used to distinguish whether the working state of the system is running or stopping, the function of the BLUE LED indicator is to show the working state of the system, the high and low level of PC13 pin controlled by STM32F411CEU6 is used to control the on and off of the LED lamp, and the KEY key is also used to control the working state of the system and then control the BLUE LED. The SWD download port needs to be debugged through the ST-link debugger, the 3.3V, GND, SWDIO and SWCLK on the ST-link debugger are connected to the corresponding ports on the SW debugging download circuit, and the USB port on the ST-link debugger is connected to the computer.

[0044] The HC-05 Bluetooth module can realize data transmission between the system and the mobile device. The system transmits data through the serial port PA9 (TX) of the STM32F411CEU6 single-chip microcomputer, and receives data through PA10 (RX). The UART_TX of the HC-05 is connected to PA10, the UART_RX is connected to PA9, the VCC is powered by 3.3-6V, and the GND is the ground pin for grounding the module. The HC-05 has two working mode commands: the response mode (AT) mode and the automatic connection mode. The K1SW-PB key controls the module external pin (PIO11) input level, which can realize the dynamic conversion of the module working state. When using the HC-05 Bluetooth module, it needs to be configured first. When the K1SW-PB key of the HC-05 Bluetooth module is pressed for a long time at power-on, it enters the AT mode. At this time, the module setting control parameters or the control command can be sent through the serial port tool software. The parameters that need to be configured include: module name, pairing password, baud rate, etc. The serial port data format of the HC-05 Bluetooth module and the STM32F411CEU6 single-chip microcomputer should be kept the same, otherwise wireless communication cannot be realized. Under normal circumstances, the default baud rate is 9600 bit / s, 8-bit data, 1-bit stop bit, and no check bit. If the HC-05 Bluetooth module is directly powered on, it will directly enter the automatic connection mode. After the HC-05 Bluetooth module and the mobile device are successfully connected, in the transparent transmission mode, the module will transmit the serial port data to the mobile device through Bluetooth.

[0045] The internal structure of FSR402 is actually a pressure-sensitive resistor. When the sensor is not pressed, the resistance is very large. The greater the pressure, the smaller the resistance. When the FSR402 flexible thin film pressure sensor is not pressed or the pressure is less than the starting voltage, the voltage of the IN / A+ port is greater than that of the IN / A- port, and the OUT / A port outputs a high level. The LED2 is in an off state. When the pressure exceeds the set threshold, the voltage of the IN / A+ port is less than that of the IN / A- port, and the OUT / A port outputs a low level. The LED2 is in an on state. The voltage of the IN / A+ port can be adjusted by the VR1 potentiometer, thereby changing the threshold. The system uses the ADC1 port on the STM32F411CEU6 to collect data and read the voltage change of the OUT / A port of the pressure sensor module. The analog voltage signal is converted into a digital signal by the ADC, and the detected ADC value is used to determine whether the FSR402 flexible thin film pressure sensor is pressed, so as to identify and record the step count, step frequency and determine whether the current gait phase is a support phase or a swing phase. The system will detect the output level of the OUT / A port and the set threshold to determine whether the FSR402 flexible thin film pressure sensor is pressed. If it is pressed, the system will record data once. If it is not pressed, the system will not record the step count. The system will also detect the number of presses every 60 seconds to record the step frequency. The gait phase needs to be determined according to whether the two FSR402 flexible thin film pressure sensors are currently pressed. When the left foot FSR402-1 is pressed and the right foot FSR402-2 is also pressed, the system determines that the current gait phase is a double support phase (Double_Support_Phase). When the left foot FSR402-1 is pressed but the right foot FSR402-2 is not pressed, the system determines that the current gait phase is a left support phase (Left_Support_Phase). When the left foot FSR402-1 is not pressed but the right foot FSR402-2 is pressed, the system determines that the current gait phase is a right swing phase (Right_Support_Phase). When the left foot FSR402-1 is not pressed but the right foot FSR402-2 is pressed, the system determines that the current gait phase is a right swing phase (Right_Support_Phase). When the gait phase is in the double support phase, it means the standing state. When the gait phase is in the left support phase, it means the right foot is stepping out, which is also the right swing phase. If the gait phase is in the double swing phase, it means the jumping state. When the gait phase is in the right support phase, it means the left foot is stepping out, which is also the left swing phase. The above is the hardware composition and working principle of a portable human gait parameter measurement system.

[0046] The software part of the human gait parameter detection device involves STM32Cube MX, Keil MDKARM and MIT App Inventor. STM32Cube MX is mainly responsible for the graphical configuration of STM32F411CEU6, followed by programming in Keil MDKARM for specific function programs, and finally developing an Android APP by MIT App Inventor to display the gait parameters detected by the device.

[0047] When the STM32Cube MX needs to complete the configuration clock, ADC1 pin, USART1 pin, GPIO, for subsequent entry into Keil MDKARM for programming specific function program saves a lot of work. Configure the clock, click the SystemCore icon on the left. Select RCC mode Crystal / Ceramic Resonator, other parameters are default, enter the ClockConfiguration interface to turn on the high-speed clock (HSE), the frequency is 25MHz, M:25, N:168, P:2, PLLCLK is turned on, the frequency is 84MHz. Configure ADC1, find ADC1 in the Analog column of peripherals on the left and click Configure. In the "Mode" page: enable IN1 and IN2 channels. Configure USART1, find USART1 in the Connectivity column of peripherals on the left and click Configure, select Asynchronous mode. When configuring USART1, the data format of the HC-05 Bluetooth module must be the same, the baud rate is default 9600bit / s, 8-bit data, 1-bit stop bit, no parity bit. Configure the GPIO port, configure the PA0 pin connected to the KEY button. To achieve long-press KEY button for more than 3 seconds to switch the system state, the key is to detect whether the KEY button is pressed. Normally, the KEY button is not pressed and is in a suspended state, the level of PAO pin is unknown. After pressing the KEY button, the PA0 pin is connected to the ground. Therefore, the PA0 pin is connected to the pull-up, and the PA0 pin changes from high level to low level when the KEY button is pressed. Set the label of PA0 pin as KEY. The BLUE LED is connected to the PC13 pin of the single-chip microcomputer. The system is in the initial working state of off, so the BLUE LED indicator light is also off. Therefore, configure PC13 pin as output high level, and the mode can be set as push-pull output mode, without pull-up and pull-down. Since the function of this LED is to display the working state of the system, the output speed is not required to be high, and it is set to Low. Set the label of PC13 pin as LED to facilitate subsequent program writing in Keil MDKARM. Set the project in the Project Manager tab, name the project "Human Gait Parameter Measurement System Design" in the Project column, set the generated file path, and select MDK-ARM as the IDE. Because after generating code, Keil MDK-ARM software is used to write programs. In the Code Generate column, check Generate files to generate one pair of ".c / .h" files for each peripheral. After completing this series of work, click Generate Code.

[0048] Next, Keil MDK-ARM will be entered into the relevant specific function of each pin writing. The main program contains the key control system to start the pause work, first initialization STM32F4XX and system clock, initialization system GPIO, ADC1, USART and other peripherals. In order to prevent false touch key, frequent accidental operation makes the system start and stop, the system is set to long press 3 seconds change system state. The system in the initial state for the work state is closed state, the system to KEY key long press 3 seconds for judgment, if the key long press more than 3 seconds, the system state changes, from the closed state to the start state, at this time the system is turned on, the BLUE LED indicator light, start collecting data and data and processing, then the processed data through the serial port to HC-05 Bluetooth module, mobile phone into AndroidAPP connection the Bluetooth device, real-time view gait data. When the system recognizes the KEY key again long press more than 3 seconds, the system will change the working state to the closed state, the BLUE LED indicator light is off. Thus realize the key control system work and pause. The system data acquisition and processing program contains the start reading sensor data, processing sensor state, judging gait phase, recording step, calculating step frequency, and sending data through the serial port, so as to realize the real-time monitoring and analysis of gait, the data acquisition mainly relies on the two FSR402 thin film pressure sensor of pressure detection module, through ADC converts the voltage signal into digital signal, the system respectively judges whether the FSR402-1 and FSR402-2 thin film pressure sensor exceeds the set threshold value, if it exceeds the set threshold value, the system determines that the FSR402 thin film pressure sensor is under pressure, the system will analyze the current gait phase according to the pressure on the left and right feet, whether it is left support (right swing phase), or right support phase (left swing phase), or double support phase or double swing phase. In the process of movement, the STM32F411CEU6 single chip microcomputer analyzes the data detected by the FSR402-1 and FSR402-2 thin film pressure sensor to calculate the step and step frequency. If the value of FSR402-1 thin film pressure sensor under pressure exceeds the set threshold value, it is determined that a step is taken in the current movement state, and the system will record the step number, and the sum of the left and right foot steps is the total number of steps (step) in the movement process. When the system starts working, it will real-time statistics of each 60 steps, and record this data as step frequency (step / min). The system detects the data through the FSR402 thin film pressure sensor and processes the data, and stores the processed data in the format of "step, step frequency, gait phase", and sends the data to the HC-05 Bluetooth module through the serial port. Mobile devices can receive and send data by connecting Bluetooth module, and can real-time view related data on the developed Android app.

[0049] Finally, the MITApp Inventor is used to develop the Android APP software. The software interface is mainly used to display the data transmitted by the human gait motion parameter detection system through Bluetooth. Next, the design of components and logic is introduced. First, the design of components. The name of the system is "human gait motion parameter detection system" at the top. The software needs to use the Bluetooth client and the timer to select the Bluetooth device, connect the Bluetooth device, and receive data through Bluetooth. The Bluetooth selection is displayed through a list selection box to show the Bluetooth address and name searched by the Bluetooth client. Clicking HC-05 can connect. A button can disconnect the device. The state of Bluetooth connection is displayed below the system name. A 2x4 table is also designed to display the human gait motion parameters, step count, step frequency, and gait phase. Second, the logic design. When the software is opened and run, the Bluetooth client is disconnected. At this time, the Bluetooth device can be selected. Therefore, the current Bluetooth device is not connected, the Bluetooth state is not connected, the text color is black, and different text colors are used to intuitively display whether the Bluetooth is connected. Black represents the unconnected or connecting state, green represents the connected state, and red represents the disconnected Bluetooth. At this time, the timer does not start working. When the Bluetooth device list is added, the Bluetooth device to be connected can be selected. The Bluetooth connection state will be displayed as "Bluetooth is connecting". The text color is black. After selecting the Bluetooth device to be connected by the software, the Bluetooth connection is successful, the Bluetooth state is displayed as "connection success √", and the text color is green, indicating that the device has been successfully connected. At this time, the timer will check every 1 second whether the data transmitted by the Bluetooth device is received. In the case of having connected Bluetooth devices, other Bluetooth devices cannot be connected. If you want to disconnect the Bluetooth, you can click the disconnect button. A global variable is defined to store the received data in the list. The received data is separated by commas. The first item is placed in the step value, the second item is placed in the step frequency value, and the third item is placed in the gait phase data. If the disconnect button is clicked, the software will disconnect the connected Bluetooth, the Bluetooth state will be displayed as "Bluetooth has been disconnected", and the text color will be displayed as red. At this time, other Bluetooth devices can be selected for connection, and the gait data will be displayed as empty data. The designed Android App is packaged as an.apk file. There are two ways to download the Android application. You can click the download apk file or scan the two-dimensional code with your mobile phone.

[0050] The above embodiments only express the implementation of the present application, but cannot be interpreted as a limitation on the scope of the present application. It should be noted that for those skilled in the art, without departing from the concept of the present application, some modifications and improvements can be made, which are within the scope of protection of the present application.

Claims

1. A portable human gait motion parameter detection device, characterized in that, Includes a main control module, a pressure detection module, and a Bluetooth communication module; The main control module is an STM32F411CEU6 minimum system, including an STM32F411CEU6 chip, a clock circuit, an SW debug download interface, a reset circuit, a BOOT setting circuit, an LED indicator circuit, a button control circuit, a Type-C interface, and a 5-3.3V power conversion circuit. The reset circuit includes an RC reset circuit and a manual button reset. The RC reset circuit consists of a pull-up resistor and a capacitor. When the system is powered on, the capacitor charges through the resistor, causing a short circuit and generating a low-level pulse. The NRST pin is grounded, and the MCU enters the reset state. After approximately 5 milliseconds, the voltage on the NRST pin approaches 3.3V, completing the reset process and enabling automatic reset when the microcontroller powers on. The manual reset connects the NRST pin to GND via a button. When the button is pressed, the NRST pin is grounded, achieving a manual reset. The associated BOOT setting circuit configures the startup mode of the chip by setting the level states of the BOOT0 and BOOT1 pins of the STM32F411CEU6. The LED indicator circuit is used to determine whether the system power supply is normal and whether the system operation has stopped. The REDLED function is to detect whether the system power supply is normal, and the BLUE LED function is to display the system operation status. The high and low levels of the PC13 pin controlled by the STM32F411CEU6 control the LED's on and off states. The button control circuit is used to control the system's start and stop operation. When the KEY button is pressed, the PA0 pin is grounded. The Type-C interface and 5-3.3V power conversion circuit are used for system power supply. The pressure detection module includes two identical pressure sensors, each consisting of an FSR402 thin-film pressure sensor and a signal conversion module; the system uses two identical FSR402 flexible thin-film pressure sensors, which are respectively placed at the heel position of the left and right insoles; H1 connects to the FSR402 flexible film pressure sensor. The internal structure of the FSR402 is actually a pressure-sensitive resistor. When the sensor is not pressed, the resistance is very high. The greater the pressure, the lower the resistance. When the FSR402 flexible film pressure sensor is not under pressure or the pressure is less than the start-up voltage, the voltage at the IN / A+ port is greater than that at the IN / A- port, the OUT / A port outputs a high level, and LED2 is off. When the pressure exceeds the set threshold, the voltage at the IN / A+ port is less than that at the IN / A- port, the OUT / A port outputs a low level, and LED2 is on. The Bluetooth communication module is the HC-05 Bluetooth module, which is responsible for data communication between the system and the mobile device. The system sends data through the serial port PA9(TX) of the STM32F411CEU6 microcontroller and receives data through PA10(RX). The UART_TX of the HC-05 is connected to PA10, and the UART_RX is connected to PA9. VCC uses 3.3-6V power supply, and GND is the ground pin used for grounding the module. The parameters of the HC-05 and the serial port data format of the STM32F411CEU6 must be the same. The serial ports PA9 and PA10 are also configured in STM32CubeMX. The default baud rate is 9600bit / s, 8 data bits, 1 stop bit, and no parity bit.

2. The portable human gait motion parameter detection device as described in claim 1, characterized in that, The voltage at the IN / A port is adjusted by the VR1 potentiometer to change the threshold. The system uses the ADC1 port on the STM32F411CEU6 to acquire data and read the voltage change at the OUT / A port on the pressure sensor module. The analog voltage signal is converted into a digital signal by the ADC, and the detected ADC value is used to determine whether the FSR402 flexible film pressure sensor is being pressed, thereby identifying and recording the number of steps, step frequency, and determining whether the current gait phase is the support phase or the oscillating phase.

3. The portable human gait motion parameter detection device as described in claim 1, characterized in that, The clock circuit includes a high-speed external oscillator and a low-speed external oscillator. The high-speed external oscillator uses a 25MHz crystal oscillator, and the low-speed external oscillator uses a 32.768kHz crystal oscillator. The SW debug download interface uses the SWDIO and SWCLK interfaces of the STM32F411CEUX chip to connect to ST-link for program burning.

4. The portable human gait motion parameter detection device as described in claim 1, characterized in that, The portable human gait motion parameter detection device also includes a software component, which includes STM32CubeMX, KeilMDK ARM, and MIT AppInventor. The STM32CubeMX is mainly used for configuring the clock, ADC, USART, and GPIO. The high-speed external oscillator of the STM32F411CEU6 used in the system is 25MHz, configured with M:25, N:168, P:2, PLLCLK enabled, and a frequency of 84MHz. The system uses two identical FSR402 flexible thin-film pressure sensors, so two ADC channels are needed to detect whether the sensors are pressed. The system uses an HC-05 Bluetooth module for communication, and the serial port needs to be configured with a baud rate of 9600bit / s, 8 data bits, 1 stop bit, and no parity bit. The data format must be the same as that of the HC-05 Bluetooth module, otherwise data transmission will not be possible. PA0 and PC13 are the KEY button module pins and LED status indicator pins of the system.

5. The portable human gait motion parameter detection device as described in claim 1, characterized in that, The portable human gait motion parameter detection device also includes a software component, which includes STM32CubeMX, KeilMDK ARM, and MIT AppInventor. The KeilMDK ARM described above primarily performs the specific functions required by the system, divided into three parts: the main program, data acquisition and processing, and data transmission. The main program includes the button control system's start and stop operations. First, it initializes the STM32F4XX and system clock, and initializes peripherals such as GPIO, ADC1, and USART. To prevent accidental button presses and frequent unexpected operations from starting and stopping the system, the system is configured to change its state after a 3-second long press. Initially, the system is in a working, off state. The system checks if the KEY button is pressed for 3 seconds. If the button is pressed for more than 3 seconds, the system's working state changes from off to on. At this point, the system turns on, the BLUE LED lights up, and it begins continuously acquiring and processing data. The processed data is then sent to the HC-05 Bluetooth module via serial port. A mobile phone connected to the Bluetooth device via an Android app can then view gait data in real time. When the system detects that the KEY button has been pressed for more than 3 seconds again, the system will change its working state back to off, and the BLUE LED will light up. The LED indicator light is turned off; this enables the button control system to operate and pause. The data acquisition and processing program includes starting to read sensor data, processing sensor status, determining gait stage, recording steps, calculating step frequency, and sending data via serial port to achieve real-time monitoring and analysis of gait. Data acquisition mainly relies on two FSR402 thin-film pressure sensors in the pressure detection module. The voltage signal is converted into a digital signal by an ADC. The system determines whether the FSR402-1 and FSR402-2 thin-film pressure sensors exceed the set threshold. If the threshold is exceeded, the system determines that the FSR402 thin-film pressure sensors are under pressure. The system analyzes the current gait stage based on the pressure on the left and right feet: is it a left support phase, a right support phase, a double support phase, or a double swing phase? During movement, the STM3... The 2F411CEU6 microcontroller analyzes the data detected by the FSR402-1 and FSR402-2 thin-film pressure sensors to calculate the step count and cadence. If the pressure value of the FSR402-1 thin-film pressure sensor exceeds the set threshold, it determines that a step has been taken in the current movement state, and the system records one step. The sum of the steps of the left and right feet is the total number of steps during the movement. When the system starts working, it counts the steps every 60 seconds in real time and records this data as the cadence. The data transmission program is that the system detects data through the FSR402 thin-film pressure sensor, processes the data, and stores the processed data in the format of "step count, cadence, gait stage." The data is sent to the HC-05 Bluetooth module via serial port. Mobile devices can receive and send data by connecting to the Bluetooth module, and the relevant data can be viewed in real time on the developed Android app.

6. The portable human gait motion parameter detection device as described in claim 1, characterized in that, The portable human gait motion parameter detection device also includes a software component, which includes STM32CubeMX, KeilMDK ARM, and MIT AppInventor. The MIT AppInventor described above is used for software design. The software displays data transmitted via Bluetooth by the human gait motion parameter measurement system, with the system name "Human Gait Motion Parameter Measurement System" displayed at the top. The software requires a Bluetooth client and a timer to select and connect to Bluetooth devices and receive data via Bluetooth. Bluetooth selection is achieved through a list selection box displaying the Bluetooth address and name searched by the Bluetooth client; clicking HC-05 connects the device. A button disconnects the device. The Bluetooth connection status is displayed below the system name. A 2×4 table is also required to display human gait motion parameters: steps, cadence, and gait phase.

7. A method of using a portable human gait motion parameter detection device, characterized in that, Includes the following steps: First, place the two FSR402 thin-film pressure sensors in their respective positions. Place the FSR402-1 on the left and fix it to the left heel, and place the FSR402-2 on the right and fix it to the right heel. Place the STM32F411CEU6 minimum system development board and the HC-05 Bluetooth module in your pocket or fix them to your waist. The second step is to connect the STM32F411CEU6 minimum system development board to a power source and use a USB Type-C data cable to connect to a 5V power output for direct power supply. At this time, the system power indicator light will light up and the red LED will remain on. Third, on the Android APP on your phone, click "Add Device" and select the device name of the portable human gait motion parameter detection system. When the Bluetooth connection status shows "Bluetooth connected", manually press and hold the KEY button for more than three seconds. The system's LED working indicator will light up, and the FSR402 thin film pressure sensor will start detecting gait data and transmit the data through the HC-05 Bluetooth module. The data received by the phone will be displayed in the list of steps, cadence, and gait stage. Fourth, if you want to pause and rest during rehabilitation training or daily exercise, manually press and hold the KEY button for more than three seconds. The system's LED indicator light will turn off, and the system will pause its operation. Fifth, when a system error occurs, press the reset button to restart the system. At this time, repeat the third step to connect the device and restart the system.