# Voltage range limitations on ADC

I'm designing an amplification stage using an MCP6021 op-amp operating from 0 to 5V. I managed to tune the circuit so I get 515.646mV to 4.878 V but I could get like 4.99V if tuned the gain a bit more. The reason for not doing so is because I was suggested to keep a minimum of 50mV from both 0V a 5V due to voltage range limitations of the ADC (I'm using a 10 bit ADC by the way), which would be 4.95V. I've been researching about these "voltage range limitations" but the only limitation I found is resolution, 4.88mV ideally, which is ~10 times smaller than 50mV. Could someone explain what I'm missing? Thanks

• Which ADC? The datasheet for it will tell you its input limits.
– JRE
May 18 '18 at 7:44
• I plan to use a PIC16F873 but for testing purposes I'm using an Arduino MEGA which is based on ATMEGA2560. Could you tell me how are these input limits called in datasheets, I've been already reading the PIC15F873 datasheet but didn't find anything about input limits May 18 '18 at 7:50
• The suggested 50 mV (5.0 V - 50 mV = 4.95 V) is what I call "headroom" or "breathing space" which most circuits need for proper operation. Feeding a circuit with 5.0 V and expecting it to properly measure up to 4.99 V is asking for trouble as there is almost no headroom. It can be done but requires so circuit "tricks" like level shifting. May 18 '18 at 7:52
• @Bimpelrekkie So you suggest that those 50mV come from power supply output error? May 18 '18 at 7:55
• That is one factor yes, a 5 V voltage regulator might typically have a 5% tolerance so that's 0.25 V so then even 50 mV is very optimistic. Then a more realistic input voltage range will be up to 4.5 V (0.25 V from the supply being low and 0.25 V for other factors). For proper circuit design you need to take margins and inaccuracies into account. If you don't and everything is "on the edge" you have a large chance that your circuit will not always work. For example, it might work at 20 degrees C on your bench but not at 50 C when it is sitting in some hot environment. May 18 '18 at 7:59

The data sheet will provide you the values you need. Your previous question was more general so I suggested 50 mV either side because some ADCs can have zero offset and gain errors that force you significantly inside the "nominal" refernce voltage range.

For the PIC you listed the errors are listed in table 15-12: -

• Resolution 10 bits
• INL +/-1 LSb
• DNL +/-1 LSb
• Offset +/-2 LSb
• Gain +/-1 LSb

So you could have a total of +5 LSb at the zero end of the scale and -5 LSb at the top end of the scale.

5 LSb in a 5 volt signal having 10 bits of resolution is +/-24.4 mV and this would be for ratiometric operation.

• I've been checking the table and what some of those errors actually mean, thanks for the useful information, I had no idea. I guess I'll have also to keep an eye on environment temperature as Bimpelrekkie said May 18 '18 at 11:02