Full-Range Analog Input for ESP32: Obtain a Better Linearity Out of Your ADC
on

The analog input of an Espressif ESP32 doesn't seem very reactive in the very first part of its allowed range, with a lack of response, and a non-linearity in the whole range, consequently. The aim of this project is designing a specific analog interface to linearize the analog inputs of the ESP32 even for those low values, getting the most out of the ADC and with a remarkable linearity. With this project, you will also learn how to use the powerful MicroPython language to build a data acquisition and processing program.
In its original release, the Espressif ESP32 has two 12-bit Successive Approximation Register (SAR) ADCs which can convert up to 18 analog inputs (the ESP32-Cx and -Sx versions have ADCs with other specs). The maximum value to convert is equal to the internal reference value Vref. For the ESP32, it is about 1 V, but it can vary between 950 and 1100 mV. It is also possible to use voltages higher than Vref by attenuating the input. The ESP32 has four possible att...