Precision of resistor measurements...

Hi,

Thanks for all these answers, I've been testing most of your comments but root cause is completely different. I think I found it. First few points to mention:

  • I've replaced sensors for well known resistors, to ensure reads are consistent.

  • Maths are correct, equation I'm using is valid. Easy to demonstrate.

  • I've tested readings with a decoupling capacitor of 100nF but it doesn't help. In fact Atmel datasheet for SAM3X micros do not show any recommendation about it. It recommends impedances lower than 10K for good measures but this depends on the sensor itself which I cannot control, obviously I can reduce the ref. resistor to be less than 7.87K but will increase power consumption and also doesn't help to improve measures (tested). I'm using this value as recommended in sensor manufacturer examples.

  • Aref in a Due is 3.3Volts. The advantage of using 2 analog inputs is that measures do not depend on ref. voltage itself.

Ok, so the interesting part:

  • When I'm powering the circuit connecting the Due to the USB programming port and a USB socket I get correct readings in resistors, obviously with an acceptable error.

  • When I'm powering the Due with the power supply I'm building (adafruit breakouts: solar lipoly charger + powerboost + TPL5110 as a timer ) I get resistor measurements with an important error.

So I should understand what's missing in my power supply as all circuit is working fine and XBee packets are sent normally in both cases...

Regards,
Joan