Smart test
Design of Automatic Thermistor Tester Based on PIC18F
As a commonly used temperature sensor, thermistor is widely used in consumer electronics, industrial control, communications, aviation and other fields. In the production process of thermistor, the resistance performance test and calibration link is very critical. This paper designs an instrument that can automatically test and analyze the thermistor performance—thermistor tester. It can test the performance of fifteen thermistors at the same time. During the test, the user can pass the upper position The machine interface controls the temperature range and temperature interval during the test. After obtaining the measurement data, the user can draw the thermal temperature curve of each resistance through the Excel spreadsheet program, so that the defective resistance can be easily identified. This instrument shortens the average time for detecting the thermistor and improves the production efficiency of the manufacturer.
The basic principle of measurement
To test the thermistor, it needs to be placed in a thermostat. The tester also needs to measure the temperature in the thermostat to determine the resistance of the thermistor according to different temperatures. In the temperature measurement process of the incubator, a platinum resistance PT1000 is used as a sensor to convert temperature into voltage for analog-to-digital conversion. The analog-to-digital conversion process mainly uses a 24-bit low-noise programmable analog-to-digital converter. It uses sigma-delta conversion technology internally. The effective digits of data collected by A/D can reach about 14 bits, so that the resolution accuracy of temperature can reach 0.05 degree. In this case, the temperature interval during the thermistor test is relatively small, which lays a good foundation for the thermistor's fine measurement and further broadens the scope of use of this instrument.
Incubator temperature collection
In the process of measuring the thermistor, it is very important to collect the temperature of the incubator. The prerequisite for measuring the thermistor is to be able to detect the temperature value with high precision and high resolution. The collection of the temperature of the incubator is realized by the schematic circuit diagram shown in Figure 1.
In the circuit, the voltage of the voltage source is provided by the precision voltage source AD780 produced by AD Company, with an output voltage of 2.5V±1mV and a temperature coefficient of 5ppm. The introduction of precision voltage source provides a good basis for temperature measurement. The temperature sensor uses platinum resistance PT1000, which has good linearity in the range of 0~100℃, high sensitivity, and a temperature coefficient of 0.4%, which is suitable for surface or slit temperature measurement. Resistor R0 is a high-precision resistor with a resistance value of 1.5kΩ±0.05%, and its temperature coefficient is 5ppm. The platinum resistance PT1000 has good linearity at a temperature of -50℃~100℃. Therefore, the temperature measurement range of this tester is between -50°C and 100°C.
Thermistor resistance measurement
The circuit principle of measuring the resistance of the thermistor is similar to the principle of measuring the temperature of the incubator, as shown in Figure 2. In the picture, the voltage source is an adjustable voltage source composed of LM317, the size is 3.8V, R1 to R19 are high-precision resistors of 2kΩ, and the temperature coefficient (TCR) is 15PPM. The lower resistors RX1 to RX19 are thermistors to be tested. The voltage from the connection point AIN1 to AIN19 of the two resistors is sent to the voltage input terminal of AD7731. When the resistance of the lower thermistor changes with temperature, the voltage at the AINX point also changes, and the resistance change can be measured through it.
lower computer part
Hardware parts
The hardware part of the thermistor tester includes six functional modules. The hardware block diagram is shown in Figure 3. The functions of each module are briefly described as follows:
·Power circuit: provide analog +5V power supply, digital +5V power supply and +8V power supply
·Voltage source circuit: Provides +2.5V high-precision reference voltage for AD7731 and +5V voltage source for data acquisition circuit.
·Data acquisition circuit: The resistance value is converted into a corresponding voltage, which is sent to the data acquisition pin of AD7731 for analog-to-digital conversion. The actual data acquisition circuit is shown in Figure 4.
In the figure, the left part is the resistance value data acquisition circuit, which together with the protection circuit in the middle converts the thermistor resistance into voltage. On the right is the circuit that measures the temperature of the incubator. It divides the voltage of 2.5V through a platinum resistance PT1000 and a high-precision resistance with a resistance of 1.5kΩ and sends it to the AD input.
·Analog-to-digital conversion circuit: consists of four AD7731 chips, collects 20 analog inputs, and sends the collected results to the single-chip microcomputer. AD7731 is a sigma-delta analog-to-digital converter with low noise and high throughput characteristics developed by ADI in the United States. 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, industrial process control and other fields. The main task of the AD7731 chip in the tester is to collect data and transmit the data to the microcontroller. The specific connection method is shown in Figure 5.
Both the analog input and the reference input are differential mode signals, the voltage applied to the analog modulator is a common mode voltage, and the better common mode rejection ratio of AD7731 can effectively remove the common mode noise at the input. The digital filter can effectively remove the noise of the power supply voltage on the circuit board. Therefore, the AD7731 chip has stronger anti-interference ability than traditional high-precision converters. However, due to the very high resolution of the AD7731, when designing the PCB circuit board, great attention should be paid to the positional relationship between the shielding layer design and the component layout.
·PIC microcontroller and serial communication module: control AD7731 chip to complete data collection, and send the received data to the host computer through the RS232 serial port. The circuit related to the one-chip computer and serial communication in the circuit is shown as in Fig. 6.
In the picture, the MAX232 chip is responsible for completing the conversion from TTL level to RS232 level, so that the microcontroller and PC can communicate normally. In this tester, the communication rate of the RS232 serial port adopts 9600bps, 8 data bits, 1 stop bit, and no parity.
Software part
The lower computer software of the thermistor tester mainly completes two tasks:
·The AD7731 chip is controlled through the SPI bus for data collection, and the collected data is read into the machine.
·Properly configure the serial port communication module, and send data to the host computer at the rate specified in the protocol.
The specific operation process is shown in Figure 7. Among them, SPI and USART belong to the internal modules of the single-chip microcomputer, and only need to set the relevant registers of the module, while the control of the AD7731 chip needs to be carried out indirectly through the SPI module.
host computer part
Visual Studio 6.0 produced by Microsoft is a commonly used programming tool, and the host computer software of the thermistor tester is written with this tool. The main function of the upper computer program is to receive the A/D conversion data sent from the lower computer via RS232, process it, and fill in the processed result into the Excel table for the user to process. In the process of data processing, KALMAN digital filter is used to further improve the accuracy of temperature measurement. The system fills in the data into the Excel worksheet through OLE automation technology. If the user has further requirements for the data, he can process the data by himself. The program can meet the needs of different users.
The upper computer interface of the tester is concise, and the user's operation is simple. The main interface is shown in Figure 8.
There are four button controls on the upper part of the main interface: start, stop, settings and help.
Start button: After pressing it, it can start the processing program for the OnComm message generated by the Microsoft communication control, and start the Excel template file mytest.xlt for display data.
Stop button: Stop the OnComm message processing program, refresh the display data in the lower status bar.
Setting button: to realize the temperature calibration, the setting of the measurement interval of the measurement range, and the setting of the internal parameters of the tester. When setting the internal parameters, you must first enter the password to prevent misoperation of the calibration data.
The temperature, measuring range and internal parameters can be set in the parameter setting interface. After the data is written into the file, the parameters set when the program is restarted will be automatically read in.
Help button: Start the help file. The operation of the software is explained in detail in the help file. Including hardware connection, operating procedures, etc.
Conclusion
With the continuous advancement of sensor technology, the theoretical research and application development of thermistors have achieved remarkable results. As a part of the production process, the thermistor test, to improve its detection efficiency, will inevitably shorten the production time and reduce the production cost, so that the thermistor is more widely used.