Transmitter with self-calibration function and current loop
Technical Field
The invention belongs to the technical field of current loops, and particularly relates to a transmitter with a self-calibration function and a current loop.
Background
Current type two-wire transmitters, such as pressure transmitters, etc., are powered by a power supply, usually with 24V DC, and output signals of the power supply are (4-20) mA current. Thus, a current loop capable of transmitting signals is formed between the direct current power supply and the transmitter, as shown in fig. 1.
The 4-20mA current is modulated by the transmitter and is returned to the transmitter after passing through the DC power supply, so the current loop is called.
The design form of the current loop has inherent defects, one is that the output current value of the transmitter needs to be calibrated in advance before leaving a factory, so that the precision of the transmitter can meet the use requirement; secondly, when the transmitter is in use, the error of the current signal becomes large due to various reasons, and the transmitter needs to be calibrated irregularly in order to eliminate the error.
Disclosure of Invention
The invention aims to provide a transmitter with a self-calibration function and a current loop, which can be used for avoiding the production calibration process of the transmitter through a built-in calibration circuit of the transmitter and an algorithm thereof, keeping the output current of the transmitter consistent with that of the transmitter when leaving a factory and avoiding the increase of the current error in the use process.
In order to solve the problems, the technical scheme of the invention is as follows:
a transmitter with self calibration functionality, comprising:
the built-in calibration circuit comprises a DAC circuit, an ADC circuit and a V/I conversion circuit;
the DAC circuit receives a digital code value given by a front-end sensor and outputs a voltage signal of 0.5-2.0V to the V/I conversion circuit;
the V/I conversion circuit converts the voltage signal into a current signal of 4 mA-20 mA and outputs the current signal to the outside;
the ADC circuit detects the voltage signal output by the DAC circuit in real time, dynamically adjusts the size of the voltage signal according to a preset algorithm, and calibrates the voltage signal.
According to an embodiment of the present invention, the DAC circuit and the ADC circuit form a negative feedback system.
According to an embodiment of the present invention, the V/I conversion circuit includes an operational amplifier, a first resistor, a second resistor, a capacitor, a third resistor, and a fourth resistor;
one end of the first resistor is connected with the output end of the DAC circuit, and the other end of the first resistor is connected with the positive input end of the operational amplifier;
one end of the second resistor is connected with the positive input end of the operational amplifier, and the other end of the second resistor is connected with the current input end of the transmitter;
the capacitor is connected with the positive voltage end of the operational amplifier and the ground;
one end of the third resistor is connected with the output end of the operational amplifier, the other end of the third resistor is connected with one end of the fourth resistor, and the other end of the fourth resistor is grounded; and the common end of the third resistor and the fourth resistor is connected with the current output end of the transmitter through an MOS (metal oxide semiconductor) tube.
A current loop with self calibration, comprising:
the transmitter with the self-calibration function and the direct-current power supply in one embodiment of the invention;
the transmitter outputs a current signal, and the current signal returns to the transmitter after flowing through the direct current power supply to form a current loop.
Due to the adoption of the technical scheme, compared with the prior art, the invention has the following advantages and positive effects:
the current loop with the self-calibration function in the embodiment of the invention solves the problems that the current loop needs to calibrate the output current value of the transmitter in advance before leaving factory and the transmitter needs to calibrate irregularly due to large current error in the use process, and avoids the production calibration process of the transmitter by using the built-in calibration circuit of the transmitter and the algorithm thereof, so that the output current of the transmitter is consistent with the output current of the transmitter, and the current error is prevented from increasing in the use process. The built-in calibration circuit comprises a DAC circuit, an ADC circuit and a V/I conversion circuit, wherein the DAC circuit receives a digital code value given by the front-end sensor and outputs a voltage signal of 0.5V-2.0V to the V/I conversion circuit; the V/I conversion circuit converts the voltage signal into a current signal of 4 mA-20 mA for output; the ADC circuit detects the voltage signal output by the DAC circuit in real time, dynamically adjusts the size of the voltage signal according to a preset algorithm, and calibrates the voltage signal in real time.
Drawings
FIG. 1 is a schematic diagram of a current loop in accordance with the present invention;
FIG. 2 is a diagram of a built-in calibration circuit according to an embodiment of the present invention;
FIG. 3 is a diagram of a negative feedback system according to an embodiment of the present invention.
Detailed Description
The transmitter and current loop with self-calibration function according to the present invention will be described in detail with reference to the accompanying drawings and specific embodiments. Advantages and features of the present invention will become apparent from the following description and from the claims.
The embodiment aims at the problems that the output current value of the transmitter needs to be calibrated in advance before the transmitter leaves a factory and the transmitter needs to be calibrated irregularly due to large current error in the using process in the existing current loop, and provides the transmitter with the self-calibration function and the current loop.
The transmitter with the self-calibration function comprises a built-in calibration circuit, wherein the built-in calibration circuit comprises a DAC circuit, an ADC circuit and a V/I conversion circuit; the DAC circuit receives a digital code value given by the front-end sensor and outputs a voltage signal of 0.5-2.0V to the V/I conversion circuit; the V/I conversion circuit converts the voltage signal into a current signal of 4 mA-20 mA and outputs the current signal to the outside (a loop); the ADC circuit detects the voltage signal output by the DAC circuit in real time, dynamically adjusts the size of the voltage signal according to a preset algorithm, and calibrates the voltage signal.
Specifically, referring to fig. 2, the reference numbers LOOP +, LOOP "and the external two-wire dc power supply form a current LOOP. In the current LOOP, the output current of the transmitter flows out of the LOOP + into the two-wire dc power supply and back from the LOOP-.
The built-in calibration circuit of the transmitter comprises U15, U20, U29 and resistors and capacitors on the periphery of the U29, wherein the U15 is a DAC chip (namely a DAC circuit) and adopts an SGM5351-16 model. U29 is an ADC chip (i.e., ADC circuit) and adopts MS5193T model. U20 (operational amplifier) and its peripheral RJ1/RJ2/C45/R44/R43 devices together form a V/I converter. As can be seen from the figure, one end of the RJ1 is connected to the output end of the DAC circuit, and the other end is connected to the positive input end of the U20; one end of the RJ2 is connected with the positive input end of the U20, and the other end of the RJ2 is connected with the current input end LOOP-of the transmitter; c45 connects the positive voltage terminal of U20 with ground; one end of the R44 is connected with the output end of the U20, the other end of the R44 is connected with one end of the R43, and the other end of the R43 is grounded; the common end of R44 and R43 is connected to the current output LOOP + of the transmitter through a MOS tube.
The DAC circuit outputs a 0.5V-2.0V voltage signal VOUT, and the voltage signal VOUT is converted into 4 mA-20 mA current through a V/I converter and is output to a loop. The ADC circuit detects the voltage signal VOUT output by the DAC circuit in real time, dynamically adjusts the size of the voltage signal VOUT according to a preset algorithm, and calibrates the voltage signal VOUT.
The voltage signal VOUT is the core of the built-in calibration circuit and determines the magnitude of the output current error of the transmitter. In the present embodiment, the voltage signal VOUT is calibrated by using a negative feedback system, please refer to fig. 3. The DAC circuit receives a digital code value C given by a front-end sensor and outputs a voltage signal VOUT, wherein the voltage signal VOUT can be expressed as:
VOUT=k*C+b
wherein, k and b are coefficients, have initial calibration values and can be dynamically adjusted. When the ADC circuit detects that the voltage signal VOUT has deviation with a calibrated value, the voltage signal meets the set output by adjusting the coefficients k and b in real time.
When the transmitter is connected with a two-wire direct-current power supply to form a current loop, the current loop has a self-calibration function, and the transmitter does not need to calibrate current in production through the real-time calibration of the voltage signal VOUT, so that the current error caused by environmental factors in the working process of the transmitter can be eliminated, and the influence of time drift and temperature drift is avoided.
The embodiments of the present invention have been described in detail with reference to the accompanying drawings, but the present invention is not limited to the above embodiments. Even if various changes are made to the present invention, it is still within the scope of the present invention if they fall within the scope of the claims of the present invention and their equivalents.