This is an old revision of the document!
The ADuCM360_demo_cn0394 is a temperature measurement demo project which used thermocouple principle of measurement with the EVAL-ADICUP360 base board with additional EVAL-CN0394-ARDZ shield, created using the GNU ARM Eclipse Plug-ins in Eclipse environment.
The ADuCM360_demo_cn0394 project uses the EVAL-CN0394-ARDZ shield, which is a multichannel thermocouple temperature measurement system with cold junction compensation.
The EVAL-CN0394-ARDZ shield uses the internal ADC from ADuCM360 microcontroller which has 2-Channels available, 24-Bit with PGA and Reference. The first channel is used for RTDs measurements, while the second channel measures thermocouples changes.
The EVAL-CN0394-ARDZ board has 4 thermocouple ports: P1~P4. The board has 4 Pt1000 RTDs: R1~R4 close to each thermocouple socket for cold junction compensation. It supports all 8 types of thermocouple: T, J, K, E, S, R, N, B with full range temperature measurement. The RTD operates in the 2-wire mode and the excitation current is generated by the ADuCM360.
The ADuCM360_demo_cn0394 application reads the 4 RTD channels and the 4 thermocouple channels, processes them, makes all necessary calculations in order to output a linearized temperature for each available port. The UART interface (19200 baud rate, 1 start bit, 8-bits data length, no parity bits and 2 stop bits) is used to send data to a terminal window. The user has the possibility to enable/disable calibration on each channel separately. In the terminal window after initialization will appear information messages regarding this: if calibration is enable then the user will be informed when the calibration is completed, otherwise the user will be informed that the calibration is disabled (see USE_RTD_CALIBRATION and USE_TH_CALIBRATION parameters).
Before starting the measurement it is required to setup the thermocouple types for each port (check P1_TYPE - P4_TYPE). Based on those settings the output data will be calculated and displayed in the terminal window continuously considering a data refresh parameter (see DISPLAY_REFRESH). Also the warning messages will be displayed if the final linearized temperature for the selected thermocouple is out of the boundaries:
This project uses voltage to temperature solution, based on the cold junction temperature compensation and thermocouple measurements in order to provide a final linearized temperature. The linearization is dictated by thermocouple type and it uses standard formulas generated by the National Institute of Standards and Technology (NIST).
When implementing thermocouple measurements, the thermocouple measures the temperature at the thermocouple relative to the cold junction. The cold junction temperature must be added to give the overall temperature. Converting the thermocouple measured voltage to a temperature requires the data measured to be linearized. Linearization is carried out by using the cold junction temperature together with the voltage generated by the thermocouple.
For the cold junction temperature measurement is used PT1000 RTD method. Cold junction reading from each RTD channel is used to calculate RTD resistance:
The PT1000 RTD is ideally 1000Ω at 0°C. There are two separate equations that are used for linearization and depending on the calculated resistance it is use one or the other:
1. RTD resistance > 1000Ω
2. RTD resistance ≤ 1000Ω
For thermocouple temperature linearization are used standard NIST equations. The thermocouple type used dictates the formulas needed for the linearization. First the cold junction temperature needs to be converted to a cold junction voltage. This conversion is implemented using a standard formula. The formula is the same for all thermocouple types. However, the coefficient values used in the formula are dependent on the thermocouple type.
The final thermocouple voltage is calculated using thermocouple voltage read on the thermocouple channel and adding to this value the converted cold junction voltage:
Vtc - final voltage value for themocouple channel Vtc = Vtc_read + Vcj Vtc_read - voltage value measured on thermocouple channel Vcj - cold junction voltage calculated using first NIST formula
For the final linearized temperature value is used the second polynomial formula provided by NIST standard:
The following is a list of items needed in order to replicate this demo.
We recommend not opening the project directly, but rather import it into CCES and make a local copy in your workspace.
The source code and include files of the ADuCM360_demo_cn0394 can be found on Github:
CrossCore Embedded Studio Application Source Code:
For more information on importing, debugging, or other tools related questions, please see the tools user guide.
Following is the UART configuration.
Select COM Port Baud rate: 19200 Data: 8 bit Parity: none Start: 1 bit Stop: 2 bit Flow Control: none
The official tool we promote for use with the EVAL-ADICUP360 is CrossCore Embedded Studio. For more information on downloading the tools and a quick start guide on how to use the tool basics, please check out the Tools Overview page.
For more detailed instructions on importing this application/demo example into the CrossCore Embedded Studios tools, please view our How to import existing projects into your workspace section.
For more detailed instructions on importing this application/demo example into the CrossCore Embedded Studios tools, please view our How to configure the debug session section.
The ADuCM360_demo_cn0394 is a C project that uses ADuCM36x C/C++ Project structure.
This project contains: system initialization part - disabling watchdog, setting system clock, enabling clock for peripherals; ADC setup; UART read/write functions; calculation algorithm for cold junction and linearized thermocouple temperature.
In the src and include folders you will find the source and header files related to CN0394 software application. The Communication.c/h files contain UART specific data, meanwhile the CN0394.c/h files contain the calculation part, the ADC.c/h files contain ADC channels handling. The RTD.h and Thermocouple.h headers contains specific data for RTD channel and Thermocouple channel used in the temperature calculation algorithm.
The RTE folder contains device and system related files:
End of Document