Pages: [1]   Go Down
Author Topic: External Analog Reference on Arduino Pro Mini  (Read 1463 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 25
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27352
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Pages: [1]   Go Up
Jump to: