A PWM-controlled 4-20mA constant current output circuit

By designing a PWM controlled 4-20mA constant current output circuit including a waveform conversion module, a current negative feedback module and a protection module, the existing circuit has solved the shortcomings in cost, versatility and anti-interference ability, and achieved stable and high-precision constant current output.

CN114035638BActive Publication Date: 2025-06-13CHONGQING CHUANYI AUTOMATION CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111449571.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-30
Publication Date
2025-06-13
Estimated Expiration
2041-11-30

AI Technical Summary

Technical Problem

The existing 4-20mA constant current output circuit has insufficient cost and versatility, and the PWM control circuit is susceptible to external interference.

Method used

A 4-20mA constant current output circuit controlled by PWM is designed, using a waveform conversion module, a current negative feedback module and a protection module. The PWM signal is isolated from the waveform conversion module through the optocouple isolation module, enhancing the anti-interference ability, and preventing the power supply from being reversed or overvoltage through the protection module.

Benefits of technology

It achieves a stable output of 4-20mA constant current, which improves the anti-interference ability and load capacity of the circuit, while reducing production costs and improving versatility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114035638B_ABST
    Figure CN114035638B_ABST
Patent Text Reader

Abstract

A PWM-controlled 4-20mA constant current output circuit, including a waveform conversion module, a current negative feedback module, and a protection module. The waveform conversion module is used to convert a PWM signal into a DC voltage signal. The output end of the waveform conversion module is connected to the input end of the current negative feedback module. The current negative feedback module is used to convert the DC voltage signal into a current signal. The output end of the current negative feedback module is connected to the input end of the protection module. A 4-20mA constant current is output through the protection module. The waveform conversion module is connected to the PWM signal through an optocoupler isolation module, which can stably output a 4-20mA constant current, improve the anti-interference ability of the circuit, and improve the load-carrying ability of the circuit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of constant current output circuits, and particularly to a 4-24 mA constant current output circuit controlled by PWM. Background Art

[0002] In industry, it is often necessary to measure various non-electrical physical quantities, such as temperature, pressure, speed, angle, etc. In order to transmit these non-electrical signals to a control room or display device hundreds of meters away, it is necessary to first convert them into analog electrical signals. Since current signals are not easily interfered with, and the internal resistance of the current source is infinite, the wire resistance in series in the circuit will not affect the accuracy of the current signal and can be transmitted hundreds of meters on ordinary twisted pairs. Therefore, 4-20 mA current signals are widely used in industry to transmit analog quantities.

[0003] Currently, there are two existing 4-20 mA constant current output circuits. One is to use a V-I conversion circuit to achieve the output of a 4-20 mA current signal. The main control chip controls the output voltage of the D / A conversion chip, and then controls the output current of the constant current circuit composed of components such as an amplifier and a triode. However, the manufacturing cost of this circuit is relatively high and the versatility is relatively low. The other is a 4-20 mA constant current output circuit controlled by PWM. This circuit directly generates a PWM voltage signal by the main control chip, controls the DC voltage signal after passing through the low-pass filter circuit by changing the duty cycle of the PWM, and then controls the output current of the constant current circuit. However, there is no isolation between the PWM and the output current signal of this circuit, and it is easily affected by external interference. Summary of the Invention

[0004] The purpose of the present invention is to provide a 4-20 mA constant current output circuit controlled by PWM in view of the deficiencies of the prior art, which can stably output a 4-20 mA constant current, improve the anti-interference ability of the circuit, and improve the load-carrying capacity of the circuit.

[0005] The technical solution of the present invention is: a 4-20 mA constant current output circuit controlled by PWM, including a waveform conversion module, a current negative feedback module, and a protection module. The waveform conversion module is used to convert the PWM signal into a DC voltage signal. The output end of the waveform conversion module is connected to the input end of the current negative feedback module. The current negative feedback module is used to convert the DC voltage signal into a current signal. The output end of the current negative feedback module is connected to the input end of the protection module. A 4-20 mA constant current is output through the protection module. The waveform conversion module is connected to the PWM signal through an opto-isolation module.

[0006] Further, the optocoupler isolation module includes an NPN-type triode Q1 and an optocoupler U1. The base of the triode Q1 receives a PWM signal via a resistor R2. The collector of the triode Q1 is connected to the power supply via a resistor R3. The emitter of the triode Q1 is connected to the positive input terminal of the optocoupler U1. The negative input terminal of the optocoupler U1 is connected to the digital ground, and the negative input terminal of the optocoupler U1 is connected to the PWM signal via a resistor R1. The first output terminal of the optocoupler U1 is connected to the power supply via a resistor R4 and is connected to the input terminal of the waveform transformation module. The second output terminal of the optocoupler U1 is connected to the analog ground.

[0007] Further, the waveform transformation module includes a NAND logic gate U2 and a second-order low-pass filter. The first input terminal of the NAND logic gate U2 is connected to the power supply terminal and is connected to a reference voltage Vref. The second input terminal of the NAND logic gate U2 is connected to the output terminal of the optocoupler isolation module. The ground terminal of the NAND logic gate U2 is connected to the analog ground. The resistors R6 and R7 of the second-order low-pass filter are connected in series. The resistor R6 is connected to the output terminal of the NAND logic gate U2. Parallel capacitors C1 and C2 are provided at both ends of the resistor R7. The capacitors C1 and C2 are commonly connected to the analog ground.

[0008] Further, a resistor R5 is provided between the second input terminal of the NAND logic gate U2 and the output terminal of the optocoupler isolation module.

[0009] Further, the reference voltage Vref is provided by a reference voltage chip.

[0010] Further, the current negative feedback module includes an operational amplifier U3A and a PNP-type triode Q2. The positive input terminal of the operational amplifier U3A is connected to the power supply via a resistor R9 and is connected to the analog ground via a resistor R10. The negative input terminal of the operational amplifier U3A is connected to the output terminal of the waveform transformation module via a resistor R8 and is connected to the output terminal via a capacitor C4. The base of the triode Q2 is connected to the output terminal of the operational amplifier U3A via a resistor R12. The emitter of the triode Q2 is connected to the power supply via a resistor R13 and is connected to the negative input terminal of the operational amplifier U3A via a resistor R11. The collector of the triode Q2 is connected to the protection module. The positive power supply terminal of the operational amplifier U3A is connected to the power supply and is connected to the analog ground via a capacitor C3. The negative power supply terminal of the operational amplifier U3A is connected to the analog ground.

[0011] Further, the resistor R13 is a precision resistor with an accuracy of 0.1%.

[0012] Further, the resistor R8 and the resistor R11 have the same resistance value, and the resistor R9 and the resistor R10 have the same resistance value.

[0013] Further, the protection module includes a diode D1, a diode D2, and a zener diode D3. The anode of the diode D1 is connected to the output end of the current negative feedback module. The cathodes of the diode D1 and the diode D2 are commonly connected to the positive pole of the output current. The cathodes of the diode D2 and the zener diode D3 are commonly connected to the positive pole of the output current. The anode of the zener diode D3 is respectively connected to the negative pole of the output current and the analog ground.

[0014] Further, a voltage follower circuit is provided between the waveform conversion module and the current negative feedback module. The non-inverting input terminal of the operational amplifier U3B of the voltage follower circuit is connected to the output end of the waveform conversion module. The inverting input terminal of the operational amplifier U3B is connected to the output end. The output end of the operational amplifier U3B is connected to the input end of the current negative feedback module.

[0015] With the above technical solution: the output current of this constant current output circuit is determined by the duty cycle of the PWM signal, the reference voltage Vref, and the resistance value of R13. When the reference voltage Vref and the resistance value of R13 are fixed, as long as the duty cycle is changed, the output current can be changed immediately. At the same time, an opto-isolation module is provided between the PWM signal and the waveform conversion module in this circuit. The opto-isolation module isolates the PWM signal and the waveform conversion module, which can enhance the anti-interference ability of the circuit. Moreover, this circuit can prevent device or load damage caused by reverse power connection or overvoltage through the protection module.

[0016] The NAND logic gate circuit adopted in the waveform conversion module of this constant current output circuit can solve the waveform distortion caused by the transmission delay of the opto-isolation module, ensure the accuracy of PWM signal transmission and calculation, and thus improve the output accuracy of the 4-20mA constant current.

[0017] The present invention will be further described below in conjunction with the accompanying drawings of the specification and specific embodiments. Description of the Drawings

[0018] Figure 1 It is the circuit structure diagram of the present invention. Detailed Embodiments

[0019] See Figure 1, an embodiment of a PWM-controlled 4-20mA constant current output circuit, including a waveform conversion module, a current negative feedback module, and a protection module. The waveform conversion module converts the PWM signal into a DC voltage signal, and the output end of the waveform conversion module is connected to the input end of the current negative feedback module; the current negative feedback module is used to convert the DC voltage signal into a current signal, and the output end of the current negative feedback module is connected to the input end of the protection module, and a 4-20mA constant current is output through the protection module. The protection module can prevent device and load damage caused by reverse power connection or overvoltage, and improve the service life of each device; the waveform conversion module is connected to the PWM signal through an optocoupler isolation module, and the PWM signal and the waveform conversion module are isolated by the optocoupler isolation module, so that there is no direct electrical connection between the PWM signal and the waveform conversion module, preventing electrical connection from interfering with the circuit and improving the anti-interference ability of the circuit. At the same time, the waveform conversion module can also play a role in stabilizing the output signal of the optocoupler isolation module.

[0020] The optocoupler isolation module includes an NPN-type triode Q1 and an optocoupler U1. The base of the triode Q1 receives the PWM signal through a resistor R2. The collector of the triode Q1 is connected to the power supply VCC1 through a resistor R3. The emitter of the triode Q1 is connected to the positive input end of the optocoupler U1. The negative input end of the optocoupler U1 is connected to the digital ground, and the negative input end of the optocoupler U1 is connected to the PWM signal through a resistor R1. The PWM signal can be generated by an MCU, and a high-resolution PWM signal can be output through the MCU, enabling the circuit to achieve high-precision current output. The first output end of the optocoupler U1 is connected to the power supply VCC2 through a resistor R4, and the first output end is connected to the second input end of the NAND gate U2 of the waveform conversion module. The second output end of the optocoupler U1 is connected to the analog ground. The NPN-type triode Q1 in this embodiment can increase the output ability of the PWM signal to drive the optocoupler U1 to work and reduce the load of the MCU that provides the PWM signal.

[0021] The waveform conversion module includes a NAND gate U2 and a second-order low-pass filter. In this embodiment, the NAND gate U2 is of model 7SH00F. The first input terminal of the NAND gate U2 is connected to the power supply terminal and is connected to the reference voltage Vref. The reference voltage Vref is provided by a reference voltage chip. The second input terminal of the NAND gate U2 is connected to the first output terminal of the optocoupler U1 of the optocoupler isolation module. A resistor R5 is provided between the second input terminal of the NAND gate U2 and the first output terminal of the optocoupler U1. The resistor R5, as a current-limiting resistor, can limit the current of the signal input to the NAND gate U2 and prevent the NAND gate U2 from being burned out due to excessive inflowing current. The ground terminal of the NAND gate U2 is connected to the analog ground. The square wave signal output after the operation of the NAND gate U2 is consistent with the PWM signal. The resistors R6 and R7 of the second-order low-pass filter are connected in series. The resistor R6 is connected to the output terminal of the NAND gate U2. Capacitors C1 and C2 are provided in parallel at both ends of the resistor R7. The capacitors C1 and C2 are commonly connected to the analog ground. The second-order low-pass filter composed of the resistor R6, the resistor R7, the capacitor C1, and the capacitor C2 converts the square wave signal output by the NAND gate U2 into a DC voltage signal. That is, the waveform conversion module is used to stabilize the output signal of the optocoupler U1 and convert it into a DC voltage signal.

[0022] The current negative feedback module includes an operational amplifier U3A and a PNP-type triode Q2. The positive input terminal of the operational amplifier U3A is connected to the power supply VCC2 through a resistor R9, and the positive input terminal of the operational amplifier U3A is connected to the analog ground through a resistor R10. The negative input terminal of the operational amplifier U3A is connected to the output terminal of the operational amplifier U3B of the waveform conversion module through a resistor R8, and the negative input terminal of the operational amplifier U3A is connected to the output terminal through a capacitor C4. The capacitor C4 is used to prevent the operational amplifier U3B from generating self-oscillation. The base of the triode Q2 is connected to the output terminal of the operational amplifier U3A through a resistor R12. The emitter of the triode Q2 is connected to the power supply VCC2 through a resistor R13, and the emitter of the triode Q2 is connected to the negative input terminal of the operational amplifier U3A through a resistor R11. The collector of the triode Q2 is connected to the protection module. The positive power supply terminal of the operational amplifier U3A is connected to the power supply VCC2 and is connected to the analog ground through a capacitor C3. The negative power supply terminal of the operational amplifier U3A is connected to the analog ground. Moreover, in this embodiment, the resistance values of the resistor R8 and the resistor R11 are set to be equal, and the resistance values of the resistor R9 and the resistor R10 are set to be equal, so that the output current of this circuit is only related to the duty cycle of the PWM signal and the resistance value of the resistor R13. Therefore, the resistor R13 in this embodiment uses a precision resistor with an accuracy of 0.1%, thereby improving the accuracy of the output current.

[0023] The protection module includes a diode D1, a diode D2, and a zener diode D3. The anode of the diode D1 is connected to the collector of the triode Q3 of the current negative feedback module. The cathodes of the diode D1 and the anode of the diode D2 are commonly connected to the positive pole of the output current. The cathode of the diode D2 is connected to the cathode of the zener diode D3. The anode of the zener diode D3 is respectively connected to the negative pole of the output current and the analog ground. The diodes D1 and D2 prevent damage to each device or load caused by reverse power connection, and the zener diode D3 plays a role in overvoltage protection for the devices and loads in the circuit.

[0024] In another embodiment of this circuit, a voltage follower circuit is provided between the waveform transformation module and the current negative feedback module. The non-inverting input terminal of the operational amplifier U3B of the voltage follower circuit is connected to the resistor R7 of the waveform transformation module. The inverting input terminal of the operational amplifier U3B is connected to the output terminal. The output terminal of the operational amplifier U3B is connected to the input terminal of the current negative feedback module. In this embodiment, the operational amplifier U3B and the operational amplifier U3A are integrated in a dual operational amplifier chip, and the model of this dual operational amplifier chip is LM358S. Since the voltage follower circuit has a very high input impedance and a very low output impedance, therefore, setting a voltage follower circuit between the waveform transformation module and the current negative feedback module in this embodiment can improve the load-carrying capacity of this circuit, and at the same time avoid the mutual influence between the front-end waveform transformation module and the back-end current negative feedback module, playing an isolation and buffering role for the front and back stage circuits.

[0025] The working principle of the constant current output circuit in this embodiment during operation is as follows:

[0026] When the PWM signal is at a high level, the triode Q1 conducts, and a current flows through the positive input terminal of the optocoupler U1, causing the first output terminal of the optocoupler U1 to output a low level. After being operated by the NAND logic gate U2, the output terminal of the NAND logic gate U2 outputs a high level Vref. Similarly, when the PWM signal is at a low level, the triode Q1 turns off, and the first output terminal of the optocoupler U1 outputs a high level. After being operated by the NAND logic gate U2, the output terminal of the NAND logic gate U2 outputs a low level 0. It can be obtained therefrom that the frequency and duty cycle of the output signal of the NAND logic gate U2 are the same as those of the PWM signal frequency f pwm and duty cycle D c exactly the same, the high level is Vref, and the low level is 0. During use, it is necessary to ensure that the input current of the optocoupler U1 is small, and at the same time ensure that the output terminal voltage drop when the optocoupler U1 conducts is within the low level input range of the NAND logic gate U2.

[0027] The cut-off frequency of the second-order low-pass filter is: f c = 0.37 / (2πRC),

[0028] Wherein, R = R6 = R7, C = C1 = C2, and considering the problem of transmission delay of optocoupler U1, it must satisfy f pwm > f c . Therefore, during circuit debugging, f pwm can be adjusted by the MCU according to the actual current output value to obtain a good optocoupler transmission effect and achieve a stable output current.

[0029] The DC voltage signal output after low-pass filtering by the second-order low-pass filter is: Vi = Vref * D c , where Vref is the reference voltage and D c is the duty cycle of the PWM signal.

[0030] The operational amplifier U3B constitutes a voltage follower, and the voltage at its non-inverting input terminal is Vi = Vref * D c , then the voltage at the output terminal of the operational amplifier U3B is also Vi = Vref * D c , which improves the load-carrying capacity of the circuit.

[0031] According to the principle of virtual short and virtual open, the voltages at the non-inverting input terminal and the inverting input terminal of the operational amplifier U3A are equal, that is:

[0032] U32 = U33 = VCC2 * R10 / (R9 + R10)

[0033] Wherein, U32 is the voltage at the inverting input terminal of the operational amplifier U3A, and U33 is the voltage at the non-inverting input terminal of the operational amplifier U3A. In this embodiment, R9 = R10, then through simplification, we can get: U32 = U33 = VCC2 / 2.

[0034] Moreover, according to the equality of the currents flowing through the resistor R8 and the resistor R11, the following formula can be obtained:

[0035] (Vi - VCC2 / 2) / R8 = (VCC2 / 2 - U Q2e ) / R11

[0036] Wherein, U Q2e is the emitter voltage of the triode Q2. In this embodiment, R8 = R11, then through simplification, we can get: U Q2e = VCC2 - Vi.

[0037] Let R8 = R11 >> R13, then the current flowing through the resistor R13 is equal to the emitter current of the triode Q2. Thus, the output current I O of this constant current output circuit can be obtained through the following formula:

[0038] I O = (VCC2 - U Q2e) / R13 = Vi / R13 = Vref*Dc / R13

[0039] From the above formula, it can be seen that the output current I of this constant current output circuit O is determined by the reference voltage Vref and the duty cycle of the PWM signal.

[0040] The output current of this constant current output circuit is determined by the duty cycle of the PWM signal, the reference voltage Vref, and the resistance value of R13. When the reference voltage Vref and the resistance value of R13 are fixed, as long as the duty cycle is changed, the output current can be changed immediately. At the same time, this circuit is provided with an optocoupler isolation module between the PWM signal and the waveform conversion module. The optocoupler U1 in the optocoupler isolation module plays an isolation role between the PWM signal and the waveform conversion module, which can enhance the anti-interference ability of the circuit. Moreover, the NAND logic gate circuit adopted in the waveform conversion module of this constant current output circuit can solve the waveform distortion caused by the transmission delay of the optocoupler isolation module, ensuring the accuracy of PWM signal transmission and calculation, thereby improving the output accuracy of the 4-20mA constant current. In addition, this circuit is also provided with a protection module, through which the damage of devices or loads caused by reverse power connection or overvoltage can be prevented.

Claims

1. A PWM-controlled 4-20mA constant current output circuit, including a waveform conversion module, a current negative feedback module, and a protection module. The waveform conversion module is used to convert a PWM signal into a DC voltage signal. The output end of the waveform conversion module is connected to the input end of the current negative feedback module. The current negative feedback module is used to convert the DC voltage signal into a current signal. The output end of the current negative feedback module is connected to the input end of the protection module. A 4-20mA constant current is output through the protection module. It is characterized in that: The waveform conversion module is connected to the PWM signal through an optocoupler isolation module. The waveform conversion module includes a NAND logic gate U2 and a second-order low-pass filter. The first input end of the NAND logic gate U2 is connected to the power supply terminal and is connected to the reference voltage Vref. The second input end of the NAND logic gate U2 is connected to the output end of the optocoupler isolation module. The grounding end of the NAND logic gate U2 is connected to the analog ground. The resistor R6 and the resistor R7 of the second-order low-pass filter are connected in series. The resistor R6 is connected to the output end of the NAND logic gate U2. A parallel connection of a capacitor C1 and a capacitor C2 is provided at both ends of the resistor R7. The capacitor C1 and the capacitor C2 are commonly connected to the analog ground. The current negative feedback module includes an operational amplifier U3A and a PNP-type triode Q2. The positive input end of the operational amplifier U3A is connected to the power supply through a resistor R9, and the positive input end of the operational amplifier U3A is connected to the analog ground through a resistor R10. The negative input end of the operational amplifier U3A is connected to the output end of the waveform conversion module through a resistor R8, and the negative input end of the operational amplifier U3A is connected to the output end through a capacitor C4. The base of the triode Q2 is connected to the output end of the operational amplifier U3A through a resistor R12. The emitter of the triode Q2 is connected to the power supply through a resistor R13, and the emitter of the triode Q2 is connected to the negative input end of the operational amplifier U3A through a resistor R11. The collector of the triode Q2 is connected to the protection module. The positive power supply terminal of the operational amplifier U3A is connected to the power supply and is connected to the analog ground through a capacitor C3. The negative power supply terminal of the operational amplifier U3A is connected to the analog ground. The protection module includes a diode D1, a diode D2, and a zener diode D3. The anode of the diode D1 is connected to the output end of the current negative feedback module. The cathode of the diode D1 and the anode of the diode D2 are commonly connected to the positive pole of the output current. The cathode of the diode D2 and the cathode of the zener diode D3 are commonly connected to the positive pole of the output current. The anode of the zener diode D3 is respectively connected to the negative pole of the output current and the analog ground.

2. The PWM-controlled 4-20mA constant current output circuit according to claim 1, It is characterized in that: The optocoupler isolation module includes an NPN transistor Q1 and an optocoupler U1. The base of the transistor Q1 receives a PWM signal through a resistor R2. The collector of the transistor Q1 is connected to the power supply through a resistor R3. The emitter of the transistor Q1 is connected to the positive input terminal of the optocoupler U1. The negative input terminal of the optocoupler U1 is connected to the digital ground, and the negative input terminal of the optocoupler U1 is connected to the PWM signal through a resistor R1. The first output terminal of the optocoupler U1 is connected to the power supply through a resistor R4 and is connected to the input terminal of the waveform conversion module. The second output terminal of the optocoupler U1 is connected to the analog ground.

3. The 4-20mA constant current output circuit controlled by PWM according to claim 1, characterized in that: a resistor R5 is provided between the second input terminal of the NAND gate U2 and the output terminal of the optocoupler isolation module.

4. The 4-20mA constant current output circuit controlled by PWM according to claim 1, characterized in that: the reference voltage Vref is provided by a reference voltage chip.

5. The 4-20mA constant current output circuit controlled by PWM according to claim 1, characterized in that: the resistor R13 is a precision resistor with an accuracy of 0.1%.

6. The 4-20mA constant current output circuit controlled by PWM according to claim 1, characterized in that: the resistance values of the resistor R8 and the resistor R11 are equal, and the resistance values of the resistor R9 and the resistor R10 are equal.

7. The 4-20mA constant current output circuit controlled by PWM according to claim 1, characterized in that: a voltage follower circuit is provided between the waveform conversion module and the current negative feedback module. The positive input terminal of the operational amplifier U3B of the voltage follower circuit is connected to the output terminal of the waveform conversion module. The negative input terminal of the operational amplifier U3B is connected to the output terminal. The output terminal of the operational amplifier U3B is connected to the input terminal of the current negative feedback module.

Citation Information

Patent Citations

  • 4-20mA constant current output circuit of PWM control

    CN204576335U

  • Keep apart converting circuit

    CN206332613U

  • PWM (Pulse Width Modulation)-controlled 4-20mA constant current output circuit

    CN216286365U