I am having a problem with the analog readings on my Due. On pin A4 and A5 I am measuring voltages:

double vcc = 3.288  // taken on pin 75 (ADVREF) ;
result = analogRead(A4) * (vcc / 4095);   // result = 0.47+- 0.01      actual reading = 0.429
result = analogRead(A5) * (vcc / 4095);   // result = 0.49+- 0.01      actual reading = 0.555

As you may see I could not simply offset the value because both have very different offset: one is positive and the other is negative. The reading is off by 0.05v, which is inaccurate for a 12-bit ADC that offers 0.000805v resolution, almost a 1000x inaccuracy.

Is there any way to calibrate analogRead further without using additional external components on the pin?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.