5 Replies Latest reply on Aug 14, 2015 11:02 AM by Intel_Alvarado

    edison / arduino analog digital converter glitch

    Itstechpro

      The first sample of any of the 5 analog I/O channels implemented with the TI ADS7951 ADC on the Arduino breakout board may be in error by ~200 counts.  Extensive testing using both mraa in python or a linux shell script to sample one channel repeatedly or two channels sequentially indicates that the first sample of a sequence or the first sample of a pair sequence (eg ... get A0, sleep, get A0, sleep  or get A0, get A1, sleep, get A0,get A1, sleep ....) will be in error by several percent of full scale.

       

      The next sample taken (same channel or different channel) will be correct as long as that sample is taken within no more than a couple of seconds of the first.  Waiting on the order of 10 seconds between samples or channels produces the same magnitude of error on the following sample.

       

      I can't tell whether the 7951 driver code or some 'feature' of the 7951 itself is responsible for this anomaly, but the easy workaround is to take a sample, discard it, and immediately take another sample.  If multiple channels are to be sequentially sampled, discard the first sample of the sequence, repeat it and continue with the remaining channels as long as the interchannel interval is no more than a second or so. 

       

      Another thing to keep in mind about the 7951 is that no buffer amplifier is provided on the board between the 7951 analog MUX and the comparator input.  Recommended source impedance for this condition is 50 ohms (an external op amp works fine) since signal settling time after a MUX channel change can affect accuracy.  Also, the GPIO pull up resistor on the analog pins is apparently still active as tests with source impedances of 5000 ohms and 500 ohms showed an offset of about 2% of full scale on the 5000 ohm source.  No more than 1 LSB error was noted with a source impedance of 500 ohms.

       

      Has anyone else used the Edison / Arduino breakout board ADC extensively enough to observe this behavior?