Home > Exhibition > Content
14 - bit 4 - 20mA loop - powered thermocouple temperature measurement system circuit
Dec 25, 2017

14 - bit 4 - 20mA loop - powered thermocouple temperature measurement system circuit

Circuit functions and advantages

The circuit shown in Figure 1 is a complete loop-powered thermocouple temperature measurement system that uses a precision analog microcontroller PWM function to control the 4 mA to 20 mA output current.

Figure 1. The ADuCM360 controls a 4 mA to 20 mA loop-based temperature monitoring circuit (schematic diagram: not shown all connections and decoupling)

This circuit integrates most of the circuit functions on the ADuCM360 precision analog microcontrollers, including a dual 24-bit Σ-Δ ADC, an ARM Cortex ™ -M3 processor core, and a 4-channel voltage control loop for up to 28 V MA to 20 mA loop PWM / DAC characteristics, providing a low-cost temperature monitoring solution.

The ADuCM360 is connected to a T-type thermocouple and a 100 Ω platinum resistance temperature detector (RTD). RTD is used for cold junction compensation. The low-power Cortex-M3 core converts the ADC readings to temperature values. The supported T-type thermocouple temperature range is -200 ° C to + 350 ° C, and this temperature range corresponds to an output current range of 4mA to 20mA.

This circuit is similar to the circuit described in Circuit Note CN-0300, but this circuit has the advantage of driving a 4mA to 20mA loop with a higher resolution PWM. The PWM-based output provides 14-bit resolution. For more information on the temperature sensor-to-ADC interface and linearization techniques for RTD measurement, see Circuit Note CN-0300 and Application Note AN-0970.

Circuit description

The circuit is powered by a linear regulator, the ADP1720, which regulates the loop supply to 3.3 V to supply power to the ADuCM360, op amp OP193, and the optional reference ADR3412.

Temperature monitor

This part of the circuit is similar to the temperature monitor circuit described in CN-0300, using the following features of the ADuCM360:

The 24-bit sigma-delta ADC has a built-in PGA that sets the gain of 32 for the thermocouple and RTD in the software. ADC1 continuously switches between thermocouple and RTD voltage samples.

The programmable excitation current source drives a controlled current through the RTD. The dual-channel current source can be configured with a step from 0μA to 2mA. This example uses a 200μA setting to minimize the errors caused by the RTD self-heating effect.

The ADCs in the ADuCM360 have a built-in 1.2 V reference. The internal voltage reference has a high accuracy and is suitable for measuring thermocouple voltages.

An external reference for the ADC in the ADuCM360. When measuring RTD resistors, we use a ratiometric setting to connect an external reference resistor (RREF) to the external VREF + and VREF- pins. Since the reference voltage source in this circuit is high impedance, it is necessary to enable the on-chip reference voltage input buffer. An on-chip reference buffer means that no external buffers are required to minimize input leakage effects.

Bias voltage generator (VBIAS). The VBIAS function is used to set the thermocouple common-mode voltage to AVDD_REG / 2 (900 mV). Likewise, this eliminates the need for external resistors to set the thermocouple common-mode voltage.

ARM Cortex-M3 core. The powerful 32-bit ARM core integrates 126 KB of flash memory and 8 KB of SRAM memory to run user code, configure and control the ADC, and use the ADC to convert the thermocouple and RTD inputs to the final temperature value. It also controls the PWM output to drive a 4 mA to 20 mA loop. It can also control communication on the UART / USB interface for additional debugging purposes.


The 16-bit PWM output is externally buffered using OP193 and the external NPN transistor BC548 is controlled. By controlling the VBE voltage of this transistor, the current through the 47.5Ω load resistor can be set to the desired value. This provides better than ± 0.5 ° C accuracy for the 4 mA to 20 mA output (-200 ° C to + 350 ° C, reference test results).

The internal DAC provides a 1.2 V reference for the OP193. Alternatively, a 1.2 V precision reference ADR3412 can be used to achieve higher accuracy over the temperature range. The external reference draws approximately the same power consumption as the internal DAC (~ 50 μA). See the "Power Measurement Test" section.

On-chip 16-bit PWM (pulse-width modulation) controls the 4 mA to 20 mA loop through the ADuCM360. The PWM duty cycle can be configured by software to control the voltage on the 47.5 Ω RLOOP resistor and set the loop current. Note that the top of the RLOOP is connected to the ADuCM360 ground. The bottom of the RLOOP connects the ground of the loop. For this reason, the output currents of the ADuCM360, ADP1720, ADR3412, and OP193, plus the current set by the filtered PWM output, flow through the RLOOP.

The junction voltage of R1 and R2 can be expressed as:

VR12 = (VRLOOP + VREF) x R2 / (R1 + R2) - VRLOOP

After the loop is established:

VIN = VR12

Since R1 = R2:

VIN = (VRLOOP + VREF) / 2 - VRLOOP = VREF / 2 - VRLOOP / 2


When VIN = 0 when the full-scale current flow, this time VRLOOP = VREF. Therefore, the full-scale current is VREF / RLOOP, or ≈24 mA. When VIN = VREF / 2, no current flows.

The OP193 amplifier impedance at VIN is very high and does not load the PWM filter output. The output of the amplifier changes only slightly, about 0.7 V.

The performance at the boundary (0 mA to 4 mA and 20 mA to 24 mA) is unimportant, so the operational amplifier performance at the supply rail is not critical.

The absolute values of R1 and R2 are unimportant. However, the matching of R1 and R2 is important.

ADC1 is used for temperature measurement, so this circuit note applies directly to the ADuCM361 with only one ADC. The EVAL-CN0319-EB1Z evaluation board includes a voltage measurement option labeled VR12 using the ADC0 input channel on the ADuCM360. The ADC measurement can be used for PWM control software feedback, adjusting the 4 mA to 20 mA current setting.

Programming, debugging and testing

The UART is used as the communication interface with the host PC. This is used to program the on-chip flash memory. It also serves as a debug port for calibrating filtered PWM outputs.

Two external switches are used to force the device into Flash Boot mode. While the SD is low and the RESET button is toggled, the ADuCM360 enters the boot mode instead of the normal user mode. In boot mode, the internal Flash memory can be reprogrammed via the UART interface.

Description of the code

The source code for testing this circuit can be downloaded from the ADuCM360 and ADuCM361 product pages (zip archive). The source code uses the libraries provided with the sample code.

Figure 2 shows the list of source files used in the project when viewed with the Keil μVision4 tool.

Temperature monitor

ADC1 is used for temperature measurement on thermocouples and RTDs. This section of code is copied from circuit note CN-0300. See the circuit note for details.

Communication part

Adjust the PWM filter output to ensure a minimum temperature of 4mA output and maximum temperature of 20mA output. Provides a calibration routine that can be easily included or removed using the #define CalibratePWM parameter.

To calibrate the PWM, the interface board (USB-SWD / UART) must be connected to J1 and the USB port on the PC. You can use the COM port view program such as HyperTerminal to view the calibration menu and to perform the calibration procedure step by step.

When calibrating the PWM, connect the VLOOP + and VLOOP- outputs to an accurate ammeter. The first part of the PWM calibration procedure adjusts the DAC to set the 20mA output, while the second part adjusts the PWM to set the 20mA output. The PWM codes used to set the 4mA and 20mA outputs are stored in the flash memory.

UART configuration for the baud rate 19200,8 data bits, no polarity, no flow control. If this circuit is directly connected to the PC, you can use HyperTerminal or CoolTerm and other communication port view program to see the results of the program sent to the UART, as shown in Figure 3.

To enter the characters required for the calibration procedure, type the desired character in the viewing terminal and the ADuCM360UART port will receive the character.

Figure 3. "HyperTerminal" output when calibrating the PWM

After calibration, the demonstration code turns off the UART clock, further saving power.

The calibration factor is stored in the flash memory, so it is not necessary to run the calibration routine every time the board is powered up, unless the VLOOP level is changed.

The code flow chart is shown in Figure 4.

Common changes

This circuit includes the HART communication size as well as the external reference voltage source size.

Add: No. 16, Road 3, Sanjiang Industry Zone, Shengzhou, Zhejiang, China

Contact:Boris Yue      

Email: boris@benoelectric.com

Contact:Charles Yu     

Email: charles@benoelectric.com

Tel: +86-575-83703068

Mob: +8613456528940

Fax: +86-575-83539727

Skype: live:borisyuecn

Wechat & Whatsapp: +8613456528940

Copyright © Shengzhou Beno Electric Appliance Co.,Ltd All Rights Reserved.Tel: +86-575-83703068