Skip to content
Using NTC Thermistor with Arduino and ESP32
C++
Branch: master
Clone or download
Latest commit 6fb5a40 Oct 8, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
images initial commit Oct 8, 2019
README.md correction on link Oct 8, 2019
ntc_3950.ino initial commit Oct 8, 2019

README.md

Using NTC Thermistor with Arduino and esp32

The sketch works for both Arduino and ESP32 by just changing the line:

bool esp32 = true;       // change to false when using Arduino

The sketch assumed that NTC Thermistor with 10k resistance at 25 degree Celcius and B parameter of 3950 to be used, if you have an Thermistor with 100k value, you may need to change some of the parameters accordingly.

ESP32 Linearity issue

To address the ESP32 ADC non-linear issue, a lookup table is used to correct the non-linearity. You may need to generate your own lookup table as it varies from device to device due to the variation of ESP32 internal reference voltage. The code for generating the lookup table is written by Helmut Weber and can be found here.

ESP32 ADC linearity

Noise on ESP32

The ESP32 is much noisy compare to Arduino. Add a 0.1uF capacity on Vout would help a little bit in smoothing out the noise or alternative write a filter algorithm to handle it.

*** Arduino ADC reading from thermistor *** Arduino ADC reading from thermistor

*** ESP32 ADC reading from thermistor *** ESP32 ADC reading from thermistor

References

For more detail discussion and references, read my blog post on the subject.

You can’t perform that action at this time.