I have a 5 v speed sensor and when I am reading the analog values the arduino analog output gives me some offset. The offset increases when the reading increases.What I mean is lets say the sensor is outputting 1 volt. The analog read of arduino gives me ADC count and when I conver that count to voltage it is like 1.02. When the sensor is outputting 2 volt its like 2.05. the offset keeps increasing and becomes maximum at 5 vol. I was trying to use external VREF but there is none on Arduino Pro mini 5 V.I even tried writing analogReference(DEFAULT) on the code but didnt help. Is there any solution towards it?? thanks in advance.
External A-Ref is pin 20, connects to Pin1 of capacitor C1, it is not brought out to an external pin. You can carefully tack a wire on it & bring it out.
Are you sure you're the conversion right? ADC# * (5/1023)? You may be seeing round off error also if your math is not using the correct data type.
The obvious solution to me is just use the ADC number, and not convert it to a voltage.
Another thing to do is take couple readings, each time, throw the first away, this supposedly helps make sure the voltage has a chance to settle thru the analog mux and the sample/hold circuit that is before the actual A/D conversion.