Thermal/Linear Intelligent Sensor PICtail? Plus Daughter Board
The demonstration program consists of the following basic software elements:
3.1.1
ADC Driver
The ADC driver reads the incoming signals from the thermocouple and the temperature
sensor IC (after signal conditioning by the differential amplifier and anti-aliasing filter)
on the 12-bit ADC channels AN9 and AN8, respectively. The source code file,
adcDrv1.c , contains the ADC initialization function initAdc1() as well as the ADC
Interrupt Service Routine (ISR).
The thermocouple signal samples are stored in a 128-sample array named TC_Buff
and the TC1047A signal samples are stored in a 128-sample array named CJC_Buff .
3.1.2
Averaging and Cold Junction Compensation Function
The thermocouple samples stored in TC_Buff are added with the running sum being
accumulated in accumulator A. Similarly, accumulator B is used to add all of the
TC1047A samples stored in CJC_Buff . This accumulation is performed very efficiently
using a DO loop instruction.
Note that the voltage generated by the thermocouple does not compensate for the
temperature of the cold junction (which refers to the ends of the thermocouple that are
plugged into the connector on the board). The temperature of the cold junction is
typically very close to the temperature of the board surface; therefore, the TC1047A
temperature sensor IC samples are used as the cold junction reference. Since
accumulators A and B now contain the running sum of the thermocouple and TC1047A
respectively, the two accumulators are added to each other using the 32-bit
accumulator-to-accumulator ADD instruction.
Finally, the SAC instruction is utilized to store the result back into the variable
AverageVoltage . Moreover, as part of the accumulator write-back, the data is shifted
right by 7 bits, resulting in a division by 128. Therefore, the variable AverageVoltage
now contains the average cold-junction-compensated sensor voltage output.
3.1.3
Linearization
For many temperature sensors, including thermocouples, the sensor output does not
have an exact linear relationship to the physical quantity (temperature, in this case)
being measured. Therefore, the output voltage must be linearized. A common method
of linearizing sensor output voltages is to compute a standard polynomial. This
demonstration utilizes a standardized polynomial for K-type thermocouples, as shown
EQUATION 3-1:
K-TYPE THERMOCOUPLE POLYNOMIAL
V O = ( 25.132785 ) ? V IN – ( 60.883423 ) ? V IN + ...
2
Since the voltages and higher-order coefficients are small in magnitude in this
application, the demonstration only computes a 2nd-order polynomial and neglects the
higher-order coefficients. This operation is performed by the Linearize() function in
the Linearize.s source file. Dual-operand DSP instructions such as MAC and MPY
have been utilized to compute this polynomial in only seven instruction cycles, and the
linearized result is stored in the variable LinearOut .
Finally, the main application converts the linearized voltage into a floating point variable
named Temperature , which provides the absolute temperature of the thermocouple
junction in degrees Celsius.
DS70574A-page 18
? 2008 Microchip Technology Inc.
相关PDF资料
AC323027 BOARD EVAL PIC32 CAP TOUCH CTMU
ACCRFBOUTON29JF BLACK COMMAND KNOB
ACJ2212 RELAY AUTOMOTIVE SPDT 20A 12V
ACNH3212 RELAY AUTOMOTIVE SPST 30A 12V
ACNM5112SAX RELAY AUTO SPDT 30A 12V
ACT212 RELAY AUTOMOTIVE SPDT 20A 12V
ACV33224 RELAY AUTOMOTIVE SPST 20A 24V
ACW212 RELAY AUTOMOTIVE DPST 45A 12V
相关代理商/技术参数
AC164136 功能描述:开发板和工具包 - PIC / DSPIC ZeroG 802.11 Dev Kt for Explorer 16 RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压:
AC164136-2 功能描述:开发板和工具包 - 无线 ZeroG Wi-Fi PICtail Daughter Board RoHS:否 制造商:Arduino 产品:Evaluation Boards 工具用于评估:AT32UC3L 核心:AVR32 频率: 接口类型:USB 工作电源电压:5 V
AC164136-4 功能描述:射频开发工具 MRF24WB0MA Wi-Fi PICtail+ Daughter Bd RoHS:否 制造商:Taiyo Yuden 产品:Wireless Modules 类型:Wireless Audio 工具用于评估:WYSAAVDX7 频率: 工作电源电压:3.4 V to 5.5 V
AC164137-1 功能描述:子卡和OEM板 434MHz Daughter Board RoHS:否 制造商:BeagleBoard by CircuitCo 产品:BeagleBone LCD4 Boards 用于:BeagleBone - BB-Bone - Open Source Development Kit
AC164137-1 制造商:Microchip Technology Inc 功能描述:MRF49XA PICtail/PICtail Plus Daughter Bo
AC164137-2 功能描述:子卡和OEM板 868/915MHz Daughter Board RoHS:否 制造商:BeagleBoard by CircuitCo 产品:BeagleBone LCD4 Boards 用于:BeagleBone - BB-Bone - Open Source Development Kit
AC164137-2 制造商:Microchip Technology Inc 功能描述:MRF49XA PICtail/PICtail Plus Daughter Bo
AC164138-1 功能描述:子卡和OEM板 MRF89XAM8A PICtail PICtail + Daught Brd RoHS:否 制造商:BeagleBoard by CircuitCo 产品:BeagleBone LCD4 Boards 用于:BeagleBone - BB-Bone - Open Source Development Kit