A two-wire water level, water temperature and pumping test detection instrument and method
Through a two-wire water level and water temperature detection instrument, using a two-core scale cable and a proportional temperature detection circuit, combined with a float switch and a Kalman filter algorithm, the problems of low water temperature measurement accuracy and complex operation in the existing technology are solved, and the Precise measurement of groundwater level and water temperature, simplifying structure and improving portability.
Patent Information
- Application Number
- CN202010008064.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-01-06
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2040-01-06
AI Technical Summary
The existing two-wire portable water level meter is difficult to achieve high-precision water temperature measurement, and the measurement of groundwater level and water temperature requires the use of two machines, which is complex to operate and not portable.
A two-wire water level, water temperature and water pumping test detection instrument is designed, using a two-core scale cable, main control circuit, sensing probe sensor, proportional temperature detection circuit and ADC module, through the differential channel of the temperature measuring resistor and the reference resistor. Temperature measurement, and uses float switches and Kalman filter algorithms to improve measurement accuracy.
It achieves accurate measurement of groundwater level and water temperature, simplifies the product structure, improves measurement accuracy, avoids false alarms of battery undervoltage, and can be widely used in portable products.
Smart Images

Figure CN111103032B
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of water quality detection, and relates to a two-wire water level, water temperature and pumping test detection instrument and method. Background Art
[0002] The existing portable water level meter using two-wire scale cable cannot measure the groundwater temperature. There are generally two ways to measure temperature. One is to use an integrated digital temperature sensor, which requires at least three wires, and the two-wire cable does not meet the use requirements; the second is to use a temperature measuring resistor, thermistor, etc., which uses two wires. The use of temperature measuring resistors and thermistors for high-precision temperature measurement requires accurate compensation for the wire resistance, groundwater resistance, etc. The resistance of groundwater is different, and the resistance of the scale cable varies with the length and processing material, so the second method is not feasible in the existing technical solution.
[0003] In addition, when testing groundwater quality, groundwater level measurement and pumping test are common measurement items. In the prior art, two machines are needed to respectively perform groundwater level measurement and pumping test, which is complicated to operate and inconvenient to carry. Summary of the invention
[0004] The invention provides a two-wire water level, water temperature and pumping test detection instrument and method, which solves the problem that the two-wire portable water level meter in the prior art is difficult to achieve high-precision water temperature measurement.
[0005] The technical solution of the present invention is implemented as follows: a two-wire water level, water temperature and pumping test detection instrument, including a two-core scale cable, and also including
[0006] Main control circuit;
[0007] The sensing probe sensor includes a float switch, wherein a temperature measuring resistor is arranged inside the sensing probe sensor, two ends of the temperature measuring resistor are connected in parallel with two ends of the float switch, and two ends of the temperature measuring resistor are connected with a two-core scale cable;
[0008] The proportional temperature detection circuit includes a reference resistor and an ADC module.
[0009] The ADC module includes two pairs of differential inputs, and the ADC module is connected to the main control circuit.
[0010] The temperature measuring resistor is connected in series with the reference resistor through a two-core calibrated cable, one end of the temperature measuring resistor away from the reference resistor is connected to a DC power supply, one end of the reference resistor away from the temperature measuring resistor is connected to a ground signal, both ends of the temperature measuring resistor are respectively connected to a pair of differential inputs of the ADC module, and both ends of the reference resistor are respectively connected to another pair of differential inputs of the ADC module.
[0011] Furthermore, the main control circuit includes a main control chip, and the ADC module is built in the main control chip.
[0012] Furthermore, two ends of the reference resistor are respectively connected to a reference voltage of the ADC module.
[0013] Furthermore, it also includes an LED reminder circuit, a sound reminder circuit and a digital display circuit, all of which are connected to the main control circuit.
[0014] The LED reminder circuit includes a first switch tube and an LED indicator light connected in sequence, wherein the base of the first switch tube is connected to the main control circuit, the emitter of the first switch tube is connected to the ground signal, the collector of the first switch tube is connected to one end of the LED indicator light, and the other end of the LED indicator light is connected to a DC power supply.
[0015] The sound reminder circuit includes a second switch tube and a buzzer connected in sequence, the base of the second switch tube is connected to the main control circuit, the emitter of the second switch tube is connected to the ground signal, the collector of the second switch tube is connected to one end of the buzzer, and the other end of the buzzer is connected to a DC power supply.
[0016] Furthermore, it also includes a key circuit, one end of which is connected to the ground signal, and the other end is connected to the main control circuit.
[0017] The key circuit includes a plurality of keys connected in parallel, which are a mode selection key, a calibration key, a value adjustment key 1 and a value adjustment key 2.
[0018] A two-wire water level and water temperature and pumping test detection method, applied to a two-wire water level and water temperature and pumping test detection instrument as claimed in any one of claims 1 to 5, wherein the two-wire water level and water temperature detection instrument comprises a main control chip, an LED indicator light and a buzzer, including
[0019] S1: Obtain the voltage across the temperature measuring resistor, the voltage across the temperature measuring resistor is obtained by a proportional temperature position detection circuit. When the temperature measuring resistor is above the water level, the float switch is closed, and the voltage across the temperature measuring resistor is zero. When the temperature measuring resistor is placed in groundwater via a two-core scale cable, the float switch is disconnected, and the voltage across the temperature measuring resistor is greater than 0.5V.
[0020] S2: According to the voltage across the temperature measuring resistor, when the voltage across the temperature measuring resistor jumps from zero to greater than 0.5V, the LED indicator and the buzzer are controlled to send out an audible and visual alarm signal, and the audible and visual alarm signal is used to remind the user to read the two-core scale cable to obtain the current water level value h1;
[0021] S3: Obtaining a first resistance value R1 of the temperature measuring resistor according to the voltage across the temperature measuring resistor;
[0022] S4: Divide -10℃-80℃ into N temperature sections, perform segmented compensation on the first resistance R1, and obtain the second resistance R21, R22, ... R2n corresponding to each temperature section, where n is the temperature section number, n=1, 2, ... N, N>=1,
[0023]
[0024] Among them, Rcom1, Rcom2, ..., Rcomn are compensation resistors corresponding to each temperature segment, which are pre-stored in the main control chip.
[0025] S5: Using the least square method, the second resistance values R21, R22...R2n are respectively fitted and regressed to obtain the third resistance values R31, R32...R3n, which are specifically:
[0026]
[0027] Among them, A1, B1, C1, A2, B2, C2, ..., An, Bn, Cn are all constant coefficients, which are pre-stored in the main control chip. The calculation process of A1, B1, C1, A2, B2, C2, ..., An, Bn, Cn is the same. The calculation process of A1, B1, C1 is to use precision resistance boxes with resistance values of Rref1, Rref2, and Rref3 to replace the temperature measuring resistors in turn and connect them to the proportional temperature position detection circuit to obtain the measured values Rce1, Rce2, and Rce3 of the precision resistance box. A quadratic equation is used as the fitting regression equation, and the least squares method is used to fit and regress the three arrays (Rref1, Rce1), (Rref2, Rce2), and (Rref3, Rce3) to obtain A1, B1, and C1.
[0028] S6: Obtain the final temperature T according to the third resistance values R31, R32...R3n.
[0029] Furthermore, S6 and later also include
[0030] S7: obtaining the current working mode, which is obtained by the main control circuit according to the input signal of the key, including temperature detection mode, water pumping test mode and compensation resistance calibration mode;
[0031] S8: If the working mode is the pumping test, the LED indicator and buzzer are controlled to stop the sound and light alarm signal; otherwise, the temperature position detection mode is entered;
[0032] S9: Obtain the voltage across the temperature measuring resistor. When the groundwater level drops from h1 to h2 through the pumping test, the voltage across the temperature measuring resistor is zero. The LED indicator light and the buzzer are controlled to emit an audible and visual alarm signal, which is used to remind the user that the pumping test is completed.
[0033] Further, step S6 includes
[0034] S61: Obtain the first RTD temperature T according to the third resistance values R31, R32...R3n respectively RTD1 , T RTD2 ,…T RTDn ,
[0035]
[0036] Among them, R TD0 is the resistance of the temperature measuring resistor at 0°C, A=3.9083×10 -3 , B = -5.775 × 10 -7 , C = -4.23225 × 10 -12 ,
[0037] S62: If T RTD1 , T RTD2 ,…T RTDn are greater than or equal to zero, then T RTD1 , T RTD2 ,…T RTDn The first RTD temperature corresponding to the temperature segment number is taken as the final temperature T; if T RTD1 , T RTD2 ,…T RTDn If both are less than zero, the second RTD temperature T is calculated according to the following formula (2): RTD1 ', T RTD2 ', ...T RTDn ', and T RTD1 ', T RTD2 ', ...T RTDn 'The second RTD temperature corresponding to the temperature segment number is taken as the final temperature T,
[0038]
[0039] Further, step S3 includes
[0040] S30: Obtaining a voltage U across the temperature measuring resistor and a voltage U0 across the reference resistor, wherein the voltage U across the temperature measuring resistor and the voltage U0 across the reference resistor are both obtained by reading the output of the ADC module by the main control circuit;
[0041] S31: Using the Kalman filter algorithm, the voltage U across the temperature measuring resistor and the voltage U0 across the reference resistor are filtered in the same process to obtain the voltage U' across the temperature measuring resistor and the voltage U0' across the reference resistor, wherein the filtering process of the voltage U across the temperature measuring resistor is specifically as follows:
[0042] S311: Obtain the initial value X(0|0) of the optimal voltage value X(k-1|k-1) of the voltage U at time k-1, the initial value P(0|0) of the error covariance P(k-1|k-1) at time k-1, the initial value Q0 of the process noise Q, and the initial value R0 of the measurement noise R;
[0043] S312: Obtain the system state value X(k|k-1) at time k according to X(k-1|k-1),
[0044] X(k|k-1)=AX(k-1|k-1)
[0045] S313: According to the error covariance P(k-1|k-1) at time k-1 and the process noise Q, the error covariance P(k|k-1) at time k is obtained:
[0046] P(k|k-1)=P(k-1|k-1)+Q
[0047] S314: Calculate the current Kalman gain Kg(k) according to the error covariance P(k|k-1) at time k and the measurement noise R:
[0048] Kg(k)=P(k|k-1) / (P(k|k-1)+R)
[0049] S315: Obtaining V at time k A0+ The measured value Z(k) is used to obtain the optimal value X(k|k) at time k based on Z(k), Kalman gain Kg(k) and the system state value X(k|k-1) at time k.
[0050] X(k|k)=X(k|k-1)+Kg(k)((Z(k)-X(k|k-1))
[0051] S316: According to the Kalman gain Kg(k) and the error covariance P(k|k-1) at time k, we get
[0052] P(k|k)=(1-Kg(k))P(k|k-1)
[0053] S317: Assign P(k|k) obtained in step S316 to P(k|k-1), and execute steps S312 to S317.
[0054] S33: Obtain a first resistance value of the temperature measuring resistor according to the voltage U' across the temperature measuring resistor, the voltage U0' across the reference resistor, and the resistance value R0 of the reference resistor.
[0055] R1=(U' / U0')×R0
[0056] Further, in step S4, the steps for setting the compensation resistors Rcom1, Rcom2, ..., Rcomn are the same, wherein the steps for setting the compensation resistor Rcom1 include:
[0057] S41: Determine the correction temperature Tref1 of the first temperature section;
[0058] S42: Setting the temperature of the calibration system to Tref1, and setting the sensing probe sensor in the calibration system;
[0059] S43: Start the two-wire water level and water temperature detection instrument, the main control circuit reads the current temperature value Tche1 through the proportional temperature detection circuit, and displays it through the digital display circuit;
[0060] S44: If Tche1 is inconsistent with Tref1, the value of the compensation resistor Rcom1 is adjusted through the digital tube display circuit until Tche1 is the same as Tref1;
[0061] S45: Store the value of the compensation resistor Rcom1 in the main control chip.
[0062] The working principle and beneficial effects of the present invention are:
[0063] 1. Since the resistance of the temperature measuring resistor changes with the temperature, the sensing probe sensor is placed in the groundwater in the present invention, and the two ends of the temperature measuring resistor are connected to the proportional temperature detection circuit through a two-core scale cable. By measuring the resistance of the temperature measuring resistor, the temperature of the measured groundwater can be obtained.
[0064] The two ends of the temperature measuring resistor are connected to a pair of differential channels of the ADC module, and the two ends of the reference resistor are connected to another pair of differential channels of the ADC module. The current flowing through the temperature measuring resistor and the reference resistor is the same. The voltage across the temperature measuring resistor is U, and the resistance is R. The voltage across the reference resistor is U0, and the resistance is R0. The current flowing through the temperature measuring resistor and the reference resistor is I, then there is the following relationship:
[0065] U / U0=IR / IR0=R / R0
[0066] That is, R = U * R0 / U0
[0067] The present invention adopts a proportional temperature detection circuit, so that the measurement of water temperature is not affected by groundwater resistance and wire resistance, which greatly eliminates the influence of external interference, and is conducive to improving the measurement accuracy of water temperature and the applicability of the present invention.
[0068] At the same time, the float switch is connected in parallel with both ends of the temperature measuring resistor. When it is above the water level, the float switch is closed to short-circuit the temperature measuring resistor. At this time, the voltage across the temperature measuring resistor is approximately zero. The float switch is further lowered into the well. When it contacts the groundwater, the float switch is disconnected. At this time, the voltage across the temperature measuring resistor jumps from zero to a value greater than 0.5V, indicating that the float switch has reached underwater. The current water level value can be obtained by reading the scale value on the scale cable. Therefore, the water level measurement in the present invention is not affected by the groundwater resistance and the wire resistance.
[0069] The present invention realizes accurate measurement of groundwater level and water temperature by using a two-wire system, achieving the effect that can only be achieved by a three-wire system or a four-wire system, which is conducive to simplifying the product structure and is widely used in portable products.
[0070] 2. The ADC module in the present invention is built into the main control chip, which is beneficial to further simplify the circuit structure and improve the measurement accuracy.
[0071] 3. The portable water level meter needs to use a battery to provide DC power for the entire device. In the prior art, whether to replace the battery is generally determined by judging the battery supply voltage. Because the capacity and load capacity of different batteries are different, the battery voltage may drop instantly and the battery undervoltage alarm may sound at the moment the instrument is working. However, each device in the circuit is working normally. This situation is a false alarm of battery undervoltage.
[0072] In the present invention, the voltage at both ends of the reference resistor is proportional to the DC power supply voltage, and the two ends of the reference resistor are respectively connected to the two ends of the reference voltage of the ADC module, providing an external reference source for the reference voltage of the ADC module. When the battery voltage is abnormal, the main control chip will detect the abnormal reference voltage of the ADC module and perform a battery undervoltage alarm, effectively avoiding the situation of false battery undervoltage alarm. At the same time, there is no need to add a special battery voltage detection circuit, which simplifies the circuit structure.
[0073] 4. The present invention is also provided with an LED reminder circuit and a sound reminder circuit. When it is detected that the water level reaches the specified water level, an audible and visual alarm is issued to remind the staff to control the start or stop of the water pump and other equipment in time.
[0074] Among them, the first switch tube is used to amplify the control signal of the main control circuit to meet the driving requirements of the LED indicator light; the second switch tube is used to amplify the control signal of the main control circuit to meet the driving requirements of the buzzer, thereby realizing the timely and accurate issuance of the sound and light alarm signal.
[0075] The digital display circuit in the present invention is used to intuitively display the detection result of the water temperature, so that the staff can understand the detection result in time.
[0076] 5. The two-wire water level and water temperature detection instrument of the present invention can realize temperature detection and conduct water pumping test. By setting the key circuit, different working modes can be selected, including: temperature detection mode, water pumping test mode and compensation resistance calibration mode. The key circuit includes a mode selection key, a calibration key, a value adjustment key 1 and a value adjustment key 2, which correspond to Figure 7 The K1, K2, K3 and K4 shown can realize the operation of the corresponding mode by pressing the corresponding buttons, and have a simple structure and convenient operation.
[0077] For example, after the detection instrument is powered on, it enters the temperature position detection mode by default. When the voltage value across the temperature measuring resistor jumps from approximately zero to greater than 0.5V, it means that the sensing probe sensor contacts the water level, the float switch floats up, the two-core scale cable is disconnected, and the temperature measuring resistor is connected to the circuit. A voltage value is generated across the temperature measuring resistor. At this time, the LED reminder circuit and the sound reminder circuit emit an audible and visual alarm, and the digital tube displays the temperature value. The staff reads the cable scale value through the two-core scale cable, which is the groundwater level value, and the value displayed on the digital tube is the temperature value.
[0078] In the temperature detection mode, after the sensing probe sensor is lowered to the position where it contacts the groundwater, the LED reminder circuit and the sound reminder circuit send out sound and light reminders, the digital tube display circuit displays the groundwater temperature, and records the groundwater level value h1 at this time. At this time, press the mode selection button to enter the pumping test mode, the LED reminder circuit and the sound reminder circuit stop the sound and light alarm, continue to lower the sensing probe sensor to the required position, read the scale cable at this time, and record the groundwater level value h2. Start the pumping operation, and after the groundwater level drops to the groundwater level h2 and leaks out of the sensing probe sensor, the sound and light reminder circuit sends out sound and light reminders, and the digital tube display circuit goes out. At this time, record and organize the pumping volume, water level drop, and pumping duration of the entire pumping test process to complete the pumping test.
[0079] In order to improve the temperature measurement accuracy, the temperature measuring resistor can be calibrated and compensated in sections as needed, which is called compensation resistor calibration. Press the calibration button to enter the compensation resistor calibration mode. Different temperature sections have different circuit characteristics. The circuit characteristics of this circuit are divided into four temperature sections within the range of -10℃-80℃. Set a calibration temperature in each of the four different temperature sections, place the sensing probe sensor in the calibration temperature, the calibration temperature is simulated by the calibration system, turn on the instrument, the digital tube displays the temperature value, if the temperature value displayed on the digital tube is inconsistent with the calibration temperature, adjust the compensation resistance value through the numerical adjustment button 1 and the numerical adjustment button 2, and alternately display the compensation resistance value on the digital tube until the temperature displayed on the digital tube is the same as the calibration temperature. At this time, the compensation resistance R of the four temperature sections are recorded and saved through the Flash of the main control chip. com1 , R com2 , R com3 and R com4 , complete the compensation resistance calibration.
[0080] 6. The present invention also proposes a two-wire water level, water temperature and pumping test detection method. The main control circuit reads the voltage across the temperature measuring resistor in real time. When the voltage value across the temperature measuring resistor jumps from approximately zero to greater than 0.5V, it means that the sensing probe sensor contacts the water level. At this time, the LED reminder circuit and the sound reminder circuit are controlled to emit an audible and visual alarm. The staff obtains the groundwater level value by reading the two-core scale cable.
[0081] First, the first resistance R1 of the temperature measuring resistor is obtained from the voltage across the temperature measuring resistor. Then, within the temperature range of -10°C to 80°C, the temperature is divided into N sections, and the first resistance R1 is compensated in sections to obtain the second resistance R21, R22...R2n corresponding to each temperature section. Then, the least squares method is used to perform fitting regression calculations on the second resistances R21, R22...R2n to obtain the third resistances R31, R32...R3n. The final temperature T is then obtained from the third resistances R31, R32...R3n.
[0082] Through the above calibration process, the instrument can measure groundwater temperature with an accuracy of ±0.1°C, and achieves the measurement accuracy that can only be achieved by a four-wire measurement method using a two-wire method.
[0083] 7. The working mode is selected by the key circuit. The present invention can also perform a pumping test after the temperature level is detected. Before the pumping test starts, the LED indicator light and the buzzer are controlled to stop the sound and light alarm signal. When the groundwater level drops from h1 to h2 by starting the pumping operation, the voltage across the temperature measuring resistor is zero, and the LED indicator light and the buzzer are controlled to send out a sound and light alarm signal to remind the user that the pumping test is completed.
[0084] 8. When calculating the temperature from the resistance of the temperature measuring resistor, the calculation is divided into two stages. When the temperature is greater than or equal to 0°C, it is calculated according to formula (1). When the temperature is less than 0°C, it is calculated according to formula (2), which further improves the temperature measurement accuracy.
[0085] 9. The main control circuit acquires two pairs of differential outputs of the ADC module to obtain the voltage U across the temperature measuring resistor and the voltage U0 across the reference resistor. The Kalman filter algorithm is used to eliminate and correct large error interferences of U and U0 and perform data smoothing to obtain U' and U0'. Then, according to the formula R1=(U' / U0')×R0, the first resistance value R1 of the temperature measuring resistor is obtained to further improve the accuracy of temperature measuring resistor detection.
[0086] 10. According to the needs of the user, the compensation resistors Rcom1, Rcom2, ... Rcomn can be calibrated, and the results can be saved in the main control chip and used in step S11. The specific process is: the range of -10℃-80℃ is divided into N temperature sections, a calibration temperature is set in each of the N different temperature sections, the sensing probe sensor is placed in the calibration system, and the two-wire water level and water temperature detection instrument is turned on. The instrument displays the temperature value through the digital tube. If the temperature value displayed on the digital tube is inconsistent with the calibration temperature, the compensation resistance value is adjusted through the numerical adjustment button 1 and the numerical adjustment button 2, and the compensation resistance value is alternately displayed on the digital tube until the temperature displayed on the digital tube is the same as the calibration temperature. Record the compensation resistors Rcom1, Rcom2, ... Rcomn corresponding to each temperature section and save them in the main control chip. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0088] Figure 1 This is a circuit principle block diagram of the present invention;
[0089] Figure 2 This is the principle diagram of the main control circuit in the present invention;
[0090] Figure 3 This is a schematic diagram of a proportional temperature detection circuit in the present invention;
[0091] Figure 4 This is the schematic diagram of the LED reminder circuit in the present invention;
[0092] Figure 5 This is a schematic diagram of the sound reminder circuit in the present invention;
[0093] Figure 6 This is a schematic diagram of the digital display circuit in the present invention;
[0094] Figure 7 It is the principle diagram of the key circuit in the present invention;
[0095] Figure 8 It is the principle diagram of the power supply circuit in the present invention;
[0096] Fig. 9 This is a flow chart of the two-wire water level and water temperature detection method of the present invention;
[0097] Fig.10 This is a flow chart of the method for using the two-wire water level and water temperature detection instrument of the present invention;
[0098] In the figure: 1-main control circuit, 101-main control chip, 1011-reference voltage, 2-sensing probe sensor, 21-float switch, 22-temperature measuring resistor, 3-proportional temperature detection circuit, 31-reference resistor, 32-ADC module, 4-LED reminder circuit, 5-sound reminder circuit, 6-digital display circuit, 7-button circuit, 8-two-core scale cable, 9-power supply circuit. DETAILED DESCRIPTION
[0099] The following will be combined with the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0100] Embodiment 1
[0101] A two-wire water level, water temperature and pumping test detection instrument, comprising a two-core scale cable 8, and also comprising
[0102] Main control circuit 1;
[0103] The sensing probe sensor 2 includes a float switch 21, a temperature measuring resistor 22 is arranged in the sensing probe sensor 2, two ends of the temperature measuring resistor 22 are connected in parallel with two ends of the float switch 21, and two ends of the temperature measuring resistor 22 are connected to a two-core scale cable 8;
[0104] The proportional temperature detection circuit 3 includes a reference resistor 31 and an ADC module 32.
[0105] The ADC module 32 includes two pairs of differential inputs. The ADC module 32 is connected to the main control circuit 1.
[0106] The temperature measuring resistor 22 is connected in series with the reference resistor 31 through a two-core calibration cable 8. The end of the temperature measuring resistor 22 away from the reference resistor 31 is connected to a DC power supply, and the end of the reference resistor 31 away from the temperature measuring resistor 22 is connected to a ground signal. The two ends of the temperature measuring resistor 22 are respectively connected to a pair of differential inputs of the ADC module 32, and the two ends of the reference resistor 31 are respectively connected to another pair of differential inputs of the ADC module 32.
[0107] Since the resistance of the temperature measuring resistor 22 changes with the temperature, in the present invention, the sensing probe sensor 2 is placed in the groundwater, and the two ends of the temperature measuring resistor 22 are connected to the proportional temperature detection circuit 3 through a two-core scale cable 8. By measuring the resistance of the temperature measuring resistor 22, the temperature of the measured groundwater can be obtained.
[0108] The two ends of the temperature measuring resistor 22 are respectively connected to a pair of differential channels of the ADC module 32, and the two ends of the reference resistor 31 are respectively connected to another pair of differential channels of the ADC module 32. The current flowing through the temperature measuring resistor 22 and the reference resistor 31 is the same. The voltage across the temperature measuring resistor 22 is U, and the resistance is R. The voltage across the reference resistor 31 is U0, and the resistance is R0. The current flowing through the temperature measuring resistor 22 and the reference resistor 31 is I, and the following relationship is obtained:
[0109] U / U0=IR / IR0=R / R0
[0110] That is, R = U * R0 / U0
[0111] The present invention adopts a proportional temperature detection circuit 3, so that the measurement of water temperature is not affected by groundwater resistance and wire resistance, which greatly eliminates the influence of external interference, and is conducive to improving the measurement accuracy of water temperature and the applicability of the present invention.
[0112] At the same time, the float switch 21 is connected in parallel with both ends of the temperature measuring resistor 22. When it is above the water level, the float switch 21 is closed, short-circuiting the temperature measuring resistor 22. At this time, the voltage across the temperature measuring resistor 22 is approximately zero. The float switch 21 is further lowered into the well. When it contacts the groundwater, the float switch 21 is disconnected. At this time, the voltage across the temperature measuring resistor 22 jumps from zero to a value greater than 0.5V, indicating that the float switch 21 has reached underwater. By reading the scale value on the scale cable, the current water level value can be obtained. Therefore, the water level measurement in the present invention is not affected by the groundwater resistance and the wire resistance.
[0113] The present invention realizes accurate measurement of groundwater level and water temperature by using a two-wire system, achieving the effect that can only be achieved by a three-wire system or a four-wire system, which is conducive to simplifying the product structure and is widely used in portable products.
[0114] Furthermore, the main control circuit 1 includes a main control chip 101 , and the ADC module 32 is built in the main control chip 101 .
[0115] In the present invention, the ADC module 32 is built into the main control chip 101, which is beneficial to further simplify the circuit structure and improve the measurement accuracy.
[0116] Furthermore, both ends of the reference resistor 31 are also connected to the reference voltage 1011 of the ADC module 32 .
[0117] Portable water level meters require batteries to provide DC power for the entire device. In the prior art, whether to replace the battery is generally determined by judging the battery supply voltage. Because different batteries have different capacities and load capacities, the battery voltage may drop instantly and the battery undervoltage alarm may sound at the moment the instrument is working. However, each device in the circuit is working normally. This situation is a false battery undervoltage alarm.
[0118] In the present invention, the voltage across the reference resistor 31 is proportional to the DC power supply voltage. The two ends of the reference resistor 31 are connected to the reference voltage 1011 of the ADC module 32 to provide an external reference source for the ADC module 32. When the battery voltage is abnormal, the main control chip 101 will detect the abnormal reference voltage 1011 of the ADC module 32 and issue a battery undervoltage alarm, effectively avoiding the situation of false battery undervoltage alarm. At the same time, there is no need to add a special battery voltage detection circuit, which simplifies the circuit structure.
[0119] like Figure 3 As shown, it is a schematic diagram of the temperature position detection circuit 3, wherein the temperature measuring resistor 22 is a platinum resistor PT1000, the DC power supply voltage VCC is 3.3V, the maximum measurement temperature of the instrument is set to 80°C, the maximum resistance of the platinum resistor is 1320 ohms, R4 is selected to be 2K, R0 is selected to be 5.3K, R4 and R0 are precision resistors with an accuracy of at least 0.1%, so as to limit the circuit current I=VCC / (R4+Rpt+R0) to within 400uA, and eliminate the influence of self-heating effect on the temperature measurement of the platinum resistor PT1000, wherein Rpt is the resistance value of the platinum resistor PT1000.
[0120] At the same time, the main control chip 101 is MSP430F4270, with a built-in ADC module 32. The two ends of R0 are respectively connected to the reference voltage 1011VREF of the ADC module 32 to provide a reference voltage for the ADC module. The VREF voltage is R0*400uA=2.1V, and the maximum voltage across the platinum resistor is 1320*400uA=0.528V. After being amplified 4 times by the internal PGA of the ADC module, it is 0.528V*4=2.112V, which is equal to the reference voltage of the ADC module, which is equivalent to collecting the platinum resistor voltage near the reference voltage of the ADC module. Moreover, the DC power supply, the reference voltage 1011VREF of the ADC module and the voltage across the platinum resistor are in the same path and have the same change trend, which is conducive to eliminating external interference and improving measurement accuracy.
[0121] Furthermore, it also includes an LED reminder circuit 4, a sound reminder circuit 5 and a digital display circuit 6, all of which are connected to the main control circuit 1.
[0122] The LED reminder circuit 4 includes a first switch tube and an LED indicator light connected in sequence, wherein the base of the first switch tube is connected to the main control circuit 1, the emitter of the first switch tube is connected to the ground signal, the collector of the first switch tube is connected to one end of the LED indicator light, and the other end of the LED indicator light is connected to a DC power supply.
[0123] The sound reminder circuit 5 includes a second switch tube and a buzzer connected in sequence, the base of the second switch tube is connected to the main control circuit 1, the emitter of the second switch tube is connected to the ground signal, the collector of the second switch tube is connected to one end of the buzzer, and the other end of the buzzer is connected to a DC power supply.
[0124] The present invention is also provided with an LED reminder circuit 4 and a sound reminder circuit 5. When it is detected that the water level reaches a specified water level, an audible and visual alarm is issued to remind the staff to control the start or stop of equipment such as a water pump in time.
[0125] Among them, the first switch tube is used to amplify the control signal of the main control circuit 1 to meet the driving requirements of the LED indicator light; the second switch tube is used to amplify the control signal of the main control circuit 1 to meet the driving requirements of the buzzer, thereby realizing the timely and accurate issuance of the sound and light alarm signal.
[0126] The digital display circuit 6 in the present invention is used to intuitively display the detection result of the water temperature, so that the staff can understand the detection result in time.
[0127] Furthermore, it also includes a key circuit 7, one end of which is connected to the ground signal, and the other end is connected to the main control circuit 1.
[0128] The key circuit 7 includes a plurality of keys connected in parallel, namely a mode selection key, a calibration key, a value adjustment key 1 and a value adjustment key 2.
[0129] The two-wire water level and water temperature detection instrument of the present invention can realize temperature detection and conduct water pumping test. By setting the key circuit 7, different working modes can be selected, including: temperature detection mode, water pumping test mode and compensation resistance calibration mode. The key circuit 7 includes a mode selection key, a calibration key, a value adjustment key 1 and a value adjustment key 2, which correspond to Figure 7 The K1, K2, K3 and K4 shown can realize the operation of the corresponding mode by pressing the corresponding buttons, and have a simple structure and convenient operation.
[0130] For example, after the detection instrument is powered on and started, it enters the temperature position detection mode by default. When the voltage value across the temperature measuring resistor 22 jumps from approximately zero to greater than 0.5V, it means that the sensing probe sensor 2 contacts the water level, the float switch floats up, the two-core scale cable 8 is disconnected, and the temperature measuring resistor 22 is connected to the circuit. A voltage value is generated across the temperature measuring resistor 22. At this time, the LED reminder circuit 4 and the sound reminder circuit 5 emit an audible and visual alarm, and the digital tube displays the temperature value. The staff reads the cable scale value through the two-core scale cable 8, which is the groundwater level value, and the value displayed on the digital tube is the temperature value.
[0131] After the sensing probe sensor 2 is lowered to the position where it contacts the groundwater in the temperature detection mode, the LED reminder circuit 4 and the sound reminder circuit 5 send out sound and light reminders, the digital tube display circuit displays the groundwater temperature, and records the groundwater level value h1 at this time. At this time, press the mode selection button to enter the pumping test mode, the LED reminder circuit 4 and the sound reminder circuit 5 stop the sound and light alarm, continue to lower the sensing probe sensor 2 to the required position, read the scale cable at this time, and record the groundwater level value h2. Start the pumping operation, and after the groundwater level drops to the groundwater level h2 and leaks out of the sensing probe sensor 2, the sound and light reminder circuit sends out a sound and light reminder, and the digital tube display circuit goes out. At this time, record and organize the pumping volume, water level drop, and pumping duration of the entire pumping test process to complete the pumping test.
[0132] In order to improve the temperature measurement accuracy, the temperature measuring resistor 22 can be calibrated and compensated in sections as needed, which is called compensation resistance calibration. Press the calibration button to enter the compensation resistance calibration mode. Different temperature sections have different circuit characteristics. The circuit characteristics of this circuit are divided into four temperature sections within the range of -10℃-80℃. Set a calibration temperature in each of the four different temperature sections, place the sensing probe sensor 2 in the calibration temperature, the calibration temperature is simulated by the calibration system, turn on the instrument, the digital tube displays the temperature value, if the temperature value displayed on the digital tube is inconsistent with the calibration temperature, adjust the compensation resistance value through the numerical adjustment button 1 and the numerical adjustment button 2, and alternately display the compensation resistance value on the digital tube until the temperature displayed on the digital tube is the same as the calibration temperature. At this time, the compensation resistance R of the four temperature sections are recorded and saved through the Flash of the main control chip 101. com1 , R com2 , R com3 and R com4 , complete the compensation resistance calibration.
[0133] Embodiment 2
[0134] A two-wire water level and water temperature and pumping test detection method, the two-wire water level and water temperature detection instrument includes a main control chip 101, an LED indicator light and a buzzer, including
[0135] S1: Obtain the voltage across the temperature measuring resistor 22. The voltage across the temperature measuring resistor 22 is obtained by the proportional temperature position detection circuit 3. When the temperature measuring resistor 22 is above the water level, the float switch 21 is closed, and the voltage across the temperature measuring resistor 22 is zero. When the temperature measuring resistor 22 is placed in the groundwater via the two-core scale cable 8, the float switch 21 is disconnected, and the voltage across the temperature measuring resistor 22 is greater than 0.5V.
[0136] S2: According to the voltage across the temperature measuring resistor 22, when the voltage across the temperature measuring resistor 22 jumps from zero to greater than 0.5V, the LED indicator and the buzzer are controlled to send out an audible and visual alarm signal, and the audible and visual alarm signal is used to remind the user to read the two-core scale cable 8, so as to obtain the current water level value h1;
[0137] S3: Obtaining a first resistance value R1 of the temperature measuring resistor 22 according to the voltage across the temperature measuring resistor 22;
[0138] S4: Divide -10℃-80℃ into four temperature sections: -10℃-10℃, 10℃-40℃, 40℃-60℃, and 60℃-80℃, and perform segmented compensation on the first resistance R1 to obtain the second resistance R21, R22, R23, and R24 corresponding to each temperature section.
[0139] R21 = R1 - Rcom1;
[0140] R22 = R1 - Rcom2;
[0141] R23 = R1 - Rcom3;
[0142] R24 = R1 - Rcom4;
[0143] Among them, Rcom1, Rcom2, Rcom3, and Rcom4 are compensation resistors corresponding to each temperature range, which are pre-stored in the main control chip 101.
[0144] S5: Using the least square method, the second resistance values R21, R22, R23, and R24 are respectively fitted and regressed to obtain the third resistance values R31, R32, R33, and R34, which are specifically:
[0145] R31=A1×R21×R21+B1×R21+C1
[0146] R32=A2×R22×R22+B2×R22+C2
[0147] R33=A3×R23×R23+B3×R23+C3
[0148] R34=A4×R24×R24+B4×R24+C4
[0149] Among them, A1, B1, C1, A2, B2, C2, A3, B3, C3, A4, B4, C4 are all constant coefficients, which are pre-stored in the main control chip 101. The calculation process of A1, B1, C1, A2, B2, C2, A3, B3, C3, A4, B4, C4 is the same. The calculation process of A1, B1, C1 is
[0150] Precision resistance boxes with resistance values of Rref1, Rref2, and Rref3 are used to replace the temperature measuring resistor 22 and connected to the proportional temperature position detection circuit 3 in turn to obtain the measured values Rce1, Rce2, and Rce3 of the precision resistance box. A quadratic equation is used as the fitting regression equation, and the least squares method is used to fit and regress the three arrays (Rref1, Rce1), (Rref2, Rce2), and (Rref3, Rce3) to obtain A1, B1, and C1.
[0151] S6: Obtain a final temperature T according to the third resistance values R31, R32, R33, and R34.
[0152] The present invention also proposes a two-wire water level, water temperature and pumping test detection method, in which the main control circuit 1 reads the voltage across the temperature measuring resistor 22 in real time. When the voltage value across the temperature measuring resistor 22 jumps from approximately zero to greater than 0.5V, it indicates that the sensing probe sensor 2 contacts the water level. At this time, the LED reminder circuit 4 and the sound reminder circuit 5 are controlled to emit an audible and visual alarm, and the staff obtains the groundwater level value by reading the two-core scale cable 8.
[0153] First, the first resistance R1 of the temperature measuring resistor 22 is obtained from the voltage across the temperature measuring resistor 22. Then, within the temperature range of -10°C to 80°C, the temperature is divided into four sections, and the first resistance R1 is compensated in sections to obtain the second resistance R21, R22, R23, and R24 corresponding to each temperature section. Then, the least squares method is used to perform fitting regression calculations on the second resistances R21, R22, R23, and R24 to obtain the third resistances R31, R32, R33, and R34. The final temperature T is then obtained from the third resistances R31, R32, R33, and R34.
[0154] Through the above calibration process, the instrument can measure groundwater temperature with an accuracy of ±0.1°C, and achieves the measurement accuracy that can only be achieved by a four-wire measurement method using a two-wire method.
[0155] Furthermore, S6 and later also include
[0156] S7: obtaining the current working mode, which is obtained by the main control circuit 1 according to the input signal of the key, including temperature detection mode, water pumping test mode and compensation resistance calibration mode;
[0157] S8: If the working mode is the pumping test, the LED indicator and buzzer are controlled to stop the sound and light alarm signal; otherwise, the temperature position detection mode is entered;
[0158] S9: Obtain the voltage across the temperature measuring resistor 22. When the groundwater level drops from h1 to h2 through the pumping test, the voltage across the temperature measuring resistor 22 is zero. The LED indicator light and the buzzer are controlled to emit an audible and visual alarm signal, which is used to remind the user that the pumping test is completed.
[0159] By selecting the working mode through the key circuit 7, the present invention can also perform a pumping test after the temperature level is detected. Before the pumping test starts, the LED indicator light and the buzzer are controlled to stop the sound and light alarm signal. When the groundwater level drops from h1 to h2 by starting the pumping operation, the voltage across the temperature measuring resistor 22 is zero, and the LED indicator light and the buzzer are controlled to send out a sound and light alarm signal to remind the user that the pumping test is completed.
[0160] Further, step S6 includes
[0161] S61: Obtain the first RTD temperature T according to the third resistance values R31, R32, R33, and R34 respectively. RTD1 , T RTD2 , T RTD3 , T RTD4 ,
[0162]
[0163] Among them, R TD0 is the resistance of the temperature measuring resistor 22 at 0°C, A = 3.9083 × 10 -3 , B = -5.775 × 10 -7 , C = -4.23225 × 10 -12 ,
[0164] S62: If T RTD1 , T RTD2 , T RTD3 , T RTD4 are greater than or equal to zero, then T RTD1 , T RTD2 , T RTD3 , T RTD4 The first RTD temperature corresponding to the temperature segment number is taken as the final temperature T, for example, T RTD1 , T RTD2 , T RTD3 , T RTD4 If both are within the third temperature range, then T RTD3 As the final temperature T; if T RTD1 , T RTD2 , T RTD3 , T RTD4 If both are less than zero, the second RTD temperature T is calculated according to the following formula (4): RTD1 ', T RTD2 ', T RTD3 ', T RTD4 ', and T RTD1 ', T RTD2 ', T RTD3 ', T RTD4 The second RTD temperature corresponding to the temperature segment number is taken as the final temperature T, for example, T RTD1 ', T RTD2 ', T RTD3 ', T RTD4 ' are all within the second temperature range, then T RTD2 ' as the final temperature T.
[0165]
[0166] The temperature calculation process is divided into two stages. When the temperature is greater than or equal to 0°C, it is calculated according to formula (3). When the temperature is less than 0°C, it is calculated according to formula (4), thereby further improving the temperature measurement accuracy.
[0167] Further, step S3 includes
[0168] S30: Obtaining a voltage U across the temperature measuring resistor 22 and a voltage U0 across the reference resistor 31, wherein the voltage U across the temperature measuring resistor 22 and the voltage U0 across the reference resistor 31 are both obtained by reading the output of the ADC module 32 by the main control circuit 1;
[0169] S31: Using the Kalman filter algorithm, the voltage U across the temperature measuring resistor 22 and the voltage U0 across the reference resistor 31 are filtered in the same process to obtain the voltage U' across the temperature measuring resistor 22 and the voltage U0' across the reference resistor 31, wherein the filtering process of the voltage U across the temperature measuring resistor 22 is specifically as follows:
[0170] S311: Obtain the initial value X(0|0) of the optimal voltage value X(k-1|k-1) of the voltage U at time k-1, the initial value P(0|0)=0.05 of the error covariance P(k-1|k-1) at time k-1, the initial value Q0=0.004 of the process noise Q, and the initial value R0=0.1 of the measurement noise R;
[0171] S312: Obtain the system state value X(k|k-1) at time k according to X(k-1|k-1),
[0172] X(k|k-1)=AX(k-1|k-1)
[0173] Where A = 1;
[0174] S313: According to the error covariance P(k-1|k-1) at time k-1 and the process noise Q, the error covariance P(k|k-1) at time k is obtained:
[0175] P(k|k-1)=P(k-1|k-1)+Q
[0176] S314: Calculate the current Kalman gain Kg(k) according to the error covariance P(k|k-1) at time k and the measurement noise R:
[0177] Kg(k)=P(k|k-1) / (P(k|k-1)+R)
[0178] S315: Obtaining V at time k A0+ The measured value Z(k) is used to obtain the optimal value X(k|k) at time k based on Z(k), Kalman gain Kg(k) and the system state value X(k|k-1) at time k.
[0179] X(k|k)=X(k|k-1)+Kg(k)((Z(k)-X(k|k-1))
[0180] S316: According to the Kalman gain Kg(k) and the error covariance P(k|k-1) at time k, we get
[0181] P(k|k)=(1-Kg(k))P(k|k-1)
[0182] S317: Assign P(k|k) obtained in step S316 to P(k|k-1), and execute steps S312 to S317.
[0183] S33: Obtain a first resistance value of the temperature measuring resistor 22 according to the voltage U′ across the temperature measuring resistor 22, the voltage U0′ across the reference resistor 31, and the resistance value R0 of the reference resistor 31.
[0184] R1=(U' / U0')×R0
[0185] The main control circuit 1 obtains the voltage U across the temperature measuring resistor 22 and the voltage U0 across the reference resistor 31 by collecting two pairs of differential outputs of the ADC module 32. The large error interference of U and U0 is eliminated, corrected and the data is smoothed by the Kalman filtering algorithm to obtain U' and U0'. Then, according to the formula R1=(U' / U0')×R0, the first resistance value R1 of the temperature measuring resistor 22 is obtained, thereby further improving the detection accuracy of the temperature measuring resistor 22.
[0186] Furthermore, in step S4, the steps for setting the compensation resistors Rcom1, Rcom2, Rcom3, and Rcom4 are the same, wherein the steps for setting the compensation resistor Rcom1 include:
[0187] S41: Determine the correction temperature Tref1 of the first temperature section;
[0188] S42: Setting the temperature of the calibration system to Tref1, and setting the sensing probe sensor in the calibration system;
[0189] S43: Start the two-wire water level and water temperature detection instrument, the main control circuit 1 reads the current temperature value Tche1 through the temperature detection circuit 3, and displays it through the digital display circuit 6;
[0190] S44: If Tche1 is inconsistent with Tref1, the value of the compensation resistor Rcom1 is adjusted through the digital tube display circuit until Tche1 is the same as Tref1;
[0191] S45 : storing the value of the compensation resistor Rcom1 in the main control chip 101 .
[0192] According to the needs of the user, before the water level and water temperature detection, the compensation resistors Rcom1, Rcom2, Rcom3, and Rcom4 can be calibrated, and the results can be saved in the main control chip 101 and used in step S11. The specific process is: the range of -10℃-80℃ is divided into four temperature sections, and a calibration temperature is set in each of the four different temperature sections. The sensing probe sensor 2 is placed in the calibration system, and the two-wire water level and water temperature detection instrument is turned on. The instrument displays the temperature value through the digital tube. If the temperature value displayed on the digital tube is inconsistent with the calibration temperature, the compensation resistance value is adjusted by pressing the button, and the compensation resistance value is alternately displayed on the digital tube until the temperature displayed on the digital tube is the same as the calibration temperature. The compensation resistors Rcom1, Rcom2, Rcom3, and Rcom4 corresponding to each temperature section are recorded and saved in the main control chip 101.
[0193] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A two-wire water level, water temperature and pumping test detection instrument, comprising a two-core scale cable (8), Features: Also includes Main control circuit (1); The sensing probe sensor (2) comprises a float switch (21), wherein a temperature measuring resistor (22) is arranged inside the sensing probe sensor (2), wherein two ends of the temperature measuring resistor (22) are connected in parallel with two ends of the float switch (21), and two ends of the temperature measuring resistor (22) are connected to a two-core scale cable (8); A proportional temperature detection circuit (3) includes a reference resistor (31) and an ADC module (32). The ADC module (32) comprises two pairs of differential inputs, the ADC module (32) is connected to the main control circuit (1), and two ends of the reference resistor (31) are respectively connected to two ends of a reference voltage (1011) of the ADC module (32); The temperature measuring resistor (22) is connected in series with the reference resistor (31) via a two-core scale cable (8); one end of the temperature measuring resistor (22) away from the reference resistor (31) is connected to a DC power supply; one end of the reference resistor (31) away from the temperature measuring resistor (22) is connected to a ground signal; two ends of the temperature measuring resistor (22) are respectively connected to a pair of differential inputs of the ADC module (32); and two ends of the reference resistor (31) are respectively connected to another pair of differential inputs of the ADC module (32); It also includes an LED reminder circuit (4), a sound reminder circuit (5) and a digital display circuit (6) all connected to the main control circuit (1). The LED reminder circuit (4) comprises a first switch tube and an LED indicator light connected in sequence, wherein the base of the first switch tube is connected to the main control circuit (1), the emitter of the first switch tube is connected to a ground signal, the collector of the first switch tube is connected to one end of the LED indicator light, and the other end of the LED indicator light is connected to a DC power supply; The sound reminder circuit (5) comprises a second switch tube and a buzzer connected in sequence, the base of the second switch tube is connected to the main control circuit (1), the emitter of the second switch tube is connected to the ground signal, the collector of the second switch tube is connected to one end of the buzzer, and the other end of the buzzer is connected to a DC power supply; The proportional temperature detection circuit obtains the voltage across the temperature measuring resistor. When the temperature measuring resistor is above the water level, the float switch is closed, and the voltage across the temperature measuring resistor is zero. When the temperature measuring resistor is placed in the groundwater via the two-core scale cable, the float switch is disconnected, and the voltage across the temperature measuring resistor is greater than 0.5V. According to the voltage across the temperature measuring resistor, when the voltage across the temperature measuring resistor jumps from zero to greater than 0.5V, the LED indicator and the buzzer are controlled to send out an audible and visual alarm signal, and the audible and visual alarm signal is used to remind the user to read the two-core scale cable to obtain the current water level value h1; According to the voltage across the temperature measuring resistor, a first resistance value R1 of the temperature measuring resistor is obtained; The temperature range of -10℃-80℃ is divided into N temperature sections, and the first resistance R1 is compensated in sections to obtain the second resistance R21, R22, R23, R24, ..., R2n corresponding to each temperature section; then the least squares method is used to perform fitting regression calculations on the second resistances R21, R22, R23, R24, ..., R2n to obtain the third resistances R31, R32, R33, R34, ..., R3n; and the final temperature T is obtained from the third resistances R31, R32, R33, R34, ..., R3n.
2. A two-wire water level, water temperature and pumping test detection instrument according to claim 1, Features: The main control circuit (1) comprises a main control chip (101), and the ADC module (32) is built into the main control chip (101).
3. A two-wire water level, water temperature and pumping test detection instrument according to claim 1, Features: It also includes a key circuit (7), one end of the key circuit (7) is connected to the ground signal, and the other end is connected to the main control circuit (1). The key circuit (7) comprises a plurality of keys connected in parallel, namely a mode selection key, a calibration key, a first value adjustment key and a second value adjustment key.
4. A two-wire water level, water temperature and pumping test detection method, applied to a two-wire water level, water temperature and pumping test detection instrument as claimed in any one of claims 1 to 3, wherein the two-wire water level, water temperature and pumping test detection instrument comprises a main control chip, an LED indicator light and a buzzer, It is characterized in that include S1: Obtain the voltage across the temperature measuring resistor, the voltage across the temperature measuring resistor is obtained by a proportional temperature position detection circuit. When the temperature measuring resistor is above the water level, the float switch is closed, and the voltage across the temperature measuring resistor is zero. When the temperature measuring resistor is placed in groundwater via a two-core scale cable, the float switch is disconnected, and the voltage across the temperature measuring resistor is greater than 0.5V. S2: According to the voltage across the temperature measuring resistor, when the voltage across the temperature measuring resistor jumps from zero to greater than 0.5V, the LED indicator and the buzzer are controlled to send out an audible and visual alarm signal, and the audible and visual alarm signal is used to remind the user to read the two-core scale cable to obtain the current water level value h1; S3: Obtaining a first resistance value R1 of the temperature measuring resistor according to the voltage across the temperature measuring resistor; S4: Divide -10℃-80℃ into N temperature sections, perform segmented compensation on the first resistance R1, and obtain the second resistance R21, R22, ... R2n corresponding to each temperature section, where n is the temperature section number, n=1, 2, ... N, N>=1, R21=R1-Rcom1; R22=R1-Rcom2; … R2n=R1-Rcomn; Among them, Rcom1, Rcom2, ... Rcomn are the compensation resistors corresponding to each temperature range, which are pre-stored in the main control chip; S5: Using the least square method, the second resistance values R21, R22...R2n are respectively fitted and regressed to obtain the third resistance values R31, R32...R3n, which are specifically: R31=A1×R21×R21+B1×R21+C1 R32=A2×R22×R22+B2×R22+C2 … R3n=An×R2n×R2n+Bn×R2n+Cn Among them, A1, B1, C1, A2, B2, C2, ..., An, Bn, Cn are all constant coefficients, which are pre-stored in the main control chip. The calculation process of A1, B1, C1, A2, B2, C2, ..., An, Bn, Cn is the same. The calculation process of A1, B1, C1 is Use precision resistance boxes with resistance values of Rref1, Rref2, and Rref3 to replace the temperature measuring resistors in turn and connect them to the proportional temperature detection circuit to obtain the measured values Rce1, Rce2, and Rce3 of the precision resistance boxes. Use a quadratic equation as the fitting regression equation and use the least squares method to fit and regress the three arrays (Rref1, Rce1), (Rref2, Rce2), and (Rref3, Rce3) to obtain A1, B1, and C1. S6: Obtain the final temperature T according to the third resistance values R31, R32...R3n.
5. A two-wire water level, water temperature and pumping test detection method according to claim 4, It is characterized in that S6 and later also include S7: obtaining the current working mode, which is obtained by the main control circuit according to the input signal of the key circuit, including temperature detection mode, water pumping test mode and compensation resistance correction mode; S8: If the working mode is the pumping test, the LED indicator and buzzer are controlled to stop the sound and light alarm signal; otherwise, the temperature position detection mode is entered; S9: Obtain the voltage across the temperature measuring resistor. When the groundwater level drops from h1 to h2 through the pumping test, the voltage across the temperature measuring resistor is zero. The LED indicator light and the buzzer are controlled to emit an audible and visual alarm signal, which is used to remind the user that the pumping test is completed.
6. A two-wire water level, water temperature and pumping test detection method according to claim 4, It is characterized in that Step S6 includes S61: Obtain the first RTD temperature according to the third resistance values R31, R32...R3n respectively , ,… , (1) … in, For the temperature measuring resistor The resistance value when , , , S62: If , ,… are greater than or equal to zero, then , ,… The first RTD temperature corresponding to the temperature segment number is taken as the final temperature T; if , ,… If both are less than zero, the second RTD temperature is calculated according to the following formula (2): , ,… , and with , ,… The second RTD temperature corresponding to the temperature segment number is taken as the final temperature T. (2) … 。 7. A two-wire water level, water temperature and pumping test detection method according to claim 4, It is characterized in that Step S3 includes S30: Obtaining a voltage U across the temperature measuring resistor and a voltage U0 across the reference resistor, wherein the voltage U across the temperature measuring resistor and the voltage U0 across the reference resistor are both obtained by reading the output of the ADC module by the main control circuit; S31: Using the Kalman filter algorithm, the voltage U across the temperature measuring resistor and the voltage U0 across the reference resistor are filtered in the same process to obtain the voltage U' across the temperature measuring resistor and the voltage U0' across the reference resistor, wherein the filtering process of the voltage U across the temperature measuring resistor is specifically as follows: S311: Obtain the initial value X(0|0) of the optimal value X(k-1|k-1) of the voltage U at time k-1, the initial value P(0|0) of the error covariance P(k-1|k-1) at time k-1, the initial value Q0 of the process noise Q, and the initial value R0 of the measurement noise R; S312: Obtain the system state value X(k|k-1) at time k according to X(k-1|k-1). X(k|k-1) = AX(k-1|k-1) S313: According to the error covariance P(k-1|k-1) at time k-1 and the process noise Q, the error covariance P(k|k-1) at time k is obtained: P(k|k-1) = P(k-1|k-1) + Q S314: Calculate the current Kalman gain Kg(k) according to the error covariance P(k|k-1) at time k and the measurement noise R: Kg(k) = P(k|k-1) / (P(k|k-1) + R) S315: Obtaining V at time k A0+ The measured value Z(k) is used to obtain the optimal value X(k|k) at time k based on Z(k), Kalman gain Kg(k) and the system state value X(k|k-1) at time k. X(k|k) = X(k|k-1) + Kg(k)((Z(k) - X(k|k-1)) S316: According to the Kalman gain Kg(k) and the error covariance P(k|k-1) at time k, we get P(k|k) = (1 - Kg(k))P(k|k-1) S317: assign P(k|k) obtained in step S316 to P(k|k-1), and execute steps S312 to S317; S33: Obtain a first resistance value of the temperature measuring resistor according to the voltage U' across the temperature measuring resistor, the voltage U0' across the reference resistor, and the resistance value R0 of the reference resistor. R1=(U' / U0')×R0.
8. A two-wire water level, water temperature and pumping test detection method according to claim 4, It is characterized in that The steps for setting the compensation resistors Rcom1, Rcom2, ... Rcomn in step S4 are the same, wherein the steps for setting the compensation resistor Rcom1 include: S41: Determine the correction temperature Tref1 of the first temperature section; S42: Setting the temperature of the calibration system to Tref1, and setting the sensing probe sensor in the calibration system; S43: Start the two-wire water level and water temperature detection instrument, the main control circuit reads the current temperature value Tche1 through the proportional temperature detection circuit, and displays it through the digital display circuit; S44: If Tche1 is inconsistent with Tref1, the value of the compensation resistor Rcom1 is adjusted through the digital tube display circuit until Tche1 is the same as Tref1; S45: Store the value of the compensation resistor Rcom1 in the main control chip.
Citation Information
Patent Citations
Liquid level and temperature sensor
CN101603848A
Constant current source's platinum resistance temperature measuring circuit
CN205843836U
Two-wire system water level, water temperature and water pumping test detection instrument
CN211042397U
HTA Fluid Level and Fluid Type Measurement
US20090158842A1
