You are currently viewing Digital Thermometer using Arduino
Made with Square InstaPic

Digital Thermometer using Arduino

Table of contents

1.Circuit Diagram

2.Hardware required

3.Working

4.code

Hardware required

1.Arduino

2. NTC  temperature sensor

3.Resistor 470 ohms

4. Breadboard

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:

equation 1

                                                                                                                                   

equation 1

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

table 1

                                                                                                                  

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

equation 2

                                                                                                                                   

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[8] =
{
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-------*/
float reading=analogRead(sensor);
float temperature=reading*(5.0/1023.0)*100;
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);
}

Leave a Reply