4.2 Signal Margin and Analog-to-Digital Converters (ADCs)
Analog-to-Digital Converters (ADCs) measure an analog signal and generate a digital value proportional to the input. To maximize the input signal range of the ADC, a larger voltage reference can be used, but this comes at the cost of signal resolution.
One solution for this is to use the operational amplifier to dynamically scale the input signal for more resolution from the ADC. However, when using the operational amplifier for signal gain, it is important to leave a small amount of margin to account for any errors in the signal chain. If the output of the operational amplifier exceeds the measurement range, then the digital value will be clipped at the largest value possible in the ADC. This is described in more detail in Microchip Application Note AN4225, "Maximizing the Signal: Tips and Tricks to Properly Acquiring Analog Signals" (DS00004225A).