Design of Dual-Integral A/D Conversion Based on Single Chip Microcomputer

Publisher:Tianran2021Latest update time:2011-12-09 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.

Reference address:Design of Dual-Integral A/D Conversion Based on Single Chip Microcomputer

Previous article:Research on Photoelectric Detection Based on Single Chip Microcomputer
Next article:Four steps to learn MCU

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号