Smart test
Design of High Resistance Tester Based on Single Chip Microcomputer and AD574
introduction
The electronics industry is developing rapidly. As one of the basic circuit components, the demand for resistors in electronic systems continues to increase. In electronic instruments, precise resistance is required to improve the accuracy of the instrument. For ordinary electronic instrument companies, a resistance tester that is both fast and accurate is needed. In the design of electronic circuits, it is often necessary to easily measure Therefore, it is of great practical significance to design a high-precision resistance measuring instrument that is not only safe and reliable, but also simple and practical.
1, system design
The system is controlled by the single-chip microcomputer STC89C54RD. The measured resistance is passed through the measuring circuit, the resistance change is converted into the voltage and current change and sent to the analog-to-digital converter for A/D conversion, and the obtained digital signal is sent to the single-chip microcomputer through software The design can realize the judgment and measurement of the resistance value, the measured resistance can be displayed through the display circuit, and the automatic screening function can be realized through the software design. The system is shown in Figure 1.
The design of a high-precision resistance tester based on single-chip microcomputer and AD574
Figure 1 System composition block diagram
2, hardware design
2.1, constant current source voltage measurement method
Using the dual op amp composed of OP07, using the constant current flowing through the resistance Rx to be measured, the resistance value of Rx can be calculated by measuring the voltage value at both ends of Rx, which can have high accuracy when measuring small resistance (100-100kΩ) .
2.2, constant voltage source current measurement method
When measuring a large resistance (100k-10MΩ) with a constant current source, the current flowing through the resistance is very small, the output voltage is small, it is difficult for A/D to sample and convert it, and there is a large error at the same time, so this increase The method of measuring current under pressure is not feasible when measuring large resistance. So adopt the method of measuring the electric current of the constant voltage source, its design circuit diagram is shown as in Fig. 2.
The design of a high-precision resistance tester based on single-chip microcomputer and AD574
Figure 2 Constant voltage source current measurement circuit
2.3, 12-bit A/D conversion interface circuit
The improvement of the measurement accuracy of the whole system and the improvement of the measurement speed also depend on the analog-to-digital conversion circuit. The analog-to-digital conversion chip AD574 is a classic 12-bit high-speed successive comparison type A/D with built-in bipolar conversion circuit. Integrated chip, with few external components, low power consumption, high precision, with automatic zero calibration and automatic polarity conversion functions, only a small number of external resistance and capacitance components can form a complete A/D conversion circuit.
The non-linear error of AD574 is less than 1/2LSB, and the conversion time is 35us, which is suitable for applications where the conversion rate is less than 30kB/s. The input control signals of AD574 are CE, CS, R/C, A0, and 12/8. The control signals and their corresponding working states are shown in Table 1, and the interface circuit with the microcontroller is shown in Figure 3.
Table 1AD574 status bit control
The design of high-precision resistance tester based on single-chip microcomputer and AD574
The design of high-precision resistance tester based on single-chip microcomputer and AD574
Figure 3 AD574 and MCU interface circuit diagram
3, software design
The STC89C54RD single-chip microcomputer in this circuit controls the on and off of the relay to realize the switch of the measuring resistance circuit. The voltage measured by the measured resistance is sent to the A/D converter AD574 (the data is converted, the voltage and the resistance are equal) The A/D converted data is sent to the single-chip microcomputer for processing and display. The flowchart is shown in Figure 4. Shown. The automatic screening program first judges whether the single-chip microcomputer has a key pressed. When a key is pressed, it enters the filter, otherwise it enters the measurement circuit, collects the numerical value output by the A/D module, performs processing, and displays the processed numerical value.
The design of high-precision resistance tester based on single-chip microcomputer and AD574
Figure 4 Software flow chart of the test circuit
4. Error analysis
4.1. Causes of system errors
(1) The non-ideal error of the integrated operational amplifier;
(2) Errors generated by the A/D conversion circuit;.
(3) Electric field interference, etc.
4.2, the main method to reduce errors and improve accuracy
(1) Set four ranges, but in the same range, the voltage range for removing AD is also between the full range and 1/10 of the full range. When 12-bit AD conversion is used, it is below 1/10 of the full range (1V) , The accuracy is not enough, now the AD over-sampling method is used to improve the accuracy. In each test, perform multiple AD conversions (200 times) before taking the average value;
(2) In the high resistance test, the power frequency interference will affect the measurement. The use of multiple (200) AD conversions in a power frequency sine cycle can make the digital filtering effect;
(3) When testing low resistance, the wire resistance and the contact resistance of the relay and probe can not be ignored. The "four-wire system" is used in the test to eliminate the corresponding error;
(4) Process requirements. In order to ensure the high precision of the resistance tester, the process requirements are also very important. First, it must be decoupled and filtered, and the ground line should be as thick as possible and as short as possible; secondly, the operational amplifier Resistor selection must pay attention to "pairing", that is, it needs to be selected from a large number of resistors; again, the range resistance must use a precision resistance of more than one thousandth, and the op amp must choose the high-precision op amp OP07.
5 Conclusion
Through the STC89C54RD single-chip microcomputer to control the on and off of the relay, the measuring range of the resistance is switched. The small resistance uses a double high-precision operational amplifier OP07 to form a constant current source to measure the voltage, and the measurement of the large resistance is realized by measuring the current through the constant voltage source. The received voltage or current is sent to the 12-bit serial AD574 circuit to realize the acquisition of analog quantity, and the control of the whole circuit is realized through the STC89C54RD single-chip microcomputer and the circuit. The hardware structure of the whole circuit is simple and the output voltage is stable. However, the entire system emphasizes software design. A/D conversion has different conversion algorithms for resistance output voltages of different ranges. The algorithm error of A/D conversion is the main cause of system test errors. It is necessary to continuously adjust the A/D conversion algorithm to continuously improve the test accuracy.