offset in adcchannel.voltage() method



  • Someone has checked if the adc channel reads "0 volts" when the adc pin is connected to GND and you are using the adcchaneel.voltage() method? I am reading 40-50 mV

    However, if you use the adc.value(), the adc reads 0

    Thanks



  • @roqueton The ADC does not return values from 0V on. You get value > 0 from 30-70 mV on, depending on the attenuator setting. And it i somewhat nonlinear at both ends of the range. adc.value() returns the raw read. adc.voltage() tries to compensate for nonlinearity and offsets. So it looks as if it is doing it wrong.
    If you need a precise ADC, use a dedicated chip for that, like the ADS111x family.


 

Pycom on Twitter