Liquid level detection device and liquid level detection method
Through the TSC functional module of the microcontroller and the moving average algorithm, combined with multiple sampling capacitors, the cross-contamination and electromagnetic interference problems of liquid level detection in IVD equipment are solved, and accurate liquid level detection and the effect of reducing the liquid area of the needle contact is achieved.
Patent Information
- Application Number
- CN202210634216.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-07
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2042-06-07
AI Technical Summary
The existing liquid level detection methods have high cross-contamination rate and electromagnetic interference problems in IVD equipment, making it difficult to accurately detect whether the sample injection needle or reagent needle has come into contact with the liquid level.
The TSC functional module of the microcontroller uses a moving average algorithm and combines multiple sampling capacitors to detect the difference in the number of charges of the needle in the air and when it contacts the liquid surface. The moving average algorithm is designed to judge the liquid surface, reduce electromagnetic interference, and improve detection accuracy.
Reliable liquid level detection is achieved in complex electromagnetic environments, reducing the liquid area of the needle contact, improving the accuracy of detection and anti-interference ability, and ensuring the accuracy of the absorption amount.
Smart Images

Figure CN115047201B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of medical detection equipment, and in particular to a liquid level detection device and a liquid level detection method. Background Art
[0002] Many types of in vitro diagnostic medical devices (IVDs), such as immunoluminescence assays, biochemical assays, and coagulation function assays, play a vital role in laboratory testing departments. The test reagents used with IVDs are expensive, so ensuring that each vial of IVD reagent is labeled with the correct dosage is a key concern for departments.
[0003] The cross-contamination rate of the sample needle is an important indicator that directly affects the performance of IVD equipment, especially equipment such as immunoluminescence, which has strict requirements on the cross-contamination rate.
[0004] Taking these two points into account, when IVD devices are aspirating samples or reagents, the sample needle must minimize the area of contact with the liquid (including the sample and test reagent) while ensuring the required aspiration volume. Therefore, once the needle contacts the liquid surface, it must stop descending at the appropriate depth. Therefore, a liquid level detection method is urgently needed to accurately determine whether the sample needle or reagent needle has contacted the liquid surface. Summary of the Invention
[0005] In order to accurately detect whether a sample injection needle or a reagent needle has contacted the liquid surface, the present application provides a liquid level detection device and a liquid level detection method.
[0006] In a first aspect, the present application provides a liquid level detection device, which adopts the following technical solution:
[0007] A liquid level detection device, comprising:
[0008] a driving unit connected to the needle and the single chip microcomputer, respectively, for controlling the movement of the needle and sending a start detection instruction to the single chip microcomputer after the needle moves;
[0009] The single-chip microcomputer is connected to the needle and the sampling capacitor respectively, and is used to use the TSC function module to run the charge and discharge process multiple times to charge and discharge the needle and the sampling capacitor after receiving the start detection instruction, and obtain the number of times the sampling capacitor is charged after each charge and discharge process; based on the number of times, a moving average algorithm is used to determine whether the needle contacts the liquid surface;
[0010] The liquid surface is the liquid surface of the sample or the detection reagent, and the needle is the sample addition needle or the reagent needle.
[0011] By adopting the above technical solution, the TSC function of the microcontroller is used to detect the liquid level through a moving average algorithm, which not only eliminates the rectification and filtering links, but also saves the signal generation circuit and will not generate EMI interference. The entire IVD medical device itself has a complex electromagnetic environment. This solution has strong compatibility with different devices or electromagnetic environments, and can be unaffected by external interference in complex electromagnetic environments and work reliably to ensure that liquid level detection will not fail due to interference from the electromagnetic environment. In addition, the moving average algorithm is designed by utilizing the characteristic that the number of charging times obtained when the needle is in the air and when the needle has contacted the liquid surface is different, which can accurately determine whether the needle has contacted the liquid surface.
[0012] Currently, most detection schemes using signal rectification are simple to implement. However, the antenna effect generated by the combination of the oscillation circuit and the sample injection needle or the liquid aspiration needle will cause EMI interference, resulting in EMC test failure. In addition, the entire IVD medical device itself has a complex electromagnetic environment. The anti-interference ability of the signal rectification detection scheme is also limited, and liquid level detection failures often occur.
[0013] Preferably, the single chip microcomputer is specifically used for:
[0014] Assign the acquired charging times to the member variables in the array in sequence until all member variables in the array are assigned, and then calculate the average value of all charging times in the array;
[0015] The newly acquired charging times are sequentially replaced with the existing charging times in the array until all the existing charging times in the array are replaced, and then the average value of all the replaced charging times in the array is calculated;
[0016] Determine whether the difference between the two most recently obtained average values is greater than a threshold;
[0017] If so, it is determined that the needle has touched the liquid surface;
[0018] If not, return to the step of replacing the existing charging times in the array with the newly acquired charging times in sequence until all existing charging times in the array are replaced, and then calculate the average value of all replaced charging times in the array.
[0019] Preferably, there are multiple sampling capacitors, and the capacitance of each sampling capacitor is different; the single chip microcomputer is specifically used for:
[0020] Before receiving a start detection instruction, obtaining a sampling capacitor selected from a plurality of sampling capacitors;
[0021] The single chip microcomputer is further specifically used for:
[0022] Each time the TSC functional module is used to run the charge and discharge process, the selected sampling capacitor is charged;
[0023] Determine whether the voltage of the selected sampling capacitor is greater than a preset value;
[0024] If so, the charge and discharge process is completed, and the number of charging times after the charge and discharge process is completed is obtained.
[0025] By adopting the above technical solution, in the laboratory, the area of the needle contacting the liquid is reduced as much as possible under the premise of ensuring the amount of suction. Therefore, after the needle contacts the liquid surface, it stops descending when it reaches the appropriate depth. Accordingly, the present application can flexibly control the depth of the needle immersed in the liquid by selecting different sampling capacitors.
[0026] Preferably, the single chip microcomputer is specifically used for:
[0027] Before receiving the start detection command, power on and perform function initialization;
[0028] Make sure the TSC function module is in the preparation stage.
[0029] Preferably, the single chip microcomputer is further configured to, after determining that the needle has touched the liquid surface, send a stop motion instruction to the driving unit; disable the TSC functional module and initialize variables, and return to the step of determining that the TSC functional module is in the preparation stage;
[0030] The driving unit is specifically configured to control the frame to stop moving after receiving a stop motion instruction; and control the needle to move to an initial position after receiving a move instruction.
[0031] In a second aspect, the present application provides a liquid level detection method, which adopts the following technical solution:
[0032] A liquid level detection method, applied to a single chip microcomputer, comprising:
[0033] Determine whether the start detection instruction transmitted by the drive unit is received;
[0034] If so, use the TSC function module to run the charge and discharge process multiple times while the needle moves toward the liquid surface, and obtain the number of charges after each run of the charge and discharge process; wherein the liquid surface is the liquid surface of the sample or the detection reagent;
[0035] According to the charging times, a moving average algorithm is used to determine whether the needle contacts the liquid surface; wherein the needle is a sample addition needle or a reagent needle.
[0036] By adopting the above technical solution, the TSC function of the microcontroller is used to obtain the number of charging times when the needle moves towards the liquid surface. Taking advantage of the fact that the number of charging times when the needle is in the air and when the needle has touched the liquid surface is different, a moving average algorithm is designed to accurately determine whether the needle has touched the liquid surface.
[0037] Preferably, the step of using a moving average algorithm to determine whether the needle has touched the liquid surface based on the number of charging times includes:
[0038] Assign the acquired charging times to the member variables in the array in sequence until all member variables in the array are assigned, and then calculate the average value of all charging times in the array;
[0039] The newly acquired charging times are sequentially replaced with the existing charging times in the array until all the existing charging times in the array are replaced, and then the average value of all the replaced charging times in the array is calculated;
[0040] Determine whether the difference between the two most recently obtained average values is greater than a threshold;
[0041] If so, it is determined that the needle has touched the liquid surface;
[0042] If not, return to the step of replacing the existing charging times in the array with the newly acquired charging times in sequence until all existing charging times in the array are replaced, and then calculate the average value of all replaced charging times in the array.
[0043] Preferably, before determining whether the start detection instruction transmitted by the drive unit is received, the method further includes:
[0044] Obtaining a sampling capacitor selected from a plurality of sampling capacitors; wherein the capacitances of the plurality of sampling capacitors are different;
[0045] The method of using the TSC function module to run the charge and discharge process multiple times to obtain the number of charge times after each run of the charge and discharge process includes:
[0046] Each time the TSC functional module is used to run the charge and discharge process, the selected sampling capacitor is charged;
[0047] Determine whether the voltage of the selected sampling capacitor is greater than a preset value;
[0048] If so, the charge and discharge process is completed, and the number of charging times after the charge and discharge process is completed is obtained.
[0049] By adopting the above technical solution, in the laboratory, the area of the needle contacting the liquid is reduced as much as possible under the premise of ensuring the amount of suction. Therefore, after the needle contacts the liquid surface, it stops descending when it reaches the appropriate depth. Accordingly, the present application can flexibly control the depth of the needle immersed in the liquid by selecting different sampling capacitors.
[0050] Preferably, before determining whether the start detection instruction transmitted by the drive unit is received, the method further includes:
[0051] Power on and perform function initialization;
[0052] Make sure the TSC function module is in the preparation stage.
[0053] Preferably, after determining that the needle has touched the liquid surface, the method further comprises:
[0054] sending a stop motion instruction to the drive unit;
[0055] The TSC functional module is disabled and variables are initialized, and the process returns to the step of determining that the TSC functional module is in the preparation stage. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 This is a structural block diagram of the liquid level detection device provided in an embodiment of the present application.
[0057] Figure 2 This is a schematic structural diagram of the TSC functional module of the STM32F0XX series microcontroller provided in the embodiment of the present application.
[0058] Figure 3 It is a schematic structural diagram of the charge and discharge detection channel provided in an embodiment of the present application.
[0059] Figure 4 This is a schematic diagram of the charging and discharging principle of the sampling capacitor provided in an embodiment of the present application.
[0060] Figure 5 Schematic diagram of the moving average algorithm provided in the embodiment of the present application.
[0061] Figure 6 This is another schematic structural diagram of the charge and discharge detection channel provided in an embodiment of the present application.
[0062] Figure 7 It is a flow chart of the liquid level detection method provided in the embodiment of the present application.
[0063] Figure 8 This is another flow chart of the liquid level detection method provided in an embodiment of the present application.
[0064] Description of the accompanying drawings: 1. Drive unit; Cx, needle; SCM, microcontroller; Cs, sampling capacitor; 2. TSC functional module; Re, resistor; S1, first switch; S2, second switch; S3, third switch; S4, fourth switch; S5, fifth switch; S6, sixth switch. DETAILED DESCRIPTION
[0065] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0066] This embodiment provides a liquid level detection device, such as Figure 1 Shown, including:
[0067] The drive unit 1 is connected to the needle Cx and the single-chip microcomputer SCM, and is used to control the movement of the needle Cx and send a start detection instruction to the single-chip microcomputer SCM after the needle Cx moves;
[0068] The single-chip microcomputer SCM is connected to the needle Cx and the sampling capacitor Cs, respectively, and is used to use the TSC function module 2 to run the charge and discharge process multiple times to charge and discharge the needle Cx and the sampling capacitor Cs after receiving the start detection instruction, and obtain the number of times the sampling capacitor is charged after each charge and discharge process; based on the number of charges, a moving average algorithm is used to determine whether the needle Cx contacts the liquid surface;
[0069] The liquid surface is the liquid surface of the sample or the detection reagent, and the needle Cx is the sample needle or the reagent needle. Specifically, the liquid sucked by the sample needle is the sample, and the liquid sucked by the reagent needle is the detection reagent.
[0070] The single-chip microcomputer SCM can be a single-chip microcomputer of the STM32 series, specifically a single-chip microcomputer of the STM32F0XX series. Figure 2 As shown in the schematic structure diagram of the TSC function module 2 of the STM32F0XX series microcontroller, the TSC function module 2 is based on the surface charge transfer principle, has 6 embedded IO simulation groups, supports a maximum of 18 channels, and the charge transfer process is completely completed by hardware.
[0071] like Figure 3 As shown, one of the six IO simulation groups is used, and the channel G1_IO1 in this IO simulation group is connected to the pin Cx (each TSC functional module 2 can only be connected to one pin Cx, the pin Cx is double-layered, and the channel G1_IO1 is connected between the double layers of the pin Cx, that is, the equivalent capacitor connecting the pin Cx). Of course, a resistor Re can also be connected between the channel G1_IO1 and the pin Cx; the channel G1_IO2 in the IO simulation group is connected to the sampling capacitor Cs, and the TSC functional module 2, the pin Cx and the sampling capacitor form a charge and discharge detection channel.
[0072] Further, if Figure 4 As shown, the first switch S1, the second switch S2, the third switch S3, the fourth switch S4, the fifth switch S5 and the sixth switch S6 are all switches in the single-chip microcomputer SCM, and the equivalent capacitance of the pin Cx and the sampling capacitor Cs are charged and discharged through these switches. Specifically, the charging and discharging process is as follows:
[0073] (1) The fourth switch S4 remains in the closed state, and the fifth switch S5 and the sixth switch S6 remain in the open state;
[0074] (2) Open the second switch S2, close the first switch S1 and the third switch S3, and discharge the equivalent capacitance of the pin Cx and the sampling capacitor Cs;
[0075] (3) Open the first switch S1 and the third switch S3, close the second switch S2, and charge the equivalent capacitance of the pin Cx;
[0076] (4) Open the second switch S2 and the third switch S3, close the first switch S1, and charge the sampling capacitor Cs through the equivalent capacitance of pin Cx;
[0077] (5) looping step (3) and step (4), and judging whether the voltage of the sampling capacitor Cs is greater than the preset value; if so, it means that the voltage of the sampling capacitor Cs has reached a high voltage, and step (3) and step (4) are no longer looped, and the charge and discharge process is terminated. The number of cycles of step (3) and step (4) is obtained, that is, the number of times the sampling capacitor is charged. Figure 4 The register I / O register is a register in the microcontroller SCM, and the microcontroller SCM reads the number of charging times in the register I / O register.
[0078] The number of charging times indirectly reflects the environment in which needle Cx is located. The number of charging times obtained when needle Cx is in the air is different from the number when needle Cx has touched the liquid surface. Based on this characteristic, the microcontroller SCM uses a moving average algorithm to determine whether needle Cx has touched the liquid surface. Specifically:
[0079] The single chip microcomputer SCM pre-sets an array including N member variables, and the initial value of the member variables is zero; wherein N is a positive integer, and N is set to 5 in this embodiment.
[0080] like Figure 5As shown, the single-chip microcomputer SCM assigns the acquired charging times to the member variables in the array in sequence, until all the member variables in the array are assigned, and then calculates the average value of all the charging times in the array; replaces the existing charging times in the array with the newly acquired charging times in sequence, until all the existing charging times in the array are replaced, and then calculates the average value of all the replaced charging times in the array; determines whether the difference between the two most recently acquired average values is greater than a threshold; if so, determines that the needle Cx contacts the liquid surface; if not, returns to the step of replacing the existing charging times in the array with the newly acquired charging times in sequence, until all the existing charging times in the array are replaced, and then calculates the average value of all the replaced charging times in the array.
[0081] Optionally, in order to control the depth of the needle Cx immersed in the liquid, multiple sampling capacitors Cs are provided, each of which has a different capacitance. Before receiving the start detection instruction, the single-chip microcomputer SCM obtains the sampling capacitor Cs selected from the multiple sampling capacitors Cs.
[0082] Specifically, such as Figure 6 As shown, this embodiment uses four sampling capacitors, Cs1, Cs2, Cs3, and Cs4. A switch module is provided between channel G1_IO2 and the multiple sampling capacitors Cs. The switch module contains an electronic switch, which allows the operator to select a sampling capacitor Cs. The selected sampling capacitor Cs is then used in the aforementioned charge-discharge process and moving average algorithm. In the moving average algorithm, different sampling capacitors Cs correspond to different thresholds.
[0083] Optionally, to ensure that the liquid level detection device can be recycled, the single-chip microcomputer SCM is powered on and performs functional initialization before receiving a start detection instruction; and determines that the TSC functional module 2 is in the ready stage. The power-on operation includes starting the TSC functional module 2 after power is turned on, and the functional initialization includes initializing functional modules such as the RCC, USART, TSC, and NVIC. If there is only one sampling capacitor Cs, then the TSC functional module 2 is determined to be in the ready stage after the single-chip microcomputer SCM functional initialization is completed. If there are only multiple sampling capacitors Cs, then the TSC functional module 2 is determined to be in the ready stage only after a sampling capacitor Cs is selected from the multiple sampling capacitors Cs.
[0084] After determining that the needle Cx contacts the liquid surface, the single-chip microcomputer SCM sends a stop motion instruction to the drive unit 1; disables the TSC functional module 2 and initializes the variables, and returns to the step of determining that the TSC functional module 2 is in the preparation stage; wherein, variable initialization refers to initializing the member variables in the above-mentioned array to zero and disconnecting the electronic switch in the Switch module, etc.
[0085] After receiving the stop motion instruction, the drive unit 1 controls the frame to stop moving, and then waits to receive a movement instruction. If a movement instruction is received, the control needle Cx moves to the initial position. The sending of the movement instruction can be controlled by the staff or automatically controlled by the program.
[0086] Optionally, the single chip microcomputer SCM is connected to the LED light. After the single chip microcomputer SCM determines that the needle Cx contacts the liquid surface, it controls the LED light to light up for a fixed time. After the fixed time is reached, the LED light is controlled to go out. In this way, the staff is reminded that the needle Cx has contacted the liquid surface.
[0087] This embodiment also provides a liquid level detection method, which is applied to the single chip microcomputer in the above liquid level detection device, such as Figure 7 As shown, the main process of the method is described as follows (steps S101 to S103):
[0088] Step S101: Determine whether a start detection instruction transmitted by a driving unit is received; if so, proceed to step S102.
[0089] The driving unit controls the movement of the needle. When the driving unit sends a start detection instruction to the single chip microcomputer, the driving unit controls the needle to move toward the liquid surface.
[0090] Step S102: During the needle movement toward the liquid surface, the TSC function module is used to run the charge and discharge process multiple times to obtain the number of charges after each run of the charge and discharge process; wherein the liquid surface is the liquid surface of the sample or the detection reagent.
[0091] like Figure 3 and Figure 4 As shown, the equivalent capacitance of the needle and the sampling capacitor are charged and discharged according to the charge and discharge process through the first switches S1, S2, S3, S4, S5 and S6. Each time the charge and discharge process is executed, the sampling capacitor is charged to determine whether the voltage of the sampling capacitor is greater than a preset value. If so, the charge and discharge process is terminated, and the number of charging times after the charge and discharge process is executed is obtained.
[0092] Optionally, in order to control the depth of the needle immersed in the liquid, the sampling capacitors are set to multiple, and the capacitance of each sampling capacitor is different. After the staff selects a sampling capacitor through an electronic switch, the selected sampling capacitor is obtained from the multiple sampling capacitors and applied to the above-mentioned charging and discharging process.
[0093] Step S103: Based on the number of charging times, a moving average algorithm is used to determine whether the needle contacts the liquid surface; wherein the needle is a sample addition needle or a reagent needle.
[0094] like Figure 5As shown, the obtained number of charging times is assigned to the member variables in the array in sequence until all the member variables in the array are assigned, and then the average value of all the charging times in the array is calculated; the newly obtained number of charging times replaces the existing number of charging times in the array in sequence until all the existing number of charging times in the array are replaced, and then the average value of all the replaced number of charging times in the array is calculated; it is determined whether the difference between the two most recently obtained average values is greater than a threshold; if so, it is determined that the needle touches the liquid surface; if not, the process returns to the step of replacing the existing number of charging times in the array with the newly obtained number of charging times in sequence until all the existing number of charging times in the array are replaced, and then the average value of all the replaced number of charging times in the array is calculated.
[0095] like Figure 8 As shown, step S104 and step S105 are included before step S101.
[0096] Step S104: power on and perform function initialization.
[0097] Among them, power-on operation includes starting the TSC functional module to run after power is turned on, and function initialization includes initializing functional modules such as RCC, USART, TSC and NVIC.
[0098] Step S105: Determine whether the TSC functional module is in the preparation stage.
[0099] Specifically, if there is only one sampling capacitor, the TSC functional module is determined to be in the preparation stage after the microcontroller function is initialized; if there are only multiple sampling capacitors, a step of obtaining a sampling capacitor selected from the multiple sampling capacitors is added. Only after the sampling capacitor is selected is the TSC functional module determined to be in the preparation stage.
[0100] like Figure 8 As shown, after determining that the needle contacts the liquid surface, the process further includes step S106 and step S107.
[0101] Step S106: Sending a stop motion instruction to the driving unit.
[0102] Step S107: disable the TSC function module and initialize variables, and return to step S105.
[0103] The various variations and specific examples of the liquid level detection device provided in the above embodiments are also applicable to the liquid level detection method of this embodiment. Through the above detailed description of the liquid level detection device, those skilled in the art can clearly know the implementation method of the liquid level detection method in this embodiment. For the sake of brevity of the specification, it will not be described in detail here.
Claims
1. A liquid level detection device, characterized in that: include: The drive unit (1) is connected to the needle (Cx) and the single chip microcomputer (SCM) respectively, and is used to control the movement of the needle (Cx). After the needle (Cx) moves, a start detection instruction is sent to the single chip microcomputer (SCM); while the drive unit (1) sends the start detection instruction to the single chip microcomputer (SCM), the needle (Cx) is controlled to move toward the liquid surface; The single chip computer (SCM) is connected to the needle (Cx) and the sampling capacitor (Cs) respectively, and is used to use the TSC function module (2) to run the charge and discharge process multiple times to charge and discharge the needle (Cx) and the sampling capacitor (Cs) after receiving the start detection instruction, and obtain the number of times the sampling capacitor is charged after each run of the charge and discharge process; based on the number of times, a moving average algorithm is used to determine whether the needle (Cx) contacts the liquid surface; wherein the liquid surface is the liquid surface of the sample or the detection reagent, and the needle (Cx) is the sample needle or the reagent needle; when it is determined that the needle contacts the liquid surface, a stop movement instruction is sent to the driving unit (1); The single chip computer (SCM) is specifically configured to: sequentially assign the acquired charge times to member variables in an array until all member variables in the array are assigned, and then calculate the average value of all charge times in the array; sequentially replace the existing charge times in the array with the newly acquired charge times until all existing charge times in the array are replaced, and then calculate the average value of all replaced charge times in the array; determine whether the difference between the two most recently acquired average values is greater than a threshold; if so, determine that the needle (Cx) has contacted the liquid surface; if not, return to the step of sequentially replacing the existing charge times in the array with the newly acquired charge times until all existing charge times in the array are replaced, and then calculate the average value of all replaced charge times in the array; There are multiple sampling capacitors (Cs), each of which has a different capacitance, and different sampling capacitors (Cs) correspond to different thresholds. The single chip microcomputer (SCM) is specifically configured to: before receiving a start detection instruction, obtain a sampling capacitor (Cs) selected from a plurality of sampling capacitors (Cs); The single chip computer (SCM) is further specifically configured to: charge the selected sampling capacitor (Cs) each time the TSC functional module (2) is used to run a charge and discharge process; determine whether the voltage of the selected sampling capacitor (Cs) is greater than a preset value; if so, terminate the charge and discharge process, and obtain the number of charges after the charge and discharge process is run.
2. The device according to claim 1, characterized in that The single chip microcomputer (SCM) is specifically used to: power on and perform function initialization before receiving a start detection instruction; It is determined that the TSC function module (2) is in the preparation stage.
3. The device according to claim 2, characterized in that The single chip computer (SCM) is further specifically configured to send a stop motion instruction to the drive unit (1) after determining that the needle (Cx) has contacted the liquid surface; disable the TSC functional module (2) and perform variable initialization, and return to the step of determining that the TSC functional module (2) is in the preparation stage; The driving unit (1) is specifically used to control the frame to stop moving after receiving a stop movement instruction; and to control the needle (Cx) to move to an initial position after receiving a movement instruction.
4. A liquid level detection method, characterized in that: Applicable to microcontrollers, including: Determine whether the start detection instruction transmitted by the drive unit is received, wherein the drive unit sends a start detection instruction to the microcontroller. When the start detection command is sent, the control needle (Cx) moves toward the liquid surface; If so, during the movement of the needle toward the liquid surface, the TSC function module is used to repeatedly run the charge and discharge process to obtain the number of charges after each run of the charge and discharge process; wherein the liquid surface is the liquid surface of the sample or the detection reagent; based on the number of charges, a moving average algorithm is used to determine whether the needle contacts the liquid surface; wherein the needle is a sample needle or a reagent needle; The method of determining whether the needle contacts the liquid surface using a moving average algorithm based on the charging times includes: sequentially assigning the acquired charging times to member variables in an array until all member variables in the array are assigned, and then calculating an average value of all charging times in the array; The newly acquired charging times are sequentially replaced with the existing charging times in the array until all the existing charging times in the array are replaced, and the average value of all the replaced charging times in the array is calculated; it is determined whether the difference between the two most recently acquired average values is greater than a threshold value; if so, it is determined that the needle has touched the liquid surface, and when it is determined that the needle has touched the liquid surface, a stop motion instruction is sent to the driving unit (1); if not, the step of sequentially replacing the existing charging times in the array with the newly acquired charging times until all the existing charging times in the array are replaced, and calculating the average value of all the replaced charging times in the array; Before determining whether the start detection instruction transmitted by the drive unit is received, the method further includes: obtaining a sampling capacitor selected from a plurality of sampling capacitors; wherein the capacitances of the plurality of sampling capacitors are different, and different sampling capacitors (Cs) correspond to different thresholds; and using the TSC function module to run the charge-discharge process multiple times and obtain the number of charges after each run of the charge-discharge process, including: charging the selected sampling capacitor each time the TSC function module is used to run the charge-discharge process; determining whether the voltage of the selected sampling capacitor is greater than a preset value; if so, terminating the charge-discharge process and obtaining the number of charges after the charge-discharge process is run.
5. The method according to claim 4, characterized in that In the judgment whether the drive unit transmission is received Before the start detection instruction, it also includes: Power on and perform functional initialization; make sure the TSC functional module is in the ready stage.
6. The method according to claim 5, characterized in that After determining that the needle has touched the liquid surface, the method further includes: sending a stop motion instruction to the driving unit; Disable the TSC function module and initialize the variables, return to the TSC function module is ready Steps in the completion phase.
Citation Information
Patent Citations
Liquid level detecting device
CN204612781U