Thermistor in Arduino Sidekick Basic Kit

Can you give me some info on this thermistor?

All I have is what is on the side 503.

Hi, arpeland

You can referece here.

Regards,
Simon

Thanks for that info.

I haven’t tested it on the actual Thermistor yet, but for those who want S-H coefficients, I got:

S-H coefficient A = 9.6564E-04
S-H coefficient B = 2.1069E-04
S-H coefficient C = 8.5826E-08

The tool I used to grab the coefficients confirmed 10 random tests across the gamut of this pdf file. My final equation (I intend to load into the IDE and test today:

Ok…I’m tossing out what I had (there were some minor errors). This is what I’m using now. And it works, perfectly. I’m going to go into detail because it was surprisingly hard to find all the answers in one place, and this is certainly a great project for first-timers.

I’ve got my 503 thermistor in serial with a 10kOhm resistor (I don’t have any 50’s to make my math easier. Oh well). In the middle of the series is a jumper to an analog input.

All you have to do is #define SERIESRESISTOR to be the resistor in series to the thermistor #define SERIESRESISTOR 10000 .

Then call this.

double getTemperature(int pin) { int v = analogRead(pin); //voltage of the thermpin double res = (1023.0/v)-1; res = SERIESRESISTOR / res; double temp = (1/(0.00096564 +(0.00021068 * log(res) ) +(0.000000085826*( pow( log(res) ,3)))))-273.15; temp = (temp * 9.0/5.0)+32; return temp; }

Hi
I have the same thermistor as you, but I can’t get your code working. I mean, the code itself is working, but the temperature from the sensor is read as nearly 100 degrees, while in my house I have about 23 degrees.

Did you ran into similar problems?

the temp is being calculated in F i hope your house is C
which you would comment out the
temp * 9 / 5 + 32

/*

  • Inputs ADC Value from Thermistor and outputs Temperature in Celsius
  • requires: include <math.h>
  • Utilizes the Steinhart-Hart Thermistor Equation:
  • Temperature in Kelvin = 1 / {A + B[ln®] + C[ln®]3}
  • where A = 0.001129148, B = 0.000234125 and C = 8.76741E-08
  • Schematic:
  • [Ground] – [10k-pad-resistor] – | – [thermistor] --[Vcc (5 or 3.3v)]
    ************************************** |
  • **********************************Analog Pin 0
  • The resistance calculation uses the ratio of the two resistors, so the voltage
  • specified above is really only required for the debugging that is commented out below
  • Resistance = (1024 * PadResistance/ADC) - PadResistor

*/

#include <math.h>

#define ThermistorPIN 0 // Analog Pin 0

float vcc = 5.00; // only used for display purposes, if used
// set to the measured Vcc.
float pad = 10500; // balance/pad resistor value, set this to
// the measured resistance of your pad resistor
float thermr = 10000; // thermistor nominal resistance

float Thermistor(int RawADC) {
long Resistance;
float Temp; // Dual-Purpose variable to save space.

Resistance=((1024 * pad / RawADC) - pad);
Temp = log(Resistance); // Saving the Log(resistance) so not to calculate it 4 times later
Temp = 1 / (0.001129148 + (0.000234125 * Temp) + (0.0000000876741 * Temp * Temp * Temp));
Temp = Temp - 273.15; // Convert Kelvin to Celsius
Temp = (Temp * 9.0)/ 5.0 + 32.0; // Convert to Fahrenheit comment out for Celsius
return Temp; // Return the Temperature
}

void setup() {
Serial.begin(115200);
}

void loop() {
float temp;
temp=Thermistor(analogRead(ThermistorPIN)); // read ADC and convert it
//Serial.print("Celsius: "); // comment and uncomment the desired reading
Serial.print(“Fahrenheit: “);
Serial.print(temp,1); // display Temp
Serial.println(””);
delay(5000); // Delay time to read
}

I tried the code example and tweaked the 10k because I was getting 9.740K and am getting temp readings of about 17F in my room. It almost seems like I’m reading C but outputting as F. I didn’t want to truly assume that because I don’t know if there was something else to tweak in the code.

Right now I’ve got the 503 “50k” thermistor from the kit and the only thing I tweaked in the code was the value of the 10k resistor.

The tool I used to grab the coefficients confirmed 10 random tests across the gamut of this pdf file. My final equation I intend to load into the IDES and test today:
I’m tossing out what I had (there were some minor errors). This is what I’m using now. And it works, perfectly. I’m going to go into detail because it was surprisingly hard to find all the answers in one place.

I have a new docu of this thermistor , maybe you can have a look.

:laughing: And there are some chinese words within.
Thermistor.pdf (123 KB)

it works, perfectly. I’m going to go into detail because it was surprisingly hard to find all the answers in one place.