0 Introduction
A/D conversion circuit is an important part of data acquisition system and an important functional interface in computer application system. There are two commonly used A/D conversion chips on the market. One is the successive approximation type, such as AD1674, which is characterized by high conversion speed and low power. The other is the dual-integral type, such as
ICL7135
, which is characterized by high conversion accuracy and strong anti-interference ability. However, the price of high-bit A/D converter is relatively high. This article introduces a high-precision, dual-integral A/D conversion circuit based on a single-chip microcomputer, which has the characteristics of small circuit size, low cost, high cost performance, simple structure, easy debugging and reliable operation, and has good practical application value.
1 Basic principle
of dual-integrating ADC The basic circuit of dual-integrating ADC is shown in Figure 1. Op amp A1, R, and C are used to form an integrator, and op amp A2 is used as a comparator. The circuit first integrates the unknown analog input voltage U1 for a fixed time T1, and then switches to reverse integration of the standard voltage U0 until the integral output returns to the starting value. The reverse integration time is T0. As shown in Figure 2, the larger the input voltage U1, the longer the reverse integration time. During the entire sampling period, the charging charge on the integration capacitor C is equal to the discharging charge, so there is
Since U0 and T1 are both constants, the reverse integration time T0 is proportional to the input analog voltage U1. During this period, the internal counter count value of the microcontroller is proportional to the signal voltage. This count value is the digital value corresponding to U1.
2 Practical dual-integral A/D conversion circuit
1) Hardware circuit diagram
As shown in Figure 3, op amp A1, R, and C constitute an integration circuit. C is usually a 0.22μF polypropylene capacitor, and R is usually about 500kΩ. A2 is a voltage follower that provides a stable comparison voltage for the circuit. Op amp A3 is a voltage comparator to ensure that the A/D conversion level is quickly flipped. CD4051 is a multi-way selection switch. The microcontroller P1.0, P1.1, and P1.2 are used as output ports to control its address selection terminals A, B, and C to select different channels to input to the integrator A1. U is the analog input voltage to be A/D converted, Uin is the input voltage of the integrator, U0 is the comparison voltage, and U1 is the reference voltage. In order to make the A/D conversion result have higher accuracy, the reference circuit should provide accurate voltage. It is recommended to use precision resistors with an accuracy of 1%. The microcontroller uses 89C51, and its internal timer T0 provides accurate time timing for the integration circuit. Counter T1 is used to record the reverse integration time, and INT0 is used to detect comparator level changes. The analog input signal, zero reference voltage and reference voltage to be measured are connected to the input end of the multi-way selector switch. Through the program control in the single-chip microcomputer, each input signal is selected in turn, and the integration circuit is used to perform timing or fixed value integration with the fixed voltage. [page]
The output signal of the integration circuit is used as the input signal of the comparator to compare with the comparison voltage. When the comparator outputs a flip signal, the CPU counter stops counting, thereby obtaining the count value of the zero reference voltage. After processing and calculating this data, the A/D conversion is completed.
2) Conversion process
In order to provide the integration circuit with an integration zero point, the integration circuit is first connected to GND during the system power-on phase. When the comparator outputs a low level, the integration circuit is discharged for a period of time to make the integration capacitor zero charge. Therefore, the working process of the dual integration circuit is divided into three stages:
(1) Zeroing phase: When the comparator outputs a low level, a large amount of charge accumulates on the integration capacitor, which must be discharged to provide an accurate zero starting point for the subsequent A/D conversion. That is, U0 is integrated at a fixed value, and
It can be seen that the discharge time depends on the specific values of U0, U1, R, and C.
(2) Integration stage: The analog input voltage Uin is integrated for a fixed time. The integration time T1 is determined by the accuracy of the A/D. The higher the accuracy, the longer the integration time. The output voltage of the integrator at this stage
is (3) Comparison stage: After the analog input voltage is integrated at a fixed time, the zero level is reversely integrated until the output of the comparator is reversed. The output voltage of the integrator at this stage is
According to the comparator principle, U10=U1, so it can be obtained
Among them, T1, U0, R, C, and U1 are all constants, that is, the integration time T0 of the zero level is proportional to the analog input voltage U, and T0 is the required value. The specific conversion waveform is shown in Figure 4.
[page]
3) Software Design
The internal timer T0 of the single-chip microcomputer controls the timing integration of the reference voltage and the analog voltage respectively, the counter T1 is used to record the reverse integration time, P1.0, P1.1, and P1.2 control the channels of the multiplexer, and the single-chip microcomputer detects the output level of the comparator in a query mode. From the above analysis, it can be seen that the A/D conversion flow chart of the system is shown in Figure 5.
3 Analysis of circuit characteristics
From the above analysis, it can be seen that when the analog voltage U is greater than the reference voltage U1, the zero level is fixedly integrated after the analog voltage U is timed integrated, and the waveform is shown in Figure 4. When the analog voltage U is less than the reference voltage U1, the fixed value integration should be performed on U0 after the analog voltage U is timed integrated. It only needs to be distinguished in the software design or a negative reference voltage is provided. This circuit makes full use of the advantages of low cost and high reliability of the single-chip microcomputer. The main components are only a single-chip microcomputer 89C51, a multi-channel analog switch CD4051, and a four-op amp LM324, so the structure is simple and cost-effective. Practical application shows that the characteristics of this dual-integration A/D converter are stable working performance and strong anti-interference ability, but from the principle analysis, it can be seen that the circuit has inherent delay, so it is not suitable for collecting continuous and fast changing signals.
4 Conclusion
This design circuit retains the main features of dual-integral A/D conversion, and the cost of the entire circuit is very low. As long as the circuit parameters are reasonably selected and adjusted to reduce data processing errors, the conversion accuracy and speed can be further improved, and it has outstanding characteristics such as simple conversion process, high conversion accuracy and low cost. Therefore, it has good use value in data acquisition systems and other application systems.
Innovation of this article: This article uses a multi-way selection switch CD4051 to realize the conversion of the integrator input variable, and the single-chip microcomputer controls the selection of its channel, completes the clearing, integration, and comparison links, and completes the dual-integral A/D. This circuit has the characteristics of simple structure, low cost, and good stability.
Previous article:Research on Photoelectric Detection Based on Single Chip Microcomputer
Next article:Four steps to learn MCU
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
- MSP430 program burning problem in IAR
- If you had 100,000, what would you choose to do?
- Voltage Follower
- ROM boot example of TMS320C6212
- Repair a two-trace oscilloscope of Shanghai Radio Factory No. 21
- Let’s talk about RCD calculation
- Pre-registration for the prize-winning live broadcast | Microsoft and Avnet join forces to help you quickly start your IoT security journey
- Xiaobai needs help!!
- Get a free copy of Industrial Pie worth RMB 879! TI invites you to watch the live broadcast of the introduction of the Industrial Pie open source platform of Sitara AM5708 with prizes
- Using cycloneIV for smoke detection, the reading has not changed