NTC like KY-013 but with 100K


hello everyone,
i trying make use of sensor looks ky-013:
as mentioned in other threads, pins wrong labeled. using multimeter figured
left (labeled s) signal (voltage divider)
middle gnd
right (labeled -) vcc

the example code ky-013 (wich can found on several websites) throws out negative values (in right range) , heat ntc displayed temperature decreases , vice versa:
code: [select]
#include <math.h>
 
int sensorpin = a5;

double thermistor(double resistance) {
  double temp;
  temp = log(resistance);
  temp = 1 / (0.001129148 + (0.000234125 * temp) + (0.0000000876741 * temp * temp * temp));
  temp = temp - 273.15;
  return temp;
}
 
void setup() {
 serial.begin(9600);
}
 
void loop() {
 int readval = analogread(sensorpin);
 double  resistance = ((10240000/readval) - 10000);
 double temp =  thermistor(resistance);

 serial.print(temp);  // display tempature
 serial.print(" c   ");
 serial.print(readval);  // display
 serial.print(" byteval   ");
 serial.print(resistance);  // display
 serial.println(" ohm   ");
 
 delay(100);
}


i measured ntc , seems 100k ohm ntc , not 10k ohm ntc used ky-013 (at least point of view).

here image of transient behavior when touch ntc in normal room (approx. 20-25 °c room temperature):



imo constants of steinhart-hart equation seems wrong. don't have thermometer figure them out self. has did or more precise values?
thank in advance.

as heat ntc displayed temperature decreases , vice versa:
then swap sensor vcc , ground.

that board thermistor , 10k resistor (marked 103) voltage divider, center tap going analogue pin.
temp goes 1 way if thermistor connected ground , resistor vcc.
temp goes other way if thermistor connected vcc , resistor connected ground.
leo..


Arduino Forum > Using Arduino > Sensors > NTC like KY-013 but with 100K


arduino

Comments

Popular posts from this blog

DHT11 Time out error using v0.4.1library

Sketch upload fails with Java error (___REMOVE___/bin/avrdude)!

Arduino Uno + KTY81/210 temperature sensor