Track multisite temperatures on your PC
Clayton Grantham, National Semiconductor, Tucson, AZ -- 4/18/2002
The low-cost circuit in Figure 1 allows you to track four remote temperatures with thermistor sensors through the parallel port on your PC. This four-zone thermometer instrument has a temperature range of –40 to +90°C and a resolution of better than ±1°C. You can calibrate its accuracy to within 1°C over a 0 to 50°C span and within 3°C over a –40 to +90°C span. Thermistors are low-cost, passive, rugged components, making them a good choice for temperature sensing. The signal-conditioning hardware in Figure 1 performs a simple voltage division to partially linearize the thermistors. Temperature data in the form of thermistor voltages goes into Excel macros, and software performs a fifth-order-equation fit using calibration coefficients to convert the data into Celsius temperatures. This Design Idea focuses on the electronics in Zone 1; the other zones behave similarly. You can implement one, two, three, or all four zones without software modification.
All components have low power (quiescent current) consumption to minimize LPT1 sourcing requirements. Four LPT1 outputs at D0 (Zone 1), D2 (Zone 2), D4 (Zone 3), and D6 (Zone 4) power this application. The hardware typically requires less than 162 µA of current per zone. Parallel-port drivers within your PC generally source at least 400 µA. Supervisory circuit IC1 monitors the voltage from the LPT1 port. The reset output signal of IC1 goes back to the parallel port at S7 for software error-checking at initialization. The software ascertains that the hardware is present and that the minimum voltage from D0 of the LPT1 port is greater than approximately 4.65V. Most PCs have a 5V parallel-port interface, but a few have only 3.3V available. For 3.3V PCs, you need to scale the voltage options of the components you use.
IC2 is a voltage reference for both the RT1-R7 voltage divider and the ADC, IC3. Inasmuch as IC2 is common to the divider and the ADC, you obtain accurate ratiometric analog-to-digital conversion, and gain, offset, and thermistor-interchangeability errors are at a minimum. The low temperature coefficient of IC2 (grades are available with lower than 10 ppm/°C) ensures that the circuit exhibits high accuracy in the environments that a portable PC encounters. You should also select R4 and R7 with thermal performance in mind. A 0.1% tolerance, 25-ppm/°C metal-film resistor is a good choice. If you intend to use the circuit in a temperature-controlled lab, then you can use less expensive components. RT1 operates in a zero-power resistance mode, in which self-heating errors are negligible. RT1 and R7 form a voltage divider that only slightly linearizes the exponential equation of the NTC thermistor's negative-resistance-versus-temperature relationship: RT=RT0exp[(T0–T)/(T×T0)]. The software performs further curve fitting.
IC1 also has a manual reset that provides direct user control for external triggering. If you depress the momentary switch, S1, and select the "Trig" button on the user form, then the circuit performs a temperature measurement. The hardware turns off when the user form closes. The program control resides in Excel (running under Office 2000) macros that perform I/O through the LPT1 port of the PC. The program uses a free file "Input32.dll" to bit-wise-control the parallel port's digital I/O. The author of the .dll file is Jonathan Titus, editorial director of Test and Measurement World. You load QuadZone.xls with its macros, connect the circuit of Figure 1 to the parallel port, and then run the ControlPanel macro. A user form (Figure 2) pops up, overlaying the spreadsheet, and connects temperature-measurement actions with the electronics. Your possible options using the user form are single-temperature measurement, multiple-temperature measurements separated by user-defined time intervals, linked measurements that append the data to an Excel spreadsheet, and externally triggered single-temperature measurements. Click here to download the spreadsheet and the .dll file.
The user form displays a single quad-zone temperature measurement when you press the Update button on the user form. Measurement data links to the cells from columns A to G (named "data") in the spreadsheet when you press the Linked button. When you press the Loop button, the circuit samples measurement data in user-defined intervals. S1 externally triggers measurement data if you press the Trig button. By using macros within Excel, all the graphing, analysis, and data-storage utilities common to Excel are available for familiar usage. The macros in the .xls listing contain the basic interface features for capturing the signal-conditioned thermistor-sensor signals. Within Module 1, the declaration of Input32.dll needs to include its directory path. The code for input/output of temperature data is within the user-form module.
The macros also include a software-calibration routine that steps users through a temperature-calibration sequence. With the thermistor inside a calibrated oven, you right-click on the user form to initiate calibration. The "cal" spreadsheet of Figure 2 stores the raw calibration data. The "FitChart" chart plots this raw data and displays a fifth-order-polynomial trend-line equation. The user-form code uses the equation's coefficients to scale and display the temperatures in the user form.
Is this the best Design Idea in this issue? Select at www.ednmag.com.
© 2009, Reed Business Information, a division of Reed Elsevier Inc. All Rights Reserved.

