Oversampling technology based on ARM Cortex-M3

Publisher:知音学友Latest update time:2011-05-28 Keywords:ARM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

In this paper, through the analysis of oversampling technology, this technology is applied to the LM3S8962 on-chip ADC of TI Company, and a higher resolution is obtained without using an expensive off-chip ADC. It not only saves costs, but also saves circuit board space, and also improves the overall reliability of the system. 1 Analysis of oversampling technology 1.1 Principle of oversampling Oversampling is to sample the data to be measured multiple times, obtain sample data, accumulate and sum these sample data, and filter them by mean value, and finally obtain the sampling result after reducing noise. Under certain conditions, oversampling can improve the signal-to-noise ratio (SNR) and reduce noise, thereby improving the measurement resolution. Oversampling technology increases the sampling frequency to 4 times the sampling frequency, can filter out components higher than 3fb, and use digital filters to filter components from fb to 3fb, and finally the useful components are completely preserved. If enough samples are taken, the original signal can be reproduced. Formula (1) is the frequency requirement of oversampling In formula (1), Fo is the oversampling frequency; n is the number of bits of resolution to be increased; fb is the initial sampling frequency requirement. 1.2 Relationship between oversampling, noise and resolution Before proposing the corresponding relationship between oversampling and noise, a brief description of quantization noise is given. Quantization error is determined by the spacing between adjacent ADC codes, so the distance between adjacent ADC codes is In formula (2), N is the number of bits of the ADC code; Vr is the reference voltage. Formula (3) is the relationship between the quantization error ed. Nyquist theorem points out that if the bandwidth of the measured signal is less than 1/2 of the sampling frequency, then the signal can be reconstructed. Now white noise is used to approximate the noise in the actual signal. The noise energy spectrum density in the signal frequency band is In formula (4), e(f) is the in-band energy spectrum density; ea is the average noise power; fs is the sampling frequency. The power relationship of ADC quantization noise is shown in formula (5). Since quantization noise will cause fixed noise power, the oversampling ratio can be calculated for the increased effective number of bits In formula (6), P is the oversampling ratio; fs is the sampling frequency; fm is the highest frequency of the input signal. The in-band noise power at the output of the low-pass filter is shown in formula (7). Where n2 is the noise power output by the filter. It can be seen that oversampling can reduce noise power without affecting signal power. While reducing quantization error, it can obtain the same signal-to-noise ratio as high-resolution ADC, thereby increasing the effective number of bits of the measured data. The effective resolution of the ADC can be improved by increasing the sampling frequency or oversampling ratio. 2 Oversampling conditions and operation steps For oversampling, in theory, the signal needs to have a certain amount of noise, and it must be approximately white noise with a large enough amplitude. If the noise signal cannot meet the theoretical requirements described above, it is necessary to introduce noise excitation. Therefore, periodic noise is selected as the excitation signal. At the same time, there are certain requirements for the excitation noise: the excitation noise amplitude ≥ 1 LSB; the noise mean must be 0 when the excitation noise is added. After understanding the oversampling theory and the conditions that need to be met, the oversampling operation steps are designed for specific applications. They are summarized as follows: (1) Determine whether the sampled signal has noise. If there is no noise, superimpose periodic excitation noise. (2) Oversample the signal 4n times (n is the number of bits of resolution that you want to increase). If you use the on-chip 10-bit ADC and want to get 14-bit ADC accuracy, you need 44, or 256, 10-bit oversampling. (3) Extract the digital sequence and accumulate each sampled value. (4) For the accumulated sampled data, if you want to increase the accuracy by n bits, shift it right by n bits to get the oversampled value. [page]


























3 LM3S8962 implements ADC oversampling 3.1 Introduction to the features of the Cortex-M3 core In the design of ADC oversampling, TI's ARM Cortex-M3 chip is selected. The main reason is that its powerful and cost-effective Cortex-M3 core further improves the efficiency and accuracy of oversampling. The core has the following features: (1) It adopts the ARMv7M architecture, which expands 36 instructions based on the ARMv4T architecture. (2) Based on the Harvard structure, data and instructions can be read from the memory at the same time, and multiple operations can be performed in parallel to speed up program execution. Compared with ARM7TDMI-S, the efficiency per MHz of ARM instructions is increased by 35%, and the efficiency of Thumb instructions is increased by 70%. (3) It has multiple sleep and wake-up modes to achieve low power consumption of the product. (4) Single-cycle multiplication, multiply-add, and hardware division instructions to achieve fast calculations. (5) Low-latency interrupt processing: supports 8-level hardware interrupt nesting, tail chain function, and late processing of high-priority interrupts. 3.2 Software implementation of oversampling (1) Peripheral initialization. Before implementing oversampling in software, each module must be initialized and configured. Initialize the timer, ADC, UART and other modules. The timer module is used to provide the system clock cycle. Configure the trigger mode and sampling rate of the ADC. Use UART to transfer the measured value to the PC to check whether it is correct. (2) Generate a PWM signal as noise. In order to ensure the reliability of the application of the oversampling principle, a noise excitation signal is introduced. In order to avoid the error caused by the excitation noise, the internal PWM signal generator is used to generate a PWM wave with good periodicity and symmetry as the excitation noise. The steps for generating noise are shown in Figure 1.












(3) Data collection, filtering and extraction.
The digital average filtering done in oversampling only improves the smoothness, but does not increase the accuracy. The extraction process is the real improvement of accuracy. The additional K samples are accumulated as the conventional average, but the result is not directly divided by M, but right-shifted by N bits (N is the expected additional accuracy) to obtain a more accurate sampling result.
The oversampling algorithm is shown in Figure 2. For TI's LM3S8962 chip, the method to increase the accuracy of the 10-bit AD value to 12 bits is to directly call the register read function HWREG to access the FIFO buffer. After two cycles, the 16 10-bit conversion values ​​collected from the FIFO are added to produce a 14-bit result. After shifting right by 2 bits, the desired 12-bit AD value is obtained. [page]

4 Application Analysis
Conversion rate, stability and resolution are the measurement criteria of analog-to-digital converters. In order to clearly see the effect of improving the AD value by using oversampling technology, the LM3S8962 chip was used to perform a 12-bit ADC oversampling experiment. According to the displayed experimental data and measurement conditions, the improvement of the indicators is given and analyzed. For the conversion rate, the on-chip timer is used for measurement. When the CPU is in the 50 MHz clock frequency state and the ADC sampling speed is 100 kHz, the sampling continuous trigger mode performs one 12-bit oversampling time of 52 μs. Since the data buffer area must be accessed while the data is converted, the actual speed is 64 μs. The values ​​obtained after several samplings are digitally filtered and the sliding average is used to obtain a relatively stable data value. The data after oversampling is transmitted through the serial port as shown in Figure 3. A group of data has 6 bits, of which the first 3 bits are the original 10-bit sampling values ​​and the last 3 bits are the 12-bit oversampling values. It can be seen from Figure 3 that the value of the 12-bit oversampling resolution is more stable than the resolution value of the 10-bit sampling value.


In order to verify that the higher the number of bits, the higher the sampling accuracy, a 13-bit oversampling experiment was conducted. During the sampling process, the cycle was repeated 8 times to obtain 64 sets of AD values, and the nonlinear error was corrected using the segmented broken line method to convert the sampled values ​​into standard voltage values. As can be seen from Figure 4, the voltage value after oversampling fluctuates very little, and the effect is particularly obvious.



5 Conclusion
Starting from the spectrum characteristics of oversampling, this paper analyzes the basic principle of oversampling technology. Then, TI's cost-effective Cortex-M3 core ARM is used to improve the resolution of the measured value by oversampling technology. The experimental results show that the use of oversampling technology can not only reduce costs, but also simplify the peripheral circuits. When combined with the Cortex-M3 core, it can further improve the operating speed, reliability and stability of the system. This combination plays a positive role in the fields of detection and monitoring, and has certain promotion and practical value.

Keywords:ARM Reference address:Oversampling technology based on ARM Cortex-M3

Previous article:Character collection and recognition system based on ARM and Linux
Next article:Design of Embedded 3G Wireless Video Monitoring System Based on ARM9

Recommended ReadingLatest update time:2024-11-17 11:46

Part2_lesson1---Arm family review
Chips (such as 2440, 6410, 210, etc.) contain ARM cores. The instruction structure is related to the ARM core: ARM9 corresponds to the instruction architecture version ARMV4 ARM11 corresponds to the instruction architecture version ARMV6 Cortex A8 corresponds to the instruction architecture
[Microcontroller]
Part2_lesson1---Arm family review
Analysis of which ARM development board is better
There are many ARM development board manufacturers on the market, and there are also many different series on the market. Sometimes it is difficult to choose a development board. So how to choose an ARM development board? The following is an analysis of several manufacturers. Guangzhou Friendly Arms The product is
[Microcontroller]
Analysis of which ARM development board is better
ARM7 Getting Started 2, Hello world program
   Main file code: /******************************************************************************/ /*  This file is part of the uVision/ARM development tools                    */ /*  Copyright KEIL ELEKTRONIK GmbH 2002-2004                                  */ /*************************************************
[Microcontroller]
ARM7 Getting Started 2, Hello world program
GNU ARM assembly .balignl alignment experiment
The ".balignl 16 0xdeadbeef" statement appears in the start.s source file of u-boot. This statement is used to implement address alignment. .balignl is similar to .align. The complete alignment statement format is: .align {alignment} {,fill} {,max} alignment is used to specify the alignment mode. Possible values ​​a
[Microcontroller]
GNU ARM assembly .balignl alignment experiment
Understanding the Arm China "leadership change" storm in one article
      In 2020, the technology circle has seen one "drama" after another. This time, it was the turn of Arm, the world's leading semiconductor intellectual property (IP) manufacturer, and Arm China's joint venture, Arm Technology (hereinafter referred to as Arm China). The two sides staged a drama of "the board of dire
[Mobile phone portable]
Understanding the Arm China
Introduction to ARM Cortex-M7 processor architecture
This article uses ST's STM32F7 as an example to introduce the M7 architecture, mainly involving the M7 memory model and buffer mechanism, programming model, exception model, two major working modes of the processor, and privilege levels. For core registers, core peripherals SysTick, MPU, The FPU and system control blo
[Microcontroller]
Application of MAX194 in ARM microcontroller system
Introduction In order to realize the automatic measurement and control of computers, A/D conversion technology is adopted in more and more fields. With the development of large-scale integrated circuit chip technology, integrated circuit chips with faster speed, higher precision and more convenient use are eme
[Microcontroller]
Application of MAX194 in ARM microcontroller system
Learn ARM development (6)
Last time, I talked about learning ARM assembly. OK, let's start now. My boot program is modified from UBOOT1.1.2. You can download the source code of UBOOT. Maybe you will ask where to download it? I don't need to answer this question. Just use GOOGLE and search for u-boot. You can find it. Since this boo
[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号