# I'm getting 512 as a reading from a thermistor. Trying to convert this into something readable but having a hard time

I just recently purchased a KY028 Temperature Sensor located HERE. I was having trouble hooking this sensor up so I snipped off the thermistor and shoved it in a breadboard. I know it sounds tacky but here is the picture of my circuit I have going now.

I have the +5V pin on my arduino connected to the thermistor then the 10K resistor connected to the negative side of the thermistor then going to ground.

I have researched several sites on how to convert the reading i'm getting into kelvins and/or C and/or F but i'm not getting a correct value as a final result.

This website HERE. It's providing me with an equation to solve for the thermistors resistance which is as follows....

It then tells me to plug this value into Steinhart HART equation as follows....

The problem is i'm getting a negative value for the first equation. My Vout is at 4.983 Volts. When I plugged this into the first equation to find the thermistor resistance I get a negative value which is -5.950435k ohms.

I can't plugged this value into Steinharts equation because i can't take the natural log of a negative number. So this is the first problem i'm having. Plus A, B and C are constants which i'm unsure if I should use the standard values they have on that link I attached or find them for my specific thermistor. However, i don't know how to do that so i'm using the values they provide.

Next problem is I don't see where I'm suppose to use the reading i'm getting from the analog input pin i have connected to my thermistor which happens to read a value of 512. I'm not using this value anywhere in these above equations so as a result i'm completely lost at what to do.

I have found several sites containing programs already made like this one HERE. HOWEVER, i'm not interested in copying their code as I would have no idea what's happening. I tried to understand their code for the conversion part but it's not the same as the equations i provided above. The person even says he used that same link to do the conversions but he must of manipulated the equations to do the conversion because i'm not following his code. What I would like is an explanation of how I can go about converting this value without using huge lookup tables as a cheat or copying code. I'm wanting to replicate my own result but i just can't understand what I need to do. Can someone put me back on track here.

• my resistor value isn't quite 10k ohms. I measured it and it reads 9.94k ohms Commented Mar 18, 2014 at 23:29
• That equation looks like it's for the provided circuit that uses a 2.5V reference to power the thermistor. But you might be better replacing the photos with a circuit and include the code you're using, if you get a stable value of 512 it sounds a little suspicious and you may have a software problem. Commented Mar 18, 2014 at 23:39

$$R=10k \times (\frac{5v}{V_{out}}-1)$$
$$R=10k \times (\frac{1023}{ADC}-1)$$