Mixed type high-precision liquid level measuring device and method
By using a hybrid high -precision liquid level measurement device in the urea level sensor, combined with the signal processing of the multi -road simulation switch circuit and the Hall magnetic device, solve the short circuit and Hall magnetic sensitivity device in the urea level sensor The problem of being easily affected by the signal realizes high -precision and reliable liquid level measurement.
Patent Information
- Application Number
- CN202411737432.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-01-24
AI Technical Summary
Existing urea level sensors may cause a short circuit in reed tube at high liquid levels, affecting the accuracy of liquid level measurement, and the signals of Hall magnetic sensitive devices are susceptible to other factors, reducing measurement accuracy.
It adopts a hybrid high-precision liquid level measurement device, including a float, inner column, sensing unit and signal processing unit. It generates a pulse sequence through multiple analog switch circuits and counters, and combines the signals of the reed switch and Hall magnetic sensor. Identify and isolate faulty reed switches and reduce the sensitivity of Hall magnetic sensitive devices.
A high -precision measurement of the urea level is realized, identified and isolation of the fault reservoir switch, reducing the error of Hall magnetic device, and improving the reliability and accuracy of the system.
Smart Images

Figure CN119354302A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of urea solution detection, and in particular relates to a hybrid high-precision liquid level measuring device and method. Background Art
[0002] Urea level sensors are a key component in the Selective Catalytic Reduction (SCR) system, used to monitor and control the amount of urea solution (commonly known as Diesel Exhaust Fluid or DEF) in the system. This sensor ensures that the SCR system can continue to operate effectively, thereby reducing nitrogen oxides (NOx) emitted by diesel engines.
[0003] Urea level sensors are usually installed in urea tanks and can monitor the liquid level in real time, helping the vehicle management system determine when the urea solution needs to be replenished. The working principle of the sensor is based on technologies such as reed switches, capacitors, ultrasound or optics, which can accurately measure the liquid level in the tank. When the urea level is lower than the set threshold, the sensor will send a signal to the vehicle's control system to prompt the driver or maintenance personnel to replenish it to ensure the normal operation of the SCR system. In addition, urea level sensors can also help detect possible problems in the system, such as urea crystallization or failure of the sensor itself, to ensure efficient operation of the system and compliance with emission control. This is of great significance for complying with strict environmental regulations and reducing environmental pollution.
[0004] Urea level sensors based on reed switches are the most widely used. Reed switches are a type of magnetic switch. In urea level sensors using reed switches, a float moves up and down with the liquid level. The float contains a magnet. When the distance between the magnet and the reed switch is less than the action distance, the reed switch closes. The urea level can be detected by detecting the resistance change caused by the closure of the reed switch and the position of the reed switch.
[0005] Usually, in the urea liquid level sensor, one end of the reed switch is connected to a group of series resistors, and the other end is connected to a signal common terminal. When the liquid level is high, the corresponding reed switch is closed, resulting in low resistance, and when the liquid level is low, the resistance is high. However, if the reed switch corresponding to the high liquid level is short-circuited, all the reed switches corresponding to the following liquid levels will be short-circuited, causing the sensor to fail (only the high liquid level will be reported). In addition, the reed switch is a switching device. In order to increase the accuracy of liquid level sensing, the number of reed switches needs to be increased. Too many reed switches not only make the layout difficult, but also increase the risk of failure.
[0006] Hall magnetic sensors can also be used together with magnets to measure urea liquid level. Hall magnetic sensors can be used instead of switching devices, and the distance between the magnets and the device can be measured by the signal generated by the device. However, the signal generated by the Hall magnetic sensor itself will be affected by other factors and will change, resulting in inaccurate measurement, which limits the application of Hall magnetic sensors in urea liquid level sensors. Summary of the invention
[0007] Purpose of the invention: The technical problem to be solved by the present invention is to provide a hybrid high-precision liquid level measurement device and method in view of the deficiencies in the prior art.
[0008] In order to solve the above technical problems, in the first aspect, a hybrid high-precision liquid level measuring device is disclosed, including a float, an inner column, a sensing unit and a signal processing unit, wherein the float surrounds the inner column and can move up and down along the outer side of the inner column, and a magnet is installed in the float; a sensing unit is arranged in the inner column, and the sensing unit is connected to the signal processing unit; the sensing unit includes a plurality of sensing elements arranged along the length direction of the inner column, and the sensing elements can interact with the magnets to generate sensing signals, and the sensing signals are received and processed by the signal processing unit; when the float moves up and down, the sensing signals generated by the sensing elements change to form a pulse sequence, and the signal processing unit can obtain the urea liquid level according to the pulse sequence and the position of the sensing elements.
[0009] Furthermore, the signal processing unit includes a multi-way analog switch circuit and a counter, one end of the sensing element is connected to the multi-way end of the multi-way analog switch circuit, the multi-way end of the multi-way analog switch circuit is also connected to a marking resistor, the control end of the multi-way analog switch circuit is connected to the counter, the counter generates a counting signal, and the counting signal sequentially connects the multi-way end of the multi-way analog switch circuit to the single-way end to generate the pulse sequence, and the pulse voltage of at least one pulse signal in the pulse sequence is related to the resistance value of the marking resistor.
[0010] Furthermore, the sensing element is a reed switch and / or a Hall magneto-sensitive device.
[0011] Furthermore, one end of the reed switch is connected to the ground GND, and the other end is connected to the multi-way end of the multi-way analog switch circuit; the Hall magnetic sensor device includes three wiring terminals: a power supply terminal, a ground terminal and a signal terminal, the power supply terminal is connected to the power supply Vcc, the ground terminal is connected to the ground GND, and the signal terminal is connected to the multi-way end of the multi-way analog switch circuit.
[0012] Furthermore, the signal characteristics of the Hall magnetosensitive device are as follows: The signal amplitude generated by the Hall magnetic sensor device is related to the distance between the magneton and the device: when the north and south poles of the magneton are less than the effective distance of the Hall magnetic sensor device, the signal amplitude is related to the distance; when the north and south poles of the magneton are more than the effective distance of the Hall magnetic sensor device, the signal changes to a certain value and loses the distance correlation.
[0013] Furthermore, the sensing unit further comprises a liquid temperature sensor, one end of the liquid temperature sensor is connected to the ground GND, and the other end is connected to the multi-way end of the multi-way analog switch circuit.
[0014] Furthermore, the signal processing unit also includes a pulse generating circuit, which is connected to the counter and is used to generate a clock signal.
[0015] Furthermore, the signal processing unit also includes a CPU, which is connected to a single-way end of the multi-way analog switch circuit and is used to process the sensing signal.
[0016] In a second aspect, a hybrid high-precision liquid level measurement method is disclosed, using the hybrid high-precision liquid level measurement device, comprising the following steps: Step 1, finding the pulse generated by the marker resistor by checking the pulse voltage, and marking it as the initial pulse; Step 2, find the pulse generated by the closed reed switch by checking the pulse voltage after the initial pulse and mark its position; Step 3, if the position of the closed reed switch changes and more than one reed switch is closed, then detect the reed switch whose position does not change. If the position is detected to be unchanged for multiple times, mark the reed switch at that position as a failed reed switch; Step 4, taking the lowest liquid level after removing the failed reed switch position as the reed switch float level.
[0017] Furthermore, the method further comprises: Step 5, finding the pulse generated by the Hall magnetic sensor by checking the pulse voltage after the initial pulse, and measuring the pulse voltage generated by the Hall magnetic sensor; Step 6, calculating the float position of the Hall magnetic sensor device according to the pulse voltage and the position of the Hall magnetic sensor device; Step 7, detecting a fault of the Hall magnetic sensor device by comparing the float position of the Hall magnetic sensor device and the reed switch float liquid level; Step 8: If there is no Hall magnetic sensor failure, the float position of the Hall magnetic sensor is used as the current urea liquid level; otherwise, the float position of the reed switch is used as the current urea liquid level.
[0018] Furthermore, after executing step 1, the temperature voltage pulse generated by the liquid temperature sensor is found by checking the pulse voltage after the initial pulse, and the urea temperature is calculated according to the pulse voltage of the temperature voltage pulse.
[0019] Furthermore, the step 1 includes: if it is detected that the pulse sequence has a pulse rising edge, the pulse voltage Vp is measured, if the pulse voltage Vp is within the range of the first voltage threshold V_lo to the second voltage threshold V_up, then the pulse is the pulse generated by the marking resistor, it is marked as the initial pulse, and the two counting variables ID and i are cleared (the first voltage threshold V_lo and the second voltage threshold V_up represent voltage threshold constants, which are calibrated through experiments).
[0020] Furthermore, the step 2 includes: determining whether the position corresponding to the ID pulse in the pulse sequence is a reed switch; if it is a reed switch, comparing the pulse voltage Vp corresponding to the ID pulse with the third voltage threshold Thd_lo; if the pulse voltage Vp is less than the third voltage threshold Thd_lo, marking the reed switch state as closed and marking the reed switch position.
[0021] Furthermore, step 6 includes: if the pulse voltage Vp generated by the Hall magnetic sensor is less than or equal to V0_Hi and Vp is greater than or equal to V0_Lo, then the ID value in the liquid level series L of the Hall magnetic sensor is set to zero, (V0_Hi and V0_Lo represent voltage threshold constants, which are calibrated through experiments), if Vp is greater than V0_Hi or less than V0_Lo, then the liquid level difference dL is calculated according to the value of Vp using formula (F1), and the magnetic sub-position L0 is calculated using formula (F2): dL=Tbl_dL(Vp) (F1) L0 = Tbl_H(ID) (F2) Among them, Tbl_dL(Vp) is a table lookup calculation for calculating the position of the magneton relative to the Hall magnetic sensor device, which can be calibrated through experiments. Tbl_H() is a table lookup calculation for calculating the position of the Hall magnetic sensor device. After the position of the Hall magnetic sensor device is determined, the table value of the table can be obtained.
[0022] Then use formula (F3) to calculate the ID value of the L series: L(ID) = L0 + dL (F3).
[0023] Furthermore, step 7 includes: comparing the position of the non-failed reed switch in the closed state with the float position. If the absolute value of the difference between the two readings is greater than the threshold Thd_Err, it is determined that the reading of the Hall magnetic sensor is incorrect, and the threshold Thd_Err is calibrated according to demand.
[0024] Further, the pulse generated by the liquid temperature sensor is found by checking the pulse voltage after the initial pulse, and the urea temperature is calculated according to the pulse voltage, which includes: assuming that the pulse voltage generated by the liquid temperature sensor is Vp, the urea solution temperature UT is calculated using formula (F4): UT=Tbl_T(Vp) (F4) Where Tbl_T() is a table lookup calculation for calculating the liquid temperature, and the table value is calibrated through experiments.
[0025] In a third aspect, another hybrid high-precision liquid level measurement method is disclosed, using the hybrid high-precision liquid level measurement device, comprising the following steps: Step 1, finding the pulse generated by the marker resistor by checking the pulse voltage, and marking it as the initial pulse; Step 2, by checking the pulse voltage after the initial pulse, find the pulse generated by the Hall magnetosensitive device and measure its pulse voltage; Step 3, calculating the float position of the Hall magnetic sensor device according to the pulse voltage and the position of the Hall magnetic sensor device.
[0026] Beneficial effects: The hybrid high-precision liquid level measurement device and method provided by the present invention can identify and isolate faulty reed switches, solving the problem of the influence of short-circuited reed switches on the liquid level. At the same time, the reed switch and the Hall magnetic sensor can be used in combination, and the sensitivity of the Hall magnetic sensor to other factors can be reduced, thereby improving the accuracy of urea solution level sensing. The reed switch and the Hall magnetic sensor are reasonably arranged, and the method can also be used to detect the failure of the Hall magnetic sensor. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments, and the above and / or other advantages of the present invention will become more clear.
[0028] Figure 1 It is a structural schematic diagram of the urea sensor module.
[0029] Figure 2 A schematic diagram of the structure of a hybrid high-precision liquid level measurement system provided in an embodiment of the present application.
[0030] Figure 3 A schematic diagram of the structure of a sensing unit and a signal processing unit in a hybrid high-precision liquid level measurement system provided in an embodiment of the present application.
[0031] Figure 4 A schematic diagram of a pulse signal generated by a signal processing unit in a hybrid high-precision liquid level measurement system provided in an embodiment of the present application.
[0032] Figure 5This is a signal characteristic diagram of a Hall magneto-sensitive device in a sensing unit of a hybrid high-precision liquid level measurement system provided in an embodiment of the present application.
[0033] Figure 6 A flow chart of a hybrid high-precision liquid level measurement method provided in an embodiment of the present application.
[0034] Figure 7 A schematic diagram of a process for determining whether a reed switch is short-circuited in a hybrid high-precision liquid level measurement method provided in an embodiment of the present application.
[0035] Figure 8 A schematic diagram of a process for detecting a Hall magnetic sensor failure in a hybrid high-precision liquid level measurement method provided in an embodiment of the present application.
[0036] Fig. 9 A schematic diagram of a flow chart of calculating the current liquid level of a urea solution in a hybrid high-precision liquid level measurement method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0037] The embodiments of the present invention will be described below in conjunction with the accompanying drawings.
[0038] In order to solve the problem of the influence of the short-circuited reed switch on the liquid level and to improve the liquid level sensing accuracy by using Hall magnetic sensors, the present invention proposes a liquid level detection circuit and detection method based on a multi-channel analog switch. Using this method, the faulty reed switch can be identified and isolated, and the reed switch and Hall magnetic sensors can be used in combination, and the sensitivity of the Hall magnetic sensors to other factors can be reduced. By reasonably arranging the reed switch and the Hall magnetic sensors, this method can also be used to detect the failure of the Hall magnetic sensors.
[0039] The first embodiment of the present application discloses a hybrid high-precision liquid level measuring device, including a float 150, an inner column 155, a sensing unit 90 and a signal processing unit 140, wherein the float 150 surrounds the inner column 155 and can move up and down along the outer side of the inner column 155, and a magnet 151 is installed in the float 150; a sensing unit 90 is arranged in the inner column 155, and the sensing unit 90 is connected to the signal processing unit 140; the sensing unit 90 includes a plurality of sensing elements arranged along the length direction of the inner column 155, and the sensing elements can interact with the magnet 151 to generate a sensing signal, and the sensing signal is received and processed by the signal processing unit 140; when the float 150 moves up and down, the sensing signal generated by the sensing element changes to form a pulse sequence, and the signal processing unit 140 can obtain the urea liquid level according to the pulse sequence and the position of the sensing element.
[0040] The signal processing unit 140 includes a multi-way analog switch circuit 210 and a counter 205, one end of the sensing element is connected to the multi-way terminal D of the multi-way analog switch circuit 210, the multi-way terminal D of the multi-way analog switch circuit 210 is also connected to a marking resistor 204, the control end of the multi-way analog switch circuit 210 is connected to the counter 205, the counter 205 generates a counting signal, and the counting signal sequentially connects the multi-way terminal D of the multi-way analog switch circuit 210 to the single-way terminal Y to generate the pulse sequence, and the pulse voltage of at least one pulse signal in the pulse sequence is related to the resistance value of the marking resistor 204.
[0041] The sensing element is a reed switch 162 and / or a Hall magnetic sensor 161 .
[0042] One end of the reed switch 162 is connected to the ground GND, and the other end is connected to the multi-way terminal D of the multi-way analog switch circuit 210; the Hall magnetic sensor 161 includes three wiring terminals: a power supply terminal, a ground terminal and a signal terminal, the power supply terminal is connected to the power supply Vcc, the ground terminal is connected to the ground GND, and the signal terminal is connected to the multi-way terminal D of the multi-way analog switch circuit 210.
[0043] The signal characteristics of the Hall magnetosensitive device 161 are as follows: The signal amplitude generated by the Hall magnetic sensor 161 is related to the distance between the magneton 151 and the device: when the north and south poles of the magneton 151 are less than the effective distance of the Hall magnetic sensor 161, the signal amplitude is related to the distance; when the north and south poles of the magneton 151 are greater than the effective distance of the Hall magnetic sensor 161, the signal turns to a certain value and loses the distance correlation.
[0044] The sensing unit 90 further includes a liquid temperature sensor 152 , one end of which is grounded GND, and the other end of which is connected to a multi-way terminal D of the multi-way analog switch circuit 210 .
[0045] The signal processing unit 140 further includes a pulse generating circuit 200 , which is connected to a counter 205 and is used to generate a clock signal.
[0046] The signal processing unit 140 further includes a CPU 100 , which is connected to a single-way terminal Y of the multi-way analog switch circuit 210 for processing the sensing signal.
[0047] Example 1
[0048] like Figure 1As shown, in this embodiment, the urea sensor module includes a base 70 and a rubber head module 80, an inner column 155 arranged therebetween, and a float 150 sleeved on the inner column and moving up and down along the inner column. A support column 60 is placed parallel to the inner column, and a heating pipeline 50 is also arranged between the base 70 and the rubber head module 80. The heating pipeline 50 is connected to the inlet end 51 and the outlet end 52 respectively. After the heating control valve (not shown) is opened, the engine coolant flows into the heating pipeline 50 from the inlet end 51, and flows out from the outlet end 52 after passing through the heating pipeline 50. The coolant takes away heat from the engine and transfers it to the urea solution through the heating pipeline, which is used to thaw the urea solution and keep its temperature higher than the freezing temperature when the system is running.
[0049] like Figure 2 As shown, the hybrid high-precision liquid level measuring device for sensing the liquid level in the urea sensor module includes a float 150, an inner column 155, a sensing unit 90 and a signal processing unit (SPU, Signal Processing Unit) 140. The float 150 includes a magnet 151, and the magnet 151 is magnetic. The float 150 surrounds the inner column 155 and moves up and down along the inner column 155 with the liquid level. The sensing unit 90 is arranged in the inner column 155, and the sensing unit includes a liquid temperature sensor 152 and a substrate 160, and a Hall magnetic sensor 161 and a reed switch 162 are arranged on the substrate 160. The Hall magnetic sensor 161, the liquid temperature sensor 152 and the reed switch 162 are connected to the SPU 140 through signal lines 142, 143 and 141 respectively.
[0050] The urea sensor module is arranged in the urea tank (not shown). Under the buoyancy of the urea liquid, as the float 150 moves up and down, the distance between the magnet 151 and the reed switch 162 and the Hall magnetic sensor 161 arranged in the inner column 155 also changes. When the distance from the magnet 151 to a certain reed switch 162 is less than the magnetic force action distance, the reed switch 162 will be closed, resulting in a change in the detection signal. Through the change in the detection signal caused by a certain reed switch 162 and the position of the reed switch 162 in the inner column 155, the position of the float 150 relative to the inner column 155 can be measured, thereby measuring the height of the liquid. Similarly, when the distance from the magnet 151 to a certain Hall magnetic sensor 161 causes the signal generated by the Hall magnetic sensor 161 to change, the height of the liquid can also be measured through the signal change and the position of the Hall magnetic sensor 161 in the inner column 155.
[0051] The sensing unit 90 and the SPU 140 may be used as Figure 3The circuit shown in FIG. 1 is implemented. In the circuit, one end of the reed switch 162 is connected to the ground GND, and the other end is connected to the multi-way end (D end) of the multi-way analog switch (MUX) 210. The Hall magnetic sensor 161 has three terminals: power supply end, ground end, and signal end. The power supply end is connected to the power supply Vcc, the ground end is connected to the ground GND, and the signal end is connected to the D end of MUX 210. One end of the liquid temperature sensor 152 in the sensing unit 90 is connected to the ground GND, and the other end is connected to the D end of MUX 210. In addition, the input end of MUX 210 is also connected to a flag resistor 204, and the other end of the flag resistor 204 is connected to the ground GND. The control end of MUX 210 is connected to a counter 205, and its clock is generated by a pulse generating circuit 200. The single-way end (Y end) of MUX 210 is connected to the power supply Vcc through a pull-up resistor 207, and is connected to the CPU 100 through a signal line 145. The CPU 100 includes a microprocessor for processing and calculating the generated signals, obtaining the liquid level and sensor status information, and sending the information to the engine control unit ECU (Engine Control Unit, not shown) through a data bus (not shown).
[0052] exist Figure 3 In the circuit, the pulse generated by the pulse generating circuit 200 triggers the counter 205 to generate a sequential counting signal, which in turn sequentially connects the D terminal of the MUX 210 to the Y terminal, and the signal generated thereby is received by the CPU 100 through the signal line 145. Figure 4 is a Figure 3 Graphs of signals generated by the circuit. Curve 201 is the pulse signal generated by the pulse generating circuit 200, and curve 202 is the signal generated by the MUX 210 on the signal line 145. Voltage Vr is the signal generated when the reed switch 162 is turned off, Vt is the signal generated when the liquid temperature sensor 152 is turned on, Vs is the signal generated when the marker resistor 204 is turned on, Vh is the signal generated when the Hall magnetic sensor 161 is turned on, and the signal with a pulse voltage close to zero is the signal generated when the reed switch 162 is closed.
[0053] The Hall magnetosensitive device 161 is a device that generates a voltage output signal, and its signal characteristics are as follows: Figure 5As shown. In the figure, the horizontal axis is the liquid level height, and the vertical axis is the voltage value generated by the Hall magnetic sensor 161. The north and south poles of the magneton 151 are arranged parallel to the Hall magnetic sensor 161. When the magneton 151 approaches the Hall magnetic sensor 161 from top to bottom, the south pole points to the Hall magnetic sensor 161, and when the magneton 151 approaches the Hall magnetic sensor 161 from bottom to top, the north pole points to the Hall magnetic sensor 161. When the magneton 151 is far away from the Hall magnetic sensor 161, the voltage output is a constant value Vo. When the liquid level rises, the north pole approaches the Hall magnetic sensor 161. When the liquid level exceeds the height Hb, the output voltage rises. When the north pole is closest to the Hall magnetic sensor 161 and the liquid level reaches the height Hn, the voltage rises to the first extreme value (highest extreme value) Vn. Then the North Pole begins to move away from the Hall magnetic sensor 161, the voltage decreases, and the South Pole begins to approach the Hall magnetic sensor 161. When the South Pole is closest to the Hall magnetic sensor 161 and the liquid level reaches Hs, the voltage drops to the second extreme value (the minimum extreme value). After the liquid level is higher than Hs, the South Pole also begins to move away from the Hall magnetic sensor 161, and the voltage rises. When the liquid level reaches Hu, the magneton leaves the sensitive area of the Hall magnetic sensor, and the voltage rises to Vo. The liquid level heights Hb, Hn, Hs, and Hu can be calibrated through experiments, and the voltages Vo and Vn can be calibrated through experiments.
[0054] The second embodiment of the present application discloses a hybrid high-precision liquid level measurement method, using the hybrid high-precision liquid level measurement device, comprising the following steps: Step 1, find the pulse generated by the marking resistor by checking the pulse voltage, and mark it as the initial pulse; specifically, if it is detected that the pulse sequence has a pulse rising edge, measure the pulse voltage Vp, if the pulse voltage Vp is within the range of the first voltage threshold V_lo to the second voltage threshold V_up, then the pulse is the pulse generated by the marking resistor, mark it as the initial pulse, and clear the two counting variables ID and i, where the first voltage threshold V_lo and the second voltage threshold V_up can be calibrated through experiments.
[0055] Step 2, by checking the pulse voltage after the initial pulse, find the pulse generated by the closed reed switch and mark its position; specifically, add 1 to the variable ID to determine whether the position corresponding to the pulse ID is a reed switch. If it is a reed switch, compare the pulse voltage Vp corresponding to the pulse ID with the third voltage threshold Thd_lo. If the pulse voltage Vp is less than the third voltage threshold Thd_lo, it means that the reed switch is closed, and set the value H(ID) corresponding to ID in the reed switch liquid number series H to 1, otherwise set it to 0. The third voltage threshold Thd_lo in step 2 is calibrated by experiment.
[0056] Step 3, if the position of the closed reed switch changes and more than one reed switch is closed, then detect the reed switch whose position does not change. If the position is detected to be unchanged for multiple times, mark the reed switch at this position as a failed reed switch. Specifically, check whether there is a change in the value of the reed switch liquid level sequence H. If there is a change, check whether there is only one position in the reed switch liquid level sequence H with a value of 1. If only one position in the reed switch liquid level sequence H has a value of 1 and the others are all zero, the short-circuit mark sequence BE is cleared and there is no failed reed switch; if multiple positions in the reed switch liquid level sequence H have a value of 1, check the position Idn in the reed switch liquid level sequence H where the value is 1 and does not change, and record the number of times the value of this position remains unchanged when the values of other positions in the reed switch liquid level sequence H change, and assign the number of times to the variable n; if n is greater than or equal to the times threshold Times_Min, Idn is counted in the short-circuit mark sequence BE, marking the reed switch at this position as a failed reed switch, and the times threshold Times_Min is calibrated according to demand.
[0057] Step 4: Take the lowest liquid level after removing the failed reed switch position as the reed switch float liquid level. Specifically, find the value of the position listed in the short-circuit mark sequence BE in the reed switch liquid number sequence H and clear it to zero. Then find the position Ide with a value of 1 in the reed switch liquid number sequence H and its corresponding liquid level value, and take the lowest liquid level as the measured value of the reed switch float liquid level.
[0058] In this embodiment, the hybrid high-precision liquid level measurement method further includes: Step 5, finding the pulse generated by the Hall magnetic sensor by checking the pulse voltage after the initial pulse, and measuring the pulse voltage generated by the Hall magnetic sensor; Step 6, calculating the float position of the Hall magnetic sensor device according to the pulse voltage and the position of the Hall magnetic sensor device. Specifically, check whether the pulse voltage is near V0. If not, detect whether there is a voltage jump. If there is a jump, record the position of the Hall magnetic sensor device as the liquid level of the Hall magnetic sensor device. Otherwise, calculate the float position of the Hall magnetic sensor device according to the pulse voltage and the liquid level of the Hall magnetic sensor device. Specifically, if the pulse voltage Vp generated by the Hall magnetic sensor device is less than or equal to V0_Hi and Vp is greater than or equal to V0_Lo, set the ID value of the Hall magnetic sensor device liquid level series L to zero, where V0_Hi and V0_Lo represent voltage threshold constants, which can be calibrated by experiments. If Vp is greater than V0_Hi or less than V0_Lo, use formula (F1) to calculate the liquid level difference dL according to the value of Vp, and use formula (F2) to calculate the magnetic sub-position L0: dL=Tbl_dL(Vp) (F1) L0 = Tbl_H(ID) (F2) Among them, Tbl_dL(Vp) is a table lookup calculation for calculating the position of the magneton relative to the Hall magnetic sensor device, which can be calibrated through experiments. Tbl_H() is a table lookup calculation for calculating the position of the Hall magnetic sensor device. After the position of the Hall magnetic sensor device is determined, the table value of the table can be obtained.
[0059] Then use formula (F3) to calculate the ID value of the L series: L(ID) = L0 + dL (F3).
[0060] Step 7, detecting the fault of the Hall magnetic sensor device by comparing the float position of the Hall magnetic sensor device and the reed switch float liquid level; specifically, finding the value of the position listed in the short circuit mark sequence BE in the H sequence and clearing it to zero; Find the position Ide with a value of 1 in the H sequence and its corresponding liquid level value HI. The lowest liquid level is used as the measured value of the reed switch float level. Determine whether there is another Hall magnetic sensor near the position Ide, if so, find out the value L_Ide of the Hall magnetic sensor in the Hall magnetic sensor liquid level series L, and compare the absolute value of the difference between L_Ide and HI; If the absolute value of the difference between L_Ide and HI is greater than the liquid level threshold Thd_Err, it is determined that the reading of the Hall magnetic sensor is incorrect and the Hall magnetic sensor is faulty, and the L_Ide value in the Hall magnetic sensor liquid level series L is cleared; the liquid level threshold Thd_Err is calibrated according to demand.
[0061] Step 8: If there is no Hall magnetic sensor failure, the float position of the Hall magnetic sensor is used as the current urea liquid level; otherwise, the float position of the reed switch is used as the current urea liquid level.
[0062] In this embodiment, after executing step 1, the temperature voltage pulse generated by the liquid temperature sensor is found by checking the pulse voltage after the initial pulse, and the urea temperature is calculated according to the pulse voltage of the temperature voltage pulse. Specifically, the pulse voltage generated by the liquid temperature sensor is Vp, and the urea solution temperature UT is calculated using formula (F4): UT=Tbl_T(Vp) (F4) Where Tbl_T() is a table lookup calculation for calculating the liquid temperature, and the table value is calibrated through experiments.
[0063] Example 2
[0064] Use features such as Figure 5 The Hall magnetic sensor device shown, Figure 3 CPU 100 can run as follows Figure 6The program shown in the figure processes the signal. This program can be run as an interrupt service program with a period of T (calculation period), and T can be set according to the required sampling frequency. After the program starts, it first detects whether there is a pulse rising edge (pulse signal such as Figure 4 As shown in curve 202), if the rising edge is not detected, the program stops and exits. Otherwise, the pulse voltage Vp is measured. If the pulse voltage Vp is within the range of the first voltage threshold V_lo to the second voltage threshold V_up, the two counting variables ID and i are cleared, and then ID is added by 1. It is determined whether the position corresponding to the pulse ID is a reed switch. If it is a reed switch, the pulse voltage Vp is compared with the third voltage threshold Thd_lo. If the pulse voltage Vp is less than the third voltage threshold Thd_lo, it means that the reed switch is closed, and the value H(ID) corresponding to ID in the reed switch liquid level sequence H is set to 1, otherwise it is set to 0. If it is determined that the position corresponding to the pulse ID is not a reed switch, or after completing the assignment of H(ID), the program determines whether the position corresponding to the pulse ID is a Hall magnetic sensor. If not, it determines whether it is a thermistor (liquid temperature sensor 152). If not, the program stops and exits. Otherwise, the liquid temperature is calculated using formula (F4). Returning to the judgment of whether the position corresponding to ID is a Hall magnetic sensor, if the corresponding position is a Hall magnetic sensor, judge whether the pulse voltage Vp is near V0: whether the pulse voltage Vp is greater than V0_Hi or less than V0_Lo. If the pulse voltage Vp is near V0 (Vp is less than or equal to V0_Hi and Vp is greater than or equal to V0_Lo), set the ID value in the Hall magnetic sensor liquid level series L to zero, and jump to the judgment of whether the ID position is a thermistor. Otherwise, formulas (F1), (F2), and (F3) calculate L(ID), and jump to the judgment of whether the ID position is a thermistor.
[0065] Through Figure 6 The processing results calculated by the program shown can be further used to identify the short circuit fault of the reed switch and mark it. Figure 6 In the figure, V_lo, V_up, Thd_lo, V0_Hi and V0_Lo are all threshold constants, which can be calibrated through experiments.
[0066] like Figure 7As shown, after the reed switch short circuit identification program starts, it first checks whether there is a change in the value in the sequence H. If there is no change, the program stops and exits. Otherwise, it checks whether there is only one position in the sequence H with a value of 1. If there is only one position in the sequence H with a value of 1 and the others are all zero, the short circuit mark sequence BE is cleared, and no reed switch is invalid (short circuit), and then the program stops and exits. If there are multiple positions in the sequence H with a value of 1, check the position Idn in the sequence H with a value of 1 and no change, and record the number of times the value of this position remains unchanged when the values of other positions in the sequence H change, and assign the number of times to the variable n. If n is greater than or equal to the number threshold Times_Min, Idn is counted in the short circuit mark sequence BE, marking the reed switch at this position as an invalid reed switch, and the program stops and exits, otherwise it stops and exits directly. Figure 7 In the example, the number threshold Times_Min is a threshold constant and can be calibrated according to requirements.
[0067] The fault of the Hall effect magnetic sensor can be further identified based on the values of the H series and the BE series. Figure 8 As shown, after a program for detecting a Hall magnetic sensor starts, it first finds the value of the position listed in the short-circuit mark sequence BE in the H sequence and clears it to zero. Then find the position Ide with a value of 1 in the H sequence and its corresponding liquid level value, and take the lowest liquid level HI as the measured value of the reed switch float liquid level. Then determine whether there is another Hall magnetic sensor near the position Ide. If not, the program stops and exits. Otherwise, find the value L_Ide of the Hall magnetic sensor in the L sequence, and compare the absolute value of the difference between L_Ide and HI to see if it is greater than the liquid level threshold Thd_Err. If the absolute value of the difference between L_Ide and HI is greater than the liquid level threshold Thd_Err, it is determined that the reading of the Hall magnetic sensor is incorrect, and the L_Ide value in the L sequence is cleared to zero, and then stops and exits. If the absolute value of the difference between L_Ide and HI is not greater than the liquid level threshold Thd_Err, the program stops and exits directly. Figure 8 In the example, the liquid level threshold Thd_Err is a threshold constant and can be calibrated according to requirements.
[0068] according to Figure 8 The HI value and L series value calculated by the program shown can be further used to calculate the current urea liquid level UH. Fig. 9 As shown in the figure, a program for calculating the urea liquid level first determines whether the values in the sequence L are all 0. If they are all 0, it means that there is no effective Hall magnetic sensor sensing signal. At this time, HI is assigned to the liquid level UH. If there is a non-zero value in the L sequence, its minimum value min(L) is assigned to UH. The program then stops and exits.
[0069] In a specific implementation, the present application provides a computer storage medium and a corresponding data processing unit, wherein the computer storage medium can store a computer program, and when the computer program is executed by the data processing unit, the invention content of a hybrid high-precision liquid level measurement method provided by the present invention and some or all of the steps in each embodiment can be executed. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0070] Those skilled in the art can clearly understand that the technical solutions in the embodiments of the present invention can be implemented by means of computer programs and their corresponding general hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention are essentially or the part that contributes to the prior art can be embodied in the form of a computer program, i.e., a software product, which can be stored in a storage medium and includes several instructions for enabling a device including a data processing unit (which can be a personal computer, a server, a single-chip microcomputer, a MUU or a network device, etc.) to execute the methods described in various embodiments of the present invention or certain parts of the embodiments.
[0071] The present invention provides a hybrid high-precision liquid level measurement device and method. There are many methods and ways to implement the technical solution. The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the protection scope of the present invention. All components not specified in this embodiment can be implemented by existing technologies.
Claims
1. A hybrid high-precision liquid level measuring device, characterized in that: The invention comprises a float (150), an inner column (155), a sensing unit (90) and a signal processing unit (140); the float (150) surrounds the inner column (155); the float (150) can move up and down along the outer side of the inner column (155); a magnet (151) is installed in the float (150); a sensing unit (90) is arranged in the inner column (155); the sensing unit (90) is connected to the signal processing unit (140); the sensing unit (90) comprises a plurality of sensing elements arranged along the length direction of the inner column (155); the sensing elements can interact with the magnet (151) to generate sensing signals, and the sensing signals are received and processed by the signal processing unit (140); when the float (150) moves up and down, the sensing signals generated by the sensing elements change to form a pulse sequence, and the signal processing unit (140) can obtain the urea liquid level according to the pulse sequence and the position of the sensing elements.
2. A hybrid high-precision liquid level measuring device according to claim 1, characterized in that: The signal processing unit (140) comprises a multi-channel analog switch circuit (210) and a counter (205); one end of the sensing element is connected to the multi-channel end (D) of the multi-channel analog switch circuit (210); the multi-channel end (D) of the multi-channel analog switch circuit (210) is also connected to a marking resistor (204); the control end of the multi-channel analog switch circuit (210) is connected to the counter (205); the counter (205) generates a counting signal; the counting signal sequentially connects the multi-channel end (D) of the multi-channel analog switch circuit (210) to the single-channel end (Y) to generate the pulse sequence; the pulse voltage of at least one pulse signal in the pulse sequence is related to the resistance value of the marking resistor (204).
3. A hybrid high-precision liquid level measuring device according to claim 2, characterized in that: The sensing element is a reed switch (162) and / or a Hall magnetosensitive device (161).
4. A hybrid high-precision liquid level measuring device according to claim 3, characterized in that: One end of the reed switch (162) is connected to the ground GND, and the other end is connected to the multi-way terminal (D) of the multi-way analog switch circuit (210); the Hall magnetosensitive device (161) comprises three wiring terminals: a power supply terminal, a ground terminal and a signal terminal, the power supply terminal is connected to the power supply Vcc, the ground terminal is connected to the ground GND, and the signal terminal is connected to the multi-way terminal (D) of the multi-way analog switch circuit (210).
5. A hybrid high-precision liquid level measuring device according to claim 4, characterized in that: The signal characteristics of the Hall magnetosensitive device (161) are as follows: The signal amplitude generated by the Hall magnetosensitive device (161) is related to the distance between the magneton (151) and the Hall magnetosensitive device (161): when the north and south poles of the magneton (151) are less than the operating distance of the Hall magnetosensitive device (161), the signal amplitude is related to the distance; and when the north and south poles of the magneton (151) are more than the operating distance of the Hall magnetosensitive device (161), the signal becomes a constant value and loses its distance correlation.
6. A hybrid high-precision liquid level measuring device according to claim 5, characterized in that: The sensing unit (90) further comprises a liquid temperature sensor (152), one end of the liquid temperature sensor (152) being grounded GND, and the other end of the liquid temperature sensor (152) being connected to a multi-way terminal (D) of a multi-way analog switch circuit (210).
7. A hybrid high-precision liquid level measuring device according to claim 6, characterized in that: The signal processing unit (140) further comprises a pulse generating circuit (200), wherein the pulse generating circuit (200) is connected to a counter (205) and is used to generate a clock signal.
8. A hybrid high-precision liquid level measuring device according to claim 7, characterized in that: The signal processing unit (140) further comprises a CPU (100), wherein the CPU (100) is connected to a single-channel end (Y) of the multi-channel analog switch circuit (210) and is used to process the sensing signal.
9. A hybrid high-precision liquid level measurement method, using a hybrid high-precision liquid level measurement device according to any one of claims 1 to 8, characterized in that: The following steps are involved: Step 1, find the pulse generated by the marker resistor by checking the pulse voltage and mark it as the initial pulse; Step 2, find the pulse generated by the closed reed switch by checking the pulse voltage after the initial pulse and mark its position; Step 3, if the position of the closed reed switch changes and more than one reed switch is closed, then detect the reed switch whose position does not change. If the position is detected to be unchanged for multiple times, mark the reed switch at that position as a failed reed switch; Step 4, taking the lowest liquid level after removing the failed reed switch position as the reed switch float level.
10. A hybrid high-precision liquid level measurement method according to claim 9, characterized in that: Also includes: Step 5, finding the pulse generated by the Hall magnetic sensor by checking the pulse voltage after the initial pulse, and measuring the pulse voltage generated by the Hall magnetic sensor; Step 6, calculating the float position of the Hall magnetic sensor device according to the pulse voltage and the position of the Hall magnetic sensor device; Step 7, detecting a fault of the Hall magnetic sensor device by comparing the float position of the Hall magnetic sensor device and the reed switch float liquid level; Step 8: If there is no Hall magnetic sensor failure, the float position of the Hall magnetic sensor is used as the current urea liquid level; otherwise, the float position of the reed switch is used as the current urea liquid level.
11. A hybrid high-precision liquid level measurement method according to claim 9, characterized in that: After executing step 1, the temperature voltage pulse generated by the liquid temperature sensor is found by checking the pulse voltage after the initial pulse, and the urea temperature is calculated according to the pulse voltage of the temperature voltage pulse.
12. A hybrid high-precision liquid level measurement method according to claim 10, characterized in that: The step 1 comprises: if it is detected that the pulse sequence has a pulse rising edge, the pulse voltage Vp is measured, and if the pulse voltage Vp is within the range of the first voltage threshold V_lo to the second voltage threshold V_up, the pulse is the pulse generated by the marking resistor, and it is marked as the initial pulse.
13. A hybrid high-precision liquid level measurement method according to claim 12, characterized in that: The step 2 includes: determining whether the position corresponding to the ID pulse in the pulse sequence is a reed switch; if it is a reed switch, comparing the pulse voltage Vp corresponding to the ID pulse with the third voltage threshold Thd_lo; if the pulse voltage Vp is less than the third voltage threshold Thd_lo, marking the reed switch state as closed and marking the reed switch position.
14. A hybrid high-precision liquid level measurement method according to claim 13, characterized in that: The step 7 includes: comparing the position of the non-failed reed switch in the closed state with the float position. If the absolute value of the difference between the two readings is greater than the threshold Thd_Err, it is determined that the reading of the Hall magnetic sensor is incorrect, and the threshold Thd_Err is calibrated according to demand.
15. A hybrid high-precision liquid level measurement method, using a hybrid high-precision liquid level measurement device according to any one of claims 1 to 8, characterized in that: The following steps are involved: Step 1, find the pulse generated by the marker resistor by checking the pulse voltage and mark it as the initial pulse; Step 2, by checking the pulse voltage after the initial pulse, find the pulse generated by the Hall magnetosensitive device and measure its pulse voltage; Step 3, calculating the float position of the Hall magnetic sensor device according to the pulse voltage and the position of the Hall magnetic sensor device.