Mechanical valve back-closing detection system, method and device
By installing resistor wire and contact rod on the mechanical valve, and using a microcontroller to detect resistance changes, the problem of slow shutdown of the mechanical valve is solved, real-time monitoring and alarm are achieved, and the normal operation of the valve and equipment safety are ensured.
Patent Information
- Application Number
- CN202411033959.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-12-06
AI Technical Summary
Mechanical valves are prone to slow shutdown after long-term operation, and are difficult to observe with the naked eye, resulting in the flow rate and pressure of oil, gas and water in the pipeline that cannot meet the industrial design requirements, which may lead to irreversible failures.
Install a resistor wire and a contact rod on the mechanical valve, use a microcontroller to detect the resistance changes of the resistor wire, calculate the valve opening through the voltage signal, and issue an alarm when the reversal value exceeds the set value.
Real-time monitoring of valve opening changes and timely alarms are achieved to ensure that the valve can be automatically opened when it is closed, avoid affecting the flow and pressure in the pipeline, and improve the safety production conditions of the equipment.
Smart Images

Figure CN119084657A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of mechanical valve return closing, and in particular to a mechanical valve return closing detection system, method and device. Background Art
[0002] Mechanical valves are essential equipment in industrial production pipelines. There are a large number of mechanical valves in oil, gas and water pipelines. These mechanical valves are mainly used to control the flow, direction and pressure of oil, gas and water in the pipelines. Mechanical valves are prone to valve reclosing after long-term operation, and the speed of valve reclosing is very slow and cannot be observed by the naked eye. For some important equipment, when the valve is closed to a certain position, the valve cannot automatically open, resulting in the flow and pressure of oil, gas and water in the pipeline may not meet the industrial design requirements, affecting the safe production of equipment, and in serious cases may cause some irreversible failures.
[0003] At present, mechanical valves cannot monitor the valve opening in real time; the valve is prone to slow closing after long-term operation, and it is not easy to detect with the naked eye; the valve cannot open automatically after closing, affecting the flow and pressure of oil, gas and water in the pipeline. Summary of the invention
[0004] In view of the above-mentioned problems existing in the existing mechanical valve return-closing detection system, the present invention is proposed.
[0005] Therefore, the purpose of the present invention is to provide a mechanical valve return detection system, the purpose of which is to issue an alarm when the opening degree changes beyond a set value so that operation and maintenance personnel can discover it in time.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions: including setting a resistance wire in the mechanical valve, and setting a contact rod at the mechanical valve switch; the contact rod is placed on one end of the resistance wire, and the mechanical valve switch is rotated so that the contact rod uses the resistance of the resistance wire to judge the voltage signal and detect the rotation degree.
[0007] As a preferred solution of the mechanical valve return detection system described in the present invention, it includes: a single-chip microcomputer, a host computer, a voltage reference circuit, a battery, a power switch, a voltage stabilizing circuit and an alarm circuit; the single-chip microcomputer connects the voltage signal detected by the contact rod with the voltage at both ends of the resistance wire through a pin, calculates the current valve opening and uses the reference value of the voltage reference circuit to realize the alarm function through the alarm circuit; the battery is connected to the system through the power switch, and provides working voltage for the single-chip microcomputer and the alarm circuit through the voltage stabilizing circuit; the information is transmitted to the host computer through the deployed WiFi for monitoring and analysis processing, and when the battery is lower than the set value, the single-chip microcomputer alarms.
[0008] As a preferred solution of the mechanical valve return-to-close detection system described in the present invention, wherein: the two ends of the resistance wire are connected to the rotating part of the mechanical valve through a voltage reference circuit, one end of the contact rod is overlapped on the resistance wire, and the other end is connected to the ADC pin of the single-chip microcomputer; when the valve is in the fully closed position, the resistance between the contact rod and the resistance wire is close to 0, and the voltage signal detected by the ADC pin of the single-chip microcomputer is also close to 0; when the valve is in the fully open position, the resistance between the contact rod and the resistance wire is the largest, and the voltage signal detected by the ADC pin of the single-chip microcomputer is also close to the voltage applied to the two ends of the resistance wire, thereby detecting the degree of rotation.
[0009] In view of the problems existing in the above-mentioned existing mechanical valve return closing detection method, the present invention is proposed.
[0010] Therefore, the object of the present invention is to provide a mechanical valve back-closing detection method, the purpose of which is to use the principle of Ohm's law to convert the valve opening into a voltage signal to realize valve opening detection.
[0011] In order to solve the above technical problems, the present invention provides the following technical solutions: including that the voltage signal detected by the ADC pin of the single-chip microcomputer is also close to the voltage applied to the two ends of the resistor wire, specifically, the battery voltage detection adopts the form of a first resistor R1 and a second resistor R2 connected in series to collect the battery voltage, the voltage across the resistor R2 is connected to the single-chip microcomputer, and the rotation opening between the resistance of 0 and the maximum position is calculated as:
[0012]
[0013] Among them, Ui is the battery voltage; ADC_CH5 is the quantized code value when the MCU ADC module channel is sampled; 2 12 It means that the ADC of the microcontroller is 12 bits, that is, the maximum encoding value of the ADC channel is 4095; Uo2 is the reference voltage of the microcontroller ADC.
[0014] As a preferred solution of the mechanical valve back-closing detection method of the present invention, wherein: by monitoring the battery voltage, when it is detected that the battery voltage is lower than the set value, a high-level signal is output through the single-chip microcomputer, and an indicator light is lit for warning;
[0015] Use a reference voltage generation circuit to provide a stable reference voltage, and connect the reference voltage to the ADC reference voltage pin of the microcontroller and the valve opening detection circuit to ensure the measurement accuracy of ADC sampling and valve opening detection;
[0016] By collecting the voltage signal at both ends of the resistor, using an operational amplifier to process the differential signal, a proportional operation is performed to calculate the valve opening, and at the same time, the reference voltage source is protected from overcurrent damage through a resistor;
[0017] When the valve return value is greater than the set value, the microcontroller outputs a square wave signal of a specific frequency to control the on and off of the transistor, thereby driving the alarm.
[0018] As a preferred solution of the mechanical valve back-closing detection method of the present invention, the operational amplifiers are respectively operational amplifier U1 and operational amplifier U2, and OPA series integrated operational amplifiers with high common mode rejection ratio are selected, and the seventh resistor is used to prevent the voltage reference source Uo2 chip from being damaged, and is connected in series with the eleventh resistor loop;
[0019] Without the current limiting function of the seventh resistor, the eleventh resistor slides to the minimum value, at which point the resistance is close to 0, and the voltage reference source Uo2 is equivalent to being directly grounded;
[0020] The voltage across the seventh resistor is measured using differential operational amplifier U1:
[0021] UR7=U1-U2
[0022] The output voltage Uo3 of the differential operational amplifier U1 is:
[0023]
[0024] Among them, R10 is the tenth resistor; R9 is the ninth resistor. Since the output voltage Uo3 of the differential operational amplifier U1 can be acquired by the ADC of the ESP32 microcontroller;
[0025] That is, the actual voltage value of the output voltage Uo3 of the differential operational amplifier U1 is:
[0026]
[0027] Wherein, ADC_CH6 is the quantized code value when sampling channel 6 of the MCU ADC module;
[0028] The voltage u2 across the seventh resistor is:
[0029]
[0030] For this reason, the voltage u2 across the eleventh resistor is:
[0031]
[0032] When the valve is fully closed, the contact rod is at the very end of the eleventh resistor, that is, the voltage u3 of the contact rod to ground is 0V. When the valve is fully open, the contact rod is at the very top of the eleventh resistor, that is, the voltage u3 of the contact rod to ground is the voltage u2 across the eleventh resistor. The eleventh resistor is the resistance wire of the system.
[0033] As a preferred solution of the mechanical valve back-closing detection method of the present invention, when the valve rotates, the contact rod on the eleventh resistor will rotate accordingly, that is, the voltage u3 of the contact rod to the ground will also change accordingly, and the differential operational amplifier U2 is used to measure the voltage u3 of the contact rod to the ground;
[0034] The output voltage Uo4 of the differential operational amplifier U2 is:
[0035]
[0036] Among them, R13 is the thirteenth resistor; R12 is the twelfth resistor;
[0037] Since the output voltage Uo4 of the differential operational amplifier U2 can be acquired by the ADC of the ESP32 microcontroller, the actual voltage value of the output voltage Uo4 of the differential operational amplifier U2 is:
[0038]
[0039] Where ADC_CH7 is the quantized code value when sampling channel 7 of the MCU ADC module.
[0040] As a preferred solution of the mechanical valve return detection method of the present invention, wherein: and Calculate the voltage u3 of the contact rod to ground:
[0041]
[0042] As a preferred solution of the mechanical valve return detection method of the present invention, the real-time valve opening value is:
[0043]
[0044] Will and Substituting the above formula, the real-time valve opening value can be calculated;
[0045] When the valve is closed, the contact rod on the eleventh resistor will also rotate, and the voltage u3 of the contact rod to the ground will decrease. At this time, the valve's closed value is:
[0046]
[0047] Among them, uset is the voltage value of the contact rod to the ground corresponding to the set opening of the valve. When the set opening is 50%, uset = 0.5*u2.
[0048] In view of the above problems existing in the existing mechanical valve return-closing detection device, the present invention is proposed.
[0049] Therefore, the object of the present invention is to provide a mechanical valve return-closing detection device, the purpose of which is to utilize the principle of Ohm's law to convert the valve opening into a voltage signal to realize valve opening detection.
[0050] In order to solve the above technical problems, the present invention provides the following technical solutions: including a valve mechanism, which includes a valve body, a single chip microcomputer arranged on the valve body, a contact rod arranged at the switch of the valve body, and a resistance wire arranged on the valve body; the contact rod is in contact with the resistance wire.
[0051] The beneficial effects of the present invention are as follows: a resistance wire is installed on the valve body, and a single-chip microcomputer and a contact rod are installed on the valve disc indicating mechanism, a reference voltage is added to both ends of the resistance wire, and the voltage on the resistance wire is detected by the ADC pin of the single-chip microcomputer to realize valve opening detection. When the valve return value is greater than the set value, the single-chip microcomputer starts the alarm circuit. The circuit is also designed to monitor the battery voltage. When the battery voltage is lower than the set value, the output pin of the single-chip microcomputer outputs a high level and lights up a red LED light, which is convenient for timely detection and charging of the battery. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:
[0053] Figure 1 It is a schematic diagram of the mechanical valve return-closing detection circuit structure of the mechanical valve return-closing detection system of the present invention.
[0054] Figure 2 It is a schematic diagram of the principle of the mechanical valve return-closing detection circuit of the mechanical valve return-closing detection system, method and device of the present invention.
[0055] Figure 3 It is a schematic diagram of the overall structure of the mechanical valve return-closing detection device of the present invention.
[0056] In the figure: 1. 3.3V voltage regulator circuit; 2. ESP32 microcontroller (MCU); 3. Battery low voltage indication circuit; 4. 3.3V reference voltage source circuit; 5. Valve back-closing sound and light alarm circuit; 6. Differential ratio operation circuit; 7. ADC module channel; 101. Host computer; 102. Voltage reference circuit; 103. Battery; 104. Power switch; 105. Voltage regulator circuit; 106. Alarm circuit; 200. Valve mechanism; 201. Valve body; 202. Microcontroller; 203. Contact rod; 204. Resistance wire; R1. First resistor; R2. Second resistor; R3. Third resistor; R4. Fourth resistor; R5. Fifth resistor; R6. Sixth resistor; R7. Seventh resistor; R8. Eighth resistor; R9. Ninth resistor; R10. Tenth resistor; R11. Eleventh resistor; R12. Twelfth resistor; R13. Thirteenth resistor. DETAILED DESCRIPTION
[0057] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.
[0058] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0059] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0060] Secondly, the present invention is described in detail with reference to the schematic diagram. When describing the embodiments of the present invention in detail, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.
[0061] Example 1
[0062] Reference Figure 1 and 3 , which is the first embodiment of the present invention, provides a mechanical valve back-closing detection system, method and device, the system includes setting a resistance wire 204 at the mechanical valve, and setting a contact rod 203 at the mechanical valve switch;
[0063] The contact rod 203 is placed on one end of the resistance wire 204 and the mechanical valve switch is rotated so that the contact rod 203 uses the resistance of the resistance wire 204 to determine the voltage signal and detect the rotation degree.
[0064] Among them, it also includes: a single-chip microcomputer 202, a host computer 101, a voltage reference circuit 102, a battery 103, a power switch 104, a voltage stabilizing circuit 105 and an alarm circuit 106; the single-chip microcomputer 202 connects the voltage signal detected by the contact rod 203 with the voltage at both ends of the resistor 204 through a pin, calculates the current valve opening and uses the reference value of the voltage reference circuit 102 to realize the alarm function through the alarm circuit 106; the battery 103 is connected to the system through the power switch 104, and provides working voltage for the single-chip microcomputer 202 and the alarm circuit 106 through the voltage stabilizing circuit 105; the information is transmitted to the host computer 101 through the deployed WiFi for monitoring and analysis processing, and when the battery 103 is lower than the set value, the single-chip microcomputer 202 alarms.
[0065] The valve opening information and the battery 103 power information are transmitted to the host computer 101 through the WiFi deployed at the production site for monitoring, analysis and processing. The valve opening and the valve opening curve can be viewed in real time using the host computer 101.
[0066] When the battery voltage is lower than the set value, the microcontroller (MCU) output pin outputs a high level and lights up the red LED, making it easy to detect and charge the battery in time.
[0067] During use, the two ends of the resistance wire 204 are connected to the rotating part of the mechanical valve through the voltage reference circuit 102, one end of the contact rod 203 is overlapped on the resistance wire 204, and the other end is connected to the ADC pin of the single-chip microcomputer 202; when the valve is in the fully closed position, the resistance between the contact rod 203 and the resistance wire 204 is close to 0, and the voltage signal detected by the ADC pin of the single-chip microcomputer 202 is also close to 0. When the valve is in the fully open position, the resistance between the contact rod 203 and the resistance wire 204 is the largest, and the voltage signal detected by the ADC pin of the single-chip microcomputer 202 is also close to the voltage applied to the two ends of the resistance wire 204, thereby detecting the degree of rotation.
[0068] That is, by adding a reference voltage to both ends of the resistance wire 204, the detection circuit is installed on the rotating part of the valve, one end of the contact rod 203 is connected to the resistance wire 204, and the other end of the contact rod 203 is connected to the ADC pin of the single-chip microcomputer 202, that is, the MCU. When the valve is in the fully closed position, the resistance between the contact rod 203 and the resistance wire 204 is close to 0, and the voltage signal detected by the ADC pin of the single-chip microcomputer 202, that is, the MCU, is also close to 0. When the valve is in the fully open position, the resistance between the contact rod 203 and the resistance wire 204 is the largest, and the voltage signal detected by the ADC pin of the single-chip microcomputer 202, that is, the MCU, is also close to the voltage applied to both ends of the resistance wire. When in other positions, the formula is used:
[0069]
[0070] The current valve opening can be calculated.
[0071] When the valve return value exceeds the set value, the alarm circuit 106 can be used to realize the alarm function, so that the operation and maintenance personnel can find and deal with it in time. The valve return value can be calculated using the formula:
[0072] UR7=U1-U2
[0073] Perform calculations.
[0074] Example 2
[0075] Reference Figures 1 to 3 , which is the second embodiment of the present invention. This embodiment is different from the first embodiment in that: the method and circuit application are mainly composed of a battery 103, a power switch 105SW, a 3.3V voltage stabilizing circuit 1, an ESP32 single-chip microcomputer (MCU) 2, i.e., a single-chip microcomputer 202, a battery voltage detection and battery low voltage indication circuit 3, a 3.3V reference voltage source circuit 4, a valve return sound and light alarm circuit 5 and a differential proportional operation circuit 6.
[0076] The 3.3V voltage regulator circuit 1 adopts the linear voltage regulator (LDO) chip AMS1117-3.3, and its output terminal Uo1 is connected to the power input pin (pin 2) of ESP32 for powering the ESP32 microcontroller.
[0077] The ADC positive reference voltage SENSOR_VP pin (pin 4) of the ESP32 microcontroller (MCU) 2 is connected to the voltage reference source Uo2, and the negative reference voltage SENSOR_VN pin (pin 5) is connected to GND and the ESP32 microcontroller (the circuit diagram only lists the pins related to this patent, and the other pins are not listed).
[0078] The battery voltage detection and battery low voltage indication circuit 3, the battery voltage detection uses the first resistor R1 and the second resistor R2 to collect the battery voltage in the form of voltage division in series, and the voltage across the second resistor R2 is connected to the ADC module channel 5 of ESP32. The battery voltage can be calculated according to formula [1].
[0079] Formula[1]:
[0080] Where Ui is the battery voltage, ADC_CH5 is the quantized code value when sampling channel 5 of the ADC module of the ESP32 microcontroller, 212 means that the ADC of the ESP32 microcontroller is 12 bits, that is, the maximum code value of the ADC channel is 4095, and Uo2 is the ADC reference voltage Uo2 of the ESP32 microcontroller.
[0081] Compared with Example 1, further, the battery low voltage indication circuit is composed of a third resistor R3 and a light-emitting diode D1. When the battery voltage Ui is lower than the set value, the output IO port 27 (pin 12) of the ESP32 microcontroller outputs a high level, and the light-emitting diode D1 lights up. Under normal circumstances, the light-emitting diode D1 is in an off state.
[0082] The 3.3V reference voltage source circuit 4 uses a low drift reference voltage chip REF330 to generate a 3.3V voltage reference Uo2, which is connected to the ESP32 microcontroller ADC positive reference voltage SENSOR_VP pin (pin 4) and connected to one end of the seventh resistor R7 of the valve opening detection circuit, and is used for the voltage reference of the ESP32 microcontroller ADC sampling and the reference voltage of the valve opening detection resistor wire.
[0083] The valve return sound and light alarm circuit 5, when it is detected that the valve return value is greater than the set value, the output IO port 32 (pin 8) of the ESP32 microcontroller outputs a square wave signal of a specific frequency to control the on and off of the transistor Q, and further controls the light-emitting diode D2 to flash at a specific frequency and the buzzer B to beep at a specific frequency, thereby realizing the sound and light alarm function.
[0084] The fourth resistor R4 is used to limit the current flowing through the light-emitting diode D2 to prevent the current flowing through the light-emitting diode D2 from being too large and damaging the light-emitting diode D2, and changing the resistance value of the fourth resistor R4 can also adjust the brightness of the light-emitting diode D2; the fifth resistor R5 is used to limit the current flowing through the buzzer B to prevent the current flowing through the buzzer B from being too large and damaging the buzzer B, and changing the resistance value of the fifth resistor R5 can also adjust the volume of the buzzer B; the sixth resistor R6 is used to limit the current flowing through the transistor Q to prevent the ESP32 microcontroller IO port from being damaged by a short circuit of the transistor Q due to excessive current; the eighth resistor R8 is used to pull the ESP32 microcontroller IO32 port level to a low level when idle to prevent the transistor Q from being misconnected, causing the alarm circuit to falsely alarm.
[0085] The differential proportional operation circuit 6 is mainly used to collect the voltage signals across the seventh resistor R7 and the eleventh resistor R11, and perform proportional operation on them. The method of separately measuring the voltage across the seventh current-limiting resistor R7 and the eleventh resistor R11 can effectively solve the amplification of the valve opening calculation error caused by the resistance error of the seventh resistor R7 and the eleventh resistor R11. In order to improve the operation accuracy, the operational amplifier U1 and the operational amplifier U2 of the differential proportional operation circuit 6 use OPA series integrated operational amplifiers with high common mode rejection ratio.
[0086] In the differential proportional operation circuit 6, the function of the seventh resistor R7 is to prevent the voltage reference source Uo2 chip from being damaged. It is connected in series in the loop of the eleventh resistor R11 of the resistor wire. When there is no current limiting by the seventh resistor R7, when the eleventh resistor R11 of the resistor wire slides to the minimum value, the resistance value is close to 0, and the voltage reference source Uo2 is equivalent to being directly grounded. At this time, since the voltage reference source Uo2 does not have the load capacity (that is, it can only provide a voltage reference signal, and the output current is less than 5mA), the voltage reference source chip REF330 will be damaged. In order to meet the requirement that when the eleventh resistor R11 of the resistor wire slides to the minimum value, in order to ensure that the loop current is not greater than 5mA, the value of the seventh resistor R7 should be greater than 1kΩ.
[0087] In order to ensure the accuracy of voltage acquisition on the eleventh resistor R11 of the resistance wire, a differential operational amplifier U1 is used to measure the voltage across the seventh resistor R7. Therefore, when selecting the seventh resistor R7, it only needs to be greater than 1kΩ, and its value does not need to be calculated in detail. The voltage across the seventh resistor R7 is:
[0088] Formula [2]: UR7=U1-U2
[0089] The output voltage Uo3 of the differential operational amplifier U1 is:
[0090] Formula [3]:
[0091] Wherein, R10 is the tenth resistor R10; R9 is the ninth resistor R9;
[0092] Since the output voltage Uo3 of the differential operational amplifier U1 can be acquired by the ADC of the ESP32 microcontroller, the actual voltage value of the output voltage Uo3 of the differential operational amplifier U1 is:
[0093] Formula [4]:
[0094] Among them, ADC_CH6 is the quantized code value when sampling channel 6 of the MCU 202ADC module;
[0095] The voltage u2 across the seventh resistor R7 is:
[0096] Formula [5]:
[0097] For this purpose, the voltage u2 across the eleventh resistor R11 is:
[0098] Formula [6]:
[0099] Therefore, it is defined that when the valve is fully closed, the contact rod 203 is at the very end of the eleventh resistor R11, that is, the voltage u3 of the contact rod 203 to the ground is 0V; when the valve is fully open, the contact rod 203 is at the very top of the eleventh resistor R11, that is, the voltage u3 of the contact rod 203 to the ground is the voltage u2 across the eleventh resistor R11, and the eleventh resistor R11 is the resistance wire 204 of the system.
[0100] When the valve rotates, the contact rod 203 on the eleventh resistor R11 will rotate accordingly, that is, the voltage u3 of the contact rod 203 to the ground will also change accordingly. The differential operational amplifier U2 is used to measure the voltage u3 of the contact rod 203 to the ground.
[0101] The output voltage Uo4 of the differential operational amplifier U2 is:
[0102] Formula [7]:
[0103] Among them, R13 is the thirteenth resistor R13; R12 is the twelfth resistor R12;
[0104] Since the output voltage Uo4 of the differential operational amplifier U2 can be acquired by the ADC of the ESP32 microcontroller, the actual voltage value of the output voltage Uo4 of the differential operational amplifier U2 is:
[0105] Formula [8]:
[0106] Wherein, ADC_CH7 is the quantized code value when sampling channel 7 of the ADC module of the single-chip microcomputer 202.
[0107] The voltage u3 of the contact rod 203 to the ground can be calculated using formulas [7] and [8].
[0108] Formula [9]:
[0109] The real-time valve opening value is:
[0110] Formula
[10] :
[0111] Substituting formula [6] and formula [9] into formula
[10] , the real-time valve opening value can be calculated.
[0112] When the valve is closed, the contact rod 203 on the eleventh resistor R11 also rotates, and the voltage u3 of the contact rod to the ground will decrease. At this time, the valve closed value is:
[0113] Formula
[11] :
[0114] Wherein, uset is the voltage value of the contact rod to ground corresponding to the set valve opening. When the set opening is 50%, uset=0.5*u2, and the set valve opening is 48%. If the resistors R9, R10, R12, and R13 are all 10kΩ, the output voltage Uo3 of the differential operational amplifier U1 measured by the ESP32 microcontroller ADC is 3V. Substituting into formula [5], the voltage value UR7 across the seventh current limiting resistor R7 can be calculated to be 1.5V. Substituting into formula [6], the voltage u2 across the eleventh resistor R11 can be obtained to be 1.8V. At this time, the corresponding set voltage value uset is uset=0.48*u2=0.864V. If the output voltage Uo4 of the differential operational amplifier U2 measured by the current ESP32 microcontroller 202ADC is 1.66V, substituting into formula [7], the voltage u3 of the contact rod 203 to ground can be calculated to be 0.83V. According to formula
[11] , the valve return value is 2.58%.
[0115] The battery power can be monitored in real time and a warning signal can be issued when the battery is low. The method of separately measuring the voltage across the seventh current-limiting resistor R7 and the eleventh resistor R11 can effectively solve the problem of amplified valve opening calculation error caused by the resistance error of the seventh current-limiting resistor R7 and the eleventh resistor R11. The resistance value of the eleventh resistor R11 is not restricted and is suitable for various types of resistance wires.
[0116] The remaining structures are the same as those of Example 1.
[0117] Example 3
[0118] Reference Figures 1 to 3, which is the third embodiment of the present invention. This embodiment is different from the second embodiment in that: a valve mechanism 200 includes a valve body 201, a single chip computer 202 arranged on the valve body 201, a contact rod 203 arranged at the switch of the valve body 201, and a resistance wire 204 arranged on the valve body 201; the contact rod 203 is in contact with the resistance wire 204.
[0119] Compared with Example 2, further, a reference voltage is applied to both ends of the resistance wire 204, and the detection circuit is installed on the rotating part of the valve body 201. One end of the contact rod 203 is connected to the resistance wire, and the other end of the contact rod 203 is connected to the ADC pin of the microcontroller 202 (MCU). When the valve body 201 is in the fully closed position, the resistance between the contact rod 203 and the resistance wire 204 is close to 0, and the voltage signal detected by the ADC pin of the microcontroller 202 (MCU) is also close to 0. When the valve body 201 is in the fully open position, the resistance between the contact rod 203 and the resistance wire 204 is the largest, and the voltage signal detected by the ADC pin of the microcontroller 202 (MCU) is also close to the voltage applied to both ends of the resistance wire 204. When it is in other positions, the current opening of the valve body 201 can be calculated using formula [1].
[0120] Therefore, the power supply voltage range is wide and suitable for common batteries. By adopting battery power supply, no external power supply is required. It is flexible to use and easy to disassemble, and can realize valve opening measurement and judge the opening trend. When the set value is exceeded, an alarm signal can be issued.
[0121] The remaining structure is the same as that of Example 2.
[0122] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should be included in the scope of the claims of the present invention.
Claims
1. A mechanical valve return detection system, characterized in that: include, A resistance wire (204) is arranged on the mechanical valve, and a contact rod (203) is arranged at the switch of the mechanical valve; The contact rod (203) is placed on one end of the resistance wire (204), and the mechanical valve switch is rotated so that the contact rod (203) uses the resistance of the resistance wire (204) to judge the voltage signal and detect the rotation degree.
2. The mechanical valve return detection system according to claim 1, characterized in that: Also includes: A single chip microcomputer (202), a host computer (101), a voltage reference circuit (102), a battery (103), a power switch (104), a voltage stabilizing circuit (105) and an alarm circuit (106); The single chip computer (202) connects the voltage signal detected by the contact rod (203) and the voltage at both ends of the resistance wire (204) through a pin, calculates the current valve opening and uses the reference value of the voltage reference circuit (102) to realize the alarm function through the alarm circuit (106); The battery (103) is connected to the system via a power switch (104), and provides operating voltage for the single chip microcomputer (202) and the alarm circuit (106) via a voltage stabilizing circuit (105); The information is transmitted to the host computer (101) through the deployed WiFi for monitoring and analysis, and when the battery (103) is lower than a set value, the single chip computer (202) issues an alarm.
3. The mechanical valve return detection system according to claim 1 or 2, characterized in that: The two ends of the resistance wire (204) are connected to the rotating part of the mechanical valve through a voltage reference circuit (102); one end of the contact rod (203) is connected to the resistance wire (204), and the other end is connected to an ADC pin of the single-chip computer (202); When the valve is in the fully closed position, the resistance between the contact rod (203) and the resistance wire (204) is close to 0, and the voltage signal detected by the ADC pin of the single-chip microcomputer (202) is also close to 0. When the valve is in the fully open position, the resistance between the contact rod (203) and the resistance wire (204) is the largest, and the voltage signal detected by the ADC pin of the single-chip microcomputer (202) is also close to the voltage applied to both ends of the resistance wire (204), thereby detecting the degree of rotation.
4. A mechanical valve return detection method, characterized in that: Applicable to the mechanical valve return-closing detection system described in claim 3; The voltage signal detected by the ADC pin of the single-chip computer (202) is also close to the voltage applied to the two ends of the resistor (204). Specifically, the battery (103) voltage detection adopts the form of a first resistor (R1) and a second resistor (R2) connected in series to collect the battery (103) voltage, and the voltage across the second resistor (R2) is connected to the single-chip computer (202). The rotation opening between the resistance of 0 and the maximum position is calculated as: Wherein, Ui is the battery voltage; ADC_CH5 is the quantized code value when sampling the ADC module channel (5) of the single chip microcomputer (202); 12 It indicates that the ADC of the single-chip microcomputer (202) is 12 bits, that is, the maximum encoding value of the ADC channel is 4095; Uo2 is the ADC reference voltage of the single-chip microcomputer (202).
5. The mechanical valve return detection method according to claim 4, characterized in that: By monitoring the battery voltage, when it is detected that the battery voltage is lower than a set value, a high level signal is output through the single chip computer (202), and an indicator light is lit to warn; Using a reference voltage generation circuit to provide a stable reference voltage, connecting the reference voltage to an ADC reference voltage pin of a single-chip computer (202) and a valve opening detection circuit, thereby ensuring the measurement accuracy of ADC sampling and valve opening detection; By collecting the voltage signal at both ends of the resistor, using an operational amplifier to process the differential signal, a proportional operation is performed to calculate the valve opening, and at the same time, the reference voltage source is protected from overcurrent damage through a resistor; When the valve return value is greater than the set value, the single chip microcomputer (202) outputs a square wave signal of a specific frequency to control the on and off of the transistor, thereby driving an alarm.
6. The mechanical valve return detection method according to claim 5, characterized in that: The operational amplifiers are respectively operational amplifier U1 and operational amplifier U2, and OPA series integrated operational amplifiers with high common mode rejection ratio are selected. The seventh resistor (R7) is used to prevent the voltage reference source Uo2 chip from being damaged, and is connected in series in the eleventh resistor (R11) loop; Without the seventh resistor (R7) limiting the current, the eleventh resistor (R11) slides to the minimum value, at which time the resistance is close to 0, and the voltage reference source Uo2 is equivalent to being directly grounded; The voltage across the seventh resistor (R7) is measured using differential operational amplifier U1: UR7=U1-U2 The output voltage Uo3 of the differential operational amplifier U1 is: Among them, R10 is the tenth resistor (R10); R9 is the ninth resistor (R9), because the output voltage Uo3 of the differential operational amplifier U1 can be acquired by the ADC of the ESP32 microcontroller; That is, the actual voltage value of the output voltage Uo3 of the differential operational amplifier U1 is: Wherein, ADC_CH6 is the quantized code value when sampling the channel 6 of the ADC module of the single chip microcomputer (202); The voltage u2 across the seventh resistor (R7): is the voltage u2 across the eleventh resistor (R11): When the valve is fully closed, the contact rod (203) is at the very end of the eleventh resistor (R11), that is, the voltage u3 of the contact rod (203) to the ground is 0V; when the valve is fully open, the contact rod (203) is at the very top of the eleventh resistor (R11), that is, the voltage u3 of the contact rod (203) to the ground is the voltage u2 across the eleventh resistor (R11), and the eleventh resistor (R11) is the resistance wire (204) of the system.
7. The mechanical valve return detection method according to claim 6, characterized in that: When the valve rotates, the contact rod (203) on the eleventh resistor (R11) rotates accordingly, that is, the voltage u3 of the contact rod (203) to the ground will also change accordingly, and the voltage u3 of the contact rod (203) to the ground is measured by using a differential operational amplifier U2; The output voltage Uo4 of the differential operational amplifier U2 is: Among them, R13 is the thirteenth resistor (R13); R12 is the twelfth resistor (R12); Since the output voltage Uo4 of the differential operational amplifier U2 can be acquired by the ADC of the ESP32 microcontroller, the actual voltage value of the output voltage Uo4 of the differential operational amplifier U2 is: ADC_CH7 is the quantized code value when sampling the channel 7 of the ADC module of the single chip microcomputer (202).
8. The mechanical valve return detection method according to claim 7, characterized in that: pass and Calculate the voltage u3 of the contact rod (203) to the ground: 。 9. The mechanical valve return detection method according to claim 8, characterized in that: The real-time valve opening value is: Will Substituting the above formula, the real-time valve opening value can be calculated; When the valve is closed, the contact rod (203) on the eleventh resistor (R11) also rotates, and the voltage u3 of the contact rod (203) to the ground decreases. At this time, the valve closed value is: Among them, uset is the voltage value of the contact rod to the ground corresponding to the set opening of the valve. When the set opening is 50%, uset = 0.5*u2.
10. A mechanical valve return detection device, characterized in that: The mechanical valve return detection method applied to claims 4 to 9 further includes: A valve mechanism (200), comprising a valve body (201), a single chip computer (202) arranged on the valve body (201), a contact rod (203) arranged at a switch of the valve body (201), and a resistance wire (204) arranged on the valve body (201); The contact rod (203) is in contact with the resistance wire (204).
Citation Information
Cited By
Mechanical valve back-closing detection system, method and device
CN120557428A
Ball valve state detection device and method
CN121739180A
