Skip to content

This repository will explain how and when to use the powerful noise suppression features available on the Microchip tinyAVR® 1-series and megaAVR® 0-series ADCs.

Notifications You must be signed in to change notification settings

microchip-pic-avr-examples/attiny817-noise-countermeasures-for-adc-mplab

Repository files navigation

MCHP

Noise Countermeasures for ADC Applications

This repository will explain how and when to use the powerful noise suppression features available on the Microchip tinyAVR® 1-series and megaAVR® 0-series ADCs. In these ADCs, the input signal is fed through a sample-and-hold circuit which ensures that the input voltage to the ADC is held at a constant level during sampling. The ADC supports sampling in bursts where a configurable number of conversion results are accumulated into a single ADC result (sample accumulation). Further, a sample delay can be configured to tune the ADC sampling frequency associated with a single burst. This to tune the sampling frequency away from any harmonic noise aliased with the ADC sampling frequency (within the burst) from the sampled signal. An automatic sampling delay variation feature can be used to randomize this delay to slightly change the time between samples.


Topics covered include using the ADC hardware sample accumulator to filter out zero mean random noise and surpassing harmonic noise through tuned sampling delays or automatic sampling delay variation. The noise filtering is demonstrated by using an example source code and plotting a graph of ADC samples in MPLAB Data Visualizer. This is explained in detail in the Application Note AN2551 - Noise Countermeasures for ADC Applications by Microchip. The code is run on a ATtiny817 Xplained Pro board.

Related Documentation

Software Used

Hardware Used

Operation

  1. Connect the ATtiny817 Xplained Pro board to the PC using the USB cable.

  2. Download the zip file or clone the example to get the source code.

  3. Open the project in MPLAB X IDE.

  4. Follow the application note AN2551 - Noise Countermeasures for ADC Applications to configure the code for different types of noise.

  5. Build the solution and program the ATtiny817.

  6. Plot the ADC results:

  7. Try plotting different signals by combining the use of random noise, periodic noise, sample accumulation and sampling delay. You do this by reconfiguring the macro definitions before building and programming the device. The new graph will be plotted in Data Visualizer.

Conclusion

We have now looked at how to use the powerful noise suppression features available on the Microchip tinyAVR® 1-series and megaAVR® 0-series ADCs. The example described how to use the ADC hardware sample accumulator to filter out zero mean random noise and surpassing harmonic noise through tuned sampling delays or automatic sampling delay variation.

About

This repository will explain how and when to use the powerful noise suppression features available on the Microchip tinyAVR® 1-series and megaAVR® 0-series ADCs.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages