sigma

CN0281

Using ADuC7060/ADuC7061 precision analog microcontroller to build a thermocouple temperature sensor with cold junction compensation based on automotive SENT interface

 
Overview

Circuit functions and advantages

This circuit shows how to use the ADuC7060 or ADuC7061 precision analog microcontroller in a precision thermocouple temperature monitoring application. The ADuC7060/ADuC7061 integrated dual-channel 24-bit sigma-delta analog-to-digital converter (ADC), dual-channel programmable current source, 14-bit Digital-to-analog converter (DAC), 1.2 V built-in voltage reference along with ARM7 core, 32 kB Flash, 4 kB SRAM and various digital peripherals such as UART, timers, serial peripheral interface (SPI) and I2C interface.

In this circuit, the ADuC7060/ADuC7061 are connected to a thermocouple and a 100Ω platinum resistance temperature detector (RTD). RTD is used for cold junction compensation. As an additional option, the ADT7311 digital temperature sensor can be used in place of the RTD to measure the cold junction temperature.

In the source code, the ADC sampling rate is selected as 4 Hz. The noise-free resolution of the ADuC7060/ADuC7061 is greater than 18 bits when the ADC input programmable gain amplifier (PGA) is configured with a gain of 32.

The single-sided nibble transfer (SENT) interface to the host is accomplished by using timers to control digital output pins. This digital output pin is then level converted to 5 V externally using an external NPN transistor. An EMC filter is provided in the SENT output circuit as recommended in section 6.3.1 of the SENT protocol (SAE J2716 standard). Data is measured from falling edge to falling edge, and the duration of each pulse is related to the number of system clock cycles. The system clock rate can be determined by measuring the SYNC pulses. The SYNC pulse is sent at the beginning of each packet. For more details, see the "SENT Interface" section.

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

 

Circuit description

Used in this application: The following features of the ADuC7060 / ADuC7061 :

  • 24-bit Σ-Δ main ADC with built-in PGA. The gain of the PGA is set to 32 in the software of this application. The main ADC continuously switches between thermocouple signal sampling and RTD voltage signal sampling.
  • If an RTD is used to measure the cold junction temperature, a programmable excitation current source drives a controlled current through the RTD. The dual-channel current source is configurable in 200µA steps from 0µA to 2µA. This example uses a 200µA setting to minimize errors caused by RTD self-heating effects.
  • If the ADT7311 is used to measure the cold junction temperature, the SPI interface will be used in master mode to connect the ADT7311 slave.
  • Built-in 1.2 V reference for the ADC in the ADuC7060/ADuC7061. The internal reference voltage source is highly accurate and suitable for measuring thermocouple voltages.
  • External voltage reference source for the ADC in the ADuC7060/ADuC7061. To measure RTD resistance, we use a ratiometric setup with an external reference resistor (RREF) connected to the external VREF+ and VREF− pins.
  • The AD8628  single-supply op amp is used to buffer RREF to the high-impedance reference voltage of the ADC.
  • The OP193 is an alternative model to replace the AD8628.
  • DAC 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 SPI interface.
  • Timer 1 and the digital output pin are used to generate the SENT output signal.
  • Optional PESDLIN protection diode for suppression of ESD, electrical fast transients (EFT) and surge transients (up to 23kV).
  • An EMC filter is provided at the SENT output as recommended in section 6.3.1 of the SAE J2716 standard (SENT protocol).
  • Two external switches are used to force the device into flash boot mode. By holding S1 low while 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 T-type (copperconstantan) 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 PGA gain setting can cover the entire temperature range of the thermocouple.

RTD is used for cold junction compensation. This circuit uses 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 RREF should be a precision 5.6 kΩ (±0.1%) resistor.


SENT interface

The SENT interface is a single-pin, unidirectional (sensor to host) time-modulated signal primarily used to interface distributed sensors with the host CPU in automotive systems.

The main requirements of SENT include the following:

  • There must be a signal swing of 0 V to 5 V with EMC filtering.
  • The clock used for the SENT signal must have an accuracy of ±20%.
  • The SENT output circuit must be stable enough to withstand short circuits to ground and short circuits to the supply voltage.

The associated source code uses the P0.4 digital pin of the ADuC7061 as the SENT output pin. The data packet format used is the single sensor data packet format, see Section A.4 of the SAE J2716 standard (SENT protocol) document for details. The source code (especially the SENT.h and Sent.c files) can be modified to support other packet formats. The overall temperature result is returned in /°C format via data nibble 1 through data nibble 3. To summarize, the output packet returned is

  • 56 clock cycles of sync pulse
  • Status pulse (7 cycles to 15 cycles)
  • Data nibble 1 (Bit 11 to Bit 8 of temperature result)
  • Data nibble 2 (Bit 7 to Bit 4 of the temperature result)
  • Data nibble 3 (Bit 3 to Bit 0 of temperature result)
  • Data nibble 4 (Bit 7 to Bit 4 of the counter)
  • Data nibble 5 (Bit 3 to Bit 0 of counter)
  • Data nibble 6 (opposite of nibble 1)

Figure 2 shows an example of a data packet.

Figure 2. Example SENT packet measured at P0.4 pin

 

The circuit must be built on a multilayer printed circuit board (PCB) with a large area ground plane. For optimal performance, proper layout, grounding, and decoupling techniques must be used (see Tutorial MT-031 "Grounding Data Converters and Solving the Mysteries of AGND and DGND" , Tutorial MT-101 "Decoupling Techniques" and ADuC7060/ADuC7061 evaluation board layout).


Code description

Timer 1 is used to control the SENT output pin P0.4. After the temperature result is calculated based on the ADC result of the thermocouple and the cold junction temperature, the SENT packet structure SENT_PACKET will be updated and timer 1 will be started. The domains of this structure will be output one by one on the P0.4 pin, as shown in Figure 2. The first level of the data packet is the synchronization sequence. The host determines the clock period based on this pulse and uses it to determine subsequent nibble values.

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. 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. Then, the RTD voltage is measured and converted to temperature via a lookup table. Next, this temperature is 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.

Finally, a piecewise linear scheme is used to calculate the final temperature value. The corresponding temperatures for a fixed number of voltages are stored in an array, and the values ​​between them are calculated using linear interpolation of adjacent points. Figure 3 shows the algorithm error when using ideal thermocouple voltages. Figure 4 shows the error obtained when measuring 52 thermocouple voltages over the entire thermocouple operating range using the ADC0 pin on the ADuC7060/ADuC7061. The worst-case total error is less than 1°C.

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

 

Figure 4. Error calculated using piecewise linear approximation using 52 calibration points measured at the ADC0 pin of the ADuC7060/ADuC7061

 

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.

The source code in the design support package was generated using KEILμVision V3.90.

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

参考设计图片
×

Blockdiagram

 
Related Devices
Devices Class introduce Datasheet
AD8628 semiconductor;Analog mixed-signal IC QUAD OP-AMP, 10 uV OFFSET-MAX, 2.5 MHz BAND WIDTH, PDSO14 Download
ADUC7060 semiconductor;Discrete semiconductor low power, precision analog microcontroller, dual sigma-delta adcs, flash/EE, arm7tdmi Download
ADUC7061 Download
ADT7311 Digital temperature sensor Download
ADP7102 semiconductor;Power management 1.5 V FIXED POSITIVE LDO REGULATOR, PDSO8 Download
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2024-11-20 12:53:26

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

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号