Arduino LCD thermometer tutorial

Arduino temperature display project

Welcome to a new Arduino project. In this tutorial we will see how to show temperature on an LCD using Arduino and a thermistor. We will also review the materials used to build it, show the wiring diagram and share the code needed to control the screen and display the data.

Materials used in this project

Below you can find the materials used to build this Arduino temperature measurement project together with a brief description of each one. If you want to make the project yourself, you can click the images to visit a website where those materials are available.

Arduino UNO board: It is the brain of the project and controls all of its processes through the code you will find below.

Protoboard: A board with internally connected holes (pins) that we will use to make the project's electrical connections.

Thermistor: It is a type of resistor whose value changes with temperature more noticeably than a standard resistor.

LCD screen: A liquid crystal display, or LCD, is a thin, flat screen made up of pixels in a single colour placed in front of a light source or reflector.

Jumper wires: These wires have male or female pin ends that let us connect the different components used in the project.

Components needed for this project

Arduino starter kit
Arduino starter kit
Arduino Uno board
Arduino Uno board
LCD screen
LCD screen
Protoboard
Protoboard
Male-to-female jumper wires
Male-to-female jumper wires

WE DEVELOP YOUR IDEA

Need help with a project?

RobotUNO project consulting
  • Prototyping and MVPs
  • Arduino and ESP32
  • PCB design
  • 3D part design
  • Bluetooth connectivity
  • Feasibility study
  • Cost optimization
  • Technical consulting
  • Internet of Things
  • Patent support

Project video explanation

If you want a much more detailed explanation of how to build this project from start to finish, including the code, the video below covers the full process in a clearer and more visual way. And if you enjoy this kind of content, do not forget to subscribe.

Arduino wiring diagram for the LCD screen and temperature sensor

One of the most important parts of assembling this LCD setup is wiring every component correctly. To avoid assembly mistakes or wrong connections, here is the wiring diagram used in this project. With this wiring setup, you can use the code at the end of the post without any modification.

Arduino LCD thermometer wiring diagram

Arduino code for the temperature sensor and LCD display

Below you can find the Arduino code developed specifically for this project. The pins used in the code are the same ones shown in the wiring diagram above.

If you want a more detailed explanation of the different parts of the code used to drive the LCD and of how the temperature sensor or thermistor works, I recommend watching the video linked above.

If you have any questions about how to use or install the development environment used for Arduino, here is a link to how to download the Arduino IDE

//Canal de YouTube -> RobotUNO
//Proyecto 3

#include <LiquidCrystal.h>

int tempPin = 0;
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
void setup(){
  lcd.begin(16, 2);
}

void loop(){
  int tempReading = analogRead(tempPin);
  double tempK = log(10000.0 * ((1024.0 / tempReading - 1)));
  tempK = 1 / (0.001129148 + (0.000234125 + (0.0000000876741 * tempK * tempK )) * tempK );
  float tempC = tempK - 273.15;
  lcd.setCursor(0, 0);
  lcd.print("Temp         C  ");
  lcd.setCursor(6, 0);
  lcd.print(tempC);
  delay(500);
}
Published in Arduino projects, Sensor projects, Electronics projects.