ispPAC 10 Low Cost Temperature Measurement ® Figure 1. ispPAC Block Diagram Introduction This application note describes how to use the ispPAC10 and a single transistor to implement a low-cost temperature measurement system. The temperature measuring device is a 2N2222A transistor. In-System Programmability (ISP™) enables programming, verification and reconfiguration directly on the printed circuit board using the IEEE standard 1149.1 compliant serial port. The ispPAC10 contains four integrated programmable analog modules known as PACblocks and a programmable interconnect system (Figure 1). Each PACblock emulates a collection of op amps, resistors and capacitors. The ispPAC10 is easily configured using PAC-Designer®, a Windows®-based design environment. The temperature measuring system requires only a single PACblock but can include in-system programmable offset cancellation and gain adjustment to “zoom in” for higher resolution measurements. OUT2+ 1 OUT2- 2 IN2+ 3 IN2- 4 TDI 5 TRST 6 VS 7 TDO 8 TCK 9 27 OUT126 IN1+ IA IA IA IA 11 OUT4- 24 TEST 22 VREFout Reference & Auto-Calibration 21 GND 20 CAL IA IA IA IA 19 CMVin 18 IN317 IN3+ 13 OUT4+ 14 25 IN1- 23 TEST Configuration Memory IN4+ 12 Silicon PN junctions exhibit a change in potential inversely proportional to temperature, which is approximately -2.2 mV/°C over a wide temperature range. This phenomenon can be used to make a low-cost, fastresponse temperature sensor. While commercial devices are available that specify the nominal junction VBE and the junction’s temperature coefficient, not all temperature measurement systems require such precision. In these cases, a common diode or bipolar transistor can serve as the temperature-sensing element. Figure 2 shows a circuit for such a case. 28 OUT1+ OA Analog Routing Pool TMS 10 IN4- OA 16 OUT3OA OA 15 OUT3+ varies with the collector current, so the value of IC is chosen to be large enough to ensure that the transistor achieves a good beta value. This can be determined by referring to the transistor’s data sheet or by measurement. In Figure 2, R1 equals 19.1 kΩ which establishes a collector current of about 100 µA, assuming a nominal VBE of 590 mV. This circuit uses a PACblock output as a stable 2.5V reference to bias the transistor. By default, the PACDesigner software configures unused PACblocks to output 2.5V. This voltage is generated internally using a bandgap reference and is available externally at the VREFOUT output. However, VREFOUT is strictly a reference and is not capable of sourcing any current. Therefore, it is not usable as a source without some kind of buffering. A PACblock whose output is a voltage source capable of supplying 10mA is ideal as a buffer for VREFOUT. If another reference is available, this may be used in place of a PACblock to bias the 2N2222A. A PACblock input is true differential, which means it will amplify the difference between its two inputs. It is desired to have this difference be equal to 0V at some (reference) temperature. With a voltage dependent on the transistor’s VBE connected to the positive input, a constant reference value for comparison must be connected to the minus input. Resistors R2 and R3 form a voltage divider whose purpose is to generate a voltage nominally equal to the transistor’s VBE. That is, the voltage drop across R2 should equal the VBE of the transistor at the reference temperature. In the circuit shown, R2 and R3 were chosen to provide 590mV across R2, to match the nominal VBE of the 2N2222A at room temperature. Circuit Details The resistor R1 establishes the nominal collector current (IC) for the transistor. A transistor’s current gain (beta) an6010_01 1 September 1999 ispPAC10 Low Cost Temperature Measurement Figure 2. Temperature Measurement Circuit 2N2222A R2 3.09K 10 PACblock 1 61.6 pF IA1 Vout IN1 OA1 IA2 2.5V 1 R1 19.1K R3 OUT1 10K IN2 1 PACblock 2 61.6 pF IA3 Unused Input OA2 IA4 OUT2 2.5V 1 2.5V Figure 3. Temperature Measurement Circuit with Offset Cancellation 2N2222A R2 3.09K IN1 10 PACblock 1 61.6 pF IA1 R3b Vout1 105 OA1 IA2 IN2 -10 to +10 -10 to +10 PACblock 2 R1 19.1K R3a 10K 2.5V 61.6 pF IA3 Vout2 OA2 IA4 IN3 1 OUT2 2.5V 1 Unused Input OUT1 PACblock 3 61.6 pF IA5 OA3 IA6 2.5V 1 2 OUT3 2.5V ispPAC10 Low Cost Temperature Measurement desired, the value of R3b can be changed; increasing R3b increases the range of available offset but decreases the resolution. Again, if more gain is desired, the circuit output (Output 1) can be internally cascaded into the input of another PACblock, whose output is shown as Output 2 in Figure 3. Using PAC-Designer, a single PACblock is configured to a gain of 10 and the PACblock filter pole is set to its lowest frequency value to minimize noise at the output. In this circuit, the change in output voltage is proportional to the change in transistor temperature with a slope of 24.7 mV/°C. The dynamic range of the circuit is over 250°C. Additional gain can be provided by internally cascading the circuit output (Output 1) into another PACblock input. This circuit can also be used to set the output voltage to a desired value at any given temperature. Resistor R2 is the coarse adjustment and R3b the fine adjustment to do this. In Figure 3, the change in output voltage increases (becomes more positive) for an increase in R2. For example, increasing R2 by 10% lowers the Input 1 reference voltage by approximately 7.5%. This results in the output voltage increasing by about 440mV, corresponding to a temperature change of approximately -18°C. “Zooming in” around the desired temperature is still accomplished by changing the gain and/or polarity (using in-system programmability) of the ispPAC10 input connected across R3b. Adding Offset Compensation When the output voltage does not equal the desired value at a specified temperature, an offset exists. It can sometimes be introduced by the amplifying element, but in this case it is largely due to the voltage drop across R2 not equaling the VBE of the transistor. Figure 3 shows a circuit that adds software-configurable offset. This circuit, as shown, functions primarily to allow the output voltage to be set to any desired value at room temperature, compensating for transistor static VBE variations. Results In this circuit, resistor R3b is added in series with R2 and R3a and connected to Input 2 of the ispPAC10. For the values shown in Figure 3, the voltage across R3b (VR3b) is about 20mV. Because the PACblock allows summation, VR3b can be amplified and/or inverted before adding it to the 2N2222A temperature sensing input. This can be done using in-system programmability, which makes possible an automated test and adjust system. Since the PACblock has a gain range of ±10, system offset up to ±200 mV can be added in 20 mV steps. This range is equivalent to about ±8.5 degrees. If more or less offset is The circuit in Figure 3 was built and the output versus temperature was measured using a random population of 2N2222As, with the composite result shown in Figure 4. The result is very linear over the temperature range used. Figure 5 is a series of histograms of the circuit’s output at various temperatures for the population. This data shows that at all temperatures, the total variation is only about ±1.2 degrees. Figure 4. Temperature Measurement Results 2N2222A Temp Circuit Evaluation Circuit Output (mV) 2700 y = 24.686x - 479.31 1800 R2 = 0.9997 900 0 -900 -1800 -40 0 40 Temp (°C) 3 80 120 ispPAC10 Low Cost Temperature Measurement Figure 5. Variation Across Transistor Population Room Temperature Distribution High Temperature Distribution 40 Low Temperature Distribution 30 25 20 30 20 % of Units % of Units % of Units 20 15 10 10 10 5 0 20.5 20.9 21.3 21.7 22.1 0 120.4 120.8 121.2 121.6 122.0 122.4 122.8 Measured Temperature (°C) Measured Temperature (°C) 0 -38.3 -38.0 -37.8 -37.5 -37.2 -36.9 Measured Temperature (°C) Technical Support Assistance Impact of ispPAC10 Specifications The ispPAC10 gain specification of ±3.0% affects the slope of the temperature measurement curve. With the offset adjusted to provide a known output at some temperature, the IC’s gain error causes a corresponding error in the temperature value of up to 3.0%. For example, at a temperature 100° away from where the offset was normalized, the error could be ±3.0°C. Since it is systematic, this error could be eliminated with a multipoint calibration. However, even without this extra effort, the combination of the transistor characteristic and ispPAC10 gain error results in a measurement error of less than 3.3° over a 100° span. The ispPAC10 offset does not affect the measurement accuracy. Using the auto-cal feature, the typical offset specification of the ispPAC10 is 200µV. Because of the device architecture, this same level is present at the output regardless of gain. This corresponds to less than 0.01°C of error, which is insignificant in this measurement. Summary The ispPAC10 is a versatile component for analog signal processing. In this case, a simple, low-cost temperature measurement system is realized using a readily-available 2N2222A transistor. The ispPAC10 provides gain and filtering and makes it possible to perform automatic offset adjustment. The resulting circuit is highly linear over a wide temperature range. The repeatability is dependent on the junction characteristics of the device used and was found to be within a few degrees over a 160° span for the 2N2222A transistor used. 4 Toll Free Hotline: 1-800-LATTICE (Domestic) International: 1-408-826-6002 E-mail: [email protected] Internet: http://www.latticesemi.com