Check this strange behavior, what could be the reason for this 12 Hours "stabilization" curve?

Hello

I just bought a ESP32 nano board and the idea is to start reading PH in my aquarium but before buying the sensor I started testing the board and the code with a simple voltage divisor.

What is strange is that I found a significant variation in voltage readings over time (12Hours) for a circuit that I havent touched in 24Hours.

I’m also measuring room temperature to see if that could explain the variation but it’s clear from the charts that this is not the cause.

Looking for community forum for ideas/suggestions.

The circuit is simple, a single potentiometer (1k) connected between 3V3 and GND pins, the middle pin of the resistance is connected to A1.

The DC source is stable, what could be the reason for this 12 Hours "stabilization" curve?

Thansk !!

I have never used the ESP32 ADC, only others like Arduinos and ESP8266.
But I saw that there are several websites reporting problems with lack of linearity in the ESP32's ADC.
It seems like some correction needs to be done.

These are some of the ones I found in a quick search.

https://rntlab.com/question/the-adc-seems-terrible/

Not at all strange for a pH probe. Most are quite delicate, and not intended for continuous measurements in contaminated media.

The probes with thin glass membranes are quickly fouled and need to be carefully rinsed with distilled water after each use.

1 Like

I’m aware of the non-linear issue but here I’m presenting the readings of aconstant static voltage being read by A1, a reading that gets stabilized after 12 hours.

The +- 5% mentioned in the post is real, but not a problem if you take several samples and report the average value.

I’m still scratching my head with this issue….

.

This probe is good for constant readings, but I don’t have the probe yet :sweat_smile:

I’m reading a constant voltage (in theory), practical results are showing that something is going on with the readings over time (device temperature stabilization?) who knows…

.

Sorry, I didn't read that carefully enough. What voltage source is powering the voltage divider?

In any case I would not worry about it. The ESP32 ADC really is defective, and should simply be avoided.

You can buy external ADC modules that vastly outperform it, for the price of a cup of cappuccino. Or use the ADC on just about any other Arduino, as they all perform well, with the notable exception of the ESP32 series.

Hello,

The voltage divider is using the 3V3 pin form the Arduino itself, I will look for external ADC modules.
Thanks for the idea

You're measuring a ratiometric sensor (pot) with an absolute A/D.
That makes the returned value also dependent on the ESP supply (mains voltage?).

External sensors, like the ADS1115, are also absolute, so also not suitable for ratiometric sensors.
A PH sensor is likely absolute, so in theory would work better with the ESP.
Leo..

The ESP32 ADC is not "terrible"; it depends on the use you put it to.

The ESP32 has two 12 bit ADC's ; however ADC2 is used by the WiFi system. ADC1 is multiplexed to 8 channels, attached to GPIOs 32 - 39.
To read an analog voltage you may need to configure the ADC, as you can set different resolution (9,10,11 or 12 bits), conversion rates and voltage ranges (800, 1100, 1350, 2600 mV). The default is 12 bit resolution and 2600mV range.

The ESP32 ADC is very sensitive to noise, very non-linear (+-12 LSB), and has a very substantial dc offset.

I have a sketch here that shows it working.

https://www.skillbank.co.uk/arduino/ReadADC_ESP32.ino

Ideally to check the stability you should not use a pot. You should also make sure you dont exceed the range of the ADC.

Can you show the RAW readings from the ADC?

You have the variation of 3V3 voltage. You need external voltage reference instead of +3.3V supply voltage for more accurate readings.

The ESP32 has its own internal reference, its not referenced to the supply voltage.

"The circuit is simple, a single potentiometer (1k) connected between 3V3 and GND pins, the middle pin of the resistance is connected to A1."

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.