Oversampling ADC to reduce the noise in F28335
How can i reduce noise using oversampling in the F28335?
8 Comments
Time DescendingThe idea behind "oversampling" is to take multiple samples during the same time step and perform some sort of operation on those samples to mitigate the effect of noise, without needing to wait for multiple time steps, thus inducing a measurement latency.
A common method to address noise is to simply calculate the mean or average of the oversampled signals.
This white paper discusses the use of oversampling to address ADC noise.
According to the documentation for the F28335, you can perform sequential ADC conversions on the same channel multiple times from the same "trigger" and store the results of all the conversions. Then you can apply any method you choose to mitigate noise in the measurements.
http://www.ti.com/lit/ds/symlink/tms320f28335.pdf (page 122 - last paragraph)
If you are using the Embedded Coder Support Package for Texas Instruments C2000 Processors, you can enable the same channel to be captured multiple times by configuring the ADC block "Input Channels" tab.

In this case, the output of all four conversions will be a vector signal with 4 elements.
In the following screenshot, you can see an example implementation for averaging the four samples captured by the ADC:

The " Sum of Elements " block sums the vector elements from the ADC block, and the gain of "1/4" rescales by the number of sampled elements to produce the mean value of the 4 samples.
The use of "4" elements is not strictly necessary, but does work out nicely as dividing by a power of two with integer datatypes results in a bit-shift in the generated C-code instead of a multiply or divide, which is generally a faster operation to perform. (Though I'm not one to promote premature optimization, but thought I would point this out as an option)


