Circuit for storing parameters by utilizing excitation loop of electromagnetic flowmeter and implementation method

By integrating an MCU chip with an EEPROM or FLASH storage unit into the excitation circuit of the electromagnetic flowmeter, parameter storage and retrieval are achieved through the excitation circuit, solving the problem of tedious manual parameter entry after converter replacement and improving transmission reliability and security.

CN121954142APending Publication Date: 2026-05-01ZHONGHUAN TIG
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHONGHUAN TIG
Filing Date
2025-12-31
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing electromagnetic flowmeters require manual parameter input after the converter is replaced, which is cumbersome and the transmission process is susceptible to interference and poses safety hazards.

Method used

The circuit that stores parameters using the excitation circuit of the electromagnetic flowmeter employs an MCU chip with an internal EEPROM or FLASH storage unit. Parameter storage and retrieval are achieved through the excitation circuit. Encoding and identification are performed using high-level signals or current. A dedicated read/write protocol is designed to prevent parameter tampering.

Benefits of technology

It simplifies the connection between the converter and the sensor, improves the reliability and security of data transmission, reduces system complexity, and is suitable for scenarios where the sensor and the converter are far apart, preventing parameters from being read or tampered with at will.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121954142A_ABST
    Figure CN121954142A_ABST
Patent Text Reader

Abstract

The invention discloses a circuit for storing parameters by using an excitation loop of an electromagnetic flowmeter and an implementation method. The circuit comprises an MCU (Microprogrammed Control Unit) chip, a rectifying and voltage stabilizing circuit, a state judging circuit and a data return circuit, wherein the rectifying and voltage stabilizing circuit consists of a rectifying full bridge, a rectifying diode, a filtering capacitor and a low-power-consumption voltage stabilizer which are connected with an excitation loop of the electromagnetic flowmeter; the state judging circuit consists of a voltage comparator and a divider resistor; and the data return circuit consists of a constant-current device and a controlled switching device. By controlling the voltage state and the current state in the excitation loop, writing, storage and reading of parameter data are realized. Under the condition that the number of connecting lines between the converter and the sensor is not increased, parameters can be stored along with the sensor, and parameter backward reading is completed through the excitation loop when the converter is replaced, so that the maintenance efficiency is improved, and the safety of parameter data is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a storage circuit for operating parameters of an electromagnetic flowmeter, and particularly to a circuit and implementation method for storing parameters using the excitation circuit of an electromagnetic flowmeter. Background Technology

[0002] Electromagnetic flowmeters are commonly used flow measurement instruments, consisting of a sensor and a converter. During operation, the converter circuit provides an excitation signal to the sensor's excitation coil, generating a constant magnetic field. Conductive fluid flowing through the sensor induces an electromotive force (EMF) on the electrodes. The converter collects this EMF to calculate the fluid flow rate. During operation, the electromagnetic flowmeter needs to read parameters such as the sensor's diameter, calibration coefficient, and zero-point offset for flow calculation. When the converter malfunctions, it often needs to be replaced. The replacement converter requires the original converter's settings to function properly. If the original converter is damaged, these operating parameters cannot be directly read from it, and recovery must be achieved through other methods.

[0003] To solve the above problems, there are generally two approaches available. The first approach is to retrieve the factory parameter records of the electromagnetic flowmeter and rewrite the relevant parameters into the new converter. However, this approach relies on manual saving and input, making the operation process relatively complicated and the maintenance efficiency low. The second approach is to add a memory to the sensor side of the electromagnetic flowmeter to store the operating parameters. After the converter is replaced, the original parameters can be directly read from the sensor and restored. This approach is simple to operate and has a high implementation efficiency, so it is widely used in the current technology.

[0004] Such a typical memory is used in circuits for storing parameters, such as Figure 1 As shown. In the excitation circuit, pin 1 of external connector J1 is connected to end 1 of excitation coil L2, end 2 of L2 is connected to end 1 of excitation coil L1, and end 2 of L1 is connected to pin 2 of J1 to form the excitation circuit. Pin 1 of data storage circuit connector J2 is connected to pin 5 of memory U1 and one end of resistor R3, with the other end of R3 connected to power supply VCC; pin 2 of connector J2 is connected to pin 6 of memory U1 and one end of resistor R2, with the other end of R2 connected to power supply VCC; pin 3 of connector J2 is connected to pin 7 of memory U1 and one end of resistor R1, with the other end of R1 connected to power supply VCC; pin 4 of connector J2 is the ground terminal of the data storage circuit, connecting pins 1, 2, 3, and 4 of memory U1 and the negative terminal of capacitor C1; pin 5 of connector J2 is connected to power supply VCC, the positive terminal of capacitor C1, and pin 8 of memory U1.

[0005] The converter provides the operating voltage during operation. Under normal operation, the converter applies bidirectional constant current excitation pulses of a specific frequency to both ends of connector J1. The excitation current flows through excitation coils L1 and L2, generating an alternating constant magnetic field, thus providing the operating conditions for the electromagnetic flowmeter. When data storage backup is required, the converter supplies power to the storage circuit through connector J2 and writes data to memory U1 according to the memory's data writing protocol. When data recovery and retrieval are required, the converter is also powered through J2 and sends a read command to memory U1 according to the memory's data read protocol to retrieve the backed-up data.

[0006] This conventional circuit has the following drawbacks: First, in actual use, the converter needs to add a dedicated data storage interface, which increases the number of connections between the converter and the sensor and makes the connection method more complicated.

[0007] Secondly, since traditional solutions use TTL levels for data transmission, they are susceptible to interference when the sensor and converter are far apart, resulting in unreliable data transmission.

[0008] Furthermore, using general-purpose memory chips for data storage means that data can be read or even modified as long as it is connected to a compatible read / write device through the data storage interface, posing certain security risks. Summary of the Invention

[0009] In view of the above-mentioned shortcomings of the existing technology, the present invention provides a circuit and implementation method for storing parameters using the excitation circuit of an electromagnetic flowmeter. The circuit of the present invention enables the sensor to have parameter storage function without increasing the number of connections between the converter and the sensor. After the converter is replaced, the parameters can be restored through the excitation circuit, thereby avoiding additional data interfaces and communication lines. Since the data is encoded and identified using high-level signals or current during transmission, the anti-interference capability of communication is improved, and the reliability of data transmission is significantly enhanced. To prevent the operating parameters from being arbitrarily read or tampered with, an MCU with an internal EEPROM or FLASH storage unit is used as the core for data storage, and corresponding data read / write circuits and dedicated read / write protocols are designed to implement storage and readback operations, ensuring parameter security.

[0010] To achieve the above objectives, the technical solution adopted by the present invention is as follows: a circuit for storing parameters using the excitation circuit of an electromagnetic flowmeter, comprising a control unit, a rectification and voltage regulation unit, a status discrimination unit, and a data feedback unit. The control unit includes an MCU chip with storage function, used to execute parameter communication protocols and complete the writing, storage, and reading of parameter data. The rectification and voltage regulation unit is connected to the excitation circuit of the electromagnetic flowmeter and includes a full-bridge rectifier, rectifier diodes, filter capacitors, and a low-power voltage regulator, used to draw energy from the excitation circuit and provide a stable operating voltage to the control unit and the status discrimination unit. The status discrimination unit includes a voltage comparator and a voltage divider network composed of voltage divider resistors, used to discriminate the voltage status in the excitation circuit and convert the discrimination result into a logic level signal recognizable by the control unit. The data feedback unit includes a constant current device and a controlled switching device controlled by the control unit. By controlling whether the constant current device participates in the excitation circuit, the current in the excitation circuit changes, thereby realizing the feedback of parameter data.

[0011] Furthermore, the circuit of this invention includes an MCU chip U2, a full-bridge rectifier B, a constant current diode D1, an N-type MOSFET Q1, a low-power voltage regulator U1, a low-power voltage comparator U3, voltage divider resistors R1, R2, R3, and R4, an excitation interface J1, an excitation coil L1, an excitation coil L2, filter capacitors C1 and C2, and a rectifier diode D2. Specifically, pin 1 of the excitation circuit connector J1 is connected to pin 2 of the excitation coil L2, and simultaneously connected to pin 3 of the full-bridge rectifier B. One end of excitation coil L2 is connected to one end of excitation coil L1. One end of excitation coil L1 is connected to pin 2 of excitation circuit connector J1, and also to pin 1 of rectifier bridge B. Pin 2 of rectifier bridge B is connected to the anode of constant current diode D1, the anode of rectifier diode D2, and one end of voltage divider resistor R3. The other end of voltage divider resistor R3 is connected to one end of voltage divider resistor R4, and then to the non-inverting input of voltage comparator U3. The other end of voltage divider resistor R4 is connected to pin 4 of rectifier bridge B. Constant current diode D1... The cathode of rectifier diode D2 is connected to the drain of N-type MOSFET Q1, the source of MOSFET Q1 is connected to pin 4 of rectifier bridge B, and the control gate of MOSFET Q1 is connected to the I / O2 pin of MCU chip U2. The cathode of rectifier diode D2 is connected to the anode of filter capacitor C1 and to the input terminal of low-power regulator U1. The cathode of filter capacitor C1 is connected to pin 4 of rectifier bridge B. The ground terminal of low-power regulator U1 is connected to pin 4 of rectifier bridge B, and the output terminal of regulator U1 is connected to the anode of filter capacitor C2 and a voltage divider resistor. One end of resistor R1 is connected to the power supply pin of voltage comparator U3 and the power supply terminal VCC of MCU chip U2; the other end of voltage divider resistor R1 is connected to one end of voltage divider resistor R2 and to the inverting input terminal of voltage comparator U3, and the other end of voltage divider resistor R2 is connected to pin 4 of rectifier bridge B; the output terminal of voltage comparator U3 is connected to the I / O1 pin of MCU chip U2, and the ground terminal of voltage comparator U3, the negative terminal of filter capacitor C2 and the GND pin of MCU chip U2 are all connected to pin 4 of rectifier bridge B as a common reference ground.

[0012] A method for implementing a circuit using the stored parameters of an electromagnetic flowmeter excitation circuit. The parameter storage and reading method of this method is as follows: Apply a voltage V0 with an arbitrary voltage polarity across the excitation connector J. Through the rectification effect of the full-wave rectifier bridge, a DC voltage V1 is generated at the output end of the full-wave rectifier bridge. The DC voltage V1 is the voltage across the excitation coil minus the voltage drop VB of the full-wave rectifier bridge, that is, V1 = V0 - VB. The DC voltage V1 is processed by a rectifier diode and a filter capacitor to form a stable DC voltage V2, and is converted into the operating voltage V3 of the MCU chip through a voltage regulator. Use the operating voltage V3 to generate a constant divided voltage VR2 through a voltage-dividing resistor, where VR2 = V3 × R2 / (R1 + R2). At the same time, the DC voltage V1 is divided by the voltage-dividing resistors R3 and R4 to form a divided voltage VR4 on the voltage-dividing resistor R4. The divided voltages VR2 and VR4 are input to a voltage comparator for comparison. When VR2 > VR4, a low level is output; when VR2 < VR4, a high level is output, and the MCU chip identifies the output logic state of the voltage comparator through its I / O pin.

[0013] Furthermore, the method of the present invention has the following working states: A) In the normal excitation mode, a constant-current low-frequency square-wave excitation signal is applied across the excitation connector J1. The excitation current flows through the excitation coils L1 and L2 to generate a constant magnetic field, providing normal working conditions for the electromagnetic flowmeter. Since the excitation coils L1 and L2 have a DC impedance, a square-wave voltage is formed across the excitation connector J1, and its amplitude V0 is related to the excitation current IL and the coil DC resistance RL, V0 = IL × RL. By designing the resistance values of the voltage-dividing resistors R1, R2, R3, and R4, VR4 is always kept greater than VR2 in the normal excitation state, so that the output of the voltage comparator U3 remains at a high level, and the input state of the I / O1 pin of the MCU chip does not change. In this state, no data communication is performed, and the MCU chip is in a low-power standby state. The control mode of the converter for the excitation connector J1 is the same as that of a normal excitation circuit.

[0014] B) In data storage mode, two different constant voltages, VH and VL, are applied to the excitation connector J in a time-division multiplexing manner. This causes the three positions V0, V1, and V2 in the circuit to form two sets of voltage states corresponding to VH and VL, respectively, and corresponding DC voltages VH(VR4) and VL(VR4) are formed on the voltage divider resistor R4. Through parameter design, VR4 is greater than VR2 when powered by VH, and the voltage comparator outputs a high level; when powered by VL, VR4 is less than VR2, and the voltage comparator outputs a low level. When VH and VL voltages are applied across the excitation connector J according to a predetermined pattern, the I / O1 pins of the MCU chip form an alternating high and low level pulse train. It is stipulated that each voltage lasts for 1ms, corresponding to one bit of data transmission, where VH lasts for 1ms to represent logic 1, and VL lasts for 1ms to represent logic 0. Before each data transmission, 160 consecutive logic 1s, i.e., a high level of 160ms, are set as a synchronization signal PR to replenish power to the data storage section and stabilize its working state. The length of the synchronization signal can exceed 160ms, but cannot be shorter than 160ms. Following the synchronization signal is the start signal ST, which is logic 0. Then, 12-bit binary address information A0 to A11 is transmitted sequentially, with the least significant bit first. Next is the data direction information RW, followed by 8-bit binary data information D0 to D7, also transmitted sequentially with the least significant bit first. In data storage mode, RW is logic 0. The MCU chip identifies the address and data content through the I / O1 pin and stores the data in the corresponding address unit, completing one data storage process. It then automatically enters the synchronization phase of the next data transmission cycle.

[0015] C) In data read mode, the address transmission method is the same as in data storage mode, including the synchronization signal PR, start signal ST, address information, and data direction information RW. In this mode, RW is logic 1, and the converter maintains logic 1 after the excitation connector J sends the RW signal. After the MCU chip recognizes entering the data read state through the I / O1 pin, it reads the stored data from the corresponding address unit and returns 8-bit binary encoded data information D0 to D7 within the following 8ms. The data is transmitted sequentially in the order of least significant bit first. During data return, the MCU chip controls the conduction and cutoff of the N-type MOSFET Q1 through its I / O2 pin, thereby controlling whether the constant current diode D1 participates in the excitation circuit. When transmitting logic 1, Q1 conducts for 1ms, turning on the constant current diode D1 and increasing the excitation circuit current; when transmitting logic 0, Q1 is turned off, and the excitation circuit current remains at its original value. Because the conduction of Q1 affects the current in the excitation connector J, the converter can detect changes in the excitation circuit current within a 1ms time window. This allows it to identify the returned data bits and reconstruct the data information returned by the MCU chip, completing one data reading process. After data transmission is complete, the system automatically begins the synchronization timing for the next data transmission cycle.

[0016] The beneficial effects of this invention are: compared with the existing scheme that requires setting a dedicated parameter storage interface between the sensor and the converter, this invention uses the original excitation circuit of the electromagnetic flowmeter to realize the storage and reading of parameters. In actual use, no additional data interface is required, the number of connection lines between the converter and the sensor does not change, the connection method is simpler, which helps to reduce system complexity and improve the convenience of on-site installation and maintenance.

[0017] Meanwhile, this invention uses changes in voltage or current state based on the excitation circuit for data encoding and identification during parameter transmission. Compared with the traditional TTL level method, it has stronger anti-interference ability and is especially suitable for application scenarios where the sensor and converter are far apart, thus improving the reliability of parameter transmission.

[0018] Furthermore, this invention stores the operating parameters inside an MCU chip equipped with an internal EEPROM or FLASH storage unit, and combines it with a dedicated communication method and read / write mechanism. Without knowing the specific transmission rules, external devices cannot easily read or modify the stored parameters, thereby effectively preventing the parameters from being arbitrarily tampered with and improving the data security of the operating parameters. Attached Figure Description

[0019] Figure 1 A circuit diagram for storing sensor parameters in a typical application; Figure 2 This is a circuit diagram of the present invention; Figure 3This is an application circuit diagram of the present invention; Figure 4 This is a schematic diagram showing the timing relationship between the input voltage of the excitation interface J1 and the timing detected by the I / O1 pin of the MCU chip in data storage mode. Figure 5 This is a timing diagram of the input current change of the excitation interface J1 in data reading mode. Detailed Implementation

[0020] like Figure 2 As shown, the present invention provides a circuit for storing parameters using the excitation circuit of an electromagnetic flowmeter. The overall structure includes a control unit for parsing, storing and reading parameter data, a rectification and voltage regulation unit for extracting energy from the excitation circuit and providing a stable operating voltage, a state discrimination unit for judging the voltage state of the excitation circuit, and a data feedback unit for transmitting parameter data back through changes in the current of the excitation circuit.

[0021] The control unit preferably employs an MCU chip with internal EEPROM or FLASH storage capabilities to execute parameter communication protocols and perform parameter data writing, saving, and reading operations. The rectification and voltage regulation unit includes a full-bridge rectifier, rectifier diodes, filter capacitors, and a low-power voltage regulator to rectify, filter, and regulate the voltage signal in the excitation circuit, thereby providing a stable power supply for the control unit and the status discrimination unit. The status discrimination unit includes a voltage comparator and a voltage divider network composed of voltage divider resistors to distinguish different voltage states in the excitation circuit and convert the discrimination results into logic level signals recognizable by the control unit. The data feedback unit includes a constant current device and a controlled switching device controlled by the control unit. By controlling whether the constant current device participates in the excitation circuit, a current change that can be recognized by the converter is formed in the excitation circuit, realizing the feedback of parameter data. All the above units work collaboratively through specific circuit components and connections, drawing power from the excitation circuit and utilizing changes in the voltage and current states in the excitation circuit to achieve parameter writing and reading, completing parameter storage and recovery without increasing the number of connections between the converter and the sensor.

[0022] The circuit of this invention specifically includes: an MCU chip U2 with internal EEPROM or FLASH data storage function, a rectifier full bridge B, a constant current diode D1, an N-type MOSFET Q1, a low-power voltage regulator U1, a low-power voltage comparator U3, voltage divider resistors R1, R2, R3, and R4, an excitation interface J1, an excitation coil L1, an excitation coil L2, filter capacitors C1 and C2, and a rectifier diode D2; The specific circuit connection is as follows: Pin 1 of the excitation circuit connector J1 is connected to terminal 2 of the excitation coil L2 and simultaneously to pin 3 of the full-wave rectifier bridge B; terminal 1 of the excitation coil L2 is connected to terminal 2 of the excitation coil L1; terminal 1 of the excitation coil L1 is connected to pin 2 of the excitation circuit connector J1 and simultaneously to pin 1 of the full-wave rectifier bridge B; pin 2 of the full-wave rectifier bridge B is connected to the anode of the constant current diode D1, simultaneously to the anode of the rectifier diode D2, and to one end of the voltage-dividing resistor R3. The other end of the voltage-dividing resistor R3 is connected to one end of the voltage-dividing resistor R4 and to the non-inverting input terminal of the voltage comparator U3; the other end of the voltage-dividing resistor R4 is connected to pin 4 of the full-wave rectifier bridge B; the cathode of the constant current diode D1 is connected to the drain of the N-type MOS transistor Q1. The source of the MOS transistor Q1 is connected to pin 4 of the full-wave rectifier bridge B, and its control gate is connected to the I / O2 pin of the MCU chip U2; the cathode of the rectifier diode D2 is connected to the positive pole of the filter capacitor C1 and to the input terminal of the low-power voltage regulator U1. The negative pole of the filter capacitor C1 is connected to pin 4 of the full-wave rectifier bridge B; the ground terminal of the low-power voltage regulator U1 is connected to pin 4 of the full-wave rectifier bridge B. Its output terminal is connected to the positive pole of the filter capacitor C2 and simultaneously to one end of the voltage-dividing resistor R1, the power supply pin of the voltage comparator U3, and the power supply terminal VCC of the MCU chip U2; the other end of the voltage-dividing resistor R1 is connected to one end of the voltage-dividing resistor R2 and to the inverting input terminal of the voltage comparator U3. The other end of the voltage-dividing resistor R2 is connected to pin 4 of the full-wave rectifier bridge B; the output terminal of the voltage comparator U3 is connected to the I / O1 pin of the MCU chip U2. Its ground terminal, the negative pole of the filter capacitor C2, and the GND pin of the MCU chip U2 are all connected to pin 4 of the full-wave rectifier bridge B as a common reference ground.

[0023] Based on the above circuit structure, when a voltage V0 is applied across the excitation connector J1 with arbitrary voltage polarity, due to the effect of the full-wave rectifier bridge B, a DC voltage V1 is generated between its pins 2 and 4. V1 is the voltage across the excitation coil minus the equivalent forward voltage drop VB of the full-wave rectifier bridge, that is, V1 = V0 - VB. After this voltage passes through the rectifier diode D2, a stable DC voltage V2 is formed on the filter capacitor C1, V2 = V1 - 0.7V, and then is converted by the voltage regulator U1 into the operating voltage V3 of the MCU chip. Since V3 is provided by the voltage regulator U1 and does not change with the change of the previous-stage voltage, the voltage VR2 = V3×R2 / (R1 + R2) on the voltage-dividing resistor R2 remains constant. The voltage V1 is divided by the voltage-dividing resistors R3 and R4 to form a DC voltage VR4 on the voltage-dividing resistor R4. The voltages VR2 and VR4 are compared by the voltage comparator U3. When VR2 > VR4, the voltage comparator outputs a low level. When VR2 < VR4, the voltage comparator outputs a high level. The MCU chip identifies the above logical states through its I / O1 pin.

[0024] As Figure 3As shown in this embodiment, a specific set of component selections and parameter configurations are given to illustrate the implementation of this circuit in actual engineering. This includes a full-bridge rectifier bridge B, model MB6S, with a forward voltage drop VB=1.1V; a constant current diode D1, model CRD040D, with a nominal constant current of 40mA, a minimum constant current value of 36mA, and a maximum of 44mA; an N-type MOSFET Q1, model 2N7002, with an on-resistance of less than 4Ω; a low-power voltage regulator U1, model HT7533, with a maximum input voltage of 30V, an output voltage of 3.3V, and a quiescent current of less than 3μA, the change in current introduced by it relative to the excitation circuit current is negligible; a rectifier diode D2, model 1N4148, with a forward current of 150mA and a reverse withstand voltage of 100V; and a filter capacitor C1 with a nominal capacitance of [missing information]. The filter capacitor C2 has a nominal capacitance of 1μF / 16V and a rated capacitance of 10μF / 35V. The MCU chip model is STC8G1K08, with an operating voltage range of 1.9V to 5.5V. In this embodiment, a 3.3V power supply is used. The program space is 8KB, and the internal EEPROM storage space is 4KB. The low-power voltage comparator model is TLV7031, with an operating voltage range of 1.6V to 6.5V and a quiescent current of less than 0.5μA. In the voltage divider resistors, R1 is 100kΩ, R2 is 120kΩ, R3 is 100kΩ, and R4 is 27kΩ. The individual DC resistance of the excitation coils L1 and L2 is 40Ω, and the equivalent DC resistance after they are connected in series is RL=80Ω. In the parameter communication mode, the high-level communication voltage VH is selected as 12V, and the low-level communication voltage VL is selected as 8V.

[0025] In normal excitation mode, a constant current low-frequency square wave excitation signal is applied to both ends of excitation connector J1. The excitation frequency is 6.25Hz, and the excitation current is a constant current IL = 200mA. The excitation current flows through excitation coils L1 and L2, generating a constant magnetic field, providing normal operating conditions for the electromagnetic flowmeter. Since excitation coils L1 and L2 have DC impedance, a square wave voltage is formed across excitation connector J1. Its amplitude V0 is related to the excitation current IL and the coil DC resistance RL, V0 = IL × RL. When the excitation current is input from pin 2 of connector J1, V0 = IL × RL = 0.2A × 80Ω = 16V; when the excitation current is input from pin 1 of connector J1, V0 = −IL × RL = −0.2A × 80Ω = −16V. The presence of the rectifier bridge B ensures that V1 remains a positive voltage. Since the voltage regulator U1 has a fixed output of 3.3V, VR2 = V3 × R2 / (R1 + R2) = 3.3V × 120kΩ / (100kΩ + 120kΩ) = 1.8V; V1 = V0 − VB = 16V − 1.1V = 14.9V, VR4 = V1 × R4 / (R3 + R4) = 14.9 × 27kΩ / (100kΩ + 27kΩ) = 3.17V. Because VR4 is greater than VR2, the output of the voltage comparator U3 remains high, and the input state of the MCU chip's I / O1 pin does not change. In this state, no data communication occurs, and the MCU chip is in a low-power standby state. The converter's control method for the excitation connector J1 is the same as that of a normal excitation circuit.

[0026] In data storage mode, two different constant voltages, VH and VL, are applied to the excitation connector J1 in a time-sharing manner. Since the output of the regulator U1 is fixed at 3.3V, the voltage divider point VR2 = V3 × R2 / (R1 + R2) = 1.8V remains unchanged. When VH is powered, VH(V0) = 12V, VH(V1) = VH(V0) − VB = 12V − 1.1V = 10.9V, VH(VR4) = VH(V1) × R4 / (R3 + R4) = 10.9 × 27kΩ / (100kΩ + 27kΩ) = 2.32V. At this time, VR4 is greater than VR2, and the voltage comparator outputs a high level. When VL is powered, VL(V0) = 8V, VL(V1) = VL(V0) − VB = 8V − 1.1V = 6.9V, VL(VR4) = VL(V1) × R4 / (R3 + R4) = 6.9 × 27kΩ / (100kΩ + 27kΩ) = 1.47V. At this time, VR4 is less than VR2, and the voltage comparator outputs a low level. By regularly switching between VH and VL, alternating high and low level pulse trains are formed on the MCU chip's I / O1 pin. Each voltage lasts for 1ms, corresponding to one bit of data transmission, where VH lasts for 1ms to represent logic 1 and VL lasts for 1ms to represent logic 0. Before each data transmission, 160 consecutive logic 1s, or 160ms of high level, are set as a synchronization signal PR to replenish power to the data storage section and stabilize its operation. Following the synchronization signal is the start signal ST, which is logic 0. Then, 12-bit binary encoded address information A0 to A11 is transmitted sequentially, with the least significant bit first. Following the address information is the data direction information RW, followed by 8-bit binary encoded data information D0 to D7, also transmitted sequentially with the least significant bit first. In data storage mode, RW is logic 0. The MCU chip identifies the address and data content through the I / O1 pin and stores the data in the corresponding address unit, completing one data storage process. It then automatically enters the synchronization phase of the next data transmission cycle.

[0027] The timing relationship between the input voltage of the excitation interface J1 and the timing detected by the MCU chip I / O1 pin in data storage mode is as follows: Figure 4 As shown, Figure 4 The example corresponds to writing data 37 to address 10. After the synchronization signal PR, the start signal ST, 12-bit address information A0 to A11, data direction information RW, and 8-bit data information D0 to D7 appear in sequence. All bits are transmitted in the order of least significant bit first. VH represents logic 1 and VL represents logic 0.

[0028] In data read mode, the address transmission method is the same as in data storage mode, including the synchronization signal PR, start signal ST, address information, and data direction information RW. In this mode, RW is logic 1, and the converter maintains logic 1 after the excitation connector J1 sends the RW signal. After the MCU chip recognizes entering the data read state through the I / O1 pin, it reads the stored data from the corresponding address unit and returns 8-bit binary encoded data information D0 to D7 within the following 8ms, with the data transmitted sequentially in least significant bit-first order. During data return, the MCU chip controls the on / off state of the N-type MOSFET Q1 through its I / O2 pin, thereby controlling whether the constant current diode D1 participates in the excitation circuit. When transmitting logic 1, Q1 is turned on for 1ms, turning on the constant current diode D1 and increasing the excitation circuit current; when transmitting logic 0, Q1 is turned off, and the excitation circuit current remains at its original value. Because the conduction of Q1 affects the circuit current in excitation connector J1, the converter can detect changes in the excitation circuit current within a 1ms time window. This allows it to identify the returned data bits and reconstruct the data information returned by the MCU chip, completing one data reading process. After data transmission is complete, the system automatically begins the synchronization timing for the next data transmission cycle.

[0029] In data read mode, the address transmission method is the same as in data storage mode, selecting VH=12V and VL=8V. The VH and VL voltage changes, consistent with data storage mode, are input through the excitation interface J1. The MCU chip identifies this voltage pulse train on the I / O1 pin to obtain the target address. When the data direction bit is detected to be high, it confirms entry into data read mode. The subsequent 8ms is the data return time window. The MCU chip controls the conduction and cutoff of the N-type MOSFET Q1 to change the loop current and achieve data return. When the input voltage of the excitation connector J1 is VH (VH=12V), and the DC resistance of the excitation coil RL=80Ω, the main loop current IH=VH / RL=12V / 80Ω=0.15A=150mA. Because the data storage circuit adopts a low-power design, its overall power consumption current is less than 1mA, far less than 150mA, and this 1mA current can be ignored. Therefore, the input current of the excitation interface J1 at this time is recorded as 150mA. When the I / O2 pin of the MCU chip controls Q1 to conduct, there is a current ID1 in the constant current diode D1, which is nominally 40mA. The total current flowing into the excitation connector J1 increases accordingly, becoming IH + ID1 = 150mA + 40mA = 190mA. In data read mode, the converter detects whether the loop current increases by about 40mA in each 1ms reading cycle. If an increase in current is detected, the bit is logic 1; if no 40mA current increase is detected, the bit is logic 0. Eight bits of data are returned sequentially within a total of 8ms, and the transmission rule is consistent with the address transmission, both using the binary least significant bit first transmission order. For example, when reading data 30 from address 20, its return timing is as follows. Figure 5 As shown, during the reading process, the current of the excitation interface J1 changes with the data bits, exhibiting jumps of varying magnitudes.

[0030] In data read mode, the timing of the input voltage of excitation interface J1 and the timing of the timing detected by the MCU chip I / O1 pin, as well as the timing of the change in input current of excitation interface J1 caused by the MCU chip I / O2 pin controlling the turn-on and turn-off of Q1, are as follows: Figure 5 As shown, Figure 5 The transmission process of PR, ST, address information A0~A11 and RW=1 is the same as the data storage mode. After RW, an 8ms data return time window is entered. Within this time window, the 8 bits of data D0~D7 returned are sequentially assigned to each 1ms bit judgment period in the order of least significant bit first. When the logic is 1 returned, the current of the excitation circuit increases by about 40mA relative to the reference current. When the logic is 0 returned, the current does not increase.

Claims

1. A circuit for storing parameters using the excitation circuit of an electromagnetic flowmeter, characterized in that, The system includes a control unit, a rectification and voltage regulation unit, a status discrimination unit, and a data feedback unit. The control unit includes an MCU chip with storage function, used to execute parameter communication protocols and complete the writing, storage, and reading of parameter data. The rectification and voltage regulation unit is connected to the excitation circuit of the electromagnetic flowmeter and includes a full-bridge rectifier, rectifier diodes, filter capacitors, and a low-power voltage regulator, used to draw energy from the excitation circuit and provide a stable operating voltage to the control unit and the status discrimination unit. The status discrimination unit includes a voltage comparator and a voltage divider network composed of voltage divider resistors, used to discriminate the voltage status in the excitation circuit and convert the discrimination result into a logic level signal that the control unit can recognize. The data feedback unit includes a constant current device and a switching device controlled by the control unit. By controlling whether the constant current device participates in the excitation circuit, the current in the excitation circuit changes, thereby realizing the feedback of parameter data.

2. The circuit for storing parameters using the excitation circuit of an electromagnetic flowmeter according to claim 1, characterized in that: The circuit includes an MCU chip U2, a full-bridge rectifier B, a constant current diode D1, an N-type MOSFET Q1, a low-power voltage regulator U1, a low-power voltage comparator U3, voltage divider resistors R1, R2, R3, and R4, and also includes an excitation interface J1, an excitation coil L1, an excitation coil L2, filter capacitors C1 and C2, and a rectifier diode D2. Specifically, pin 1 of the excitation circuit connector J1 is connected to pin 2 of the excitation coil L2, and simultaneously connected to pin 3 of the full-bridge rectifier B. One end of pin 2 is connected to one end of the excitation coil L1. One end of the excitation coil L1 is connected to pin 2 of the excitation circuit connector J1, and also to pin 1 of the rectifier bridge B. Pin 2 of the rectifier bridge B is connected to the anode of the constant current diode D1, the anode of the rectifier diode D2, and one end of the voltage divider resistor R3. The other end of the voltage divider resistor R3 is connected to one end of the voltage divider resistor R4, and then to the non-inverting input of the voltage comparator U3. The other end of the voltage divider resistor R4 is connected to pin 4 of the rectifier bridge B. The cathode of the constant current diode D1 is connected to... Connect the drain of N-type MOSFET Q1. Connect the source of MOSFET Q1 to pin 4 of the rectifier bridge B. Connect the control gate of MOSFET Q1 to the I / O2 pin of MCU chip U2. Connect the cathode of rectifier diode D2 to the anode of filter capacitor C1 and to the input of low-power regulator U1. Connect the cathode of filter capacitor C1 to pin 4 of rectifier bridge B. Connect the ground of low-power regulator U1 to pin 4 of rectifier bridge B. Connect the output of regulator U1 to the anode of filter capacitor C2 and simultaneously connect the voltage divider resistor R1. One end of the voltage comparator is connected to the power supply pin of voltage comparator U3 and the power supply terminal VCC of MCU chip U2; the other end of voltage divider resistor R1 is connected to one end of voltage divider resistor R2 and to the inverting input terminal of voltage comparator U3, and the other end of voltage divider resistor R2 is connected to pin 4 of rectifier full bridge B; the output terminal of voltage comparator U3 is connected to the I / O1 pin of MCU chip U2, and the ground terminal of voltage comparator U3, the negative terminal of filter capacitor C2 and the GND pin of MCU chip U2 are all connected to pin 4 of rectifier full bridge B as a common reference ground.

3. A circuit implementation method for storing parameters using the excitation circuit of an electromagnetic flowmeter according to claim 2, characterized in that, The parameter storage and reading method is as follows: Apply a voltage V0 across both ends of the excitation connector J, with any voltage polarity. Through the rectification of the full-wave rectifier bridge, a DC voltage V1 is generated at the output end of the full-wave rectifier bridge. The DC voltage V1 is the voltage across the excitation coil minus the voltage drop VB of the full-wave rectifier bridge, that is, V1 = V0 - VB. The DC voltage V1 is processed by a rectifier diode and a filter capacitor to form a stable DC voltage V2, and then converted by a voltage regulator into the working voltage V3 of the MCU chip. Use the working voltage V3 to generate a constant divided voltage VR2 through a voltage-dividing resistor, where VR2 = V3×R2 / (R1 + R2). At the same time, the DC voltage V1 is divided by the voltage-dividing resistors R3 and R4 to form a divided voltage VR4 on the voltage-dividing resistor R4. The divided voltages VR2 and VR4 are input to a voltage comparator for comparison. When VR2 > VR4, a low level is output; when VR2 < VR4, a high level is output, and the MCU chip identifies the output logic state of the voltage comparator through its I / O pin.

4. The circuit implementation method for storing parameters using the excitation circuit of an electromagnetic flowmeter according to claim 3, characterized in that, The method has the following working states: A) In the normal excitation mode, a constant-current low-frequency square-wave excitation signal is applied across both ends of the excitation connector J1. The excitation current flows through the excitation coils L1 and L2 to generate a constant magnetic field, providing normal working conditions for the electromagnetic flowmeter. Since the excitation coils L1 and L2 have a DC impedance, a square-wave voltage is formed across both ends of the excitation connector J1, and its amplitude V0 is related to the excitation current IL and the coil DC resistance RL, V0 = IL×RL. By designing the resistance values of the voltage-dividing resistors R1, R2, R3, and R4, VR4 is always kept greater than VR2 in the normal excitation state, so that the output of the voltage comparator U3 remains at a high level, and the input state of the MCU chip I / O1 pin does not change. In this state, no data communication is carried out, and the MCU chip is in a low-power standby state. The converter controls the excitation connector J1 in the same way as a normal excitation circuit. B) In data storage mode, two different constant voltages, VH and VL, are applied to the excitation connector J in a time-division multiplexing manner, causing the three positions V0, V1, and V2 in the circuit to form two sets of voltage states corresponding to VH and VL, respectively, and corresponding DC voltages VH(VR4) and VL(VR4) to be formed on the voltage divider resistor R4; through parameter design, VR4 is greater than VR2 when powered by VH, and the voltage comparator outputs a high level; when powered by VL, VR4 is less than VR2, and the voltage comparator outputs a low level; when VH and VL voltages are applied across the excitation connector J according to a predetermined pattern, the I / O1 pin of the MCU chip forms an alternating high and low level pulse train; it is stipulated that each voltage lasts for 1ms to correspond to one bit of data transmission, where VH lasts for 1ms to represent logic 1, and VL lasts for 1ms to represent logic 0; before each data transmission, A synchronization signal PR is set with 160 consecutive logic 1s, i.e., a high level of 160ms, to replenish power to the data storage section and stabilize its operation. The length of the synchronization signal can exceed 160ms, but cannot be shorter than 160ms. After the synchronization signal is the start signal ST, which is logic 0. Then, 12-bit binary encoded address information A0 to A11 is transmitted sequentially, with the least significant bit first. After the address information is the data direction information RW, followed by 8-bit binary encoded data information D0 to D7, also with the least significant bit first. In data storage mode, RW is logic 0. The MCU chip identifies the address and data content through the I / O1 pin and stores the data in the corresponding address unit, completing one data storage process. Then, it automatically enters the synchronization phase of the next data transmission cycle. C) In data read mode, the address transmission method is the same as in data storage mode, including the synchronization signal PR, start signal ST, address information, and data direction information RW. In this mode, RW is logic 1, and the converter maintains logic 1 after the excitation connector J sends the RW signal. After the MCU chip recognizes that it has entered the data read state through the I / O1 pin, it reads the stored data from the corresponding address unit and returns 8-bit binary encoded data information D0 to D7 within the following 8ms. The data is transmitted sequentially in the order of least significant bit first. During the data return process, the MCU chip controls the conduction and cutoff of the N-type MOSFET Q1 through its I / O2 pin, thereby controlling whether the constant current diode D1 participates in the excitation circuit. When logic 1 is transmitted, Q1 is turned on for 1ms, which turns on the constant current diode D1 and increases the current in the excitation circuit. When the transmission logic is 0, Q1 is turned off, and the excitation circuit current remains at its original value. Since the circuit current in the excitation connector J is different depending on whether Q1 is on or off, the converter can detect the change in the excitation circuit current within a 1ms time window, thereby identifying the returned data bits and restoring the data information returned by the MCU chip, thus completing one data reading process. After the data transmission is completed, the system automatically begins the synchronization timing for the next data transmission cycle.