CN-0221 [ADI]

USB-Based Temperature Monitor Using the ADuCM360 Precision Analog Microcontroller; 基于USB的温度监控使用ADuCM360精密模拟微控制器
CN-0221
型号: CN-0221
厂家: ADI    ADI
描述:

USB-Based Temperature Monitor Using the ADuCM360 Precision Analog Microcontroller
基于USB的温度监控使用ADuCM360精密模拟微控制器

微控制器 监控
文件: 总5页 (文件大小:373K)
中文:  中文翻译
下载:  下载PDF数据表文档文件
Circuit Note  
CN-0221  
Devices Connected/Referenced  
Circuits from the Lab™ reference circuits are engineered and  
tested for quick and easy system integration to help solve today’s  
analog, mixed-signal, and RF design challenges. For more  
information and/or support, visit www.analog.com/CN0221.  
ADuCM360/  
ADuCM361  
Cortex-M3 Based Microcontroller with  
Dual 24-Bit Σ-Δ ADCs  
ADP1720-3.3 Low Dropout Linear Regulator  
USB-Based Temperature Monitor Using the ADuCM360 Precision Analog  
Microcontroller and an External Thermocouple  
converter (DAC), and a 1.2 V internal reference, as well as an ARM  
Cortex-M3 core, 126 kB flash, 8 kB SRAM, and various digital  
peripherals such as UART, timers, SPIs, and I2C interfaces.  
EVALUATION AND DESIGN SUPPORT  
Circuit Evaluation Board  
CN-0221 Evaluation Board (EVAL-ADuCM360TCZ)  
Design and Integration Files  
Schematics, Layout Files, Bill of Materials, source code for  
ADuCM360  
In the circuit, the ADuCM360/ADuCM361 is connected to a  
thermocouple and a 100 Ω platinum resistance temperature  
detector (RTD). The RTD is used for cold junction compensation.  
In the source code, an ADC sampling rate of 4 Hz is chosen. When  
the ADC input programmable gain amplifier (PGA) is configured  
for a gain of 32, the noise-free code resolution of the ADuCM360/  
ADuCM361 is greater than 18 bits.  
CIRCUIT FUNCTION AND BENEFITS  
This circuit uses the ADuCM360/ADuCM361 precision analog  
microcontroller in an accurate thermocouple temperature  
monitoring application. The ADuCM360/ADuCM361 integrates  
dual 24-bit sigma-delta (Σ-Δ) analog-to-digital converters (ADCs),  
dual programmable current sources, a 12-bit digital-to-analog  
3.3V  
USB HEADER  
ADP1720-3.3  
BEAD  
BEAD  
10Ω  
IN  
OUT  
GND  
5V  
4.7µF  
4.7µF  
10µF  
0.1µF  
0.1µF  
TxD  
D–  
D+  
FT232R  
RxD  
AVDD  
IOVDD  
GND  
AIN5/IEXC  
RESET  
SD  
SHIELD  
10Ω  
RESET  
0.1µF  
BEAD  
100  
PtRTD  
P2.2/BM  
AIN0  
AIN1  
0.01µF  
10Ω  
0.01µF  
ADuCM360  
FERRITE BEADS:  
1kΩ @ 100MHz  
TAIYO YUDEN  
BK2125HS102-T  
V
V
+
REF  
5.6k  
0.1%  
R
REF  
REF  
AIN2  
AIN3  
THERMOCOUPLE  
JUNCTION  
J1  
AIN7/VBIAS  
AGND  
TxD  
RxD  
Figure 1. ADuCM360/ADuCM361 as a Temperature Monitor Controller with a Thermocouple Interface (Simplified Schematic, All Connections Not Shown)  
Rev. 0  
Circuits from the Lab™ circuits from Analog Devices have been designed and built by Analog Devices  
engineers. Standard engineering practices have been employed in the design and construction of  
each circuit, andtheir function andperformance have been tested and verifiedin a lab environment at  
room temperature. However, you are solely responsible for testing the circuit and determining its  
suitability and applicability for your use and application. Accordingly, in noevent shall Analog Devices  
be liable for direct, indirect, special, incidental, consequential or punitive damages due to any cause  
whatsoever connectedtothe use ofanyCircuitsfromtheLabcircuits. (Continuedon last page)  
One Technology Way, P.O. Box 9106, Norwood, MA 02062-9106, U.S.A.  
Tel: 781.329.4700  
Fax: 781.461.3113  
www.analog.com  
©2012 Analog Devices, Inc. All rights reserved.  
 
CN-0221  
Circuit Note  
Note that the reference resistor, RREF, should be a precision  
5.6 kΩ ( 0.1%).  
CIRCUIT DESCRIPTION  
The following features of the ADuCM360/ADuCM361 are used  
in this application:  
The USB interface to the ADuCM360/ADuCM361 is implemented  
with an FT232R UART to USB transceiver, which converts USB  
signals directly to the UART.  
A 24-bit Σ-Δ ADC with a PGA set for a gain of 32 in the  
software for the thermocouple and RTD. The ADC1 was  
switched continuously between sampling the thermocouple  
and the RTD voltages.  
In addition to the decoupling shown Figure 1, the USB cable itself  
must have a ferrite bead for added EMI/RFI protection. The ferrite  
beads used in the circuit were Taiyo Yuden, #BK2125HS102-T,  
which have an impedance of 1000 Ω at 100 MHz.  
Programmable excitation current sources for forcing a  
controlled current through the RTD. The dual current  
sources are configurable in from 0 µA to 2 mA. For this  
example, a 200 µA setting was used to minimize the error  
introduced by the RTD self-heating.  
Construct the circuit on a multilayer printed circuit board (PCB)  
with a large area ground plane. Use proper layout, grounding,  
and decoupling techniques to achieve optimum performance (see  
Tutorial MT-031, Grounding Data Converters and Solving the  
Mystery of "AGND" and "DGND," Tutorial MT-101, Decoupling  
Techniques, and the ADuCM360TCZ Evaluation Board layout).  
An internal 1.2 V reference for the ADC in the ADuCM360/  
ADuCM361. It measures the thermocouple voltage; the  
internal voltage reference was used due to its precision.  
An external voltage reference for the ADC in the  
ADuCM360/ADuCM361. It measures the RTD resistance;  
a ratiometric setup was used where an external reference  
resistor (RREF) was connected across the external VREF+  
and VREF− pins.  
The PCB used for evaluating this circuit is shown in Figure 2.  
A bias voltage generator (VBIAS). The VBIAS function was  
used to set the thermocouple common-mode voltage to  
AVDD/2.  
The ARM Cortex-M3 core. The powerful 32-bit ARM core  
with integrated 126 kB flash and 8 kB SRAM memory runs  
the user code that configures and controls the ADC, processes  
the ADC conversions from the RTD, and controls the  
communications over the UART/USB interface.  
The UART was used as the communication interface to the  
host PC.  
Two external switches are used to force the part into its  
flash boot mode. By holding SD low and toggling the RESET  
button, the ADuCM360/ADuCM361 enters boot mode  
instead of normal user mode. In boot mode, the internal  
flash can be reprogrammed through the UART interface.  
Both the thermocouple and the RTD generate very small signals;  
therefore, a PGA is required to amplify those signals.  
Figure 2. EVAL-ADuCM360TCZ Board Used for this Circuit  
The thermocouple used in this application is a Type T (copper-  
constantan) that has a temperature range of −200°C to +350°C.  
Its sensitivity is approximately 40 µV/°C, which means that the  
ADC in bipolar mode, with a PGA gain of 32, can cover the  
entire temperature range of the thermocouple.  
The RTD was used for cold junction compensation. The  
particular one used in this circuit was a platinum 100 Ω RTD,  
Enercorp PCS 1.1503.1. It is available in a 0805, surface-mount  
package. This RTD has a temperature variation of 0.385 Ω/°C.  
Rev. 0 | Page 2 of 5  
 
Circuit Note  
CN-0221  
20  
0
Code Description  
The source code used to test the circuit can be downloaded as a zip  
file from the ADuCM360 product page.  
The UART is configured for a baud rate of 9600, 8 data bits, no  
parity, and no flow control. If the circuit is connected directly to  
a PC, a communication port viewing application, such as a  
HyperTerminal, can be used to view the results sent by the  
program to the UART, as shown in Figure 3.  
–20  
–40  
–60  
–80  
–100  
–210 –140  
–70  
0
70  
140  
210  
280  
350  
TEMPERATURE (°C)  
Figure 4. Error When Using Simple Linear Approximation  
Initially, this was done using a simple linear assumption that the  
voltage on the thermocouple was 40 µV/°C. It can be seen from  
Figure 4 that this gives an acceptable error only for a small range,  
around 0°C. A better way of calculating the thermocouple  
temperatures is to use a six-order polynomial for the positive  
temperatures and a seventh-order polynomial for the negative  
temperatures. This requires mathematical operations that add  
to computational time and code size. A suitable compromise is to  
calculate the respective temperatures for a fixed number of  
voltages. These temperatures are stored in an array, and values in  
between are calculated using a linear interpolation between the  
adjacent points. It can be seen from Figure 5 that the error is  
drastically reduced using this method. Figure 5 gives the algorithm  
error using ideal thermocouple voltages.  
0.30  
Figure 3. Output of HyperTerminal Communication Port Viewing Application  
0.25  
0.20  
0.15  
0.10  
0.05  
0
To get a temperature reading, measure the temperature of the  
thermocouple and the RTD. The RTD temperature is converted  
to its equivalent thermocouple voltage via a look-up table (see the  
ISE, Inc., ITS-90 Table for Type T Thermocouple). These two  
voltages are added together to give the absolute value at the  
thermocouple.  
First, the voltage measured between the two wires of the  
thermocouple (V1). The RTD voltage is measured, converted to  
a temperature via a look-up table, and then, this temperature is  
converted to its equivalent thermocouple voltage (V2). V1 and  
V2 are then added to give the overall thermocouple voltage, and  
this is then converted to the final temperature measurement.  
–0.05  
–210 –140  
–70  
0
70  
140  
210  
280  
350  
TEMPERATURE (°C)  
Figure 5. Error When Using Piecewise Linear Approximation Using  
52 Calibration Points and Ideal Measurements  
Rev. 0 | Page 3 of 5  
 
 
 
CN-0221  
Circuit Note  
Figure 6 shows the error obtained when using ADC1 on the  
ADuCM360 to measure 52 thermocouple voltages over the full  
thermocouple operating range. The overall worst-case error  
is <1°C.  
CIRCUIT EVALUATION AND TEST  
To test and evaluate the circuit, the thermocouple measurements  
and the RTD measurements were evaluated separately.  
Thermocouple Measurement Test  
0.5  
The basic test setup is shown in Figure 7. The thermocouple is  
connected to J5, and Jumper J1 must be installed to allow the  
AIN7/VBIAS pin to set the thermocouple common-mode  
voltage. The circuit board receives its power from the USB  
connection to the PC.  
0.4  
0.3  
0.2  
0.1  
0
Two methods were used to evaluate the performance of the  
circuit. Initially, the circuit was tested with the thermocouple  
attached to the board and it was used to measure the temperature  
of an ice bucket. Then, it was used to measure the temperature  
of boiling water.  
–0.1  
–0.2  
–0.3  
–0.4  
–0.5  
A Wavetek 4808 Multifunction Calibrator was used to fully  
evaluate the error, as shown in Figure 4 and Figure 6. In this  
mode, the thermocouple was replaced with the calibrator as the  
voltage source, as shown in Figure 7. To evaluate the entire range  
of a Type T thermocouple, the calibrator was used to set the  
equivalent thermocouple voltage at 52 points between −200°C  
to +350°C for the negative and positive ranges of the T-type  
thermocouple (see the ISE, Inc., ITS-90 Table for Type T  
Thermocouple).  
–210  
–140  
–70  
0
70  
140  
210  
280  
350  
TEMPERATURE (°C)  
Figure 6. Error When Using Piecewise Linear Approximation Using  
52 Calibration Points Measured by ADuCM360/ADuCM361  
The RTD temperature is calculated using lookup tables and is  
implemented for the RTD the same way as for the thermocouple.  
Note that the RTD has a different polynomial describing its  
temperatures as a function of resistance.  
For details on linearization and maximizing the performance of  
the RTD, refer to Application Note AN-0970, RTD Interfacing  
and Linearization Using an ADuC706x Microcontroller.  
To evaluate the accuracy of the lookup algorithm, 551 voltage  
readings, equivalent to temperatures in the range of −200°C to  
+350°C spaced at +1°C, were passed onto the temperature  
calculation functions. Errors were calculated for the linear  
method and the piecewise linear approximation method as is  
shown in Figure 4 and Figure 5.  
COMMON VARIATIONS  
The ADP1720 regulator can be replaced with the ADP120, which  
has the same operating temperature range (−40°C to +125°C)  
and consumes less power (typically 35 µA vs. 70 µA) but has a  
lower maximum input voltage. Note that the ADuCM360/  
ADuCM361 can be programmed or debugged via a standard  
serial wire interface.  
EVAL-ADuCM360TCZ  
THERMOCOUPLE  
J5  
JUNCTION  
J1  
AIN7/VBIAS  
For a standard UART to RS-232 interface, the FT232R transceiver  
can be replaced with a device such as the ADM3202, which  
requires a 3 V power supply. For a wider temperature range, a  
different thermocouple can be used, such as a Type J. To minimize  
the cold junction compensation error, a thermistor can be placed in  
contact with the actual cold junction instead of on the PCB.  
SEE TEXT  
USB  
CABLE  
WAVETEK 4808  
MULTIFUNCTION  
CALIBRATOR  
PC  
Instead of using the RTD and external reference resistor for  
measuring the cold junction temperature, an external digital  
temperature sensor can be used. For example, the ADT7410 can  
connect to the ADuCM360/ADuCM361 via the I2C interface.  
Figure 7. Test Setup Used to Calibrate and Test the Circuit Over Full  
Thermocouple Output Voltage Range  
For more details on cold junction compensation, refer to Sensor  
Signal Conditioning, Analog Devices, Chapter 7, “Temperature  
Sensors.”  
If isolation between the USB connector and this circuit is required,  
the ADuM3160/ADuM4160 isolation devices must be added.  
Rev. 0 | Page 4 of 5  
 
 
Circuit Note  
CN-0221  
RTD Measurement Test  
LEARN MORE  
To evaluate the RTD circuit and linearization source code, the  
RTD on the board was replacement with an accurate, adjustable  
resistance source. The instrument used was the 1433-Z Decade  
Resistor. The RTD values are from 90 Ω to 140 Ω, which represents  
an RTD temperature range of −25°C to +114°C.  
CN0221 Design Support Package:  
http://www.analog.com/CN0221-DesignSupport  
ADIsimPower Design Tool.  
Kester, Walt. 1999. Sensor Signal Conditioning. Analog Devices.  
Chapter 7, "Temperature Sensors."  
The test setup circuit is shown in Figure 8, and the error results  
for the RTD tests are shown in Figure 9.  
Kester, Walt. 1999. Sensor Signal Conditioning. Analog Devices.  
Chapter 8, "ADCs for Signal Conditioning."  
AVDD  
IOVDD  
Looney, Mike. RTD Interfacing and Linearization Using an  
ADuC706x Microcontroller. AN-0970 Application Note.  
Analog Devices.  
0.1µF  
0.1µF  
AVDD  
IOVDD  
MT-022 Tutorial, ADC Architectures III: Sigma-Delta ADC  
Basics. Analog Devices.  
1433-Z  
DECADE  
RESISTOR  
AIN5/IEXC  
10Ω  
AIN0  
0.01µF  
MT-023 Tutorial, ADC Architectures IV: Sigma-Delta ADC  
Advanced Concepts and Applications. Analog Devices.  
AIN1  
10Ω  
MT-031 Tutorial, Grounding Data Converters and Solving the  
Mystery of "AGND" and "DGND." Analog Devices.  
ADuCM360  
0.01µF  
V
V
+
REF  
R
REF  
MT-101 Tutorial, Decoupling Techniques. Analog Devices.  
5.6kΩ  
0.1%  
ITS-90 Table for Type T Thermocouple.  
REF  
Data Sheets and Evaluation Boards  
ADuCM360/ADuCM361 Data Sheet  
ADuCM360/ADuCM361 Evaluation Kit  
ADM3202 UART to RS232 Transceiver Data Sheet  
ADP120 Data Sheet  
Figure 8. Test Setup for Measuring RTD Error  
0
–0.01  
–0.02  
–0.03  
–0.04  
–0.05  
–0.06  
–0.07  
–0.08  
–0.09  
–0.10  
ADP1720 Data Sheet  
REVISION HISTORY  
5/12—Revision 0: Initial Version  
–25  
–5  
15  
35  
55  
75  
95  
115  
TEMPERATURE (°C)  
Figure 9. Error in °C of RTD Measurement Using Piecewise Linearization Code  
and ADC0 Measurements  
(Continued from first page) Circuits from the Lab circuits are intended only for use with Analog Devices products and are the intellectual property of Analog Devices or its licensors. While you  
may use the Circuits from the Lab circuits in the design of your product, no other license is granted by implication or otherwise under any patents or other intellectual property by  
application or use of the Circuits from the Lab circuits. Information furnished by Analog Devices is believed to be accurate and reliable. However, Circuits from the Lab circuits are supplied  
"as is" and without warranties of any kind, express, implied, or statutory including, but not limited to, any implied warranty of merchantability, noninfringement or fitness for a particular  
purpose and no responsibility is assumed by Analog Devices for their use, nor for any infringements of patents or other rights of third parties that may result from their use. Analog Devices  
reserves the right to change any Circuits from the Lab circuits at any time without notice but is under no obligation to do so.  
©2012 Analog Devices, Inc. All rights reserved. Trademarks and  
registered trademarks are the property of their respective owners.  
CN09985-0-5/12(0)  
Rev. 0 | Page 5 of 5  
 
 

相关型号:

CN-0227

High Performance, 16-Bit, 250 MSPS Wideband Receiver with Antialiasing Filter
ADI

CN-0232

Minimizing Spurious Outputs Using a Synthesizer with an Integrated VCO and an External PLL Circuit
ADI

CN-0243

High Dynamic Range RF Transmitter Signal Chain Using Single External Frequency Reference for DAC Sample Clock and IQ Modulator LO Generation
ADI

CN-0245

Wideband LO PLL Synthesizer with Simple Interface to Quadrature Demodulators
ADI

CN-0248

An IQ Demodulator-Based IF-to-Baseband Receiver with IF and Baseband Variable Gain and Programmable Baseband Filtering
ADI

CN-0255

Low Power, Low Noise and Distortion ail-to-Rail Output Amplifiers
ADI

CN-0259

High Performance 65 MHz Bandwidth Quad IF Receiver with Antialiasing Filter and 184.32 MSPS Sampling Rate
ADI

CN-0267

Complete 4 mA to 20 mA Loop Powered Field Instrument with HART Interface
ADI

CN-0268

Resonant Approach to Designing a Band-Pass Filter for Narrow-Band, High IF, 16-Bit, 250 MSPS Receiver Front End
ADI

CN-0274

Ultralow Power, 3-Axis, Motion Activated Switch
ADI

CN-0279

High IF Sampling Receiver Front End with Band-Pass Filter
ADI

CN-0283

Providing Fixed Power Gain at the Output of an IQ Modulator
ADI