Rui Teh
Published

Thermometer Sensor with LCD

A thermometer sensor that is easy to create and easy to use. Great for low cost, and lack of supplies.

BeginnerFull instructions provided1 hour3,674
Thermometer Sensor with LCD

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Adafruit Waterproof DS18B20 Digital temperature sensor
Adafruit Waterproof DS18B20 Digital temperature sensor
×1
4.7k Resistor
You can add up resistor values if you make it a series resistor circuit
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Standard LCD - 16x2 White on Blue
Adafruit Standard LCD - 16x2 White on Blue
×1
Single Turn Potentiometer- 10k ohms
Single Turn Potentiometer- 10k ohms
×1
Breadboard (generic)
Breadboard (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Schematics

You don't need to use two breadboards. The second one was there because the platform i was using is bad. The resistor closest to the sensor can also be put sideways too.

Code

Arduino Code

Arduino
Paste this onto Arduino platform
#include <OneWire.h>
#include <DallasTemperature.h>
#include <LiquidCrystal.h>

#define ONE_WIRE_BUS 8
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);

const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup(void)
{
  Serial.begin(9600);
  sensors.begin();
  lcd.begin(16, 2);
  
}

void loop(void){ 
  
  sensors.requestTemperatures(); 
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Temp(C)");
  lcd.setCursor(10, 0);
  lcd.print(sensors.getTempCByIndex(0));

  lcd.setCursor(0, 1);
  lcd.print("Temp(F)");
  lcd.setCursor(10, 1);
  lcd.print(sensors.getTempFByIndex(0));
  
  delay(1000);
}

Credits

Rui Teh

Rui Teh

3 projects • 1 follower
Hi

Comments