WiPy 3.0 ADC poor calibration - offset at 0V
Im using a WiPy 3.0 and expansion board, along with a Vdivider network array and opto-isolated>Pchannel MOSFET output network for my controller project.
I have a 10kOhm bussed pull-down resistor at the 8 pins im using for ADC, all set to 11dB attenuation to allow me to measure up to 3.3V.
With no external connection, and a measured 0V at the GPIO pins (pulled down via aforementioned resistor) when I call .voltage() I get 126mV for all pins.
Note: I have carried out the cal procedure mentioned here: https://docs.pycom.io/tutorials/all/adc/ and corrected against with adc.vref(1127).
Also when I manually apply 1.1V or 3.3V to the GPIO pins they return sensible values.
My question is: is it normal to have this positive offset at 0V? And if so why.
Maybe I need to code a correction function to apply to the values?
Any help would be appreciated.
Thats annoying. I will try and create a correction function which I can map my ADC value list to (to correct for non-linearity & offset).
Love that ADS1115 though, with the programmable gain amp!
robert-hh last edited by
@JSmith The simple answer is: the ADC of the ESP32 is bad. It has an offset, it is nonlinear, and it has a large amount of noise. The effective resolution is about 8-9 bits. This is discussed in the espressif forum a lot, and there is a nice analysis here: https://github.com/bboser/IoT49/blob/master/doc/analog_io.md
If you have the need for a good ADC, use an external one, like the ADS1115 ore any other made by a vendor dedicated to that.