An infusion system, a monitoring method of an infusion system, and a storage medium
By using a combination of encoder and photoelectric detection module in the infusion system, the problem of needing two systems to monitor infusion speed and rotation direction in the prior art is solved, achieving the effect of simplifying the structure and reducing costs.
Patent Information
- Application Number
- CN202410715368.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-04
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2044-06-04
AI Technical Summary
Existing infusion systems require two separate measurement systems to monitor the infusion rate and the encoder rotation direction, which increases costs and complicates the structural design.
An infusion system is employed, comprising an encoder, a peristaltic structure, a stepper motor, an MCU module, and two sets of photoelectric detection modules. The rotation direction and speed of the encoder are determined by the phase difference of the photoelectric signals, thereby monitoring the infusion rate.
It simplifies the structural design of the infusion system, reduces costs, and can simultaneously monitor the encoder's rotation direction and infusion rate.
Smart Images

Figure CN118615515B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical device technology, and in particular to an infusion system, a monitoring method for the infusion system, and a storage medium. Background Technology
[0002] Currently, infusion systems (infusion pumps and / or syringe pumps) are commonly used for intravenous infusion. During operation, these systems require precise control of the infusion rate at different stages of the infusion process, as well as control of the encoder rotation direction at these stages to regulate the infusion pump's feed direction. Current infusion systems require one measurement system to monitor the infusion rate and another to detect the encoder rotation direction. Using two separate measurement systems increases the cost of the infusion system and complicates its structural design. Summary of the Invention
[0003] Based on this, it is necessary to propose an infusion system, a monitoring method for the infusion system, and a storage medium to address the above problems.
[0004] The specific technical solution of the first embodiment of the present invention is as follows: an infusion system, the infusion system including an encoder, a peristaltic structure, a stepper motor, an MCU module, a first photoelectric detection module, and a second photoelectric detection module; the MCU is used to send PWM signals, the stepper motor is used to rotate a preset angle according to the PWM signals to drive the peristaltic structure to peristalse; the peristaltic structure peristalses for one peristaltic cycle, and the peristaltic structure squeezes the liquid medicine a preset distance; the encoder is installed on the peristaltic structure, the peristaltic structure is used to drive the encoder to rotate, and the encoder rotates one revolution for one peristaltic cycle; the first photoelectric detection module is used to monitor the rotation of the encoder at a first preset position to obtain a first photoelectric signal, and the second photoelectric detection module is used to monitor the rotation of the encoder at a second preset position to obtain a first photoelectric signal. The rotation of the position is monitored to obtain a second photoelectric signal. The encoder is provided with at least three blades, wherein the distance between adjacent first target blades and second target blades is a first distance, and the distance between the remaining adjacent blades is a second distance; the first distance is greater than the second distance; the MCU module is used to obtain the rotation direction of the encoder based on the phase difference between the first level value of the first photoelectric signal and the second level value of the second photoelectric signal, to obtain the rotation speed of the encoder based on the rotation direction of the encoder, the first level value, the second level value and a preset time interval, and to obtain the infusion rate of the infusion system based on a preset speed conversion relationship and the rotation speed of the encoder; the preset speed conversion relationship includes at least the relationship between the infusion rate of the infusion system and the rotation speed of the encoder.
[0005] The specific technical solution of the second embodiment of the present invention is as follows: a monitoring method for an infusion system, applied to the infusion system as described in the first embodiment of this application, the method comprising: obtaining the rotation direction of the encoder based on the phase difference between the first level value of the first photoelectric signal and the second level value of the second photoelectric signal; obtaining the rotation speed of the encoder based on the rotation direction of the encoder, the first level value, the second level value and a preset time interval; obtaining the infusion rate of the infusion system based on a preset speed conversion relationship and the rotation speed of the encoder; the preset speed conversion relationship includes at least the relationship between the infusion rate of the infusion system and the rotation speed of the encoder.
[0006] Preferably, obtaining the encoder's rotation direction based on the phase difference between the first level value of the first photoelectric signal and the second level value of the second photoelectric signal includes: setting a first initial count value; the initial value of the first initial count value is 0; obtaining a first final count value of the first photoelectric signal between the initial moment and the last moment using a preset first counting rule, the first initial count value, the first level value of the first photoelectric signal, and the second level value of the second photoelectric signal; the initial moment is the moment when the MCU module sends the first PWM signal; the last moment is the moment when the MCU module sends the last PWM signal; determining the encoder's rotation direction based on a preset first counting judgment rule and the first final count value; the preset first counting judgment rule is that when the first final count value is positive, the encoder's rotation direction is from the first photoelectric detection module to the second photoelectric detection module; when the first final count value is negative, the encoder's rotation direction is from the second photoelectric detection module to the first photoelectric detection module; the preset first counting rule is: when the first final count value is positive, the encoder's rotation direction is from the first photoelectric detection module to the second photoelectric detection module. When the falling edge of the first photoelectric signal at a given moment corresponds to a high level in the second photoelectric signal, the first initial count value is incremented by 1 to obtain a first count value, and this first count value is used as the first initial count value for the next moment. When the falling edge of the first photoelectric signal at the same moment corresponds to a low level in the second photoelectric signal, the first initial count value is decremented by 1 to obtain a second count value, and this second count value is used as the first initial count value for the next moment. If the first target initial count value at the previous moment of the first count value at the first moment is decremented by 1, the first target initial count value is cleared to zero, and the cleared first target initial count value is used as the first initial count value to increment by 1 to obtain a first count value. If the second target initial count value at the previous moment of the second count value at the second moment is incremented by 1, the second target initial count value is cleared to zero, and the cleared second target initial count value is used as the first initial count value to decrement by 1 to obtain a second count value. The first initial count value at the last moment of the first photoelectric signal is the first final count value.
[0007] Preferably, obtaining the encoder's rotation speed based on the encoder's rotation direction, the first level value, the second level value, and a preset time interval includes: when the encoder's rotation direction is from the first photoelectric detection module to the second photoelectric detection module, obtaining the encoder's first rotation speed using the first final count value and a preset first time interval.
[0008] Preferably, obtaining the first rotational speed of the encoder using the first final count value and a preset first time interval includes: obtaining a third count value at a third moment; the third moment being a moment within a preset first time interval before the final moment; obtaining a first difference between the first final count value and the third count value; and obtaining the first rotational speed of the encoder per unit time based on the first difference and the preset first time interval.
[0009] Preferably, obtaining the encoder's rotation direction based on the phase difference between the first level value of the first photoelectric signal and the second level value of the second photoelectric signal includes: setting a second initial count value; the initial value of the second initial count value is 0; obtaining a second final count value of the second photoelectric signal between the initial time and the last time using a preset second counting rule, the second initial count value, the first level value of the first photoelectric signal, and the second level value of the second photoelectric signal; the initial time is the time when the MCU module sends the first PWM signal; the last time is the time when the MCU module sends the last PWM signal; determining the encoder's rotation direction according to a preset second counting judgment rule and the second final count value; the preset second counting judgment rule is that when the second final count value is positive, the encoder's rotation direction is from the second photoelectric detection module to the first photoelectric detection module; when the second final count value is negative, the encoder's rotation direction is from the first photoelectric detection module to the second photoelectric detection module; the preset second counting rule is: when the same When the level of the first photoelectric signal corresponding to the falling edge of the second photoelectric signal at a certain time is high, the second initial count value is incremented by 1 to obtain a fourth count value, and the fourth count value is used as the second initial count value for the next time. When the level of the first photoelectric signal corresponding to the falling edge of the second photoelectric signal at the same time is low, the second initial count value is decremented by 1 to obtain a fifth count value, and the fifth count value is used as the second initial count value for the next time. If the third target initial count value at the previous time of the fourth count value at the fourth time is decremented by 1, the third target initial count value is cleared to zero, and the cleared third target initial count value is used as the second initial count value to increment by 1 to obtain the fourth count value. If the fourth target initial count value at the previous time of the fifth count value at the fifth time is incremented by 1, the fourth target initial count value is cleared to zero, and the cleared fourth target initial count value is used as the second initial count value to decrement by 1 to obtain the fifth count value. The second initial count value at the last time of the second photoelectric signal is the second final count value.
[0010] Preferably, obtaining the encoder's rotation speed based on the encoder's rotation direction, the first level value, the second level value, and a preset time interval includes: when the encoder's rotation direction is from the second photoelectric detection module to the first photoelectric detection module, obtaining the encoder's second rotation speed using the second final count value and a preset second time interval.
[0011] Preferably, obtaining the second rotational speed of the encoder using the second final count value and a preset second time interval includes: obtaining a sixth count value at a sixth moment; the sixth moment being a moment within a preset second time interval prior to the final moment; obtaining a second difference between the second final count value and the sixth count value; and obtaining the second rotational speed of the encoder per unit time based on the second difference and the preset second time interval.
[0012] Preferably, obtaining the second rotational speed of the encoder per unit time based on the second difference and the preset second time interval includes: dividing the second difference by the preset second time interval to obtain the second rotational speed of the encoder per unit time.
[0013] The specific technical solution of the third embodiment of the present invention is as follows: a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor performs the steps of the method as described in any one of the second embodiments of the present application.
[0014] The embodiments of the present invention have the following beneficial effects:
[0015] This invention improves the encoder structure by setting the blade distance in the encoder to two different intervals to obtain a first photoelectric signal and a second photoelectric signal. The encoder's rotation direction is obtained based on the phase difference between the first and second level values of the first and second photoelectric signals. The encoder's rotation speed is obtained based on the rotation direction, the first and second level values, and a preset time interval. The infusion rate of the infusion system is obtained based on the encoder's rotation speed and a preset speed conversion relationship. This allows a single monitoring system to determine both the encoder's rotation direction and the infusion rate of the infusion system. Compared to existing systems that require two separate measurement systems to monitor both the encoder's rotation direction and the infusion rate, this invention reduces the cost of the infusion system and simplifies its structural design. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a structural diagram of the infusion system;
[0018] Figure 2 This is a schematic diagram showing the positions of the first photoelectric detection module and the second photoelectric detection module.
[0019] Figure 3 This is a schematic diagram of the encoder blade shape;
[0020] Figure 4 A flowchart illustrating the steps of a monitoring method for an infusion system;
[0021] Figure 5 A flowchart outlining the steps to obtain the encoder's rotation direction;
[0022] Figure 6a This is a schematic diagram of the first type of photoelectric signal in this embodiment;
[0023] Figure 6b This is a schematic diagram of the second type of photoelectric signal in this embodiment;
[0024] Figure 7 Flowchart of steps to obtain the first rotational speed of the encoder;
[0025] Among them, 101 is an encoder; 102 is a creeping structure; 103 is a stepper motor; 104 is a photoelectric detection module; 201 is a first photoelectric detection module; and 202 is a second photoelectric detection module. Detailed Implementation
[0026] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0027] Please see Figure 1This is a structural diagram of an infusion system according to the first embodiment of this application. The infusion system includes an encoder 101, a peristaltic structure 102, a stepper motor 103, an MCU module, a first photoelectric detection module, and a second photoelectric detection module. The first and second photoelectric detection modules constitute a photoelectric detection module 104. The MCU is used to send PWM signals, and the stepper motor is used to rotate a preset angle according to the PWM signals, thereby driving the peristaltic structure to peristalse. The peristaltic structure squeezes the liquid medicine a preset distance for one peristaltic cycle. The encoder is mounted on the peristaltic structure, and the peristaltic structure drives the encoder to rotate. The encoder rotates one revolution for one peristaltic cycle. The first photoelectric detection module is used to monitor the rotation of the encoder at a first preset position to obtain a first photoelectric signal, and the second photoelectric detection module is used to... The encoder's rotation at a second preset position is monitored to obtain a second photoelectric signal. The encoder has at least three blades, where the distance between adjacent first and second target blades is a first distance, and the distance between the remaining adjacent blades is a second distance. The first distance is greater than the second distance so that the first and second level values have different pulse widths. The MCU module is used to obtain the encoder's rotation direction based on the phase difference between the first and second level values of the first and second photoelectric signals, and to obtain the encoder's rotation speed based on the encoder's rotation direction, the first level value, the second level value, and a preset time interval. The infusion rate of the infusion system is obtained based on a preset speed conversion relationship and the encoder's rotation speed. The preset speed conversion relationship includes at least the relationship between the infusion rate of the infusion system and the encoder's rotation speed.
[0028] For details, please refer to Figure 2 This is a schematic diagram showing the positions of the first photoelectric detection module 201 and the second photoelectric detection module 202. Figure 3 A schematic diagram of the encoder blade shape. Because the first and second photoelectric detection modules are located at different positions, they will obtain two different pulse widths when detecting the encoder's rotation. The first and second photoelectric signals form a phase difference, which can be used to determine the rotation direction of the infusion rate encoder in the infusion system.
[0029] In a specific embodiment, please refer to Figure 4 This is a flowchart illustrating the steps of a monitoring method for an infusion system according to a second embodiment of this application, applied to the infusion system described in the first embodiment of this application. The method includes:
[0030] Step 301: Obtain the rotation direction of the encoder based on the phase difference between the first level value of the first photoelectric signal and the second level value of the second photoelectric signal;
[0031] Step 302: Obtain the rotation speed of the encoder based on the rotation direction of the encoder, the first level value, the second level value, and a preset time interval;
[0032] Step 303: Obtain the infusion rate of the infusion system according to the preset speed conversion relationship and the rotational speed of the encoder; the preset speed conversion relationship includes at least the relationship between the infusion rate of the infusion system and the rotational speed of the encoder.
[0033] Specifically, the preset time interval can be set according to the actual situation, such as 1 minute or 5 minutes. Since the encoder has two different width intervals, the first photoelectric signal and the second photoelectric signal have two different pulse widths. Moreover, the positions of the first photoelectric detection module and the second photoelectric detection module are different. Therefore, the first photoelectric signal and the second photoelectric signal have a phase difference. The rotation speed of the encoder can be obtained based on the phase difference and the preset time interval. At the same time, the infusion speed of the infusion system can be obtained based on the preset speed conversion relationship and the rotation speed of the encoder. For example, if the preset speed conversion relationship is: encoder rotation speed : infusion speed of the infusion system = 2:1, the infusion speed of the infusion system can be obtained based on the encoder rotation speed.
[0034] In a specific embodiment, please refer to Figure 5 Step 301, which obtains the rotation direction of the encoder based on the phase difference between the first level value of the first photoelectric signal and the second level value of the second photoelectric signal, includes:
[0035] Step 401: Preset a first initial count value; the initial value of the first initial count value is 0;
[0036] Step 402: Using a preset first counting rule, the first initial count value, the first level value of the first photoelectric signal, and the second level value of the second photoelectric signal, obtain the first final count value of the first photoelectric signal between the initial time and the last time; the initial time is the time when the MCU module sends the first PWM signal; the last time is the time when the MCU module sends the last PWM signal.
[0037] Step 403: Determine the rotation direction of the encoder according to the preset first counting judgment rule and the first final count value; the preset first counting judgment rule is that when the first final count value is positive, the rotation direction of the encoder is from the first photoelectric detection module to the second photoelectric detection module; when the first final count value is negative, the rotation direction of the encoder is from the second photoelectric detection module to the first photoelectric detection module.
[0038] The preset first counting rule is as follows:
[0039] When the falling edge of the first photoelectric signal corresponds to a high level in the second photoelectric signal at the same moment, the first initial count value is incremented by 1 to obtain a first count value, and this first count value is used as the first initial count value for the next moment. When the falling edge of the first photoelectric signal corresponds to a low level in the second photoelectric signal at the same moment, the first initial count value is decremented by 1 to obtain a second count value, and this second count value is used as the first initial count value for the next moment. If the first target initial count value of the first moment before the first target initial count value is decremented by 1, the first target initial count value is cleared to zero, and the cleared first target initial count value is used as the first initial count value to increment by 1 to obtain a first count value. If the second target initial count value of the second moment before the second target initial count value is incremented by 1, the second target initial count value is cleared to zero, and the cleared second target initial count value is used as the first initial count value to decrement by 1 to obtain a second count value. The first initial count value of the last moment of the first photoelectric signal is the first final count value.
[0040] For details, please refer to Figure 6a The diagram shows the photoelectric signal when switching from the first photoelectric detection module to the second photoelectric detection module. Figure 6b The diagram shows the photoelectric signal when switching from the second photoelectric detection module to the first photoelectric detection module. Figure 6a It can be seen that the falling edge of the first photoelectric signal at any time corresponds to the high level of the second photoelectric signal. For example, at time a, the first initial count value will continuously increment by 1, but will not decrement by 1, nor will it be cleared. Therefore, the first initial count value at the last moment is positive. The first initial count value at the last moment of the first photoelectric signal is set as the first final count value, and the rotation direction of the encoder is determined according to the preset first counting judgment rule and the first final count value. Figure 6b It can be seen that when the falling edge of the first photoelectric signal at time b corresponds to a low level in the second photoelectric signal, the first initial count value is decremented by 1. Since the first target initial count value at the previous time point at time c is also decremented by 1, the first target initial count value is cleared to zero. Therefore, the encoder's rotation direction can be determined based on the count value at the final time.
[0041] In a specific embodiment, step 302, obtaining the encoder's rotational speed based on the encoder's rotational direction, the first voltage level, the second voltage level, and a preset time interval, includes: when the encoder's rotational direction is from the first photoelectric detection module to the second photoelectric detection module, obtaining the encoder's first rotational speed using the first final count value and the preset first time interval. Specifically, the preset first time interval can be set according to actual conditions, such as 100s, etc. The first final count value is a gradually accumulating positive number; therefore, the accurate encoder rotational speed can be obtained using the first final count value and the preset first time interval.
[0042] In a specific embodiment, please refer to Figure 7 The method of obtaining the first rotational speed of the encoder using the first final count value and a preset first time interval includes:
[0043] Step 501: Obtain the third count value at the third time point; the third time point is the time of the preset first time interval before the final time point;
[0044] Step 502: Obtain the first difference between the first final count value and the third count value;
[0045] Step 503: Obtain the first rotational speed of the encoder per unit time based on the first difference and the preset first time interval. Specifically, when the first time interval is 100s, the third count value is 900, and the first final count value is 1000, the first difference is 1000-900=100, and the first rotational speed is 100 / 100s, which is 1 revolution / s. By using the first difference and the first time interval, the rotational speed of the encoder can be detected intermittently according to the actual situation, thereby obtaining the infusion rate at different infusion stages.
[0046] In a specific embodiment, obtaining the encoder's rotation direction based on the phase difference between the first level value of the first photoelectric signal and the second level value of the second photoelectric signal includes: setting a second initial count value; the initial value of the second initial count value is 0; obtaining a second final count value of the second photoelectric signal between the initial time and the last time using a preset second counting rule, the second initial count value, the first level value of the first photoelectric signal, and the second level value of the second photoelectric signal; the initial time is the time when the MCU module sends the first PWM signal; the last time is the time when the MCU module sends the last PWM signal; determining the encoder's rotation direction according to a preset second counting judgment rule and the second final count value; the preset second counting judgment rule is that when the second final count value is positive, the encoder's rotation direction is from the second photoelectric detection module to the first photoelectric detection module; when the second final count value is negative, the encoder's rotation direction is from the first photoelectric detection module to the second photoelectric detection module; the preset second counting rule is: when... When the level of the first photoelectric signal corresponding to the falling edge of the second photoelectric signal at the same moment is high, the second initial count value is incremented by 1 to obtain a fourth count value, and the fourth count value is used as the second initial count value for the next moment. When the level of the first photoelectric signal corresponding to the falling edge of the second photoelectric signal at the same moment is low, the second initial count value is decremented by 1 to obtain a fifth count value, and the fifth count value is used as the second initial count value for the next moment. If the third target initial count value at the moment preceding the fourth count value at the fourth moment is decremented by 1, the third target initial count value is cleared to zero, and the cleared third target initial count value is used as the second initial count value to increment by 1 to obtain the fourth count value. If the fourth target initial count value at the moment preceding the fifth count value at the fifth moment is incremented by 1, the fourth target initial count value is cleared to zero, and the cleared fourth target initial count value is used as the second initial count value to decrement by 1 to obtain the fifth count value. The second initial count value at the last moment of the second photoelectric signal is the second final count value. Specifically, the principle of obtaining the encoder's rotation direction based on the phase difference between the first level value of the first photoelectric signal and the second level value of the second photoelectric signal is the same as that of steps 401-403 above, and will not be repeated here.
[0047] In a specific embodiment, obtaining the encoder's rotational speed based on the encoder's rotational direction, the first voltage level, the second voltage level, and a preset time interval includes: when the encoder's rotational direction is from the second photoelectric detection module to the first photoelectric detection module, obtaining the encoder's second rotational speed using the second final count value and a preset second time interval. Specifically, the preset second time interval can be set according to actual conditions to monitor the encoder's rotational speed over different time periods.
[0048] In a specific embodiment, obtaining the second rotational speed of the encoder using the second final count value and a preset second time interval includes: obtaining a sixth count value at a sixth moment; the sixth moment being a time interval before the final moment; obtaining a second difference between the second final count value and the sixth count value; and obtaining the second rotational speed of the encoder per unit time based on the second difference and the preset second time interval. Specifically, obtaining the second rotational speed of the encoder using the second final count value and the preset second time interval is based on the same principle as steps 501-503 described above, and will not be repeated here.
[0049] In a specific embodiment, obtaining the second rotational speed of the encoder per unit time based on the second difference and the preset second time interval includes: dividing the second difference by the preset second time interval to obtain the second rotational speed of the encoder per unit time. For example, if the second difference is 500 and the second time interval is 100, the second rotational speed of the encoder per unit time is 5 revolutions / s.
[0050] In a specific embodiment, this application also includes detection at the start of the infusion pump's operation, since within one peristaltic cycle, the blank blade of the encoder rotates through the width P of the photoelectric detection module. w It is fixed. Every time the motor rotates a fixed angle, the level of the first photoelectric signal is checked. If it is high, the count is incremented by 1. The width of each blade is counted as P. w Therefore, whenever the first photoelectric signal is detected at its falling edge, if the current blade width is greater than a preset multiple of the average of the previous three values, i.e. P w0 P represents the current width of the blank blade. w1 P is the width of the previous blank blade. w2 If the width is the width of the blank blade above, then the peristaltic structure is at the starting position. The first preset multiple is the value obtained by dividing the first interval by the second interval.
[0051] In a specific embodiment, the third embodiment of this application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the method as described in any one of the second embodiments of this application.
[0052] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0053] The above embodiments merely illustrate several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. An infusion system, characterized in that, The infusion system includes an encoder, a peristaltic structure, a stepper motor, an MCU module, a first photoelectric detection module, and a second photoelectric detection module. The MCU is used to send PWM signals, and the stepper motor is used to rotate at a preset angle according to the PWM signals, thereby driving the peristaltic structure to peristalse. When the peristaltic structure completes one peristaltic cycle, it squeezes the liquid medicine a preset distance. The encoder is mounted on the peristaltic structure, and the peristaltic structure drives the encoder to rotate. When the peristaltic structure completes one peristaltic cycle, the encoder rotates one revolution. The first photoelectric detection module is used to monitor the rotation of the encoder at a first preset position to obtain a first photoelectric signal, and the second photoelectric detection module is used to monitor the rotation of the encoder at a second preset position to obtain a second photoelectric signal. The encoder is provided with at least 3 blades, wherein the distance between adjacent first target blades and second target blades is a first distance, and the distance between the remaining adjacent blades is a second distance; the first distance is greater than the second distance. The MCU module is used to obtain the rotation direction of the encoder based on the phase difference between the first level value of the first photoelectric signal and the second level value of the second photoelectric signal, to obtain the rotation speed of the encoder based on the rotation direction of the encoder, the first level value, the second level value and a preset time interval, and to obtain the infusion rate of the infusion system based on a preset speed conversion relationship and the rotation speed of the encoder; the preset speed conversion relationship includes at least the relationship between the infusion rate of the infusion system and the rotation speed of the encoder. The step of obtaining the rotation direction of the encoder based on the phase difference between the first level value of the first photoelectric signal and the second level value of the second photoelectric signal includes: A first initial count value is preset; the initial value of the first initial count value is 0. The first final count value of the first photoelectric signal between the initial time and the last time is obtained using a preset first counting rule, the first initial count value, the first level value of the first photoelectric signal, and the second level value of the second photoelectric signal; the initial time is the time when the MCU module sends the first PWM signal; the last time is the time when the MCU module sends the last PWM signal. The rotation direction of the encoder is determined according to a preset first counting judgment rule and the first final count value; the preset first counting judgment rule is that when the first final count value is positive, the rotation direction of the encoder is from the first photoelectric detection module to the second photoelectric detection module; when the first final count value is negative, the rotation direction of the encoder is from the second photoelectric detection module to the first photoelectric detection module. The preset first counting rule is: When the falling edge of the first photoelectric signal at the same moment corresponds to a high level in the second photoelectric signal, the first initial count value is incremented by 1 to obtain the first count value, and the first count value is used as the first initial count value for the next moment for accumulation. When the level of the second photoelectric signal corresponding to the falling edge of the first photoelectric signal at the same moment is low, the first initial count value is decremented by 1 to obtain the second count value, and the second count value is used as the first initial count value for the next moment for accumulation. If the initial count of the first target in the previous time step of the first time step is a decrement operation, then the initial count of the first target is cleared to zero, and the cleared initial count of the first target is used as the first initial count value to perform an increment operation to obtain the first count value. If the initial count of the second target at the previous time step is incremented by 1, then the initial count of the second target is cleared to zero, and the cleared initial count of the second target is used as the first initial count to decrement by 1 to obtain the second count. The first initial count value at the last moment of the first photoelectric signal is the first final count value.
2. The infusion system as described in claim 1, characterized in that, The step of obtaining the encoder's rotation speed based on the encoder's rotation direction, the first voltage level, the second voltage level, and a preset time interval includes: When the encoder rotates from the first photoelectric detection module to the second photoelectric detection module, the first rotational speed of the encoder is obtained using the first final count value and the preset first time interval.
3. The infusion system as described in claim 2, characterized in that, The step of obtaining the first rotational speed of the encoder using the first final count value and a preset first time interval includes: Obtain the third count value at the third time point; the third time point is the time of the preset first time interval before the last time point; Obtain the first difference between the first final count value and the third count value; The first rotational speed of the encoder per unit time is obtained based on the first difference and the preset first time interval.
4. The infusion system as described in claim 1, characterized in that, The step of obtaining the rotation direction of the encoder based on the phase difference between the first level value of the first photoelectric signal and the second level value of the second photoelectric signal includes: A second initial count value is preset; the initial value of the second initial count value is 0. The second final count value of the second photoelectric signal is obtained from the initial time to the last time using a preset second counting rule, the second initial count value, the first level value of the first photoelectric signal, and the second level value of the second photoelectric signal; the initial time is the time when the MCU module sends the first PWM signal; the last time is the time when the MCU module sends the last PWM signal. The rotation direction of the encoder is determined according to a preset second counting judgment rule and a second final count value; the preset second counting judgment rule is that when the second final count value is positive, the rotation direction of the encoder is from the second photoelectric detection module to the first photoelectric detection module; when the second final count value is negative, the rotation direction of the encoder is from the first photoelectric detection module to the second photoelectric detection module. The preset second counting rule is as follows: When the level of the first photoelectric signal corresponding to the falling edge of the second photoelectric signal at the same moment is high, the second initial count value is incremented by 1 to obtain the fourth count value, and the fourth count value is used as the second initial count value for the next moment for accumulation. When the level in the first photoelectric signal corresponding to the falling edge of the second photoelectric signal at the same moment is low, the second initial count value is decremented by 1 to obtain the fifth count value, and the fifth count value is used as the second initial count value for the next moment for accumulation. If the initial count of the third target in the previous time step of the fourth count value is decremented by 1, then the initial count of the third target is cleared to zero, and the cleared initial count of the third target is used as the second initial count value to increment by 1 to obtain the fourth count value. If the initial count of the fourth target at the time preceding the fifth count at the fifth time is incremented by 1, then the initial count of the fourth target is cleared to zero, and the cleared initial count of the fourth target is used as the second initial count to decrement by 1 to obtain the fifth count. The second initial count value at the last moment of the second photoelectric signal is the second final count value.
5. The infusion system as described in claim 4, characterized in that, The step of obtaining the encoder's rotation speed based on the encoder's rotation direction, the first voltage level, the second voltage level, and a preset time interval includes: When the encoder rotates from the second photoelectric detection module to the first photoelectric detection module, the second rotation speed of the encoder is obtained by using the second final count value and the preset second time interval.
6. The infusion system as described in claim 5, characterized in that, The step of obtaining the second rotational speed of the encoder using the second final count value and a preset second time interval includes: Obtain the sixth count value at the sixth moment; the sixth moment is the moment of the preset second time interval before the last moment; Obtain the second difference between the second final count value and the sixth count value; The second rotational speed of the encoder per unit time is obtained based on the second difference and the preset second time interval.
7. The infusion system as described in claim 6, characterized in that, The step of obtaining the second rotational speed of the encoder within a unit time based on the second difference and the preset second time interval includes: dividing the second difference by the preset second time interval to obtain the second rotational speed of the encoder within a unit time.
Citation Information
Patent Citations
Infusion pump and control time sequence detection method of infusion pump
CN105363095A
Code disc and infusion pump
CN220193696U