Electronic – arduino – Trying to get readable value with Arduino/Thermistor setup

arduinothermistor

I'm trying to get a readable value from a thermistor. Right now it's printing 223.25 as my celsius value in my room. I know this is wrong. I'm using the thermistor model which is located HERE. The specific part number of my thermistor is called PANE102350 which you'll need when you look at the datasheet. It doesn't give very much information. I'm also trying to find the A, B and C coefficients but cannot find them on that datasheet. I believe my issue is with my code as my circuit is fairly simple. My code and circuit is shown below.

My Circuit

Code

Thermistor

I have made the following changes to my code as Spehro Pefhany has indicated. I put in new values for A,B and C. I changed the Voltage equation as another person indicated. However now I'm getting a reading of 70 for celsius. Still doesn't seem right for room temperature. Here is another picture of the newly edited code. My circuit has stayed the same. I also did a Serial.print(adc_raw) and got a value of 108. I did a Serial.print(kelvin) also and got the value 344. I'm not for sure if these values are wrong but i'm assuming the kelvin one is because the celsius reading of 70 is wrong.

New Image

Best Answer

Looks like there's some simple issue with the code.

enter image description here

To assist with getting the Steinhart-Hart equation parameters right, you can refer to the part specifications.

enter image description here

That refers to the "M" curve.

From the website, we get:

enter image description here

Which gives you the resistance values for various temperatures (multiply by 1000 for the values of your part in ohms).

Then, you can calculate the Steinhart-Hart parameters directly (from the Wikipedia page)

enter image description here

Or you can try this online calculator (I have not verified it is accurate)

enter image description here

In either case, optimize the thermistor linearization by picking three temperatures well spaced apart covering your range of interest.