This circuit uses the ADuCM360 precision analog microcontroller in a precision thermocouple temperature monitoring application and controls the output current from 4 mA to 20 mA accordingly. ADuCM360 integrates dual-channel 24-bit Σ-Δ analog-to-digital converter (ADC), dual-channel programmable current source, 12-bit analog-to-analog converter (DAC), 1.2 V built-in reference voltage source and ARM Cortex-M3 core, 126 KB Flash memory, 8 KB SRAM and various digital peripherals such as UART, timers, SPI and I 2 C interface.
In this circuit, the ADuCM360 is connected to a T-type thermocouple and a 100 platinum resistance temperature detector (RTD). RTD is used for cold junction compensation. A low-power Cortex-M3 core converts ADC readings into actual temperature values. The supported T-type temperature range is −200°C to +350°C, and the corresponding output current range for this temperature range is 4 mA to 20 mA.
The following features of the ADuCM360 are used in this application :
Thermocouples and RTDs produce very small signals, so a programmable gain amplifier (PGA) is required to amplify these signals.
The thermocouple used in this application is a T-type (copper-constantan) with 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 The PGA gain setting can cover the entire temperature range of the thermocouple.
RTD is used for 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 must be a precision 5.6 kΩ (±0.1%) resistor.
This circuit must be built on a multilayer circuit board (PCB) with a large 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 MT-101 - " Decoupling Techniques" and ADuCM360TCZ evaluation board layout).
The PCB used to evaluate this circuit is shown in Figure 2.
ADI's J-Link OB emulator (USB-SWD/UART-EMUZ) supports:
For downloading and debugging, LK1, LK2, LK4 and LK6 must be inserted. LK3 and LK5 are used for communication via UART. The software required for J-Link OB is included in the software installation.
Please note that the J-Link OB emulator replaces the J-Link Lite and related interface boards previously shipped with the ADuCM360 development system.
For more information, see UG-457 - ADuCM360 Development System Getting Started Guide .
The source code link used to test the circuit is in the CN0300 Design Support package: http://www.analog.com/CN0300-DesignSupport . The source code uses the function library provided with the sample code. Figure 6 shows the list of source files used in the project when viewed with the Keil μVision4 tool.
Calibration part of the code
The compiler #dene values (calibrateADC1 and calibrateDAC) can be adjusted to enable or disable the ADC and DAC calibration procedures.
To calibrate the ADC or DAC, the interface board (USB-SWD/UART) must be connected to J1 and the USB port on the PC. You can use a COM port viewing program such as HyperTerminal to view the calibration menu and perform the calibration procedure step by step.
When calibrating the ADC, the source code prompts the user to connect the zero-scale and full-scale voltages to AIN2 and AIN3. Note that AIN2 is the positive input terminal. After completing the calibration procedure, the new calibration values of the ADC1INTGN and ADC1OF registers are stored in the internal flash memory.
When calibrating the DAC, the VLOOP+ output should be connected through an accurate ammeter. The first part of the DAC calibration procedure calibrates the DAC to set the 4 mA output, and the second part calibrates the DAC to set the 20 mA output. The DAC code to set the 4 mA and 20 mA outputs is stored in flash memory. The voltage measured at AIN9 for the final 4 mA and 20 mA settings is also recorded and stored to flash memory. Since the voltage at AIN9 is linearly related to the current through RLOOP, these values are used to calculate the DAC adjustment factor. This closed-loop approach means that all linearity errors on the DAC and transistor-based circuitry can be trimmed using the on-chip 24-bit Σ-Δ ADC.
UA RT is configured with a baud rate of 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 "Hyper Terminal" to view the results sent by the program to the UA RT, as shown in Figure 7. .
To enter the characters required for the calibration procedure, type the required characters into the viewing terminal and the ADuCM360 UA RT port will receive the characters.
Temperature measurement part of the code
To obtain a temperature reading, the temperature of the thermocouple and RTD should be measured. The RTD temperature is converted to its equivalent thermocouple voltage using a lookup table (see ISE, Inc.'s ITS-90 table for Type T thermocouples). Adding these two voltages gives you the absolute value of the thermocouple voltage.
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.
For thermocouples, the temperature corresponding to a fixed number of voltages is stored in an array. Temperature values in between are calculated using linear interpolation of adjacent points.
Figure 8 shows the error obtained when measuring 52 thermocouple voltages over the entire thermocouple operating range using ADC1 on the ADuCM360. The worst-case total error is less than 1°C.
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, refer to the application note AN-0970, "RTD Interfacing and Linearization Using ADuC706x Microcontrollers . "
Temperature to current output portion of the code
After measuring the final temperature, set the DAC output voltage to the appropriate value to produce the desired current on RLOOP. The input temperature range should be −200°C to +350°C. The code output current is 4 mA and 20 mA for the −200°C and +350°C settings, respectively. The code implements a closed-loop scheme, as shown in Figure 7, where the feedback voltage on AIN9 is measured through ADC0, and this value is then used to compensate for the DAC output setting. The FineTuneDAC(void) function performs this correction.
For best results, the DAC should be calibrated before beginning performance testing of this circuit.
For debugging purposes, the following string is sent to the UART during normal operation (see Figure 10).
Blockdiagram
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet