I am using an MF52 thermistor on an ESP8266–12E on a NodeMCU board, using the 3.3v power from the board. My sketch (attached) is configured with the following coefficients (from the Steinhart-Hart equation calculator)
I suggest to use your multimeter to measure the actual resistance values of the thermistor at different temperatures, and use those to calculate the Steinhart-Hart coefficients.
Have a look at data types and see what a float is and what it isn't
Suggest it might be useful to put your equation into Excel or similar and round the coefficient to use less digits and see what accuracy you get. You could also see various curve types and fits in excel and choose coefficients that arduino can handle or better still use integer maths
In summary get it working in excel and then transfer to arduino.
Dependant on the temperature range your looking at you should be able to calculate within say one degree
Best of luck
The "103" part of the model number means that it is a "10k" thermistor (10 kOhms at 25°C) . It does not say if it is the B=3100 or B=3270 type. Which set of temperature/resistance measurements did you use? Have you tried the other set?
Product Name : NTC Thermistor;Model : MF52-103;Insulation Material : Ceramic
Color : Black;Rated Power : 0.05W;Resistance Value : 10K Ohm
B Value : 3435(+/-1%);Pin Pitch : 1.5mm / 0.059"
I have improved the readings, but still running 5 degrees hot by using the following coefficients:
Where did you get the data by which you ‘improved’ the readings? The document you pointed to doesn’t have a temperature/resistance table for a 10k thermistor with B=3435.
You don't need to round off the numbers. The compiler will cram in as many significant digits as it can (6 to 7 digits on most Arduinos). The additional digits do no harm and may be used if you switch to a processor with hardware floating point support.
the coefficients previously posted are not correct for the MF52 10K thermistor with Beta of 3950
I have computed the coefficients for this particular thermistor for two temperature ranges to use in the Steinhart-Hart equation
-15C < T < 45C
A = 1.106837 x 10^(-3)
B = 238.4642 x 10^(-6)
C = 65.07393 x 10^(-9)
-25C < T < 75C
A = 1.119616 x 10^(-3)
B = 236.3255 x 10^(-6)
C = 73.92945 x 10^(-9)
Both of these sets will give you resistance to temperature conversions to better than 0.01C over the respective ranges for thermistors that follow the characteristics given in the first column of the table on page 3 of this document: https://www.eaa.net.au/PDF/Hitech/MF52type.pdf
Note that the resistance given in the table for 0C as 98.96K is wrong. That value should be 32915 Ohms
GH Aug 14, 2020