AC / DC universal transmission circuit and transmission output method
Patent Information
- Application Number
- CN202510061382.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2045-01-15
AI Technical Summary
然而,现有的通用型变送器,只不过是把所有类型简单集成在了一个产品上,仍然无法避免分开校准、多次校准,以及通过改变接线和接线端子人为变更使用类型等等复杂操作,且信号测量范围一旦拉大,测量精度则存在严重问题,没有完全实现真正的通用
1、成本低廉,性价比高。从多方面控制成本,输入输出都只需要一路接口,节省进线出线和接线端子;采样为霍尔直采,不需要另配互感器;整合了许多功能,整体布板面积大大减小;校准方便,一步到位,无需反复拆接线路,生产效率提高,也是间接降低成本。
Smart Images

Figure CN119881430B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electrical quantity measurement technology, specifically to a universal AC / DC transmitter circuit and a transmitter output method. Background Technology
[0002] Due to the diverse needs of different applications, voltage and current transmitters (sensors) on the current market vary greatly in size, range, and type, even considering only their input range. Classified by input type, there are those measuring AC signals, DC signals, voltage, and current; some measure large signals, while others measure small signals. Classified by output range, there are 0-20mA, 4-20mA, 0-5V, 1-5V, 0-10V, 2-10V, and many more.
[0003] Transmitters with limited or incomplete functionality have restricted applications, requiring users to clearly understand their intended use when purchasing them. While general-purpose sensors exist that integrate and improve upon these functions, existing general-purpose transmitters merely integrate all types into a single product. They still cannot avoid complex operations such as separate calibration, multiple calibrations, and manually changing the application type by altering wiring and terminals. Furthermore, measurement accuracy suffers serious problems once the signal measurement range is expanded, failing to achieve true universality. Summary of the Invention
[0004] This invention addresses the limitations, diversity, and complexity of voltage and current transmitters on the market by designing a novel universal measurement and transmission output scheme for both AC and DC signals. Through hardware circuit design and software output method design, it controls both the input and output ends, truly achieving a universal AC / DC measurement and transmission output scheme with "one input, one output" for all input and output types, regardless of signal size. Furthermore, through software offset compensation, it eliminates errors caused by the linearity defects of the PWM (Pulse Width Modulation) output module, ensuring an overall accuracy of one-thousandth. It also solves problems related to different signal sampling and calibration, wiring classification, and output classification.
[0005] To achieve the above objectives, this invention designs a universal AC / DC transmitter circuit. The transmitter circuit includes a control unit, a current signal acquisition unit, a voltage signal sampling unit, a current output switching unit, and a voltage output switching unit. The output terminals of the current signal acquisition unit are respectively connected to the sampling input ports of the control unit, and the output terminals of the voltage signal sampling units are also respectively connected to the sampling input ports of the control unit. The current control terminal of the current output switching unit and the voltage control terminal of the voltage output switching unit are respectively connected to the output ports of the control unit. The current signal acquisition unit and the voltage signal sampling unit share an external input terminal, and the current output and voltage output of the transmitter circuit share an external output terminal. The current signal acquisition unit includes a first interference suppression circuit, and an isolated DC-to-AC circuit and an isolated AC-to-DC circuit connected in parallel therewith. The isolated DC-to-AC circuit includes a second resistor, a sixth capacitor, a twelfth capacitor, and a sixth resistor connected in series with a time constant of less than 0.1ms. The two capacitors are grounded in the middle, and the two resistors and the two capacitors have the same resistance value. The isolated AC-to-DC circuit includes an eighth resistor, a twelfth capacitor, a twelfth capacitor, and a thirteenth resistor connected in series with a time constant of greater than 100ms. The two capacitors are grounded in the middle, and the two resistors and the two capacitors have the same resistance value. The voltage signal sampling unit includes a second interference suppression circuit, a signal amplification circuit (U1), and an AC signal pickup circuit and a DC signal pickup circuit (similar to the isolated DC-to-AC circuit and isolated AC-to-DC circuit of the current signal acquisition unit, but different names are used here to distinguish their functions). The output of the second interference suppression circuit is connected to the input of the signal amplification circuit (VINP, VINN). The output of the signal amplification circuit (VOUTP, VOUTN) is divided by at least two series-connected resistors and then connected to the input of the AC signal pickup circuit and the DC signal pickup circuit respectively. The AC signal pickup circuit includes a resistor, a capacitor, a capacitor, and a resistor connected in series with a time constant of less than 0.1ms, with the two capacitors grounded in the middle. The two resistors have the same resistance value, and the two capacitors have the same value. The DC signal pickup circuit includes a resistor, a capacitor, a capacitor, and a resistor connected in series with a time constant of greater than 100ms, with the two capacitors grounded in the middle. The two resistors have the same resistance value, and the two capacitors have the same value. The current output switching unit and the voltage output switching unit have the same circuit configuration. The current control terminal of the control unit is connected to the 6th optocoupler amplifier after being current-limited by the 22nd resistor, and the voltage control terminal is connected to the 4th optocoupler amplifier after being current-limited by the 69th resistor.
[0006] Furthermore, the first interference suppression circuit includes at least a second transient voltage suppression diode (TVS diode), a second electrostatic discharge diode (ESD diode, dual small signal switching diode) connected in parallel, and several bypass resistors (for shunting).
[0007] Furthermore, the input terminals (IN-UA, IN-UN) of the second interference suppression circuit are connected in parallel with the 24th transient voltage suppression diode, the 3rd electrostatic discharge diode (dual small signal switching diode), and the filter circuit after passing through several series current-limiting resistors (R10, R11, R12, R13, R39, R45, R46, R47). The output of the filter circuit is the output of the second interference suppression circuit.
[0008] Furthermore, the transmitter circuit also includes a PWM output unit, which is connected to the current output switching unit, the voltage output switching unit, and the output signal terminal block, respectively. The PWM output unit includes a PWM current module, a PWM voltage module, and a PWM common output module.
[0009] Furthermore, the PWM current module includes a two-stage operational amplifier (IC2A, IC3B) series amplifier circuit, and a two-stage transistor (Q1, Q2) series amplifier circuit connected to the output of the final stage operational amplifier. The two stages of operational amplifiers are connected in series through a field-effect transistor (Q6, MOSFET). The PWM voltage module includes a single-stage operational amplifier (IC3A) circuit.
[0010] Furthermore, the PWM common output module includes a unidirectional 16th diode (D16). The power signal output (S2) of the current output switching unit is connected to the positive terminal of the 16th diode, and the power signal output (S5) of the voltage output switching unit is connected to the negative terminal of the 16th diode. The negative terminal of the 16th diode is connected to one end of the interconnection between the 4th inductor (L4) and the 63rd capacitor (C63). The other end of the 4th inductor (L4) is connected to the 62nd capacitor (C62) and then connected in series with the 5th inductor (L5), which is then connected to the other end of the 63rd capacitor (C63) and grounded, forming a dual-capacitor inductor filter network. The 62nd capacitor (C62) is connected in parallel with the 3rd transient voltage suppression diode (D3). The connection point of the 62nd capacitor (C62) and the 4th inductor (L4) is simultaneously connected to the interconnect pin (pin 3) of the 17th electrostatic discharge diode (D17), and the independent pins (pins 1 and 2) of the 17th electrostatic discharge diode (D17) are connected to the negative power supply and the positive power supply, respectively.
[0011] On the other hand, a universal AC / DC transmitter output method, for any of the above-mentioned universal AC / DC transmitter circuits and their preferred embodiments, the transmitter output method includes an input signal sampling and calibration method, which includes the following steps: A1. Reset status function check, including read / write, working mode switching and chip reset function checks. If the check result is normal, the main state is set to reset state and the reset check ends. Otherwise, the reset check ends and waits for processing. The read / write function includes whether the chip ID is read successfully and whether the write enable is successful. A2. Parameter setting check, including whether the channel setting parameters are successful, verification and calculation. If the check is completed normally, the main status is set to normal operation status and the check ends. Otherwise, it is set to reset status and the parameter setting check ends. A3. Normal operation check, including determining whether the checksum is successful. If successful, the sampled value is acquired, the input signal value is calculated, and the operation is repeated. If the checksum is unsuccessful, the failure count is incremented by 1. If the failure count is greater than 3, the main state is set to the reset state and the operation ends. If the failure count is less than or equal to 3, the operation ends directly or continues. A4. Perform basic calibration of the circuit input: A41. Input a zero signal and record the sampled and converted signal as b; A42, Input the first signal x a Record the sampled and converted signal as Y a ; A43, Input the second signal x b Record the sampled and converted signal as Y b ; where x b >x a ; Establish a theoretical linear relationship between the input value x and the sampled transformation value Y: Y = kx + b (Formula 1) Where, k=( Y b - Y a ) / ( x b - x a ); A44. Calibration complete; The system can then calculate the theoretical output value based on the above theoretical linear relationship between input and output and the actual input signal value, thereby realizing the universal transmission of AC and DC signals.
[0012] The steps A41, A42, and A43 above have no specific order.
[0013] Furthermore, the input signal sampling calibration method also includes: A5. The main state is set to reset state, and the program ends.
[0014] Furthermore, considering the nonlinearity of PWM, the transmission output method also includes a compensation calibration method and an output signal compensation method. The compensation calibration method includes setting the minimum output value y1 and the maximum output value y1 within a set output range. n Between these points, at least one more compensation point should be calibrated to output signal value y. i The corresponding outputs of the control unit are labeled z1 and z2, respectively. n and z i A corresponding monotonic transformation relationship is established between the two, i=1,2,…n, where n is the number of calibration points for the output signal; The control unit successively inputs calibration point z to the PWM. i There is a corresponding measured output value y. i and theoretical output value yi0 Then record the calibration point compensation amount. Δy i =y i - y i0 The corresponding Δz can be obtained based on the monotonic transition relationship between the PWM input and output. i ; The output signal compensation method includes: For any output demand y, the compensation amount Δy can be calculated by either linear interpolation of compensation amounts at adjacent calibration points or comprehensive interpolation of compensation amounts at all calibration points. Then, the actual output value of the control unit z = z0 - Δz, where z0 is the theoretical output value of the control unit corresponding to the PWM output y. That is, the corresponding compensation amount is deducted in advance when the control unit actually outputs, so that the final output can still basically maintain the original linear relationship after being amplified by PWM power. The linear interpolation method for compensation at adjacent calibration points includes finding the smallest calibration value y greater than y. i+1 and the maximum calibration value y less than y i Then the compensation amount Δy=( y- y i ) ( Δy i+1 - Δy i ) / ( y i+1 - y i )+ Δy i ; Δz is obtained based on the monotonic transformation relationship between y and z; The comprehensive interpolation method for compensation of all calibration points includes polynomial interpolation, Newton interpolation, or Lagrange interpolation, etc.
[0015] Furthermore, the transmitter output method also includes a PWM calibration and output process, which includes: B1. Determine if there is a calibration mark. If not, it means no calibration is required, proceed to step B2; if there is, proceed to the PWM calibration procedure, including: B11. Boundary value calibration: The control unit outputs the minimum value z1 and the maximum value z1 respectively. n Adjust the PWM so that the output corresponds to y1 and y2 respectively. n The maximum and minimum values are calibrated in no particular order here; B12. Set compensation point z i or y i Obtain the corresponding compensation amount Δy i , i=2, 3, …, n-1; B13. Store calibration parameters; calibration complete. B2. Obtain the input signal type and input signal value, i.e., voltage or current sampling; B3. Enter the PWM output program; B31. Determine the output type based on the input signal type, and calculate the theoretical output value based on the input signal value; B32. Obtain calibration compensation parameters and calculate compensation amount; B33. Calculate the control unit output value based on the theoretical output value and the corresponding compensation amount; B34. Control the on / off state of the logic circuit according to the output type to execute the transmission output.
[0016] The advantages and beneficial effects of this invention are as follows: 1. Low cost and high cost-effectiveness. Costs are controlled from multiple aspects. Only one interface is needed for both input and output, saving on incoming and outgoing lines and terminals; sampling is direct Hall effect sampling, eliminating the need for additional current transformers; many functions are integrated, greatly reducing the overall board area; calibration is convenient and can be completed in one step without repeated disconnection and reconnection of circuits, improving production efficiency and indirectly reducing costs.
[0017] 2. User-friendly. This invention is applicable to AC, DC, voltage, current, large signal, and small signal measurements, supporting various outputs. Users do not need extensive knowledge of on-site parameters or require categorization; it supports all conventional methods. With only one input and one output, wiring and operation are extremely convenient.
[0018] 3. High measurement and output accuracy. This invention achieves dual control accuracy through hardware filtering and software algorithms. Both input and output are rigorously calculated, and the overall accuracy after compensation reaches one-thousandth, surpassing the vast majority of power transmitters on the market.
[0019] 4. High safety. The transmitter designed using the method of this invention includes common alarm detection, such as overvoltage, undervoltage, overcurrent, and undercurrent, with timely alarm response and clear characteristics. It also supports user-customized alarm schemes. Attached Figure Description
[0020] Figure 1 This is a block diagram of the AC / DC universal transmitter circuit of the present invention; Figure 2 This is the circuit schematic of the current signal acquisition unit; Figure 3 This is the circuit schematic of the voltage signal acquisition unit; Figure 4 This is the circuit schematic diagram of the current output switching unit and the voltage output switching unit; Figure 5 This is the schematic diagram of the PWM current module circuit; Figure 6 This is the schematic diagram of a PWM voltage module circuit. Figure 7 This is the schematic diagram of the PWM shared output module circuit. Figure 8 This is a flowchart of the input signal sampling and calibration process; Figure 9 This is a flowchart of PWM calibration and output. Detailed Implementation
[0021] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings and examples. The following examples are only used to more clearly illustrate the technical solutions of the present invention and should not be construed as limiting the scope of protection of the present invention.
[0022] Example 1: A universal AC / DC transmitter circuit, such as Figure 1 , Figure 2 , Figure 3 , Figure 4 As shown, the transmitter circuit includes a control unit, a current signal acquisition unit, a voltage signal sampling unit, a current output switching unit, and a voltage output switching unit. The output terminals (I1+, I1-, I2+, I2-) of the current signal acquisition unit are respectively connected to the sampling input ports of the control unit. The output terminals (UAP1, UAN1, UAP2, UAN2) of the voltage signal sampling unit are respectively connected to the sampling input ports of the control unit. The current control terminal Ctr1 of the current output switching unit and the voltage control terminal Ctr2 of the voltage output switching unit are respectively connected to the output ports of the control unit. The current signal acquisition unit and the voltage signal sampling unit share an external input terminal, and the current output and voltage output of the transmitter circuit share an external output terminal. The shared input terminal includes a current input signal IN-IA and a voltage input signal IN-UA sharing a terminal, and a current input signal IN-IN and a voltage input signal IN-UN sharing a terminal; the shared output terminal includes a current output signal end and a voltage output signal end sharing a terminal, and the other end of the current output signal and the other end of the voltage output signal sharing another terminal. Alternatively, the same set of input terminals can sample both current and voltage signals, but only one signal can be sampled at a time. The specific signal type can be determined based on the sampling results, or the sampling type can be manually preset in the control unit. Alternatively, the same port can be used to input voltage or current signals in a time-sharing manner, with a switch controlling whether the input is sampled by the current signal acquisition unit or the voltage signal acquisition unit. The same set of output terminals can output both current and voltage signals, with the specific output signal determined by the input signal and controlled by the control unit. Of course, the two types of signals can also be isolated or amplified and then share the same terminal. In this embodiment, the control unit uses a microcontroller as the main control chip and directly utilizes the microcontroller's I / O ports as sampling and output control ports. After the input port acquires the input signal, it performs analog-to-digital conversion to obtain the input signal value.
[0023] For a microcontroller, regardless of whether the input is voltage or current, it always samples the voltage value and performs the value conversion internally. Therefore, current and voltage sampling can be connected to different I / O ports of the microcontroller, or they can be connected to the same group of ports. That is, I1+, I1-, I2+, and I2- can share four sampling ports with UAP1, UAN1, UAP2, and UAN2 respectively (I1+ shares one port with UAP1, and so on. Generally, it is necessary to ensure that AC current detection and AC voltage detection share the same port, and DC current detection and DC voltage detection share the same port). This embodiment uses a circuit with four sampling ports.
[0024] like Figure 2 As shown, the current signal acquisition unit includes a first interference suppression circuit, and an isolated DC-to-AC circuit and an isolated AC-to-DC circuit connected in parallel with it. The isolated DC-to-AC circuit includes a second resistor (R2), a sixth capacitor (C6), a twelfth capacitor (C12), and a sixth resistor (R6) connected in series with a time constant of less than 0.1ms. The two capacitors are grounded in the middle, the two resistors have the same resistance value, and the two capacitors have the same value. In this embodiment, the time constant is set to 1k*33nF=0.033ms. The connection point between the second resistor (R2) and the sixth capacitor (C6), and the connection point between the twelfth capacitor (C12) and the sixth capacitor (C6) are also specified. The connection point of resistor (R6) is the output point of AC current signal; the isolated AC-to-DC circuit includes an 8th resistor (R8), a 21st capacitor (C21), a 23rd capacitor (C23), and a 13th resistor (R13) connected in series with a time constant greater than 100ms. The two capacitors are grounded in the middle, the two resistors have the same resistance value, and the two capacitors have the same value. In this embodiment, the time constant is set to 100k * 2.2uF = 220ms. The connection point of resistor 8 (R8) and capacitor 21 (C21), and the connection point of capacitor 23 (C23) and resistor 13 (R13) are the output points of DC current signal; like Figure 3As shown, the voltage signal sampling unit includes a second interference suppression circuit, a signal amplification circuit (U1), and an AC signal pickup circuit and a DC signal pickup circuit (similar to the isolated DC-to-AC circuit and isolated AC-to-DC circuit of the current signal acquisition unit; different names are used here to distinguish their functions). The output of the second interference suppression circuit is connected to the input (VINP, VINN) of the signal amplification circuit. The output (VOUTP, VOUTN) of the signal amplification circuit is divided by at least two series resistors (R8 and R27 in the figure are essential voltage divider resistors; preferably, R73 and R74 can be connected in series for further current limiting and voltage division) and then connected to the inputs of the AC signal pickup circuit and the DC signal pickup circuit (the two ends of the voltage divider resistors R8 and R27 in the figure). The AC signal pickup circuit includes a resistor (R22), a capacitor (C29), a capacitor (C18), and a resistor (R28) connected in series with a time constant of less than 0.1ms. The two capacitors are grounded in the middle, and the resistance values of the two resistors are... The two capacitors have the same value. In this embodiment, the time constant is set to 1k*33nF=0.033ms. The connection point of the 22nd resistor (R22) and the 29th capacitor (C29), and the connection point of the 18th capacitor (C18) and the 28th resistor (R28) are the output points of the AC voltage signal. The DC signal pickup circuit includes the 5th resistor (R5), the 3rd capacitor (C3), the 11th capacitor (C11), and the 15th resistor (R15), which are connected in series with a time constant greater than 100ms. The two capacitors are grounded in the middle, the two resistors have the same resistance value, and the two capacitors have the same value. In this embodiment, the time constant is set to 100k * 2.2uF = 220ms. The connection point between the 5th resistor (R5) and the 3rd capacitor (C3), and the connection point between the 11th capacitor (C11) and the 15th resistor (R15) are the output points of the DC voltage signal. The signal amplification circuit uses the NSI1300D25-DSWWAR isolation amplifier from Naxin Microelectronics. The interference suppression circuit can use a conventional anti-interference circuit. As shown in the figure, before entering the sampling port, the signal is filtered by two RC filter circuits with different parameters: a 1kΩ + 33nF circuit filters DC while allowing AC to pass through, and a 100kΩ + 2.2uF circuit filters AC while allowing DC to pass through, ultimately achieving AC / DC separation. Thus, different types of signals enter different sampling ports through the same port. Next, the control unit only needs to process the sampled values from the corresponding sampling ports and output the corresponding transmission current or voltage based on the sampled signal magnitude and the transmission ratio.
[0025] like Figure 4As shown, the current output switching unit and voltage output switching unit have the same circuit configuration. The current control terminal (Ctr1) of the control unit is connected to the 6th optocoupler amplifier (U6) after being current-limited by the 22nd resistor (R22), and the voltage control terminal (Ctr2) is connected to the 4th optocoupler amplifier (U4) after being current-limited by the 69th resistor (R69). The outputs of the optocouplers are the corresponding current and voltage output signals after transmission. In this logic circuit, Ctrl1 and Ctrl2 are output as high and low levels by the microcontroller. When Ctrl1 is high and Ctrl2 is low, S1 and S2 are turned on, and S4 and S5 are turned off; when Ctrl1 is low and Ctrl2 is high, S1 and S2 are turned off, and S4 and S5 are turned on. By using the method of turning two lines on and off alternately, the current and voltage signals after transmission are output from the same port.
[0026] Other components connected to the current output switching units S1 and S2 include a PWM (Pulse Width Modulation) current output module and a PWM voltage module connected to the voltage output switching units S4 and S5. Both can be implemented using existing technologies, and the specific circuit implementation is omitted in this embodiment.
[0027] Example 2: The difference from Embodiment 1 is that the first interference suppression circuit in this embodiment includes at least a second transient voltage suppression diode (D2, TVS diode), a second electrostatic discharge diode (U2, ESD diode, dual small signal switching diode) connected in parallel, and several bypass resistors (R3, R4, R28, which serve as shunt resistors). In this embodiment, the TVS diode D2 is model SMBJ36CA, and the ESD electrostatic discharge diode U2 is model BAV199_HD.
[0028] Preferably, the input terminals (IN-UA, IN-UN) of the second interference suppression circuit are connected in parallel with several series current-limiting resistors (R10, R11, R12, R13, R39, R45, R46, R47), followed by the 24th transient voltage suppression diode (D24), the 3rd electrostatic discharge diode (U3, dual small-signal switching diode), and a filter circuit. The output of the filter circuit is the output of the second interference suppression circuit. In this embodiment, the filter circuit consists of the 7th capacitor (C7) connected in series with... The 34th resistor (R34) and the 37th resistor (R37), the 17th resistor (R17) connected in series, the 5th capacitor (C5), the 8th capacitor (C8) and the 49th resistor (R49) are connected in parallel, and the connection points between the 34th resistor (R34) and the 37th resistor (R37), and between the 5th capacitor (C5) and the 8th capacitor (C8) are all grounded; the TVS diode D24 mentioned in this embodiment is model SMBJ8.0CA, and the ESD electrostatic discharge diode U3 is model BAV199_HD.
[0029] Example 3: The difference from Embodiment 1 is that the transmitter circuit in this embodiment further includes a PWM output unit. The PWM output unit is connected to the current output switching unit, the voltage output switching unit, and the output signal terminal block. The PWM output unit includes a PWM current module, a PWM voltage module, and a PWM common output module. The control unit outputs corresponding signals to the corresponding PWM current module or PWM voltage module according to the type and magnitude of the sampled signal. The signal is amplified and then output from the same output port of the PWM common output module.
[0030] Preferred, such as Figure 5 As shown, the PWM current module includes a two-stage operational amplifier (IC2A, IC3B) series amplifier circuit and a two-stage transistor (Q1, Q2) series amplifier circuit connected to the output of the final stage operational amplifier. The two stages of operational amplifiers are connected in series through a field-effect transistor (Q6, MOSFET). The output of the final stage of the transistor is connected to the power signal input (S1) of the current output switching unit. The operational amplifiers, field-effect transistors, transistors, and other peripheral circuits are conventionally connected, jointly constructing a voltage follower and constant current source circuit; as shown... Figure 6 As shown, the PWM voltage module includes a single-stage operational amplifier (IC3A) circuit. The output of this operational amplifier is connected to the power signal input (S4) of the voltage output switching unit, and the peripheral circuits are conventionally connected.
[0031] The input signals (Vin) of the PWM current module and PWM voltage module are issued by the microcontroller of the control unit. After being amplified by the PWM current and voltage output modules, S1 and S4 are respectively connected to the power signals of the current output switching unit and the voltage output switching unit. Based on the working principle of the two switching units, due to the above logic circuit, only one signal is ultimately connected. That is, according to the type and magnitude of the input signal of the transmission circuit, the corresponding transmitted signal is output.
[0032] Preferred, such as Figure 7As shown, the PWM common output module includes a unidirectional conducting 16th diode (D16). The power signal output (S2) of the current output switching unit is connected to the positive terminal of the 16th diode, and the power signal output (S5) of the voltage output switching unit is connected to the negative terminal of the 16th diode. The negative terminal of the 16th diode is connected to one end of the interconnection between the 4th inductor (L4) and the 63rd capacitor (C63). The other end of the 4th inductor (L4) is connected to the 62nd capacitor (C62) and then connected in series with the 5th inductor (L5), which is then connected to the other end of the 63rd capacitor (C63) and grounded, forming a dual-capacitor inductor filter network. The 62nd capacitor (C62) is connected in parallel with the 3rd transient voltage suppression diode (D3). The connection point of the 62nd capacitor (C62) and the 4th inductor (L4) is also connected to the interconnect pin (pin 3) of the 17th electrostatic discharge diode (D17). The independent pins (pins 1 and 2) of the 17th electrostatic discharge diode (D17) are connected to the negative power supply and the positive power supply, respectively. In this embodiment, the TVS diode D3 is model SMBJ36CA, and the ESD electrostatic discharge diode D17 is model BAV199_HD.
[0033] Example 4: A universal AC / DC transmitter output method, such as Figure 8 As shown, for any of the above-mentioned AC / DC universal transmitter circuits and their preferred embodiments, the transmitter output method includes an input signal sampling and calibration method, which includes the following steps: A1. Reset state function check, including read / write, working mode switching and chip reset function checks. If the check result is normal, the main state is set to reset state and the reset check ends. Otherwise, the reset check ends. The read / write function includes whether the chip ID is read successfully and whether the write enable is successful. A2. Parameter setting check, including whether the channel setting parameters are successful, verification and calculation. If the check is completed normally, the main status is set to normal operation status and the check ends. Otherwise, it is set to reset status and the parameter setting check ends. A3. Normal operation check, including determining whether the checksum is successful. If successful, the sampled value is acquired, the input signal value is calculated, and the operation is repeated. If the checksum is unsuccessful, the failure count is incremented by 1. If the failure count is greater than 3, the main state is set to the reset state and the operation ends. If the failure count is less than or equal to 3, the operation ends directly or continues. This embodiment adopts the method of ending the operation. A4. Perform basic calibration of the circuit input: A41. Input a zero signal and record the sampled and converted signal as b; A42, Input the first signal x a Record the sampled and converted signal as Y a ; A43, Input the second signal x b Record the sampled and converted signal as Y b ; where x b >x a ; Establish a theoretical linear relationship between the input value x and the sampled transformation value Y: Y = kx + b (Formula 1) Where, k=( Y b - Y a ) / ( x b - x a ); A44. Calibration complete; The system can then calculate the theoretical output value based on the above theoretical linear relationship between input and output and the actual input signal value, thereby realizing the universal transmission of AC and DC signals.
[0034] The steps A41, A42, and A43 above have no specific order.
[0035] The first signal is generally a small signal, and the second signal is generally a large signal. In this embodiment, the input current range of the transmitter circuit is 0-18A and the input voltage range is 0-720V. Therefore, the small signal is set to 1A or 50V, the large current signal is set to 18A or 15A, and the large voltage signal is set to 720V or 500V, respectively, corresponding to the current and voltage inputs. The main state includes at least the reset state, parameter setting state, normal operation state, and calibration state; the above steps or processes constitute the state machine operation process, and after the main state of each operation cycle ends, it waits to enter the next cycle setting state for operation.
[0036] Preferably, the input signal sampling calibration method further includes: A5. The main state is set to reset state, and the program ends. This step is an operation after the complete calibration is completed and is not a necessary step for calibration. This embodiment considers that the software integrates system operation and calibration, and therefore this step was designed.
[0037] Example 5: Because the AC / DC universal transmitter output method of this invention only requires one output terminal, and it needs to support multiple specifications of voltage and current output at the same time, specifically including common signal output requirements such as 0-20mA, 4-20mA, 0-10mA, 2-10mA, 0-5V, 1-5V, 0-10V, and 2-10V, and also supports other customizations.
[0038] Traditional transmitters establish input-output boundary and proportional relationships based on the correspondence between the input and output quantization ranges, and output proportionally. This invention, however, supports multiple input and output types, requiring separate calibration for each. Considering the nonlinearity of PWM, simply calculating the proportional control output can lead to a significant discrepancy between the actual and ideal PWM output. Therefore, a method for PWM output compensation and calibration is proposed. Note that input signal sampling calibration and PWM output compensation calibration are two independent processes. While it's possible to output directly from a shared module based on the quantization relationship without a PWM module, this might affect the transmitter's output load capacity. Therefore, a PWM module is typically designed.
[0039] The difference from Embodiment 4 is that the transmitter output method described in this embodiment further includes a compensation calibration method and an output signal compensation method. The compensation calibration method includes setting a minimum output value y1 and a maximum output value y1 within a set output range. n (For example, for a 2-10mA output specification, y1=2mA, y n Between 10mA and 10mA, at least one more compensation point should be calibrated for the output signal value y. i The corresponding outputs Vin from the microcontroller of the control unit are labeled as z1 and z2, respectively. n and z i (For PWM, this can be referred to as the input). A monotonic transformation relationship is established between the two based on the input / output range and the computer's numerical storage method. If the nonlinearity of PWM is not considered, this embodiment uses z... i =y i For example (other conversion relationships will not be listed here, only the general case is used), i=1,2,…n, where n is the number of calibration points for the output signal, z i or y i The calibration points can be evenly distributed. Without loss of generality, all calibration points are sorted by output from smallest to largest and marked sequentially. The control unit successively inputs calibration point z to the PWM. i There can be a corresponding measured output value y. i and theoretical output value y i0 Then the calibration point compensation is recorded as: Δy i =y i - y i0 The corresponding Δz can be obtained based on the monotonic transition relationship between the PWM input and output. i In this embodiment, Δz i =Δy i The general calibration procedure described above typically includes Δy1 = Δy n =0, this is the standard procedure for initial PWM adjustment; The output signal compensation method includes: For any output demand y (based on the input quantity acquired by the signal acquisition unit and its percentage within the input range and the output range, thus obtaining the value to be output), the compensation amount Δy is calculated using either the linear interpolation method for compensation amounts at adjacent calibration points or the comprehensive interpolation method for compensation amounts at all calibration points. Then, the actual output value of the control unit z = z0 - Δz, where z0 is the theoretical output value of the control unit corresponding to the PWM output y. This means that the corresponding compensation amount is pre-deducted when the control unit actually outputs, so that the final output, after being amplified by the PWM power amplifier, can still basically maintain the original linear relationship. Of course, if there is a conversion relationship between the control unit output and the PWM output, then the corresponding compensation amount Δy also needs to be converted at the control unit end, which is omitted here.
[0040] The linear interpolation method for compensation at adjacent calibration points includes finding the smallest calibration value y greater than y. i+1 and the maximum calibration value y less than y i Then the compensation amount Δy=( y- y i ) ( Δy i+1 - Δy i ) / ( y i+1 - y i )+ Δy i ; Δz is obtained based on the monotonic transformation relationship between y and z; The comprehensive interpolation method for compensation of all calibration points includes polynomial interpolation, Newton interpolation, or Lagrange interpolation, etc.
[0041] Preferred, such as Figure 9 As shown, the transmitter output method further includes a PWM calibration and output process, which includes: B1. Determine if there is a calibration mark. If not, it means no calibration is required, proceed to step B2; if there is, proceed to the PWM calibration procedure, including: B11. Boundary value calibration: The control unit outputs the minimum value z1 and the maximum value z1 respectively. n Adjust the PWM so that the output corresponds to y1 and y2 respectively. n There is no specific order here; B12. Set compensation point z i or y i Obtain the corresponding compensation amount Δy i , i=2, 3, …, n-1; B13. Store calibration parameters; calibration ends. The calibration parameters include the PWM input signal and corresponding output signal values at calibration points (including reference and compensation points), monotonic conversion parameters, and the slope values for calculating compensation amounts at adjacent calibration points (including compensation and reference points, hereinafter the same). i+1 - Δy i ) / ( y i+1 - y i The calibration parameters (such as those for polynomial interpolation, Newton interpolation, or Lagrange interpolation) and / or integrated interpolation parameters can be stored in ascending order of input values or in quantized relation according to output type (current or voltage). B2. Obtain the input signal type and input signal value, i.e., voltage or current sample value; B3. Enter the PWM output program; B31. Determine the output type based on the input signal type, and calculate the theoretical output value based on the input signal value; B32. Obtain calibration compensation parameters and calculate compensation amount; B33. Calculate the control unit output value based on the theoretical output value and the corresponding compensation amount. In this embodiment, write the value into the control unit CCR register. B34. Control the on / off state of the logic circuit (such as the current output switching unit and the voltage output switching unit) according to the output type to perform the transmission output.
[0042] The above steps or processes are also the state machine operation process. After the main state of each operation cycle ends, it waits to enter the next cycle's set state for operation.
[0043] During program design, there is a quantization relationship between different output range signals (0-5V and 1-5V are 1x, 0-10 and 2-10 are 2x, and 0-20 and 4-20 are 4x), which can save calibration procedures and only calibrate one range.
[0044] The above description is only a preferred embodiment of the AC / DC universal transmitter circuit and transmitter output method of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principle of the present invention. For example, the interference suppression circuit can be simplified or even omitted, the current limiting or voltage dividing can be achieved by using several series and parallel variations of resistors, and the current and voltage output switching can be done by general electronic switching instead of optocoupler isolation. These improvements and modifications should also be considered within the scope of protection of the present invention, and will not be listed here.
Claims
1. A universal AC / DC transmitter circuit, characterized in that, The transmitter circuit includes a control unit, a current signal acquisition unit, a voltage signal sampling unit, a current output switching unit, and a voltage output switching unit. The output terminals of the current signal acquisition units are connected to the sampling input ports of the control unit, and the output terminals of the voltage signal sampling units are also connected to the sampling input ports of the control unit. The current control terminal (Ctr1) of the current output switching unit and the voltage control terminal (Ctr2) of the voltage output switching unit are connected to the output ports of the control unit. The current signal acquisition unit and the voltage signal sampling unit share an external input terminal, and the current output and voltage output of the transmitter circuit share an external output terminal. The current signal acquisition unit includes a first interference suppression circuit, and an isolated DC-to-AC circuit and an isolated AC-to-DC circuit connected in parallel with it. The isolated DC-to-AC circuit includes a second resistor (R2), a sixth capacitor (C6), a twelfth capacitor (C12), and a sixth resistor (R6) connected in series with a time constant of less than 0.1ms. The two capacitors are grounded in the middle, and the two resistors and the two capacitors have the same resistance value. The isolated AC-to-DC circuit includes an eighth resistor (R8), a twenty-first capacitor (C21), a twenty-third capacitor (C23), and a thirteenth resistor (R13) connected in series with a time constant of greater than 100ms. The two capacitors are grounded in the middle, and the two resistors and the two capacitors have the same resistance value. The voltage signal sampling unit includes a second interference suppression circuit, a signal amplification circuit (U1), an AC signal pickup circuit, and a DC signal pickup circuit. The output of the second interference suppression circuit is connected to the input (VINP, VINN) of the signal amplification circuit. The output (VOUTP, VOUTN) of the signal amplification circuit is divided by at least two series-connected resistors and then connected to the inputs of the AC signal pickup circuit and the DC signal pickup circuit, respectively. The AC signal pickup circuit includes a 22nd resistor (R22), a 29th capacitor (C29), an 18th capacitor (C18), and a 28th resistor (R28) connected in series with a time constant of less than 0.1ms. The two capacitors are grounded in the middle, and the two resistors and capacitors have the same resistance and value. The DC signal pickup circuit includes a resistor (R5), a capacitor (C3), a capacitor (C11), and a resistor (R15) connected in series with a time constant of greater than 100ms. The two capacitors are grounded in the middle, and the two resistors and capacitors have the same resistance and value. The current output switching unit and the voltage output switching unit have the same circuit configuration. The current control terminal (Ctr1) of the control unit is connected to the 6th optocoupler amplifier (U6) after being current-limited by the 22nd resistor (R22), and the voltage control terminal (Ctr2) is connected to the 4th optocoupler amplifier (U4) after being current-limited by the 69th resistor (R69).
2. The AC / DC universal transmitter circuit according to claim 1, characterized in that, The first interference suppression circuit includes at least a second transient voltage suppression diode (D2), a second electrostatic discharge diode (U2), and several bypass resistors connected in parallel.
3. The AC / DC universal transmitter circuit according to claim 1, characterized in that, After passing through several series current-limiting resistors, the input terminal of the second interference suppression circuit is connected in parallel to the 24th transient voltage suppression diode (D24), the 3rd electrostatic discharge diode (U3), and the filter circuit.
4. The AC / DC universal transmitter circuit according to claim 1, characterized in that, The transmitter circuit also includes a PWM output unit, which is connected to the current output switching unit, the voltage output switching unit and the output signal terminal block respectively. The PWM output unit includes a PWM current module, a PWM voltage module and a PWM common output module.
5. The AC / DC universal transmitter circuit according to claim 4, characterized in that, The PWM current module includes a two-stage operational amplifier series amplifier circuit and a two-transistor series amplifier circuit connected to the output of the final stage operational amplifier. The two stages of operational amplifiers are connected in series through field-effect transistors. The PWM voltage module includes a single-stage operational amplifier circuit.
6. The AC / DC universal transmitter circuit according to claim 4, characterized in that, The PWM common output module includes a unidirectional conducting 16th diode (D16). The power signal output (S2) of the current output switching unit is connected to the positive terminal of the 16th diode, and the power signal output (S5) of the voltage output switching unit is connected to the negative terminal of the 16th diode. The negative terminal of the 16th diode is connected to one end of the interconnection between the 4th inductor (L4) and the 63rd capacitor (C63). The other end of the 4th inductor (L4) is connected to the 62nd capacitor (C62) and then connected in series with the 5th inductor (L5), and then connected to the other end of the 63rd capacitor (C63) and grounded. The 62nd capacitor (C62) is connected in parallel with the 3rd transient voltage suppressor diode (D3). The connection point of the 62nd capacitor (C62) and the 4th inductor (L4) is simultaneously connected to the interconnection pin of the 17th electrostatic discharge diode (D17). The independent pins of the 17th electrostatic discharge diode (D17) are connected to the negative power supply and the positive power supply, respectively.
7. A universal AC / DC transmitter output method, characterized in that, According to any one of the AC / DC universal transmitter circuits in claims 1-6, the transmitter output method includes an input signal sampling and calibration method, which includes the following steps: A1. Reset state function check, including read / write, working mode switching and chip reset function check. If the check result is normal, the main state is set to reset state and the reset check ends; otherwise, the reset check ends. A2. Parameter setting check; A3. Normal operation check; A4. Perform basic calibration of the circuit input: A41. Input a zero signal and record the sampled and converted signal as b; A42, Input the first signal x a Record the sampled and converted signal as Y a ; A43, Input the second signal x b Record the sampled and converted signal as Y b ; where x b >x a ; Establish a theoretical linear relationship between the input value x and the sampled transformation value Y: Y = kx + b (Formula 1) Where, k=( Y b - Y a ) / ( x b - x a ); A44. Calibration complete; The steps A41, A42, and A43 above have no specific order.
8. The AC / DC universal transmitter output method according to claim 7, characterized in that, The input signal sampling calibration method further includes: A5. The main state is set to reset state, and the program ends.
9. The AC / DC universal transmitter output method according to claim 7, characterized in that, The transmitter output method further includes a compensation calibration method and an output signal compensation method. The compensation calibration method includes setting a minimum output value y1 and a maximum output value y1 within a set output range. n Between these points, at least one more compensation point should be calibrated to output signal value y. i The corresponding outputs of the control unit are labeled z1 and z2, respectively. n and z i A corresponding monotonic transformation relationship is established between the two, i=1,2,…n, where n is the number of calibration points for the output signal; The control unit successively inputs calibration point z to the PWM. i There is a corresponding measured output value y. i and theoretical output value y i0 Then record the calibration point compensation amount. Dy i =y i - y i0 The output signal compensation method includes: For any output demand y, the compensation amount Δy is calculated using either the linear interpolation method of compensation amounts at adjacent calibration points or the comprehensive interpolation method of compensation amounts at all calibration points; then the actual output value of the control unit z = z0 - Δz, where z0 is the theoretical output value corresponding to the PWM output y; The linear interpolation method for compensation at adjacent calibration points includes finding the smallest calibration value y greater than y. i+1 and the maximum calibration value y less than y i Then the compensation amount Δy=( y- y i ) ( Δy i+1 - Dy i ) / ( y i+1 - y i )+ Δy i ; Δz is obtained based on the monotonic transformation relationship between y and z; The comprehensive interpolation method for compensation of all calibration points includes polynomial interpolation, Newton interpolation, or Lagrange interpolation.
10. The AC / DC universal transmitter output method according to claim 9, characterized in that, The transmitter output method further includes a PWM calibration and output process, which includes: B1. Determine if there is a calibration mark. If not, proceed to step B2; if there is, proceed to the PWM calibration procedure, including: B11. Boundary value calibration: The control unit outputs the minimum value z1 and the maximum value z1 respectively. n Adjust the PWM so that the output corresponds to y1 and y2 respectively. n There is no specific order here; B12. Set compensation point z i or y i Obtain the corresponding compensation amount Δy i , i=2, 3, …, n-1; B13. Store calibration parameters; calibration complete. B2. Obtain the input signal type and input signal value; B3. Enter the PWM output program; B31. Determine the output type based on the input signal type, and calculate the theoretical output value based on the input signal value; B32. Obtain calibration compensation parameters and calculate compensation amount; B33. Calculate the control unit output value based on the theoretical output value and the corresponding compensation amount; B34. Control the on / off state of the logic circuit according to the output type to execute the transmission output.
Citation Information
Patent Citations
Thermal resistance temperature transmitter
CN103616086A
Multi-interval power supply output precision calibration method and device and storage medium
CN110413940A