Single chip microcomputer measures AC current

Publisher:科技奇思Latest update time:2014-01-10 Source: dqjswKeywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

  How to convert the 4-20ma output of the current sensor?
  The output of the two-wire current sensor is 4-20ma, which is converted into an analog voltage signal of 1-5v or 2-10v through a 250ω precision resistor. There are many ways to convert it into a digital signal. If the system is used for a long time in an industrial site with a relatively harsh environment, the safety and reliability of the hardware system must be considered. The input module of the system uses the voltage-frequency conversion device LM231 to convert the analog voltage signal into a frequency signal, and uses the photoelectric coupling device TL117 to isolate the analog quantity from the digital quantity.
  At the same time, the analog signal processing circuit and the digital signal processing circuit use two independent power supplies respectively, and the analog ground and the digital ground are separated from each other, which can improve the safety of the system. The voltage-frequency conversion device LM231 also has a certain anti-high-frequency interference effect.
  What are the advantages and disadvantages of the current output type and the voltage output type?
  In many applications controlled by the single-chip microcomputer, a transmitter is used to convert the signal that the single-chip microcomputer cannot directly measure into an electrical analog signal that the single-chip microcomputer can process, such as a current transmitter, a pressure transmitter, a temperature transmitter, a flow transmitter, etc.
  Most of the early transmitters were voltage output type, that is, the measured signal was converted into 0-5V voltage output, which is the direct output of the op amp, and the signal power is <0.05W. The digital signal is converted through the analog/digital conversion circuit for the microcontroller to read and control. However, in situations where the signal needs to be transmitted over long distances or the power grid interference in the use environment is large, the use of voltage output sensors is greatly limited, exposing the shortcomings of poor anti-interference ability, line loss destroying the accuracy, etc., and two-wire current output transmitters have been widely used with their extremely high anti-interference ability. The
  voltage output transmitter has extremely poor anti-interference ability, and the line loss damages it. There is no way to talk about how high the accuracy is. Sometimes the output DC voltage is superimposed with AC components, which makes the microcontroller misjudge and control errors occur. In serious cases, it will also damage the equipment. The output 0-5V must not be transmitted remotely. After remote transmission, the line voltage drop is large, and the accuracy is greatly reduced. Now many ADC, PLC, and DCS input signal ports are made into two-wire current output transmitters 4-20ma, which proves the inevitable trend of voltage output transmitters being eliminated.
  What are the general processing methods for 4-20ma current output type to interface?
  The output range of current output type transmitter is commonly used in 0-20ma and 4-20ma. When the current transmitter outputs the minimum current and maximum current, they represent the minimum and maximum rated output values ​​calibrated by the current
   transmitter
  . The following is a description of the current transmitter with a measurement range of 0-100a. For a transmitter with an output of 0-20ma, 0ma current corresponds to an input value of 0a, and for a transmitter with an output of 4-20ma, 4ma current corresponds to an input value of 0a. The 20ma current of both types of sensors corresponds to a value of 100a.
  For a transmitter with an output of 0-20ma, in circuit design, we only need to select a suitable voltage drop resistor, and directly convert the 0-5v or 0-10v voltage on the resistor into a digital signal at the input interface of the A/D converter. Circuit debugging and data processing are relatively simple. However, the disadvantage is that it is impossible to determine the damage of the transmitter, and it is impossible to distinguish between open circuit and short circuit of the transmitter output.
  For transmitters that output 4-20ma, circuit debugging and data processing are relatively cumbersome. However, this type of transmitter can detect the current within the normal range (the minimum value is also 4ma under normal conditions) when the transmitter line is blocked, short-circuited or damaged, to determine whether the circuit is faulty or the transmitter is damaged, so it is more widely used.
  Since the voltage on the sampling resistor is not equal to 0 when the 4-20ma transmitter outputs 4ma, the digital quantity directly converted by the analog-to-digital conversion circuit is not 0, and the microcontroller cannot use it directly, and the calculation by formula is too complicated. Therefore, the general processing method is to eliminate the voltage drop generated by 4ma on the sampling resistor through the hardware circuit, and then perform A/D conversion. The first choice of this type of hardware circuit is rcv420, which is a precision i/v conversion circuit.
  There is also an i/v conversion circuit built by lm258. This circuit forms a current loop with 4-20ma current generated by a two-wire current transmitter, 24v and a sampling resistor, thereby generating a 1-5v voltage drop on the sampling resistor, and inputting this voltage value into the 3rd pin of the amplifier lm258. The resistor voltage divider circuit is used to generate a fixed voltage value at the 2nd pin of the integrated circuit lm258 to offset the voltage drop caused by the 4ma current on the sampling resistor. Therefore, when the two-wire current transmitter is at the minimum value of 4ma, the voltage difference between the 3rd and 2nd pins of lm258 is basically 0v. LM258 and the resistor connected to it form an adjustable voltage amplifier circuit, which amplifies the voltage value of the current of the two-wire current transmitter on the sampling resistor and outputs it to the analog/digital conversion circuit through pin 1 of LM258 for reading by the microcontroller CPU. Through data processing methods, the 4-20mA current of the two-wire current transmitter is displayed on the LCD/LED screen in the form of 0-100A values.

Keywords:MCU Reference address:Single chip microcomputer measures AC current

Previous article:How to learn single chip microcomputer programming design
Next article:Some pitfalls in learning C language

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号