I would assume that it will stay absolutely stable if you change nothing, at least that is how it is in my test. Only when I changed the connection status of the UART using rshell the voltage on the ADC changed.
Might be indeed related to conductivity that might not play a role with a real resistor compared to a liquid solution which has capacitance too. Additionally the use of "AC" power in my case could play a role in introducing capacitance importance to the measurement that would not be an issue with DC voltage.
But I'm still testing.
ESP32 ADC voltage drop after some hours
-
- Posts: 969
- Joined: Sat Feb 03, 2018 7:02 pm
Re: ESP32 ADC voltage drop after some hours
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Re: ESP32 ADC voltage drop after some hours
I do not know which electrodes you use. But with metal electrodes you will see the issue of polarization. In the cited link of your first post it is told that this will not happen if the test cycle is very short. I have my doubts. It is still a DC measurement, only the total time it takes to polarize will be longer. Commercial electrodes use a special coating (e.g. Ag/AgCl compound) to avoid that.
But: Since you switch both GND and power to the probe, you could alternate the polarity at the electrodes.
Besdies that: may it be that you moved the electrodes a little bit when this sudden change in conductivity occurred?
But: Since you switch both GND and power to the probe, you could alternate the polarity at the electrodes.
Besdies that: may it be that you moved the electrodes a little bit when this sudden change in conductivity occurred?
-
- Posts: 969
- Joined: Sat Feb 03, 2018 7:02 pm
Re: ESP32 ADC voltage drop after some hours
I was thinking about that too but a polarization would result in a slowly increasing ppm value. However the measurements are stable.
And I didn't touch the cable when the spike happened, nor when it returned back to the old value.
Alternating the powering pin to avoid polarization is a good idea, just need to adapt my formula.
Generally I wouldnt expect polarization to be much of a problem later when the probe is in a 150l tank with a pump that will be active every hour. But for now the probe sits in a glass of water so polarization might occur easily.
Thanks for your ideas and thoughts!
And I didn't touch the cable when the spike happened, nor when it returned back to the old value.
Alternating the powering pin to avoid polarization is a good idea, just need to adapt my formula.
Generally I wouldnt expect polarization to be much of a problem later when the probe is in a 150l tank with a pump that will be active every hour. But for now the probe sits in a glass of water so polarization might occur easily.
Thanks for your ideas and thoughts!
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: ESP32 ADC voltage drop after some hours
To be meaningful this testing needs to separate the behaviour of the electrodes from that of the ESP32. That is best done by replacing the electrodes with a fixed resistor and repeating the test.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
-
- Posts: 969
- Joined: Sat Feb 03, 2018 7:02 pm
Re: ESP32 ADC voltage drop after some hours
It doesn't seem to cause problems with real resistors, even with AC measurements, so it probably is not the ADC itself that is causing these offsets. At least in my last tests with resistors it did not make a difference if rshell was connected or not. But as soon as I use the probe, it immediately makes a difference again.
Therefore I assume it could be the capacitance of nearby traces for the UART (as dhylands suggested), which only plays a visible role when measuring using the probe, which has a capacitance (due to the water) too?
Therefore I assume it could be the capacitance of nearby traces for the UART (as dhylands suggested), which only plays a visible role when measuring using the probe, which has a capacitance (due to the water) too?
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode