Good day everyone ❗
In this post, you will learn the procedures on how to make a digital thermometer using Arduino Uno. You may think that it is somehow a human temperature upon hearing the word thermometer, but actually it is more applicable in measuring room temperatures and mostly in industrial applications.
This is rather one of the simple Arduino project that is good to have in your house. But, before we proceed to the main part of this tutorial, let's define and know first what thermometer really is and what help it can give to us humans and our environment.
thermometer is an instrument for measuring temperature, often a sealed glass tube that contains a column of liquid, as mercury, that expands and contracts, or rises and falls, with temperature changes, the temperature being read where the top of the column coincides with a calibrated scale marked on the tube or its frame.
We cannot measure the temperature by touching only. Our sense of touch only helps us determine whether the object is hot or cold, but it can't really measure its temperature. We need a certain device that can measure temperature accurately, and this device is called thermometer. 🌡
Thermometers are very important in our daily lives. Why? Simply because through this device, we will be able to know our body temperature if it's normal or not. The normal body temperature of a healthy person is 37ºC and it's important for us to maintain that.
There are many important applications that thermometer has to offer. These includes the measuring of weather temperature, instant temperature reading of foods, liquids and semi-solid samples, indoor and outdoor temperature measurement, maintaining precise temperatures in storage rooms, laboratories, incubators, etc.
All health care professionals use thermometers. All health care facilities use thermometers. Most homes also have thermometers. It is basically one of the important device to have.
♦ Arduino Uno
♦ LCD (16x2)
♦ Temperature Sensor (DS18B20)
♦ Breadboard (for circuit testing)
♦ Potentiometer (100kΩ)
♦ Resistor (1pc. - 4.7kΩ)
♦ Jumper Wires (male to male)
♦ Fritzing
♦ Arduino - download here
Arduino ➜ is an open source computer hardware and software company, project, and user community that designs and manufactures single-board microcontrollers and microcontroller kits for building digital devices and interactive objects that can sense and control objects in the physical world.
LCD ➜ Stands for "Liquid Crystal Display." LCD is a flat panel display technology commonly used in TVs and computer monitors. It is also used in screens for mobile devices, such as laptops, tablets, and smartphones.
Temperature Sensor ➜ measure the amount of heat energy or even coldness that is generated by an object or system, allowing us to “sense” or detect any physical change to that temperature producing either an analogue or digital output.
Breadboard ➜ is a solderless device for temporary prototype with electronics and test circuit designs.
Potentiometer ➜ is a three-terminal resistor with a sliding or rotating contact that forms an adjustable voltage divider. If only two terminals are used, one end and the wiper, it acts as a variable resistor or rheostat.
Resistors ➜ is a passive two-terminal electrical component that reduces current flow, adjust signal levels, to divide voltages, bias active elements, and terminate transmission lines, among other uses.
Jumper Wires ➜ are cables with connector pin at both end. They make components easier to connect.
| Pin no. | Name | Function |
|---|---|---|
| 1 | Ground | Ground (0V) |
| 2 | Vcc | Supply voltage (5V) |
| 3 | VEE | Contrast adjustment using a variable resistor |
| 4 | Register select | Selects data register when high, and command register when low |
| 5 | Read/write | Read from the register when high, and write to the register when low |
| 6 | Enable | When a high to low pulse is given, it sends data to the data pins |
| 7-14 | D0-D7 | 8-bit data pins |
| 15 | Backlight Vcc (5V) | Led (Anode) |
| 16 | Backlight Ground (0V) | Led (Cathode) |
#include
#include
#include
#define ONE_WIRE_BUS 7
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
float tempC = 0;
float tempF = 0;
LiquidCrystal lcd(12,11,5,4,3,2);
void setup() {
sensors.begin();
lcd.begin(16,2);
lcd.clear();
pinMode(3, OUTPUT);
analogWrite(3, 0);
Serial.begin(9600);
}
void loop() {
sensors.requestTemperatures();
tempC = sensors.getTempCByIndex(0);
tempF = sensors.toFahrenheit(tempC);
delay(1000);
Serial.println(tempC);
lcd.setCursor(0,0);
lcd.print("C: ");
lcd.print(tempC);
lcd.print(" degrees");
lcd.setCursor(0,1);
lcd.print("F: ");
lcd.print(tempF);
lcd.print(" degrees");
}
Before uploading this code to your Arduino, you need to manually add first the following libraries to Arduino IDE as it is not included by default.
This was the result when I compared the temperature of two rooms. As you can see, each room hast its designated temperature. The air-conditioned room has around 25.62°C and the other room without air-conditioning has around 29.75°C.
In this video, I tried to adjust the contrast of the LCD using a potentiometer. This will help you to clearly read the temperature reading.
In this video, I tested the performance of this project by simply putting an Ice near the temperature sensor. And the result was indeed convincing. 😊
The main purpose of this post is of course to share my little learnings about some Arduino projects and help my fellow steemians specially those who really loves electronics to know the steps and procedures in making this kind of project. Knowing this would surely improve your knowledge about arduino. Why? because this is one of the starting point in learning about Arduino deeply.