1 Reply Latest reply on Aug 9, 2014 6:07 PM by RGee

    Galileo AnalogRead() not accurate in case of Low Current.


      I've attached a few graphs of voltage readings from the Intel Galileo, via the following code:


      int Pin = A5;    // select the input pin for the potentiometer


      void setup() {




      void loop() {

        analogReadResolution(10);        // 5V => 1024





      I'm running a dead simple circuit: just 5 equal resistance resistors in series, connected to GND and 5V.

      The graph contains the voltage readings between each resistor (that is, 0V, 1V, 2V, 3V, 4V, 5V, if Ohm's law holds).

          For Line 1, each of the resistors had 1kΩ resistance.

          For Line 2, each of the resistors had 10kΩ resistance.

          For Line 3, each of the resistors had 470kΩ resistance.

          For Line 4, each of the resistors had 1MΩ resistance.

      It turns out the Galileo gets abnormally low readings if the resistors have high enough resistance, but the RedBoard from sparkfun and the Arduino give the correct readings, regardless of the total resistance. Does anyone else have this problem?

        • 1. Re: Galileo AnalogRead() not accurate in case of Low Current.

          It may be because of the high impedance  (the big resistors). There is a 4.9k resistor and a .15 uf capacitor on the lines going into the AD7298. That means there is a timing requirement for the capacitor and with a fixed conversion time, there are charging problems. I think that if you used a unity gain op amp to condition the input you would see the correct values when you use the larger resistors (This is a nice write up http://ww1.microchip.com/downloads/en/AppNotes/00682D.pdf).


          Then again, I am not an engineer and can't even get a running timer working inside of a sketch, so it may be advisable to wait for someone else to answer


          ...and, in the case that I am on at least the right track, could the maximum impedance be calculated so that I could understand?