sigma

CN0214

USB thermocouple temperature measurement system using ARM7

 
Overview

Circuit functions and advantages

This circuit shows how to use the precision analog microcontroller ADuC7060 / ADuC7061 in a precision thermocouple temperature monitoring application . The ADuC7060/ADuC7061 integrates dual 24-bit Σ-Δ ADC, dual programmable current sources, 14-bit DAC, 1.2 V internal reference, ARM7 core, 32 kB Flash, 4 kB SRAM, and various digital peripherals such as UART, timers, SPI and I2C interfaces, etc.

In this circuit, the ADuC7060/ADuC7061 are connected to a thermocouple and a 100 Ω Pt RTD. RTD is used to perform cold junction compensation.

In the source code, the ADC sampling rate is selected to be 100 Hz. When the gain of the ADC input PGA is configured to 32, the noise-free resolution of the ADuC7060/ADuC7061 is greater than 18 bits.

Figure 1. ADuC7060/ADuC7061 used as temperature monitoring controller and thermocouple interface (schematic diagram, not all connections shown)

 

Circuit description

Application Note AN-0970, RTD Interfacing and Linearization Using an ADuC706x Microcontroller This application uses the following features of the ADuC7060/ADuC706:

  • 24-bit Σ-Δ main ADC with built-in programmable gain amplifier (PGA): The gain of the PGA is set to 32 in the software for this application. The main ADC continuously switches between thermocouple signal sampling and RTD voltage signal sampling.
  • Programmable excitation current source to drive controlled current through the RTD: dual-channel current source configurable from 0 μA to 2 mA in 200 μA steps. This example uses a 200 μA setting to minimize errors caused by RTD self-heating effects.
  • Built-in 1.2 V reference voltage source for the ADC in the ADuC7060/ADuC7061: The internal voltage reference source has high accuracy and is suitable for measuring thermocouple voltages.
  • External reference for the ADC in the ADuC7060/ADuC7061: To measure the RTD resistance, we use a ratiometric setup with an external reference resistor (R REF ) connected to the external V REF+ and V REF− pins.
  • 14-bit DAC: The DAC is used to set the thermocouple common-mode voltage to 850 mV above ground.
  • ARM7TDMI® Core: The powerful 16/32-bit ARM7 core integrates 32 kB of Flash and SRAM memory to run user code, configure and control the ADC, handle ADC conversions through the RTD, and control communications over the UART/USB interface.
  • UART: UART is used as a communication interface with the PC host.
  • Two external switches are used to force the device into flash boot mode: by holding S1 low and toggling S2, the ADuC7060/ADuC7061 will enter boot mode instead of normal user mode. In boot mode, the internal flash memory can be reprogrammed via the UART interface.

Thermocouples and RTDs produce very small signals, so a PGA is required to amplify these signals. The auxiliary ADC of the ADuC7060/ADuC7061 does not contain a PGA, so both are connected to the main ADC, and switching between the two is done through software.

The thermocouple used in this application is a copper-constantan type, which has a temperature range of −200°C to +350°C and a sensitivity of approximately 40 μV/°C, which means that the ADC operates in bipolar mode and 32x PGA gain The complete temperature range of the thermocouple can be covered under the settings.

RTD is used to perform cold junction compensation. The RTD used in this circuit is a 100 Ω platinum RTD model number Enercorp PCS 1.1503.1. It comes in a 0805 surface mount package and has a temperature change rate of 0.385 Ω/°C.

Note that the reference resistor R REF should be a precision 5.62 kΩ (±0.1%) resistor.

The USB interface of ADuC7060/ADuC7061 is implemented through the FT232R UART to USB transceiver, which converts USB signals directly to UART.

In addition to the decoupling shown in Figure 1, the USB cable itself should use ferrite beads for enhanced EMI/RFI protection. The ferrite beads used in this circuit are Taiyo Yuden #BK2125HS102-T, which has an impedance of 1000 Ω at 100 MHz.

This circuit must be built on a multilayer circuit board with a large area ground plane. For optimal performance, proper layout, grounding and decoupling techniques must be used (refer to Tutorial MT-031 - "Grounding Data Converters and Solving the Mysteries of AGND and DGND ", Tutorial MT101 - "Decoupling Technology" and ADuC7060 / ADuC7061 Evaluation Board layout ).

Figure 2 shows the EVAL-ADUC7061MKZ PCB.

Figure 2. EVAL-ADUC7061MKZ board used in this circuit

 


Code description

The source code used to test this circuit can be downloaded from the following URL (zip file): http://www.analog.com/CN0214-SourceCode

The UART is configured for baud rate 9600, 8 data bits, no polarity, and no flow control. If this circuit is directly connected to the PC, you can use a communication port viewing program such as "HyperTerminal" to view the results sent by the program to the UART, as shown in Figure 3.

To obtain a temperature reading, the temperatures of the thermocouple and RTD must be measured and then added to give the absolute temperature value of the thermocouple.

First, measure the voltage (V1) between the two wires of the thermocouple. The RTD voltage is measured and converted to temperature via a lookup table, and this temperature is then converted to its equivalent thermocouple voltage (V2). V1 and V2 are then added to give the overall thermocouple voltage, which is then converted into the final temperature measurement.

Initially, this conversion was based on a simple linear assumption: the thermocouple temperature was 40 μV/°C. As can be seen from Figure 4, the error caused by such a conversion is only acceptable for a small range of temperatures around 0°C. A better way to calculate the thermocouple temperature is to use a 6th order polynomial for positive temperatures and a 7th order polynomial for negative temperatures. This requires mathematical operations, resulting in increased computation time and codeword size. A suitable compromise is to calculate the corresponding temperatures for a fixed number of voltages and then store these temperatures in an array with values ​​in between using linear interpolation of adjacent points. As can be seen from Figure 5, the error is significantly reduced when using this method. Figure 5 shows the algorithm error when using ideal thermocouple voltages. Figure 6 shows the error obtained when measuring 52 thermocouple voltages over the entire thermocouple operating range using ADC0 on the ADuC7060. The worst-case total error is less than 1°C.

Figure 3. Output from the HyperTerminal communication port viewing program

 

Figure 4. Error when using simple linear approximation method

 

Figure 5. Error calculated using piecewise linear approximation using 52 calibration points and ideal measurements.

 

Figure 6. Error using piecewise linear approximation using ADuC7060/ADuC7061 ADC0 for 52 calibration points.

 

The RTD temperature is calculated using a lookup table and is used with RTDs in the same way as with thermocouples. Note that the polynomial that describes the relationship between RTD temperature and resistance is different from the polynomial that describes the relationship between thermocouples.

For more information on linearization and achieving optimal RTD performance, please refer to application note AN-0970: "RTD Interface and Linearization Using ADuC706x Microcontrollers . "

参考设计图片
×

Blockdiagram

 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-23 08:37:04

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号