smallembedded

[Hunan Industrial Vocational and Technical College] Resistance measuring instrument + Lei Chaolin

 
Overview

1. Plan argumentation and selection

Resistance measurement generally uses the constant current method or the voltage division method.

1. Constant current method

Principle of resistance measurement using the constant current method. This solution uses a constant current source to power the resistor under test. By measuring the voltage at both ends of the resistor under test, the resistance of the resistor under test can be calculated. The conversion formula is :


Rx=Vx/I


In the formula, V = the voltage across the resistor being measured; I = the output current of the constant current source. This testing method mainly has two shortcomings : (1) The calculated resistance value is related to the output current of the constant current source, and the error in the output current value of the constant current source directly affects the measurement results. (2) Due to the limited input range of the A/D converter, in order to improve the measurement accuracy, a constant current source with a large output current should be selected when measuring low resistance, and a constant current source with a small current should be selected when measuring high resistance. Due to the range The changes are large. This kind of variable constant current source is difficult to produce and the accuracy is difficult to guarantee.
     



2. Partial pressure method

The schematic diagram of the resistance measurement principle of the voltage division method is shown in Figure 1. This scheme connects the measured resistor and the reference resistor in series, applies a voltage to both ends, and measures the voltage at both ends of the measured resistor to calculate the resistance of the measured resistor. value, assuming that the voltages on the glass measuring resistor and the reference resistor are V and V respectively. , according to the voltage division relationship, the resistance of the resistor under test can be obtained as:

Rx=(Vx/Vo)/R

The simple voltage dividing circuit can realize the measurement of resistance in a wide range.

figure 1

 

2. Overall system design and parameter calculation

The system block diagram of the instrument system is shown in Figure 3. It consists of a resistance measurement circuit, A/D converter, microcontroller system, stepper motor drive and other parts. The resistance measurement circuit is the most critical part of the instrument. The microcontroller performs gear shifting operations by controlling the relay, and collects the voltage of the divided voltage measurement circuit by controlling the A/D converter to complete the electrical measurement function. The microcontroller completes the automatic measurement function of the potentiometer resistance by controlling the stepper motor and cooperating with the resistance measurement.

Partial pressure method range determination

According to the formula of the voltage dividing method, the lower end resistance is used to measure, the upper end is the nominal resistance 1K ohm resistance, and the actual resistance is 997 ohms.

The reference voltage is the AMS1117 chip, the nominal output voltage is 3.3V, and the measured voltage is 3.278V.

 

Experimental results when the reference resistance is a 1K resistor:

nominal value

470R

1.5K

8K

actual voltage

1.054V

1.967V

2.919V

Calculate voltage

1.046V

1.966V

2.919V

Actual resistance: ohms

473.3

1480

8040

Calculate Resistance: Ohms

473

1500

8025

Based on the above experimental results, the reference resistance is determined to be 1K. Measuring range 500 ohms to 10K ohms.

Test results using constant current method below 500 ohms:

Current: mA

1

5

10

Resistor: Ohms

100

100

100

voltage across resistor

0.103V

0.501V

1.021V

error:

0.3%

0.1%

0.4%

Based on the above experimental results, the current is determined to be 5mA. The range is 0-3.3V, which means the resistance range is 0-660 ohms.

3. Circuit design

1. Constant current circuit

 

R1 is a positioner to adjust the current.

 

2.  Voltage dividing circuit

 

The normally closed terminal of the relay is connected to a 1K resistor, and VCC is powered by 3.3V .

 

3. Resistor voltage sampling circuit

The acquisition circuit is a 16 -bit ADS8320 external voltage follower

 

3. Software design part

The software part is a main program block with three subroutines. The basic part and the functional part each adopt different procedures. The main program flow chart will run every time it is reset.

 

The following is the main flow chart  

 1. Resistance measurement mode flow chart

 

The main function of this function program is to realize automatic switching of the measurement range by operating the corresponding relay. First, the instrument is placed in the middle gear to roughly measure the resistance to be measured, the channel is switched based on the rough measurement value, and then precise measurement is performed. The process is shown in Figure 6 .

 

Figure 6

2. Resistor automatic screening mode flow chart

The purpose of this function is to perform resistance screening. First, the qualified resistor resistance range is calculated through the screened resistance value and allowable error input by the keyboard ; then the resistance value of the measured resistor is measured by calling the resistance measurement module ; finally, the measured resistance is compared with the user keyboard input resistance value and error range. Compare and judge, and display the judgment results in real time and make voice broadcasts.

The flow chart is shown in Figure 7 .

 

3.  Locator automatic scanning mode flow chart

The scanning program mainly drives the positioner through a stepper motor, and then displays the curve of the resistance angle change of the positioner in real time on the OLED LCD screen, using the dot method.

 

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-09 16:33:47

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

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号