ADC Accuracy

  • I'm trying to measure input voltage using a voltage divider.

    When measuring the voltage on the ADC pin with a multimeter, I get 0.8V. According to the docs, the input range is 0-1.1V, right? In that case this should give me a 12bit ADC reading of 2979, but the actual reading is 3231. That's off by 0.06V (which corresponds to 0.3V when measuring higher voltages using an 1:5 voltage divider).

    This is how I'm initializing the ADC:

    pin_adc ='P20')

    Am I doing something wrong?

  • Ouch. That's probably something that should be documented by Pycom. Thanks for the link!

  • @dbrgn No. The ADC is simply bad. And the real range is something like .07V - 1.05V, but slightly varying between device, some non-linearity and a huge amount of noise. See also the discussion in the espressif forum , e.g. here:
    If you need as precise ADC, use an external ADC, e.g. from analog devices, like ADS1115 (I2C) or ADS1118 (SPI).

Log in to reply

Pycom on Twitter