Insulin pump piston position detection system and method based on magnetic field sensors

CN122828209APending Publication Date: 2026-09-29重庆联芯致康生物科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611324250.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-28
Publication Date
2026-09-29

AI Technical Summary

Technical Problem

[0005]本发明提供了基于磁场传感器的胰岛素泵活塞位置检测系统及方法,旨在解决现有胰岛素泵活塞位置检测方案体积大、功耗高以及无法实现全量程连续监测的问题

Benefits of technology

[0013]大幅提升位置检测的识别准确率本方案采用三轴磁场矢量检测替代传统单轴磁场检测,能够完整捕捉磁性块产生的空间磁场三维分布信息,有效避免了单轴检测因磁性块安装角度偏差、活塞运动微小径向偏移导致的信号失真问题;同时,三维磁场矢量的解算能够通过空间方向特征区分目标磁场与单一方向的环境杂散磁场,降低误检和漏检概率,显著提升了活塞位置识别的准确率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122828209A_ABST
    Figure CN122828209A_ABST
Patent Text Reader

Abstract

This invention relates to the field of medical devices, specifically disclosing an insulin pump piston position detection system and method based on a magnetic field sensor. The system includes: a magnetic block fixed to the insulin pump piston or piston rod; a magnetic field sensing module for sensing changes in magnetic flux at the piston end magnet and outputting a 3-axis magnetic field strength signal; a main control processing module electrically connected to the magnetic field sensing module for receiving the 3-axis magnetic field strength signal and calculating the real-time displacement of the piston based on changes in the magnetic field vector; and a power supply module including a step-down circuit, the input of which is connected to a battery power source, and the output of which is connected to the magnetic field sensing module and the main control processing module, for providing a stable operating voltage. The technical solution of this invention solves the problems of large size, high power consumption, and inability to achieve continuous monitoring across the entire insulin pump piston position detection range in existing solutions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical devices, and in particular to an insulin pump piston position detection system and method based on a magnetic field sensor. Background Technology

[0002] In the field of modern medical devices, transdermal insulin pumps, as core devices for diabetes treatment, are evolving towards extreme miniaturization and high integration. To ensure absolute accuracy in insulin dosage, real-time, continuous, and high-resolution monitoring of the linear displacement of the piston within the pump body is essential to provide real-time feedback on the remaining insulin level and ensure safe and reliable infusion.

[0003] In this specific technological field, position detection systems have undergone technological iterations from mechanical limiting to photoelectric sensing, and are gradually transitioning to non-contact magnetic field sensing technology. Magnetic field sensing technology uses magnetic sensitive elements to capture changes in the magnetic flux of the magnet at the piston end. By establishing a functional model between the spatial magnetic field vector and displacement, it strives to achieve full-range digital displacement reconstruction without increasing the mechanical friction of the system.

[0004] However, due to the extreme constraints of extremely small size and ultra-long standby time required for patch-type devices, existing position detection solutions have reached a bottleneck where accuracy and power consumption are mutually exclusive. Traditional systems often require high-frequency sampling and high-performance reference voltage to maintain the sensitivity of magnetic sensing, but this leads to rapid battery depletion. If the response speed of the power management system is reduced to save energy, the instantaneous voltage drop generated when the pump drive motor is working will cause severe disturbances in the sensor's sampling reference potential. This potential fluctuation will directly mask the effective magnetic field vector signal on the order of milligauss, thereby causing the magnetic field inference algorithm to fail and resulting in serious deviations in displacement calculation. In micro-dose delivery scenarios that require high accuracy, existing position detection technologies cannot effectively resist the combined interference of power supply ripple and environmental stray magnetic fields. This makes it difficult to provide stable and reliable full-range displacement feedback in complex electromagnetic environments, becoming a key technical challenge restricting further improvement in the safety of micro insulin pumps. Summary of the Invention

[0005] This invention provides an insulin pump piston position detection system and method based on a magnetic field sensor, aiming to solve the problems of large size, high power consumption, and inability to achieve continuous monitoring across the entire insulin pump piston position detection range in existing solutions.

[0006] To solve the above-mentioned technical problems, this application provides the following technical solution: An insulin pump piston position detection system based on a magnetic field sensor includes: A magnetic block, which is fixed to the insulin pump piston or piston rod; The magnetic field sensing module is used to sense the change in magnetic flux of the magnet at the piston end and output a 3-axis magnetic field strength signal. The main control processing module is electrically connected to the magnetic field sensing module and is used to receive the 3-axis magnetic field strength signal and calculate the real-time displacement of the piston based on the change of the magnetic field vector. The power supply module includes a step-down circuit. The input of the step-down circuit is connected to the battery power supply, and the output is connected to the magnetic field sensing module and the main control processing module to provide a stable operating voltage.

[0007] The basic principle and beneficial effects of this invention are as follows: A small magnetic block is fixed to the piston or piston rod of an insulin pump, synchronously converting the linear mechanical displacement of the piston into a continuous and monotonic change in the magnetic field vector around the magnetic block. The magnetic field sensing module captures the changes in magnetic flux distribution in three-dimensional space in real time and outputs a three-axis magnetic field strength signal reflecting the spatial characteristics of the magnetic field. After receiving this digital signal, the main control processing module calculates the real-time position of the piston based on the inherent correspondence between the magnetic field vector and the physical displacement of the piston through spatial vector calculation. Simultaneously, a power supply module containing a step-down circuit provides a stable operating voltage with extremely low ripple to the magnetic field sensing module and the main control processing module, eliminating the interference of voltage fluctuations on the detection accuracy of weak magnetic fields from the power supply end and ensuring the stable operation of the entire detection link.

[0008] In existing insulin pump piston position detection solutions, mechanical limiters require complex mechanical structures such as transmission links, trigger springs, and limit switches, while photoelectric solutions require independently set optical components such as emitting light sources, receiving lenses, and optical path isolation covers. Both types of solutions occupy a large amount of internal space of the pump body and cannot meet the development needs of ultra-miniaturization of patch insulin pumps.

[0009] The magnetic blocks used in this solution are miniature permanent magnets that can be directly embedded or pasted onto the piston end or piston rod sidewall without requiring additional mechanical installation space. The magnetic field sensing module and the main control processing module are both highly integrated semiconductor chips. The step-down circuit of the power supply module can use a small surface-mount DC-DC converter chip. All core components can be integrated on the same PCB board, with no redundant mechanical or optical path structures. The overall size is small and can perfectly fit the compact internal layout of the patch insulin pump.

[0010] While mechanical limiting methods offer low static power consumption, they cannot achieve continuous monitoring; photoelectric methods require continuous power to the emitting light source, resulting in extremely high dynamic power consumption; traditional single-axis magnetic field detection solutions require high-frequency continuous sampling to maintain sensitivity, leading to extremely poor battery life. This solution employs non-contact magnetic field sensing, eliminating mechanical friction and additional mechanical energy consumption during the detection process; the triaxial magnetic sensor inherently possesses low power consumption characteristics and, compared to photoelectric sensors, does not require continuous light source power; simultaneously, the step-down circuit in the power protection module utilizes DC-DC conversion technology, reducing conversion losses from battery power to operating voltage and further optimizing system power consumption from the power supply side, thereby improving the single-charge battery life of the insulin pump.

[0011] Mechanical limiters can only identify 2-3 discrete points such as "full drug level" and "empty drug level", which cannot reflect the intermediate running state of the piston at all; photoelectric sensors are easily affected by factors such as turbidity of the drug liquid, air bubbles blocking, and light path contamination, and the detection accuracy drops sharply in the middle of the stroke, making it difficult to achieve stable continuous monitoring.

[0012] In this scheme, the spatial magnetic field strength generated by the magnetic block changes continuously and monotonically with the distance between the piston and the magnetic field sensing module. The three-axis magnetic field strength signal output by the magnetic field sensing module can completely map any position of the piston throughout its entire stroke. The main control processing module can realize uninterrupted, full-range position monitoring from full drug level to empty drug level by solving the continuously changing magnetic field vector, breaking through the technical limitation of existing schemes that can only detect discrete points.

[0013] This solution significantly improves the accuracy of position detection by using three-axis magnetic field vector detection instead of traditional single-axis magnetic field detection. It can completely capture the three-dimensional distribution information of the spatial magnetic field generated by the magnetic block, effectively avoiding the signal distortion problem caused by the installation angle deviation of the magnetic block and the slight radial offset of the piston movement in single-axis detection. At the same time, the calculation of the three-dimensional magnetic field vector can distinguish the target magnetic field from the environmental stray magnetic field in a single direction through spatial direction features, reducing the probability of false detection and missed detection, and significantly improving the accuracy of piston position recognition.

[0014] The magnetic field sensing module can convert magnetic field signals into digital signals within 1ms; the main control processing module can directly perform vector operations on the three-axis digital signals without the need for complex analog signal conditioning and multi-level filtering preprocessing. The overall signal processing latency is low, and it can capture the instantaneous displacement changes of the piston in real time, ensuring the accuracy of dose acquisition in micro-drug administration scenarios and avoiding unexpected situations caused by detection delays.

[0015] Enhanced anti-interference capability in complex electromagnetic environments: Triaxial magnetic field vector detection can effectively filter interference from unidirectional geomagnetic fluctuations and electromagnetic radiation from electronic devices in the external environment by using the direction and intensity characteristics of the spatial magnetic field. At the same time, the stable operating voltage provided by the power supply module can eliminate the impact of natural battery voltage decay and voltage drop at startup on the magnetic field sensing module, avoiding detection signal drift caused by power instability, and enabling the system to maintain detection accuracy under complex working conditions such as motor drive and external electromagnetic interference.

[0016] Adopting a completely non-contact design, there is no contact or friction between any mechanical parts during the detection process, which completely avoids problems such as fatigue damage, contact oxidation, and optical path aging and lens contamination of traditional mechanical limit switches; the stable power supply also prevents voltage surges from damaging electronic components, increases the mean time between failures, and significantly reduces the equipment failure rate and maintenance costs.

[0017] The magnetic block can be directly fixed to the piston or piston rod by means of pasting or embedding. The magnetic field sensing module, main control processing module and power protection module are all standardized integrated electronic components that can be integrated on the PCB board. The installation process is simple, the production yield is high, and it is convenient for the large-scale production and upgrading of the equipment.

[0018] This invention can promptly detect faults such as piston jamming, motor idling (or other mechanical failures), and abnormal drive, avoiding serious safety hazards such as inaccurate dosage, leakage, or over-dosing caused by equipment failure. The non-contact detection method also avoids direct contact between the detection component and the liquid medication, ensuring the purity of the liquid medication and reducing the risk of infection for patients.

[0019] In summary, this invention solves the problems of existing insulin pump piston position detection schemes being bulky, power-consuming, and unable to achieve continuous monitoring across the entire insulin pump range. Furthermore, when the main control processing module executes the position detection logic, it reads the component values ​​of the ambient geomagnetic field in three dimensions during the device initialization phase and uses them as the zero-position compensation base. When the piston is displaced, the main control processing module obtains the current magnetic flux vector value sensed by the magnetic field sensing module and subtracts the zero-position compensation base to obtain the effective magnetic field vector.

[0020] Furthermore, the main control processing module pre-stores a lookup table or algebraic model of the relationship between magnetic field strength and displacement; the main control processing module calculates the spatial modulus of the effective magnetic field vector, and converts the spatial modulus into the linear displacement of the piston based on the lookup table or algebraic model.

[0021] Furthermore, as the piston moves from the full drug level to the empty drug level, the main control processing module calculates the remaining drug quantity in real time and executes the low remaining quantity warning logic based on the nonlinear change in magnetic field strength caused by the change in distance between the magnet and the magnetic field sensing module.

[0022] Furthermore, the magnetic field sensing module is configured in a single-transformation mode; the microcontroller generates a trigger signal through an internal timer, wakes up the measurement process once every preset time, and enters a deep sleep state with low current loss after the magnetic field sensing module completes sampling.

[0023] Furthermore, the magnetic field sensing module transmits magnetic flux vector data to the main control processing module via the integrated circuit bus; pins 1 and 4 of the magnetic field sensing module are connected to the main control processing module via the integrated circuit bus, and a pull-up resistor with a resistance of 2.4 kΩ is connected in parallel on the integrated circuit bus; pins 9 and 10 of the magnetic field sensing module are connected to a 2.8V regulated output terminal.

[0024] Furthermore, the power supply pin of the magnetic field sensing module is equipped with a multi-stage decoupling capacitor array, which consists of a 2.2 microfarad capacitor, a 100 nanofarad capacitor, and a 100 nanofarad capacitor, used to filter out high-frequency ripple.

[0025] Furthermore, the 7th pin of the magnetic field sensing module is configured as a data ready interrupt output terminal, which is used to send a wake-up signal to the main control processing module when data acquisition is completed.

[0026] Furthermore, the step-down circuit uses a DC-to-DC converter chip; the output terminal of the step-down circuit outputs a voltage of 2.8 volts. Attached Figure Description

[0027] Figure 1 This is a schematic diagram of the overall technical architecture of the insulin pump piston position detection system based on a magnetic field sensor proposed in this invention. Figure 2 This is a schematic diagram of the core principle framework of real-time piston displacement calculation based on magnetic field vector in this invention; Figure 3 This is a flowchart illustrating the logical process of environmental geomagnetic zero-position compensation and effective magnetic field vector acquisition in this invention. Figure 4 This is a schematic diagram of the multi-level interaction relationship and data flow between the magnetic field sensing module and the main control processing module in this invention; Figure 5 This is a flowchart of the system power consumption control logic based on the timed wake-up mechanism in this invention. Figure 6 The circuit diagram of the insulin pump piston position detection system based on a magnetic field sensor proposed in this invention. Detailed Implementation

[0028] The following detailed description illustrates the specific implementation method: Reference Figure 1 , Figure 1 This is a schematic diagram of the overall technical architecture of the insulin pump piston position detection system based on a magnetic field sensor proposed in this invention. Figure 1 As shown, the system includes: a magnetic field sensing module, a main control processing module, and a power supply protection module.

[0029] The magnetic field sensing module includes a magnetic sensor chip for sensing changes in magnetic flux at the piston end of the insulin pump and outputting a 3-axis magnetic field strength signal reflecting the spatial magnetic field distribution. The main control processing module includes a microcontroller unit electrically connected to the magnetic field sensing module for receiving the 3-axis magnetic field strength signal and executing a spatial magnetic field deduction algorithm based on magnetic field vector changes to calculate the real-time displacement of the piston. The power supply module includes a step-down circuit whose input is connected to a battery power source and whose output is connected to both the magnetic field sensing module and the main control processing module, providing a stable operating voltage with extremely low ripple.

[0030] In this embodiment, during operation, the insulin pump uses a motor to drive a piston along a linear track to propel the medication. The magnetic field sensing module, through its internal high-sensitivity magnetic sensor chip, captures the changing magnetic field vector of the permanent magnet in real time, which varies with the piston's displacement. The main control processing module periodically reads the raw magnetic flux data from the magnetic sensor chip's register via the integrated circuit bus (I2C) and uses preset compensation logic and geometric models to map the nonlinear changes in magnetic field strength into linear displacement in physical space. The power supply module, through precise feedback control, ensures that the power supply level of the magnetic detection link remains constant even under the instantaneous high current load generated during motor startup. This application achieves full-range, non-contact monitoring of the piston position through in-depth calculation of the three-axis magnetic field vector, significantly improving drug delivery accuracy.

[0031] Reference Figure 2 , Figure 2 This is a schematic diagram of the core principle framework for real-time piston displacement calculation based on magnetic field vector in this invention. After acquiring the current magnetic flux vector value sensed by the magnetic sensor chip, the microcontroller unit executes spatial modulus conversion logic.

[0032] In this embodiment, the microcontroller unit within the main control processing module pre-stores a lookup table or algebraic model relating magnetic field strength to displacement. When the magnetic field sensing module 10 outputs the current 3-axis magnetic field components... At that time, the microcontroller first calculates the spatial magnitude of the effective magnetic field vector. :

[0033] in, This represents the zero-point compensation base. The microcontroller unit, based on the lookup table or algebraic model, assigns the spatial modulus... Converted into linear displacement of the piston As the piston moves from a full medication reservoir to an empty one, the relative distance between the magnet and the magnetic sensor chip decreases, causing the spatial magnetic field strength to exhibit a non-linear increasing trend. Based on this change, the microcontroller calculates the remaining insulin level in the reservoir in real time. If the calculated remaining level falls below a preset safety threshold, the microcontroller immediately triggers an interrupt signal, executing low-level warning logic to ensure user medication safety.

[0034] Reference Figure 3 , Figure 3 This is a flowchart illustrating the logical framework for environmental geomagnetic null point compensation and effective magnetic field vector acquisition in this invention. To eliminate the interference of the environmental background magnetic field on detection accuracy, this application introduces an initialization calibration mechanism.

[0035] In this embodiment, during the device initialization phase, the microcontroller first instructs the magnetic sensor chip to perform baseline sampling in a piston-free state, reading the components of the ambient geomagnetic field in three dimensions and storing them in static random access memory (SRAM) as the zero-bit compensation base. When the system enters the formal monitoring state and the piston moves, the microcontroller acquires the total magnetic field components sensed by the magnetic sensor chip and performs a subtraction operation to eliminate background noise.

[0036] in, For the effective magnetic field vector, The synthetic magnetic field is sensed in real time. The ambient geomagnetic baseline is locked during the initialization phase. Through this differential compensation logic, the system can effectively counteract the superposition effect of constant magnetic interference generated by the internal metal components of the pump body and external geomagnetic fluctuations, ensuring a sensing resolution of 0.1mm.

[0037] Reference Figure 4 , Figure 4 This is a schematic diagram illustrating the multi-level interaction and data flow between the magnetic field sensing module and the main control processing module in this invention. This application ensures the integrity of signal transmission through a specific electrical connection architecture.

[0038] In this embodiment, the magnetic sensor chip has 3-axis magnetic field monitoring capability and transmits magnetic flux vector data to the microcontroller unit via an integrated circuit bus (I2C). Pins 1 (SCL) and 4 (SDA) of the magnetic sensor chip (model LIS2MDLTR in this embodiment) are connected to the microcontroller unit via the integrated circuit bus. To ensure the signal rise slope under high-speed communication, a 2.4kΩ pull-up resistor is connected in parallel on the integrated circuit bus. Pins 9 and 10 of the magnetic sensor chip are connected together to the 2.8V regulated output provided by the power supply module 30.

[0039] The power supply pins of the magnetic sensor chip are equipped with a multi-stage decoupling capacitor array. This array consists of a 2.2uF high-capacity tantalum capacitor, a 100nF ceramic capacitor, and another 100nF ceramic capacitor connected in parallel. The 2.2uF capacitor is mainly responsible for filtering low-frequency power supply ripple, while the two 100nF capacitors form a path with extremely low equivalent series inductance to absorb high-frequency transient noise, ensuring that the reference voltage at the analog-to-digital conversion front end is extremely stable. Furthermore, pin 7 of the magnetic sensor chip is configured as a data-ready interrupt output. Whenever the internal sensing array completes a quantization process from a magnetic field to a digital signal, pin 7 transitions, sending a wake-up signal to the microcontroller unit and triggering the data reading process at the master control unit.

[0040] In this embodiment, the microcontroller unit is a low-power system-on-a-chip (SoC) that operates as a host via an integrated circuit interface. In terms of physical layout, the magnetic sensor chip is positioned close to the sidewall of the piston's running track to maximize the penetration rate of magnetic field lines; while the microcontroller unit is positioned away from the main control area of ​​the motor driver to reduce interference.

[0041] In terms of power supply, the buck circuit uses a DC-DC converter chip. In other embodiments, the output of the buck circuit achieves closed-loop control through a voltage feedback loop consisting of a 560kΩ first feedback resistor and a 150kΩ second feedback resistor, and its output voltage... Follow the following proportional relationship:

[0042] in, This is the internal reference voltage of the chip. It is a 560kΩ resistor. The resistor is 150kΩ. The stable 2.8V voltage generated by this circuit not only powers the digital circuit, but more importantly, it eliminates the impact of the instantaneous drop in battery voltage caused by the drive motor working under heavy load on the accuracy of magnetic sensing.

[0043] Reference Figure 5 , Figure 5This is a flowchart illustrating the system power consumption control logic based on a timed wake-up mechanism in this invention. It achieves extremely low standby current.

[0044] In this embodiment, the magnetic sensor chip is configured for a single-transformation mode, rather than a continuous sampling mode. The microcontroller uses its internal low-power timer to generate periodic trigger signals, setting it to wake up the complete measurement process once every 1 second (i.e., a 1Hz sampling frequency).

[0045] The micro-temporal process is as follows: Pre-triggered state: Timer overflow wakes up the microcontroller from sleep state to working state and initializes the I2C bus; Execution intermediate state: The microcontroller triggers the magnetic sensor to perform a single conversion through I2C instructions; After receiving the DRDY interrupt signal, it calls the 16-bit magnetic field strength register value through the data bus; Feedback steady state: The microcontroller completes the displacement calculation and updates the status bit, and then issues a sleep command.

[0046] Under the instruction set mapping, once data acquisition is complete, the microcontroller immediately controls the magnetic sensor chip to enter a deep sleep state with low current consumption. Through this dynamic power balancing mechanism, the average power consumption of the entire position detection subsystem is kept at a low level, perfectly meeting the stringent engineering requirements of patch insulin pumps for long-lasting power.

[0047] The insulin pump piston position detection system based on a magnetic field sensor proposed in this invention has the following significant advantages: High-precision non-contact monitoring: Through triaxial magnetic vector calculation, a linear displacement detection resolution of 0.1mm is achieved, which can accurately capture the pushing action of extremely small amounts of liquid medicine, far exceeding the binarization monitoring accuracy of traditional mechanical switches.

[0048] Extremely low operating power consumption: The strategy of combining single-transformation mode with timed wake-up mechanism reduces the static power consumption of magnetic sensing link and greatly extends the battery life of pump body.

[0049] Excellent anti-interference capability: Utilizing a multi-stage decoupling array of 2.2uF+100nF+100nF and a precision feedback buck circuit, the system can effectively reduce electromagnetic noise and voltage drops generated during operation.

[0050] Strong environmental adaptability: Through the dynamic zero-position compensation algorithm, it can automatically eliminate environmental geomagnetic and magnetic interference, ensuring the stability of position calculation in different scenarios and complex magnetic environments.

[0051] Full-range continuous coverage: It breaks through the limitation of existing solutions that can only detect two positions, "full" and "empty", and realizes real-time monitoring of every coordinate point from full to empty, providing continuous data support for the warning of remaining drug quantity.

[0052] The above are merely embodiments of the present invention. The invention is not limited to the fields covered by these embodiments. Commonly known structures and characteristics in the solutions are not described in detail here. Those skilled in the art are aware of all common technical knowledge in the field prior to the application date or priority date, are able to access all existing technologies in that field, and have the ability to apply conventional experimental methods prior to that date. Those skilled in the art can, under the guidance of this application, improve and implement this solution in combination with their own capabilities. Some typical known structures or methods should not be obstacles for those skilled in the art to implement this application. It should be noted that those skilled in the art can make several modifications and improvements without departing from the structure of the present invention. These should also be considered within the scope of protection of the present invention, and will not affect the effectiveness of the implementation of the present invention or the practicality of the patent. The scope of protection claimed in this application should be determined by the content of its claims, and the specific embodiments described in the specification can be used to interpret the content of the claims.

Claims

1. An insulin pump piston position detection system based on a magnetic field sensor, characterized in that, include: A magnetic block, which is fixed to the insulin pump piston or piston rod; The magnetic field sensing module is used to sense the change in magnetic flux of the magnet at the piston end and output a 3-axis magnetic field strength signal. The main control processing module is electrically connected to the magnetic field sensing module and is used to receive the 3-axis magnetic field strength signal and calculate the real-time displacement of the piston based on the change of the magnetic field vector. The power supply module includes a step-down circuit. The input of the step-down circuit is connected to the battery power supply, and the output is connected to the magnetic field sensing module and the main control processing module to provide a stable operating voltage.

2. The insulin pump piston position detection system based on a magnetic field sensor according to claim 1, characterized in that, When executing the position detection logic, the main control processing module reads the component values ​​of the ambient geomagnetic field in three dimensions during the device initialization phase and uses them as the zero-position compensation base. When the piston is displaced, the main control processing module obtains the current magnetic flux vector value sensed by the magnetic field sensing module and subtracts the zero-position compensation base to obtain the effective magnetic field vector.

3. The insulin pump piston position detection system based on a magnetic field sensor according to claim 2, characterized in that, The main control processing module has a lookup table or algebraic model pre-stored for the relationship between magnetic field strength and displacement; the main control processing module calculates the spatial modulus of the effective magnetic field vector and converts the spatial modulus into the linear displacement of the piston based on the lookup table or algebraic model.

4. The insulin pump piston position detection system based on a magnetic field sensor according to claim 3, characterized in that, As the piston moves from the full drug level to the empty drug level, the main control processing module calculates the remaining drug quantity in real time and executes the low remaining quantity warning logic based on the nonlinear change in magnetic field strength caused by the change in distance between the magnet and the magnetic field sensing module.

5. The insulin pump piston position detection system based on a magnetic field sensor according to claim 4, characterized in that, The magnetic field sensing module is configured for a single-transformation mode; the microcontroller generates a trigger signal through an internal timer, wakes up the measurement process once every preset time, and enters a deep sleep state with low current loss after the magnetic field sensing module completes sampling.

6. The insulin pump piston position detection system based on a magnetic field sensor according to claim 5, characterized in that, The magnetic field sensing module transmits magnetic flux vector data to the main control processing module via the integrated circuit bus; pins 1 and 4 of the magnetic field sensing module are connected to the main control processing module via the integrated circuit bus, and a pull-up resistor with a resistance of 2.4 kΩ is connected in parallel on the integrated circuit bus; pins 9 and 10 of the magnetic field sensing module are connected to a 2.8V regulated output terminal.

7. The insulin pump piston position detection system based on a magnetic field sensor according to claim 6, characterized in that, The power supply pin of the magnetic field sensing module is equipped with a multi-stage decoupling capacitor array, which consists of a 2.2 microfarad capacitor, a 100 nanofarad capacitor, and a 100 nanofarad capacitor, and is used to filter out high-frequency ripple.

8. The insulin pump piston position detection system based on a magnetic field sensor according to claim 7, characterized in that, Pin 7 of the magnetic field sensing module is configured as a data ready interrupt output terminal, which is used to send a wake-up signal to the main control processing module when data acquisition is completed.

9. The insulin pump piston position detection system based on a magnetic field sensor according to claim 8, characterized in that, The step-down circuit uses a DC-to-DC converter chip; the output terminal of the step-down circuit outputs a voltage of 2.8 volts.

10. A method for detecting the piston position of an insulin pump based on a magnetic field sensor, characterized in that, The system described in any one of claims 1-9 is employed.