2.1.2 Sampling Resolution
The sampling resolution of the current measurement relies on several factors. The ADC resolution is one factor as it sets the ceiling for achievable results. Another factor is the selected measurement range. The shunt can theoretically measure infinite current, but since the ADC supports only a limited number of different results, a more realistic range must be selected. For example, if using a 12-bit ADC, there are 4096 measurement steps. When selecting a maximum current of 4.096A, each step of the ADC would, in the best case, correspond to 1 mA.
Another factor is the matching of the ADC range. The ADC will achieve its lowest result at 0V. With a differential measurement this means that no current is passing through the circuit. However, the highest ADC value is decided by the reference voltage VREF. Make sure that the voltage across the shunt resistor is as close as possible to VREF at IMAX. If it is any lower, all possible samples above this voltage are never reached, and the resolution of the ADC is consequently lowered. A gain stage is often used to amplify the maximum input voltage to as close to VREF as possible.