# Digital Thermometer using Arduino

##### Hardware Requirement

1.Arduino

2. NTC  temperature sensor

3.Resistor 470 ohms

5.Wires

##### Working

Thermistors are variable resistors that change their resistance with temperature. They are classified by the way their resistance responds to temperature changes. In Negative Temperature Coefficient (NTC) thermistors, resistance decreases with an increase in temperature. In Positive Temperature Coefficient (PTC) thermistors, resistance increases with an increase in temperature.

NTC thermistors are the most common, and that’s the type we’ll be using in this tutorial. NTC thermistors are made from a semiconducting material (such as a metal oxide or ceramic) that’s been heated and compressed to form a temperature sensitive conducting material.

The conducting material contains charge carriers that allow current to flow through it. High temperatures cause the semiconducting material to release more charge carriers. In NTC thermistors made from ferric oxide, electrons are the charge carriers. In nickel oxide NTC thermistors, the charge carriers are electron holes.

The Arduino will measure the voltage at a point between the thermistor and a known resistor. This is known as a voltage divider. The equation for a voltage divider is:

In terms of the voltage divider in a thermistor circuit, the variables in the equation above are: :_

This equation can be rearranged and simplified to solve for R2, the resistance of the thermistor:

##### Arduino Code
```#include<LiquidCrystal.h>
LiquidCrystal lcd(8,9,10,11,12,13);  //connect to the lcd pin respectively (4,6,11,12,13,14)
#define sensor A0
byte degree =
{
0b00011,
0b00011,
0b00000,
0b00000,
0b00000,
0b00000,
0b00000,
0b00000
};
void setup()
{
lcd.begin(16,2);
lcd.createChar(1, degree);
lcd.setCursor(0,0);
lcd.print("   Thermometer ");
lcd.setCursor(0,1);
lcd.print(" ElectroCircuit  ");
delay(2000);
lcd.clear();
}
void loop()
{
/*---------Temperature-------*/
delay(10);

/*------Display Result------*/
lcd.clear();
lcd.setCursor(2,0);
lcd.print("Temperature");
lcd.setCursor(4,1);
lcd.print(temperature);
lcd.write(1);
lcd.print("C");
delay(1000);
}
```