张小哥

4~20mA current acquisition module

 
Overview

1. Design scheme
    This current acquisition module is designed for current output sensors (4~20mA or 0~20mA). It mainly uses an op amp to build a current amplification circuit, and sends it to a microcontroller with a 12-bit ADC after a second-order low-pass filter. The current value is displayed through a digital tube, and the data is printed through a serial port.
2. Solution analysis
1. Current acquisition amplifier circuit
This circuit is a typical application of op amp low-side current monitoring. The sampling resistor R20 is 10Ω, with an accuracy of 0.1% 25PPM/℃. R5, R4, R6, R7 and op amp U1 form a differential amplifier circuit. Because R5=R6 and R4=R7, the Vout of the differential amplifier circuit is Vin * (R4/R5). Therefore, the voltage at CN1 is equal to the measured current * 10*10 (0~2V). Disconnect H1 and adjust the multimeter to the mA current range to monitor the current in the loop. In normal use, short-circuit H1.
2. Second-order low-pass filtering
This is a typical unit-gain KRC circuit, also known as the Sallen-Key filter, with a cutoff frequency of fc = 1/(2*pi*(R1*R2*C5*C6)^0.5), which can be calculated using the calculator on the electronics enthusiast (op amp low-pass filter online calculation tool).
My design here needs to filter out the 50HZ power frequency interference. By calculating and finding the relevant resistance and capacitance values, R1 = R2 = 10KΩ, C5 = 220nF, C6 = 470nF, and fc = 49.5HZ is calculated using the cutoff frequency calculation formula.
The operational amplifier in the circuit uses the commonly used KTA333 (SOT-23 package) low-noise, low-temperature drift precision operational amplifier. Its input offset voltage is less than 10μV, input bias current ±100pA, input offset voltage ±120pV, and offset voltage drift is only 0.05μV/℃.
3. Introduction to other functions
    The single-chip microcomputer uses STC's STC8H3K32S2-45I-LQFP32, which has a 12-bit ADC and can meet the sampling accuracy requirements of this solution. And add a TL431 circuit in the circuit as the reference voltage of the single-chip microcomputer ADC. The maximum voltage value after the op amp is amplified is 2V, and the reference voltage can be set to 2.5V. Moreover, setting the reference voltage to 2.5V can improve the sampling accuracy compared to directly using a 5V system power supply.
    The display part uses TM1650, which can drive a 4-bit 8-segment digital tube to display the test value.
        The power supply part uses the TPS5430 step-down chip, and the input can be powered by a wide voltage of 5.5 V ~ 36 V.
3. Circuit debugging
1. Check the power supply voltage & 2.5V reference voltage
 
2. The voltage value after the current passes through the sampling resistor R20 and the differential amplifier circuit is amplified 100 times:
Current (mA)
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
CN1 voltage value (mV)
395
491
588
685
783
882
978
1075
1175
1271 1368 1467
1558
1662 1763 1860 1963 CN2 voltage value (mV) 395 490 588 685 783 882 978 1074 1175 1271 1369 1467 1558 1662 1763 1861 1962 The fitting curve is y = 97.85x. Because there is an error between the 4.99K and 49.9K resistors, you can try again with 0.1% resistors later. 3. The value collected by the single-chip microcomputer TempData = temp * 2.510 /65536; After the single-chip microcomputer collects the value, the displayed value is only 0.01mA different, which can be ignored. Write the above fitting curve into the program, and the test result is still OK.



























 
 
 
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-24 01:51:19

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

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号