Application Note AN2148 Measuring Temperature Using a Thermocouple By: M. Ganesh Raaja Associated Project: Yes Associated Part Family:CY8C26xxx PSoC Designer Version: 4.00 Associated Application Notes: AN2099, AN2038, AN2101 Summary This Application Note explains how to measure temperature using a J Type Thermocouple with a PSoC. Following the principle, any thermocouple input can be measured. Introduction Thermocouples are widely used in industrial applications for the following reasons: They are robust They measure over a wide range (-270° to 3000° C) They are available in a wide variety of packages and probes Thermocouple Principle A thermocouple consists of two pieces of dissimilar metals in the form of wire fused at one end. This is called the hot junction. The other end is connected to a measuring circuit. This is called the cold junction. The difference in temperature between the hot and cold junctions causes an EMF to develop. This EMF can be measured by the measuring circuit. Because the thermocouple is a reference device, the absolute temperature (hot junction) can be measured only if the reference (cold junction) is known. The reference temperature is called the Cold Junction Temperature. Adding the thermocouple equivalent EMF of this temperature to the one measured from the thermocouple is called Cold Junction Compensation. There are two methods that can be used to acquire an accurate temperature. Using a multiorder polynomial equation (Equation 1), the temperature can be calculated accurately as close as +0.02°C. T = (a0 + a1V + a2V2 + ... + anVn) Equation 1 The polynomial coefficients for different types of thermocouples can be found in Table-3 in the Appendix. This method is quite complicated and involves high precision mathematics, which heavily taxes the resources of an 8-bit device. The second method is the use of lookup tables. Here, we divide the whole measurement range of the thermocouple into many regions and identify the coefficient for each region. The higher the number of regions, the better the accuracy. We will use this method in this Application Note. Steps Involved The whole process can be broken into the following steps. 1. There are different types of thermocouples such as J, K, T, R, and S just to name a few. Each type has its own temperature coefficient and range of measurement. 2. 3. The output of the thermocouple is not linear throughout the measurement range. 4. 5. 3/16/2004 Revision A Find Cold Junction Temperature and thermocouple voltage corresponding to that temperature. This is the Cold Junction Compensation voltage. Measure thermocouple voltage. Add the Cold Junction Compensation voltage to the thermocouple voltage. Find coefficient. Find temperature. -1- AN2148 1. Find Cold Junction Compensation: Many circuits can be used to measure the reference temperature; Thermistor, RTD, and Diode come to mind. In this circuit, the LM335 Precision Temperature Sensor is used to sense the Cold Junction Temperature. This IC has a linear output of 10 mV/°C and can give excellent accuracy without any calibration. The output of this IC is 0V at absolute zero (0°K). At 0°C, the output voltage is 2.7315V (273.15°K). The LM335 output is connected to P2[1], so that it can be directly configured as an ADC input without using any Continuous Time analog PSoC blocks. A diode can also be used to sense room temperature. Any common diode like 1N4148 can be used. A diode exhibits a temperature coefficient of –2.2 mV/°C. A single resistance can be used to set the diode current. But the absolute voltage will have some tolerance and will have to be calibrated. Correlated Double Sampling (CDS) is performed while measuring Cold Junction Temperature. CDS is explained in step #2. First, the ADC input is shorted to AGND and the output measured. The LM335 output is connected to the ADC input and the ADC output is measured. The zero value is subtracted from this value to get an offsetcorrected reading. Now, considering a 12-bit ADC and full-scale voltage of 1.3V (REFHI), the following equation gives the LM335 voltage. V = (1.3V / 2048) * ADC Count Equation 2 The LM335 output is at 10 mV/°C which modifies the equation to: T = (130 / 2048) * ADC Count Equation 3 This yields temperature directly (in °K). As the output of LM335 at 0°C is 2.731V with reference to VSS, and as ADC measurement is with reference to AGND which is 2.6V, subtracting 13 from the calculated value will give Cold Junction Temperature directly in °C. From this temperature, find the corresponding thermocouple voltage from table reference (coldJunction[]) in the Appendix. When we have to measure such small voltages, the problems of offset error and signal-to-noise ratio come into consideration. To overcome these problems we will use CDS and Infinite Impulse Response (IIR) filter techniques. Correlated Double Sampling (CDS): This method reduces offset errors present in the signal-conditioning amplifiers and the ADC. The following steps are involved. 1. 2. 3. Short the inputs. Measure ADC output. Store as Zero. Connect inputs to thermocouple. Measure output. Store as Signal. Subtract Zero from Signal. Infinite Impulse Response (IIR) Filter: This is a low-pass filter implemented in software. This averages and effectively reduces the noise from the input signal. In this application, the IIR filter constant has been set to 4. This results in poor response time but very good noise rejection. Most industrial applications that measure high temperatures do not need fast response time. For faster response, the filter constant can be reduced. For details on modifying the filter constant and other IIR techniques, see Application Note AN2099 “Single-Pole IIR Filters. To Infinity And Beyond!” The ADC output after CDS is passed through the low-pass IIR filter. From the output of this filter, the thermocouple voltage can be calculated by the following formula: volts = ADC Counts * Range / fullScale Equation 4 For calibration purposes, the range is set to 50 mV and fullScale is the ADC Counts when input is 50 mV. For better resolution, ADC Counts is multiplied by 5,000 and divided by fullScale. The resolution of the result is 10 uV/count. 3. Cold Junction Compensation: 2. Measure Thermocouple Voltage: The thermocouple input is fed to an INSAMP User Module with a gain of 16. The output of J Type Thermocouple is 69.55 mV at 1200°C. 3/16/2004 The output of the INSAMP is roughly 1.11V at this temperature. This is fed to an ADCINC12 User Module. Revision A Add the Cold Junction Compensation voltage calculated in step #2 to the measured thermocouple voltage to get a cold junction compensated output. -2- AN2148 4. Find Coefficient: Let us consider a J Type Thermocouple. The EMF table of J Type Thermocouple can be found in Tables-1 and 2 in the Appendix. First, we have to build a lookup table from the EMF table of the J Type Thermocouple. Let us divide the whole table into 0.64 mV divisions and identify the coefficient for each division. Compiling them will give us the lookup table. As resolution of the measured voltage is 10 uV, the coefficient is also calculated for °C/10 uV. Multiply this fractional number by 10,000 to convert it to an integer. As the measured voltage is in tens of microvolts, the thermocouple voltage is divided by 64 to get the lookup table offset. Sixty-four has been selected because it is easier to perform the division by rotating the voltage 6 times to the right. The procedure of building the lookup table can be found in the Excel .xls file attached with the project. 5. Find Temperature: Once the thermocouple voltage and coefficient are known, temperature can be calculated by multiplying the thermocouple voltage by the sensitivity coefficient for that type of thermocouple. Some examples of thermocouple sensitivies are given in Table 1. Table 1. Thermocouple Coefficients Type Sensitivity Coefficient K 41 uV/°C E 68 uV/°C R 10 uV/°C N 10 uV/°C The software consists of three main components. 1. 2. 3. ReadAdc() ProcessAdc() CheckCalibration() ReadAdc(): This routine reads from both the thermocouple and LM335, performs CDS and IIR filtering and updates vTc and vColdJunction. ProcessAdc(): This routine calculates Cold Junction Temperature from vColdJunction, performs the Cold Junction Compensation on vTc and calculates the temperature after finding the coefficient. It then updates the LCD display with the measured temperature and room temperature. If the voltage is positive, the coefficient is taken from the positive lookup table. If the voltage is negative, the coefficient is taken from the negative lookup table. The total time for calculation of temperature and updating the display is 2.7 mS at a CPU speed of 24 MHz. CheckCalibration(): This routine performs calibration. A push-button switch connected to P2[3] is used for Full Scale Calibration. Another push button connected to P2[5] is used for Zero Calibration. When the Zero Calibration switch is pressed, the value of vTc is stored as zero. When the Full-Scale Calibration switch is pressed, the value of vTc is stored as fullScale. Calibration: In PSoC Designer, some assembly routines have been written for 16-bit multiplication and 24-bit division. These routines are called from C. This is to minimize the time taken in math operations. For details on 16-bit multiplication, refer to Application Note AN2038, and for details on 24bit division, refer to Application Note AN2101. To support signed division, first the dividend is tested to determine if it is negative. If it is negative, the sign is saved, the value is made positive and division is performed. Then the sign is restored by 2's complementing the result. 3/16/2004 Software Revision A Though CDS takes care of the zero offset error, for optimum accuracy, a software zero calibration has been added. This takes care of any residual offset error. Apply 0 mV at the thermocouple input Wait until the display stabilizes Press the Zero Calibration push button Apply 50 mV at the thermocouple input Wait until the display stabilizes Press the Full-Scale Calibration push button The instrument is now calibrated and accurate to +2°C. For test results see Table-4 in the Appendix. -3- AN2148 The zero calibration procedure can be omitted if some inaccuracy can be tolerated. In this case, the error can go up to +4°C. About the Author Name: Contact: M. Ganesh Raaja [email protected] Conclusion Using the described method, temperature can be measured for any thermocouple input. As there are minimal external components, a low-cost temperature controller can be built using a PSoC, and adding some keys, a 4-digit LED display, and one or two relay outputs. The controller can be designed to measure various thermocouples like J, K, R, T, etc. A feature can be implemented to select the thermocouple and program the set point using the front panel keys. TC Input AGND VCC 1 27 2 26 3 25 4 24 2.2K 2 9 19 + LM335 - ADJ P07 P06 P05 P04 P03 P02 P01 P00 P17 P16 P15 P14 P13 P12 P11 P10 SMP RESET P27 P26 P25 P24 P23 P22 P21 P20 10 18 11 17 12 16 13 15 LCD_RW LCD_RS LCD_RE D7 D6 D5 D4 1.5K VCC LCD_RS LCD_RW LCD_E 5 23 6 22 7 21 8 20 D4 D5 D6 D7 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 VCC 1 3 LCD CONNECTOR CY8C26443 1 2 CAL ZERO CAL-FS VCC Figure 1. Schematic Diagram 3/16/2004 Revision A -4- AN2148 APPENDIX Table 1. J Type Thermocouple EMF Table for +ve Temperatures (in mV) °C 0 1 2 3 4 5 6 7 8 9 0 0.000 0.050 0.101 0.151 0.202 0.253 0.303 0.354 0.405 0.456 10 0.507 0.558 0.609 0.660 0.711 0.762 0.814 0.865 0.916 0.968 20 1.019 1.071 1.122 1.174 1.226 1.277 1.329 1.381 1.433 1.485 30 1.537 1.589 1.641 1.693 1.745 1.797 1.849 1.902 1.954 2.006 40 2.059 2.111 2.164 2.216 2.269 2.322 2.374 2.427 2.480 2.532 50 2.585 2.638 2.691 2.744 2.797 2.850 2.903 2.956 3.009 3.062 60 3.116 3.169 3.222 3.275 3.329 3.382 3.436 3.489 3.543 3.596 70 3.650 3.703 3.757 3.810 3.864 3.918 3.971 4.025 4.079 4.133 80 4.187 4.240 4.294 4.348 4.402 4.456 4.510 4.564 4.618 4.672 90 4.726 4.781 4.835 4.889 4.943 4.997 5.052 5.106 5.160 5.215 100 5.269 5.323 5.378 5.432 5.487 5.541 5.595 5.650 5.705 5.759 110 5.814 5.868 5.923 5.977 6.032 6.087 6.141 6.196 6.251 6.306 120 6.360 6.415 6.470 6.525 6.579 6.634 6.689 6.744 6.799 6.854 130 6.909 6.964 7.019 7.074 7.129 7.184 7.239 7.294 7.349 7.404 140 7.459 7.514 7.569 7.624 7.679 7.734 7.789 7.844 7.900 7.955 150 8.010 8.065 8.120 8.175 8.231 8.286 8.341 8.396 8.452 8.507 160 8.562 8.618 8.673 8.728 8.783 8.839 8.894 8.949 9.005 9.060 170 9.115 9.171 9.226 9.282 9.337 9.392 9.448 9.503 9.559 9.614 180 9.669 9.725 9.780 9.836 9.891 9.947 10.002 10.057 10.113 10.168 190 10.224 10.279 10.335 10.390 10.446 10.501 10.557 10.612 10.668 10.723 200 10.779 10.834 10.890 10.945 11.001 11.056 11.112 11.167 11.223 11.278 210 11.334 11.389 11.445 11.501 11.556 11.612 11.667 11.723 11.778 11.834 220 11.889 11.945 12.000 12.056 12.111 12.167 12.222 12.278 12.334 12.389 230 12.445 12.500 12.556 12.611 12.667 12.722 12.778 12.833 12.889 12.944 240 13.000 13.056 13.111 13.167 13.222 13.278 13.333 13.389 13.444 13.500 250 13.555 13.611 13.666 13.722 13.777 13.833 13.888 13.944 13.999 14.055 260 14.110 14.166 14.221 14.277 14.332 14.388 14.443 14.499 14.554 14.609 270 14.665 14.720 14.776 14.831 14.887 14.942 14.998 15.053 15.109 15.164 280 15.219 15.275 15.330 15.386 15.441 15.496 15.552 15.607 15.663 15.718 290 15.773 15.829 15.884 15.940 15.995 16.050 16.106 16.161 16.216 16.272 300 16.327 16.383 16.438 16.493 16.549 16.604 16.659 16.715 16.770 16.825 310 16.881 16.936 16.991 17.046 17.102 17.157 17.212 17.268 17.323 17.378 320 17.434 17.489 17.544 17.599 17.655 17.710 17.765 17.820 17.876 17.931 330 17.986 18.041 18.097 18.152 18.207 18.262 18.318 18.373 18.428 18.483 340 18.538 18.594 18.649 18.704 18.759 18.814 18.870 18.925 18.980 19.035 350 19.09 19.146 19.201 19.256 19.311 19.366 19.422 19.477 19.532 19.587 360 19.642 19.697 19.753 19.808 19.863 19.918 19.973 20.028 20.083 20.139 370 20.194 20.249 20.304 20.359 20.414 20.469 20.525 20.58 20.635 20.69 380 20.745 20.8 20.855 20.911 20.966 21.021 21.076 21.131 21.186 21.241 390 21.297 21.352 21.407 21.462 21.517 21.572 21.627 21.683 21.738 21.793 400 21.848 21.903 21.958 22.014 22.069 22.124 22.179 22.234 22.289 22.345 410 22.4 22.455 22.51 22.565 22.62 22.676 22.731 22.786 22.841 22.896 420 22.952 23.007 23.062 23.117 23.172 23.228 23.283 23.338 23.393 23.449 430 23.504 23.559 23.614 23.67 23.725 23.78 23.835 23.891 23.946 24.001 440 24.057 24.112 24.167 24.223 24.278 24.333 24.389 24.444 24.499 24.555 3/16/2004 Revision A -5- AN2148 450 24.61 24.665 24.721 24.776 24.832 24.887 24.943 24.998 25.053 25.109 460 25.164 25.22 25.275 25.331 25.386 25.442 25.497 25.553 25.608 25.664 470 25.72 25.775 25.831 25.886 25.942 25.998 26.053 26.109 26.165 26.22 480 26.276 26.332 26.387 26.443 26.499 26.555 26.61 26.666 26.722 26.778 490 26.834 26.889 26.945 27.001 27.057 27.113 27.169 27.225 27.281 27.337 °C 0 1 2 3 4 5 6 7 8 9 500 27.393 27.449 27.505 27.561 27.617 27.673 27.729 27.785 27.841 27.897 510 27.953 28.010 28.066 28.122 28.178 28.234 28.291 28.347 28.403 28.460 520 28.516 28.572 28.629 28.685 28.741 28.798 28.854 28.911 28.967 29.024 530 29.080 29.137 29.194 29.250 29.307 29.363 29.420 29.477 29.534 29.590 540 29.647 29.704 29.761 29.818 29.874 29.931 29.988 30.045 30.102 30.159 550 30.216 30.273 30.330 30.387 30.444 30.502 30.559 30.616 30.673 30.730 560 30.788 30.845 30.902 30.960 31.017 31.074 31.132 31.189 31.247 31.304 570 31.362 31.419 31.477 31.535 31.592 31.650 31.708 31.766 31.823 31.881 580 31.939 31.997 32.055 32.113 32.171 32.229 32.287 32.345 32.403 32.461 590 32.519 32.577 32.636 32.694 32.752 32.810 32.869 32.927 32.985 33.044 600 33.102 33.161 33.219 33.278 33.337 33.395 33.454 33.513 33.571 33.630 610 33.689 33.748 33.807 33.866 33.925 33.984 34.043 34.102 34.161 34.220 620 34.279 34.338 34.397 34.457 34.516 34.575 34.635 34.694 34.754 34.813 630 34.873 34.932 34.992 35.051 35.111 35.171 35.230 35.290 35.350 35.410 640 35.470 35.530 35.590 35.650 35.710 35.770 35.830 35.890 35.950 36.010 650 36.071 36.131 36.191 36.252 36.312 36.373 36.433 36.494 36.554 36.615 660 36.675 36.736 36.797 36.858 36.918 36.979 37.040 37.101 37.162 37.223 670 37.284 37.345 37.406 37.467 37.528 37.590 37.651 37.712 37.773 37.835 680 37.896 37.958 38.019 38.081 38.142 38.204 38.265 38.327 38.389 38.450 690 38.512 38.574 38.636 38.698 38.760 38.822 38.884 38.946 39.008 39.070 700 39.132 39.194 39.256 39.318 39.381 39.443 39.505 39.568 39.630 39.693 710 39.755 39.818 39.880 39.943 40.005 40.068 40.131 40.193 40.256 40.319 720 40.382 40.445 40.508 40.570 40.633 40.696 40.759 40.822 40.886 40.949 730 41.012 41.075 41.138 41.201 41.265 41.328 41.391 41.455 41.518 41.581 740 41.645 41.708 41.772 41.835 41.899 41.962 42.026 42.090 42.153 42.217 750 42.281 42.344 42.408 42.472 42.536 42.599 42.663 42.727 42.791 42.855 760 42.919 42.983 43.047 43.111 43.175 43.239 43.303 43.367 43.431 43.495 770 43.559 43.624 43.688 43.752 43.817 43.881 43.945 44.010 44.074 44.139 780 44.203 44.267 44.332 44.396 44.461 44.525 44.590 44.655 44.719 44.784 790 44.848 44.913 44.977 45.042 45.107 45.171 45.236 45.301 45.365 45.430 800 45.494 45.559 45.624 45.688 45.753 45.818 45.882 45.947 46.011 46.076 810 46.141 46.205 46.270 46.334 46.399 46.464 46.528 46.593 46.657 46.722 820 46.786 46.851 46.915 46.980 47.044 47.109 47.173 47.238 47.302 47.367 830 47.431 47.495 47.560 47.624 47.688 47.753 47.817 47.881 47.946 48.010 840 48.074 48.138 48.202 48.267 48.331 48.395 48.459 48.523 48.587 48.651 850 48.715 48.779 48.843 48.907 48.971 49.034 49.098 49.162 49.226 49.290 860 49.353 49.417 49.481 49.544 49.608 49.672 49.735 49.799 49.862 49.926 870 49.989 50.052 50.116 50.179 50.243 50.306 50.369 50.432 50.495 50.559 880 50.622 50.685 50.748 50.811 50.874 50.937 51.000 51.063 51.126 51.188 890 51.251 51.314 51.377 51.439 51.502 51.565 51.627 51.690 51.752 51.815 900 51.877 51.940 52.002 52.064 52.127 52.189 52.251 52.314 52.376 52.438 910 52.500 52.562 52.624 52.686 52.748 52.810 52.872 52.934 52.996 53.057 920 53.119 53.181 53.243 53.304 53.366 53.427 53.489 53.550 53.612 53.673 3/16/2004 Revision A -6- AN2148 930 53.735 53.796 53.857 53.919 53.980 54.041 54.102 54.164 54.225 54.286 940 54.347 54.408 54.469 54.530 54.591 54.652 54.713 54.773 54.834 54.895 950 54.956 55.016 55.077 55.138 55.198 55.259 55.319 55.380 55.440 55.501 960 55.561 55.622 55.682 55.742 55.803 55.863 55.923 55.983 56.043 56.104 970 56.164 56.224 56.284 56.344 56.404 56.464 56.524 56.584 56.643 56.703 980 56.763 56.823 56.883 56.942 57.002 57.062 57.121 57.181 57.240 57.300 990 57.360 57.419 57.479 57.538 57.597 57.657 57.716 57.776 57.835 57.894 °C 0 1 2 3 4 5 6 7 8 9 1000 57.953 58.013 58.072 58.131 58.190 58.249 58.309 58.368 58.427 58.486 1010 58.545 58.604 58.663 58.722 58.781 58.840 58.899 58.957 59.016 59.075 1020 59.134 59.193 59.252 59.310 59.369 59.428 59.487 59.545 59.604 59.663 1030 59.721 59.780 59.838 59.897 59.956 60.014 60.073 60.131 60.190 60.248 1040 60.307 60.365 60.423 60.482 60.540 60.599 60.657 60.715 60.774 60.832 1050 60.890 60.949 61.007 61.065 61.123 61.182 61.240 61.298 61.356 61.415 1060 61.473 61.531 61.589 61.647 61.705 61.763 61.822 61.880 61.938 61.996 1070 62.054 62.112 62.170 62.228 62.286 62.344 62.402 62.460 62.518 62.576 1080 62.634 62.692 62.750 62.808 62.866 62.924 62.982 63.040 63.098 63.156 1090 63.214 63.271 63.329 63.387 63.445 63.503 63.561 63.619 63.677 63.734 1100 63.792 63.850 63.908 63.966 64.024 64.081 64.139 64.197 64.255 64.313 1110 64.370 64.428 64.486 64.544 64.602 64.659 64.717 64.775 64.833 64.890 1120 64.948 65.006 65.064 65.121 65.179 65.237 65.295 65.352 65.410 65.468 1130 65.525 65.583 65.641 65.699 65.756 65.814 65.872 65.929 65.987 66.045 1140 66.102 66.160 66.218 66.275 66.333 66.391 66.448 66.506 66.564 66.621 1150 66.679 66.737 66.794 66.852 66.910 66.967 67.025 67.082 67.140 67.198 1160 67.255 67.313 67.370 67.428 67.486 67.543 67.601 67.658 67.716 67.773 1170 67.831 67.888 67.946 68.003 68.061 68.119 68.176 68.234 68.291 68.348 1180 68.406 68.463 68.521 68.578 68.636 68.693 68.751 68.808 68.865 68.923 1190 68.980 69.037 69.095 69.152 69.209 69.267 69.324 69.381 69.439 69.496 1200 69.553 Table 2. J Type Thermocouple EMF Table for -ve Temperatures (in mV) °C 0 -210 -8.095 -1 -2 -3 -4 -5 -6 -7 -8 -9 -200 -190 -7.890 -7.912 -7.934 -7.955 -7.976 -7.996 -8.017 -8.037 -8.057 -8.076 -7.659 -7.683 -7.707 -7.731 -7.755 -7.778 -7.801 -7.824 -7.846 -7.868 -180 -7.403 -7.429 -7.456 -7.482 -7.508 -7.534 -7.559 -7.585 -7.610 -7.634 -170 -7.123 -7.152 -7.181 -7.209 -7.237 -7.265 -7.293 -7.321 -7.348 -7.376 -160 -6.821 -6.853 -6.883 -6.914 -6.944 -6.975 -7.005 -7.035 -7.064 -7.094 -150 -6.500 -6.533 -6.566 -6.598 -6.631 -6.663 -6.695 -6.727 -6.759 -6.790 -140 -6.159 -6.194 -6.229 -6.263 -6.298 -6.332 -6.366 -6.400 -6.433 -6.467 -130 -5.801 -5.838 -5.874 -5.910 -5.946 -5.982 -6.018 -6.054 -6.089 -6.124 -120 -5.426 -5.465 -5.503 -5.541 -5.578 -5.616 -5.653 -5.690 -5.727 -5.764 -110 -5.037 -5.076 -5.116 -5.155 -5.194 -5.233 -5.272 -5.311 -5.350 -5.388 -100 -4.633 -4.674 -4.714 -4.755 -4.796 -4.836 -4.877 -4.917 -4.957 -4.997 -90 -4.215 -4.257 -4.300 -4.342 -4.384 -4.425 -4.467 -4.509 -4.550 -4.591 -80 -3.786 -3.829 -3.872 -3.916 -3.959 -4.002 -4.045 -4.088 -4.130 -4.173 -70 -3.344 -3.389 -3.434 -3.478 -3.522 -3.566 -3.610 -3.654 -3.698 -3.742 -60 -2.893 -2.938 -2.984 -3.029 -3.075 -3.120 -3.165 -3.210 -3.255 -3.300 -50 -2.431 -2.478 -2.524 -2.571 -2.617 -2.663 -2.709 -2.755 -2.801 -2.847 -40 -1.961 -2.008 -2.055 -2.103 -2.150 -2.197 -2.244 -2.291 -2.338 -2.385 3/16/2004 Revision A -7- AN2148 -30 -1.482 -1.530 -1.578 -1.626 -1.674 -1.722 -1.770 -1.818 -1.865 -1.913 -20 -0.995 -1.044 -1.093 -1.142 -1.190 -1.239 -1.288 -1.336 -1.385 -1.433 -10 -0.501 -0.550 -0.600 -0.650 -0.699 -0.749 -0.798 -0.847 -0.896 -0.946 0 0.000 -0.050 -0.101 -0.151 -0.201 -0.251 -0.301 -0.351 -0.401 -0.451 Table 3. Polynomial Constants for Different Thermocouples Type E J K R S T a0 0.0 0.0 0.0 0.0 0.0 0.0 a1 1.7057035E-2 1.978425E-2 2.508355E-2 1.8891380E-1 1.84949460E-1 2.592800E-2 a2 -2.3301759E-7 -2.00120204E-7 7.860106E-8 -9.3835290E-5 -8.00504062E-5 -7.602961E-7 a3 6.543558E-12 1.036969E-11 -2.503131E-10 1.3068619E-7 1.02237430E-7 4.637791E-11 a4 -7.3562749E-17 -2.549687E-16 8.315270E-14 -2.2703580E-10 -1.52248592E-10 -2.165394E-15 a5 -1.7896001E-21 3.585153E-21 -1.228034E-17 3.5145659E-13 1.88821343E-13 6.048144E-20 a6 8.4036165E-26 -5.344285E-26 9.804036E-22 -3.8953900E-16 -1.59085941E-16 -7.293422E-25 a7 -1.3735879E-30 5.099890E-31 -4.413030E-26 2.8239471E-19 8.23027880E-20 a8 1.0629823E-35 1.057734E-30 -1.2607281E-22 -2.34181944E-23 a9 -3.2447087E-41 -1.052755E-35 3.1353611E-26 2.79786260E-27 a10 -3.3187769E-30 Table 4. Test Results Input Compensated Expected Actual Error Error on FS mV mV Reading Reading °C % -7.90 -6.42 -148 -147 -1 0.08 -4.63 -3.15 -66 -67 1 -0.08 0.00 1.49 29 29 0 0.00 5.27 6.75 127 127 0 0.00 10.78 12.26 227 228 -1 0.08 16.33 17.81 328 328 0 0.00 21.85 23.33 427 428 -1 0.08 27.39 28.88 526 525 1 -0.08 33.10 34.59 625 625 0 0.00 39.13 40.62 724 724 0 0.00 45.49 46.98 824 824 0 0.00 51.88 53.36 924 924 0 0.00 57.95 59.44 1027 1025 2 -0.17 63.79 65.28 1126 1124 2 -0.17 66.68 68.16 1176 1175 1 -0.08 Max Error = 2°C Test Condition: Room Temperature = 29°C Cold Junction Compensation = 1.49 mV 3/16/2004 Revision A -8- AN2148 Cypress MicroSystems, Inc. nd 2700 162 Street SW, Building D Lynnwood, WA 98037 Phone: 800.669.0557 Fax: 425.787.4641 http://www.cypress.com/ / http://www.cypress.com/aboutus/sales_locations.cfm Copyright 2003-2004 Cypress MicroSystems, Inc. All rights reserved. ™ PSoC (Programmable System-on-Chip) is a trademark of Cypress MicroSystems, Inc. All other trademarks or registered trademarks referenced herein are property of the respective corporations. The information contained herein is subject to change without notice. 3/16/2004 Revision A -9-