Design of high-precision resistance tester based on STC89C54RD microcontroller and AD574

Publisher:诚信与爱Latest update time:2013-12-13 Source: 21ICKeywords:STC89C54RD  AD574 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The electronics industry is developing rapidly. As one of the most basic circuit components, the demand for resistors in electronic systems is increasing. In electronic instruments, precise resistors are needed 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 conveniently measure the resistance value. 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. Intelligent instruments and meters that use single-chip microcomputers as the control core are widely used. They have the advantages of high reliability, low power consumption, and small size, making the measuring instruments more digital, intelligent, and miniaturized.

1 System Design

This system is controlled by the single-chip computer STC89C54RD. The measured resistance is passed through the measuring circuit, and the change of resistance is converted into the change of voltage and current and sent to the analog-to-digital converter for A/D conversion. The obtained digital signal is sent to the single-chip computer. The resistance value can be judged and measured through software design. Finally, the measured resistance is displayed through the display circuit. At the same time, the automatic screening function can be realized through software design. The system block diagram is shown in Figure 1.

 

 

2 Hardware Design

2.1 Constant current source voltage measurement method

The dual op amp constant current source circuit composed of OP07 uses the constant current flowing through the measured resistor Rx. The resistance value of Rx is calculated by measuring the voltage value across Rx. It can have high accuracy when measuring small resistance (100-100kΩ).

2.2 Constant voltage source current measurement method

When using a constant current source to measure voltage to measure a large resistor (100k-10MΩ), the current flowing through the resistor is very small, the output voltage is small, and it is difficult for the A/D to sample and convert it. At the same time, there is a large error, so this method of measuring current by adding pressure is not feasible when measuring large resistors. Therefore, a constant voltage source is used to measure current, and its design circuit diagram is shown in Figure 2.

 

 

2.3 12-bit A/D conversion interface circuit

The improvement of the measurement accuracy and speed of the whole system also depends on the analog-to-digital conversion circuit. The analog-to-digital conversion chip AD574 is a classic 12-bit high-speed successive approximation A/D. It is a hybrid integrated chip with a built-in bipolar conversion circuit. It has few external components, low power consumption, high precision, automatic zero calibration and automatic polarity conversion functions, and only needs a small number of external resistors and capacitors to form a complete A/D conversion circuit.

The nonlinear error of AD574 is less than 1/2LSB, and the maximum conversion time is 35us, which is suitable for applications with a conversion rate of 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.

 

3 Software Design

In this circuit, the STC89C54RD single-chip microcomputer controls the on and off of the relay to realize the gear switching of the resistance measurement circuit. The voltage measured by the measured resistor is sent to the A/D converter AD574 (the data is converted, and the voltage and resistance values ​​are equal). The data after A/D conversion is sent to the single-chip microcomputer for processing and finally displayed. The flow chart is shown in Figure 4. The automatic screening program first determines whether there is a key pressed on the single-chip microcomputer. When a key is pressed, it enters the screening, otherwise it enters the measurement circuit, collects the numerical value output by the A/D module, processes it, and displays the processed numerical value.

 

 

4 Error analysis

4.1 Causes of Systematic Errors

(1) The non-ideal integrated operational amplifier generates errors;

(2) Errors generated by the A/D conversion circuit;.

(3) Interference of electric field, etc.

4.2 Main methods to reduce errors and improve accuracy

(1) Four ranges are set, but in the same range, the voltage range of AD conversion is also between full amplitude and 1/10 full amplitude. When using 12-bit AD conversion, the accuracy is not enough when it is below 1/10 full amplitude (1V). Now the AD oversampling method is used to improve the accuracy. In each test, multiple AD conversions (200 times) are performed and the average value is taken;

(2) During high impedance testing, power frequency interference will affect the measurement. Performing multiple (200) AD conversions in one power frequency sine cycle can achieve the best digital filtering effect.

(3) When testing low resistance, the wire resistance and the contact resistance between the relay and the probe cannot be ignored. The "four-wire system" is used during the test to eliminate the corresponding errors.

(4) Process requirements. In order to ensure the high precision of the resistance tester, the process requirements are also crucial. First, the power supply must be decoupled and filtered, and the ground wire must be as thick as possible and as short as possible. Secondly, the resistor selection of the operational amplifier must pay attention to "pairing", that is, it is necessary to screen from a large number of resistors. Thirdly, the range resistor must use a precision resistor of more than one thousandth, and finally the operational amplifier must be a high-precision operational amplifier OP07.

5 Conclusion

The STC89C54RD microcontroller controls the on and off of the relay to switch the range of the measured resistance. The small resistor uses a dual high-precision op amp OP07 to form a constant current source to measure the voltage. The large resistor is measured by measuring the current through a constant voltage source. The measured voltage or current is sent to the 12-bit serial AD574 circuit to realize the acquisition of analog quantity. The entire circuit is controlled by the STC89C54RD microcontroller and the keyboard display circuit. The hardware structure of the entire circuit is concise and the output voltage is stable. However, the entire system focuses on software design. The A/D conversion has different conversion algorithms for the output voltage of resistors of different ranges. The algorithm error of the A/D conversion is the main source of system test error. The A/D conversion algorithm should be continuously adjusted to continuously improve the test accuracy.

Keywords:STC89C54RD  AD574 Reference address:Design of high-precision resistance tester based on STC89C54RD microcontroller and AD574

Previous article:Design of Digital Signal Processing Simulation Platform Based on MATLAB GUI
Next article:Software/Hardware Design of Web Server Boa Based on ARM9

Latest Power Management Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号