Development and Research of a Fully Automated Thermistor Tester Based on PIC18F258
2026-04-06 07:22:32··#1
Introduction Thermistors, as commonly used temperature sensors, are widely applied in consumer electronics, industrial control, communications, and aerospace. In the thermistor manufacturing process, performance testing and calibration are crucial. This paper designs an instrument capable of automatically testing and analyzing the performance of thermistors—a thermistor tester. It can simultaneously test fifteen thermistors. During testing, the user can control the temperature range and intervals via a host computer interface. After obtaining the measurement data, the user can plot the thermal-temperature curves of each resistor using an Excel spreadsheet program, making it easy to identify defective resistors. This instrument shortens the average testing time for thermistors and improves the manufacturer's production efficiency. Basic Measurement Principles Testing thermistors requires placing them in a constant temperature chamber. This tester also needs to measure the temperature within the chamber to determine the thermistor's resistance value at different temperatures. During the temperature measurement process in the constant temperature chamber, a platinum resistance thermometer (PT1000) is used as the sensor to convert temperature into voltage for analog-to-digital conversion. The analog-to-digital conversion process primarily utilizes a 24-bit low-noise programmable analog-to-digital converter (ADC). Internally, it employs Σ-Δ conversion technology, allowing for approximately 14 effective bits of data acquisition, resulting in a temperature resolution accuracy of 0.05 degrees Celsius. Under these conditions, the temperature interval during thermistor testing is relatively small, laying a solid foundation for precise thermistor measurement and further expanding the instrument's application range. Temperature Acquisition from the Thermostat Chamber Accurate acquisition of the thermostat chamber temperature is crucial in the thermistor measurement process. A prerequisite for accurate thermistor measurement is the ability to detect temperature values with high precision and resolution. The acquisition of the thermostat chamber temperature is achieved using the circuit diagram shown in Figure 1. In the circuit, the voltage source is provided by the AD780 precision voltage source manufactured by Analog Devices, with an output voltage of 2.5V ± 1mV and a temperature coefficient of 5ppm. The introduction of the precision voltage source provides a solid foundation for accurate temperature measurement. The temperature sensor selected is a platinum resistance thermometer (PT1000), which exhibits good linearity and high sensitivity within the 0–100℃ range, with a temperature coefficient of 0.4%, making it suitable for surface or slit temperature measurement. Resistor R0 is a high-precision resistor with a resistance of 1.5kΩ ± 0.05% and a temperature coefficient of 5ppm. The PT1000 platinum resistance thermometer shows good linearity between -50℃ and 100℃. Therefore, the temperature measurement range of this tester is between -50℃ and 100℃. Thermistor Resistance Measurement The circuit principle for measuring the thermistor resistance is similar to that for measuring the temperature of a constant temperature chamber, as shown in Figure 2. In the figure, the voltage source is an adjustable voltage source composed of LM317, with a voltage of 3.8V. R1 to R19 are 2kΩ high-precision resistors with a temperature coefficient (TCR) of 15PPM. The lower resistors RX1 to RX19 are the thermistors to be measured. The voltage at the connection points AIN1 to AIN19 is sent to the voltage input terminal of the AD7731. When the resistance of the thermistor at the bottom changes with temperature, the voltage at the AINX point also changes, allowing the measurement of the resistance change. Lower-level computer sectionHardware section The hardware section of the thermistor tester consists of six functional modules, as shown in Figure 3. The functions of each module are briefly described below: • Power supply circuit: Provides analog +5V, digital +5V, and +8V power supplies. • Voltage source circuit: Provides a +2.5V high-precision reference voltage for the AD7731 and a +5V voltage source for the data acquisition circuit. • Data acquisition circuit: Converts the resistance value into a corresponding voltage and transmits it to the AD7731's data acquisition pin for analog-to-digital conversion. The actual data acquisition circuit is shown in Figure 4. In the figure, the left side is the resistance value data acquisition circuit, which, together with the protection circuit in the middle, converts the thermistor resistance value into voltage. The right side is the circuit for measuring the temperature of the constant temperature chamber, which divides the 2.5V voltage through a platinum resistance PT1000 and a 1.5kΩ high-precision resistor before sending it to the AD input terminal. The analog-to-digital converter (ADC) circuit consists of four AD7731 chips, which acquire 20 analog inputs and send the results to the microcontroller. The AD7731 is a Σ-Δ analog-to-digital converter developed by Analog Devices (ADI) with low noise and high throughput. It can directly receive input signals from sensors and is suitable for measuring low-frequency signals with a wide dynamic range. It can be widely used in strain measurement, temperature measurement, pressure measurement, and industrial process control. In the tester, the main task of the AD7731 chip is to acquire data and transmit it to the microcontroller. The specific connection method is shown in Figure 5. Both the analog input and the reference input are differential-mode signals, while the voltage applied to the analog modulator is a common-mode voltage. The AD7731's good common-mode rejection ratio effectively removes common-mode noise at the input. The digital filter effectively removes noise from the power supply voltage on the circuit board. Therefore, the AD7731 chip has stronger anti-interference capabilities than traditional high-precision converters. However, due to the very high resolution of the AD7731, careful attention must be paid to the shielding layer design and the positional relationship of the components when designing the PCB circuit board. • PIC Microcontroller and Serial Communication Module: Controls the AD7731 chip to complete data acquisition and sends the received data to the host computer via the RS232 serial port. The circuit related to the microcontroller and serial communication is shown in Figure 6. In the figure, the MAX232 chip is responsible for converting TTL level to RS232 level to enable normal communication between the microcontroller and the PC. In this tester, the RS232 serial port communication rate is 9600bps, with 8 data bits, 1 stop bit, and no parity check. Software Section The lower-level software of the thermistor tester mainly performs two tasks: · Controls the AD7731 chip to acquire data via the SPI bus and reads the acquired data into its internal memory. · Correctly configures the serial communication module to send data to the host computer at the rate specified in the protocol. The specific operation flow is shown in Figure 7. SPI and USART are internal modules of the microcontroller; only the relevant registers of the module need to be set. However, the control of the AD7731 chip needs to be indirectly achieved through the SPI module. Upper Computer Section Microsoft's Visual Studio 6.0 is a commonly used programming tool, and the upper computer software for the thermistor tester is written using this tool. The main function of the upper computer program is to receive A/D conversion data sent from the lower computer via RS232, process it, and fill the processed results into an Excel spreadsheet for user processing. A KALMAN digital filter is used in the data processing process to further improve the temperature measurement accuracy. The system uses OLE automation technology to fill the data into the Excel worksheet. If the user has further requirements for the data, they can process the data themselves. The program can meet the needs of different users. The tester's upper computer interface is simple and easy for users to operate. Its main interface is shown in Figure 8. At the top of the main interface are four buttons: Start, Stop, Settings, and Help. Start Button: Pressing this button starts the OnComm message handler generated by the Microsoft communication control, launching the Excel template file mytest.xlt for data display. Stop Button: Stops the OnComm message handler and refreshes the data displayed in the lower status bar. The settings button allows you to calibrate the temperature, set the measurement range and interval, and configure the internal parameters of the tester. A password is required before setting internal parameters to prevent accidental manipulation of calibration data. The parameter settings interface allows you to configure temperature, measurement range, and internal parameters. The data is then written to a file, and the set parameters are automatically read upon restarting the program. The help button launches the help file. The help file provides detailed instructions on software operation, including hardware connections and operating procedures. Conclusion With the continuous advancement of sensor technology, the theoretical research and application development of thermistors have achieved remarkable results. As the final step in the production process, improving the efficiency of thermistor testing will inevitably shorten product production time and reduce production costs, thus expanding the application of thermistors.