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.
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
- Popular Resources
- Popular amplifiers
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- Modern Electronic Technology Training Course (Edited by Yao Youfeng)
- Modern arc welding power supply and its control
- Small AC Servo Motor Control Circuit Design (by Masaru Ishijima; translated by Xue Liang and Zhu Jianjun, by Masaru Ishijima, Xue Liang, and Zhu Jianjun)
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
- Is it suitable to learn Java right after graduating from university?
- [Social Recruitment] Senior Comprehensive STA R&D Engineer
- Signal correlation operation and algorithm analysis in single chip microcomputer program application
- 【ST NUCLEO-G071RB Review】USART
- 【TI mmWave Radar Review】Human Body Position Detection
- The electronic competition is coming again, come and vote, will you participate?
- 【FAQ】 TPS63020: Phase margin improvement method
- KiCad requires the use of the new kicad.org domain
- 【GD32307E-START】+ Dual-color OLED screen driver display
- [Automatic clock-in walking timing system based on face recognition] Maixbit K210 serial communication protocol debugging