Analyze how to improve the analog-to-digital conversion accuracy of single-chip microcomputers

Publisher:SHow111timeLatest update time:2013-02-20 Source: dzscKeywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

    introduction

  When single-chip microcomputers are used in industrial control and other aspects, analog quantities such as current, voltage, temperature, displacement, and speed are often converted into digital quantities, and then further calculated and processed in the single-chip microcomputer to complete the corresponding data storage, data transmission, and data output to achieve the purpose of analysis and control. With the continuous development of large-scale integrated circuits, many single-chip microcomputers have built-in A/D modules. Therefore, the A/D conversion of single-chip microcomputers can be completed with built-in A/D modules or external A/D circuits. Now let's talk about the working principle and advantages and disadvantages of A/D conversion of single-chip microcomputers, and analyze the methods to improve the accuracy of A/D conversion.

  1 Working principle, advantages and disadvantages of A/D conversion

  (1) A/D conversion on the microcontroller chip

  The A/D conversion on the microcontroller chip uses the built-in A/D module of the microcontroller to perform A/D conversion by selecting different analog channels. The analog quantity can be directly input to the corresponding input pin of the microcontroller, and the peripheral circuit is simple. The converted data is directly stored in the on-chip register, and data extraction is convenient. However, the built-in A/D modules of most microcontrollers are only 8-bit and 10-bit, and high-precision A/D conversion cannot be performed. The principle is shown in Figure 1.


  (2) External A/D conversion of single chip microcomputer

  The single-chip microcomputer external A/D conversion is that the single-chip microcomputer controls the external A/D conversion circuit to perform A/D conversion through a certain logic circuit, and the peripheral circuit is relatively complex. The single-chip microcomputer reads the conversion result into the single-chip microcomputer through a certain timing sequence, and by selecting the A/D conversion circuit as required, high-precision A/D conversion (up to 14 bits, 16 bits, 22 bits or even higher) can be achieved. The principle is shown in Figure 2.

  2 Methods to improve A/D conversion accuracy

  To improve the accuracy of A/D conversion, it is certainly possible to use a high-precision external A/D converter to meet the requirements. In addition, are there any other methods? The answer is yes. The following introduces several methods of using the on-chip A/D conversion module to improve conversion accuracy.

  ① Taking the voltage acquisition as an example, assuming that a DC voltage of 0.0 to 400.0 V needs to be acquired, the reference voltage VREF+ of the single-chip A/D module is 5.0 V, and VREF- is 0 V. The voltage to be acquired is attenuated to 0.0 to 5.0 V. The connection circuit is shown in Figure 3. Obviously, if the accuracy of 0.1 V is to be achieved, the resolution of the A/D conversion must be less than 1/4000, and the A/D module on the chip is generally 10 bits, with a resolution of only 1/1 024, which does not meet the requirements. Since most analog (0 to 400 V voltage) inputs are not stable values ​​and will fluctuate, in order to obtain higher-precision data, the data collected multiple times can be accumulated and then averaged (in fact, even if the A/D conversion with the required resolution is required, it must be accumulated and averaged to obtain more stable data). If the 10-bit data collected at a certain interval is Di, 64 such data are accumulated and then divided by 16, 12-bit data D can be obtained, that is,


  At this time, the resolution of D is 1/212=1/4 096. In this way, higher precision data is obtained. [page]


  However, if the analog input value (0-400V voltage) is very stable and the 10-bit data Di collected at certain intervals are the same, the above method will not meet the requirements.

  ② If you want to get higher local precision data in the A/D conversion process, for example, to detect the voltage of the battery during charging and discharging, the voltage range is 0-18 V, and the general precision is 0.02 V, but users are more concerned about the voltage of 8-13 V, and the precision within 8-13 V must reach 0.01 V. In order to solve this problem, a circuit with the principle shown in Figure 4 is designed.


  The single-chip microcomputer has a built-in 10-bit A/D module. The Ui (0~20 V) voltage is attenuated by R1, R2, and P1 to obtain a 0~5 V voltage, which is directly sent to the AN1 input port of the single-chip microcomputer, that is, VAN1=Ui/4.

  U2A is connected as a subtraction circuit, that is, the voltage at U2A 1 is VU2A1=VAN1-2 V=Ui/4-2 V=(Ui-8 V)/4. U2B is connected as a 4-fold amplifier circuit, and the voltage at U2B 7 is VU2B7=VU2A×4=Ui-8 V. A 5 V voltage zener diode is connected in parallel to the AN2 input to ensure that when the input voltage is greater than 8 V, the microcontroller AN2 can obtain a voltage of 0 to 5 V. The single-chip microcomputer first collects the data of AN1, and judges whether the input voltage is between 8 and 13 V through the collected data. If it is not between 8 and 13 V, the collected data is the digital quantity (D: 000H~3FFH) corresponding to the analog quantity (U), with an accuracy of 20 V/2010=20 V/1 024≈0.02 V, and the voltage data U=D×0.02 V; if the collected data is between 8 and 13 V, the single-chip microcomputer collects the data of AN2 again, and the collected data plus 8 V is the digital quantity (D: 000H~3FFH) corresponding to the analog quantity (U), with an accuracy of (13-8)V/210=5 V/1 024≈0.005 V, and the voltage data U=8 V+D×0.005 V. In this way, the A/D conversion accuracy between 8 and 13 V is greatly improved.

  Conclusion

  With the continuous development of industrial automatic control, the application of single-chip microcomputer in industrial automatic control is becoming more and more extensive. The working principle of improving A/D conversion accuracy introduced in this article has certain practical value, especially through simple analog operation circuit, A/D conversion accuracy can be partially improved. Using this principle, if the analog quantity is amplified in sections, the A/D conversion accuracy can also be improved in the whole range. This method has a good application prospect in the field of A/D conversion.

Keywords:MCU Reference address:Analyze how to improve the analog-to-digital conversion accuracy of single-chip microcomputers

Previous article:Application of single chip microcomputer in microcomputer protection module of power system
Next article:Misunderstandings and Skills in Using MCU Instructions

Recommended ReadingLatest update time:2024-11-16 19:30

Automotive semiconductors on the rise
The past six months in the automotive industry have been dominated by the "chip shortage". Ford and GM suffered huge losses due to production cuts due to chip shortages, and Tesla temporarily stopped production at its California factory due to insufficient chip supply. In 2021, all global automakers are shrouded in th
[Automotive Electronics]
Automotive semiconductors on the rise
How to use microcontroller to send a string of Chinese characters to the computer
Recently, I saw a friend asking on the Internet how to send a string of Chinese characters from a microcontroller to a computer. In fact, this question is not difficult. hehe. Just set the relevant parameters, and then define the Chinese characters as a set of characters and send them to the computer. In order to gi
[Microcontroller]
How to use microcontroller to send a string of Chinese characters to the computer
Instruction sets that must be understood when developing PIC microcontrollers
  PIC microcontrollers have computing functions and memory like CPUs and are controlled by software. However, the processing power is average and the memory capacity is also limited, depending on the type of PIC. But their highest operating frequency is about 20MHz, and the memory capacity is about 1K-4K bytes for wri
[Microcontroller]
Application of USB interface chip SL811HS in 51 single-chip microcomputer system
1. Introduction USB (Universal Serial Bus) is a new interface technology jointly proposed by INTEL, DEC, MI-CROSOFF, IBM and other companies, which has been gradually widely used in the PC field in recent years. The USB interface has good versatility, strong real-time performance, various transmission metho
[Microcontroller]
Application of USB interface chip SL811HS in 51 single-chip microcomputer system
AVR microcontroller temperature measurement based on DS18B20
#include iom16v.h #include macros.h #include delay.h #define uint unsigned int #define uchar unsigned char #define dula_set PORTA |=BIT(3) //Digital tube segment selection #define dula_clr PORTA &=~BIT(3) #define wale_set PORTA |=BIT(4) //digital tube bit selection #define wale_clr PORTA &=~BIT(4)  #define DQ_IN DD
[Microcontroller]
How to Get Rid of Electromagnetic Interference in the Process of Single Chip Microcomputer Design
  For the design of electromagnetic interference, we mainly carry out design processing from the hardware and software aspects. The following is an introduction to the processing of electromagnetic compatibility from the PCB design of the microcontroller to the software processing.   1. Factors affecting EMC   1. Vo
[Microcontroller]
Analysis of the advantages and disadvantages of avr microcontroller
AVR microcontroller is an enhanced RISC (Reduced Instruction Set CPU) high-speed 8-bit microcontroller with built-in Flash developed by ATMEL in 1997. AVR microcontrollers can be widely used in various fields such as computer peripherals, industrial real-time control, instrumentation, communication equipment, and ho
[Microcontroller]
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号