In the process of circuit testing, it is often encountered that there is a large error between the experimental data and the theoretical value due to the neglect of the influence of some small resistances, thus affecting the test effect. For example, copper resistance often exists in inductors and transformers, and the resistance of subway rails; due to its small value, it cannot be measured by a general pointer multimeter; usually a bridge is used for measurement in the laboratory, but the operation procedure of the bridge is cumbersome, and the resistance value of the measured resistance cannot be directly read. In view of this, we adopted a single-chip microcomputer and designed the measuring instrument by taking advantage of the single-chip microcomputer. The measuring instrument can read the measured resistance value directly from the LCD display screen, with a measurement range of 10μΩ~2.9999kΩ. At the same time, the test data can be stored and then sent to the host computer through the serial port. Through the powerful functions of the host computer, the measured data can be analyzed and processed. The measurement accuracy of the tester is as high as ±0.1%, and the four-terminal measurement method is adopted. The resistance value is not affected by the length of the lead and the contact resistance. Not only is the measurement simple and the reading is intuitive, but the measurement accuracy and resolution are also higher than those of general bridges. It can be used in laboratories and research institutes, especially on the job site.
2. Test Principle
As shown in the figure above, the basic principle of this machine is to use a known constant current to pass through the measured resistor, take out the voltage drop on the measured resistor, amplify it through the amplifier and convert it into a 0-3V DC voltage, then send it to the input end of the C8051F005A/D converter, process it through the microcontroller, and finally directly display the resistance value through the LCD display.
Since the measurement of tiny resistance is to be realized, the amplifier is required to have high resolution (up to 10μV), good linearity, high input impedance, low drift, strong noise suppression and anti-interference capabilities. For this reason, we designed a differential amplifier as shown in the signal processing circuit in Figure 2. This amplifier consists of op amps A1 and A2 to form the first-stage differential circuit, A3 to form the second-stage differential circuit, R3, R4, and RW to form a feedback network, and introduces deep voltage series negative feedback, so it has a higher input impedance, and A1 and A2 both select the same phase end as the input end, then their common-mode output voltage and drift voltage are also equal, and then through the differential circuit composed of A3, they can offset each other, so it has a strong common-mode suppression capability and a small output drift voltage; A4 is a voltage reverse follower, and its function is to isolate the front and back stages. The following equation can be obtained by analyzing this circuit.
When R5= R7, R6= R8, the above equation can be simplified to:
From formula (3), we know that the output voltage U4 is proportional to the measured resistance RX. The amplifier multiple is determined by R3, R4, and RW. Since the input voltage of the A/D converter is 0~3V, the amplifier multiple of this instrument is set to 10 times, and a DC voltage of 0~3V is obtained at the U4 terminal. In order to ensure the resolution and stability of the amplifier, in addition to the advantages of the above-mentioned circuit itself, the integrated operational amplifiers A1, A2, and A3 use high-precision, low-noise, and low-drift max495. The resistors of the feedback branch are all high-precision, low-temperature coefficient precision resistors. In addition, some shielding measures are taken to effectively suppress noise and interference. During the test, the four-terminal wiring method is used between the measured resistor and the test instrument. The constant current source current is input through IN1 and output from IN2. When measuring, four dedicated wires are connected to the measured resistor Rx. When the measured resistance is small, in order to avoid the influence of wire resistance and contact resistance, the four connecting wires must have consistent characteristics and the same impedance, so that the influence of wire resistance and contact resistance can be eliminated.
3. Hardware design of small resistance tester
The core part of the instrument is the circuit board that can realize various functions. It uses the C8051F005 single-chip microcomputer of CYGNAL. The system mainly includes power supply circuit, signal acquisition circuit, signal amplification circuit, LCD drive and display circuit, serial communication circuit, system reset circuit and C8051F005 single-chip microcomputer system circuit (including analog-to-digital conversion circuit). The detailed circuits of each part of the system are shown in Figure 2.
3.1、C8051F005 MCU system circuit
This system uses C8051F005, which has the following features:
The chip has up to 60KB Flash ROM and 2KB RAM, so users do not need to expand the memory externally;
A 12-bit A/D converter ADC12 with built-in sample-and-hold function;
Two-channel serial communication interface, can be used in asynchronous or synchronous mode;
An analog comparator that can output voltage comparison or reference voltage.
ADC12 is a 12-bit precision A/D conversion module with a sampling and holding function, which is high-speed and universal. It has 8 external signal sampling channels and 4 internal channels. The signal output by the differential amplifier is input into the microcontroller through channel 0. The clock, conversion mode and reference voltage source of the A/D conversion can be set by the user using software.
Since the microcontroller integrates many peripheral modules, it not only simplifies the circuit design, but also greatly reduces the size of the circuit board. In addition, a JTAG interface is reserved on the circuit board, and with an ordinary PC, it is very convenient to debug the system software.
Figure 2. System detailed circuit diagram [page]
3.2 Serial communication circuitThe C8051F005 microcontroller integrates two universal serial synchronous/asynchronous modules USART0 and USART1, both of which support two different serial protocols, namely; universal asynchronous protocol (UART protocol) and synchronous protocol (SPI protocol). This circuit uses the UART protocol and communicates with the PC through an RS232 interface chip MAX3221E.
MAX3221E is a single RS-232 transceiver with an operating voltage of +3.0~+5.5V, a supply current of only 1μA and an automatic shutdown function. One of the major features of the C8051F005 microcontroller is its low power consumption. It has multiple power consumption states that can be programmed and controlled. MAX3221E is also an interface device with low power consumption characteristics. Through the EN, FORCEON, and FORCEOFF pins, the working state of the driver and receiver can be controlled, and the automatic power reduction function can be enabled or disabled, so that it can work in different energy consumption states to achieve the purpose of reducing power consumption.
3.3 Power supply circuit
The system is powered by batteries, which can not only keep the system running stably and reliably but also be convenient for use outside the laboratory.
3.3 LCD drive and display circuit
The LCD display uses the SMS0501C segment code display driver. The interface mode of the LCD display is a two-wire serial interface, the display mode is a reflective positive display, and the operating voltage is 2.7V~5.5V.
3.4 Other circuits
In addition to the above main circuits, the system also has a power undervoltage detection circuit and a system reset circuit. The power undervoltage detection circuit is implemented using the analog comparator integrated inside the C8051F005 microcontroller. The system reset circuit uses a button reset to correctly reset the microcontroller by charging and discharging the capacitor. When the button is pressed, the RST pin of the C8051F005 microcontroller is at a low level. As long as this low level is maintained for more than 2 machine cycles, the microcontroller can be correctly reset.
4. Software Design
The software design of this system adopts a modular design method. The entire program includes the main program, data acquisition program, data processing program, serial communication program, timer interrupt program, and LCD display program. All programs are written in C language, which can be easily debugged and downloaded. Due to space limitations, this article only gives the flow chart of the main program, as shown in Figure 3.
The main program of the system mainly completes the initialization of the C8051F005 single-chip microcomputer system, sets the system clock and interrupt word, calls the keyboard processing program, and switches to the corresponding service program according to different keystrokes to complete different functions, such as data collection and processing, serial communication, and historical record query. Among them, the serial communication subroutine can not only transmit the data stored in the single-chip microcomputer to the PC for processing and analysis, but the user can also set the amount of data to be tested and the length of the test time from the PC according to the situation.
The test is accurate. The instrument has good reading stability and high measurement accuracy when testing small resistances of 10μΩ to 10Ω.
According to the circuit principle described above, a prototype was developed. Experiments have shown that the instrument has low power consumption, which greatly increases the battery life. It is small in size, light in weight, easy to carry, and very suitable for use in the field and on the job site.
Previous article:Atmel MCU Parallel Port Download Cable Production
Next article:Design of soft starter for three-phase asynchronous motor using single-chip microcomputer AT89C51
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Several reasons for electromagnetic flowmeter errors
- Summary and analysis of interference problems in circuit design
- Does the dummy pad have any impact on the electrical characteristics of the PCB?
- [HC32F460 Development Board Review] NO.2 Familiarity with the development process and different peripheral functions
- Classification of RFID readers and their advantages
- [Repost] Correctly select low noise amplifier
- NTC thermistor driver for MicroPython
- How does Cyclone2's ep2c8 provide clock to external ADC?
- Comparison of Autoliv 2nd and 3rd generation night vision cameras
- If I use a battery to power a DCDC circuit, how can I be sure that the battery has enough power?