Arduino temperature sensor with thermistor



Arduino  temperature sensor with thermistor


What is thermistor?

thermistor is a resistance thermometer, or a resistor whose resistance is dependent on temperature. The term is a combination of “thermal” and “resistor”. ... A PTC thermistor works a little differently. When temperature increases, the resistance increases, and when temperature decreases, resistance decreases.


Using a thermistor is an easy and cheap way to sense the temperature. And to measure the exact temperature with thermistor, a micro controller will be needed. So here we are using Arduino with Thermistor to read the temperature and a LCD to display the temperature. It is useful in various projects like remote weather station, home automation, and protection and controlling of industrial and electronics equipment’s.
The key component in this circuit is Thermistor, which has been used to detect the rise in temperature. Thermistor is temperature sensitive resistor, whose resistance changes according to the temperature. There are two types of thermistor NTC (Negative Temperature Co-efficient) and PTC (Positive Temperature Co-efficient), we are using a NTC type thermistor. NTC thermistor is a resistor whose resistance decreases as rise in temperature while in PTC it will increase the resistance as rise in temperature.
Characterstic graph of NTC thermistor
Component Used:
 

1. Arduino 
2. Thermistor
3. Resistor - 100 k ohms

Connection :




Code :


int ThermistorPin = 0;
int Vo;
float R1 = 10000;
float logR2, R2, T;
float c1 = 1.009249522e-03, c2 = 2.378405444e-04, c3 = 2.019202697e-07;

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

void loop() {

  Vo = analogRead(ThermistorPin);
  R2 = R1 * (1023.0 / (float)Vo - 1.0);
  logR2 = log(R2);
  T = (1.0 / (c1 + c2*logR2 + c3*logR2*logR2*logR2));
  T = T - 273.15;
  T = (T * 9.0)/ 5.0 + 32.0; 

  Serial.print("Temperature: "); 
  Serial.print(T);
  Serial.println(" F"); 

  delay(500);
}
In degree Celsius
void setup() {
Serial.begin(9600);
}

void loop() {

  Vo = analogRead(ThermistorPin);
  R2 = R1 * (1023.0 / (float)Vo - 1.0);
  logR2 = log(R2);
  T = (1.0 / (c1 + c2*logR2 + c3*logR2*logR2*logR2));
  Tc = T - 273.15;
  Tf = (Tc * 9.0)/ 5.0 + 32.0; 

  Serial.print("Temperature: "); 
  Serial.print(Tf);
  Serial.print(" F; ");
  Serial.print(Tc);
  Serial.println(" C");   

  delay(500);
}

My Instagram

Made with by Pi-girl | Copyright © 2020 Pi-girl