Welcome to the Arduino Digital Thermometer project. In this video, we build a simple and easy project: A Temperature Monitor using an Arduino Mega and a DS18B20 temperature sensor. We also use a Nokia 5110 LCD display for displaying the temperature.

Intro to the Arduino Digital Thermometer Project

This project is very easy to use and it is very easy to construct as well. it is ideal for beginners because as we said it is very easy to build. Don’t be fooled by those wire here, those wires are needed for driving the LCD display this module here, this temperature sensor only needs three wires to operate. But let’s build it! So, that’s the temperature sensor, module, that we have bought for around 2 euros from eBay. It contains the DS18B20 sensor and all you have to do is to connect those three pins and you are ready to go. + goes to Vcc, – goes to Ground and Output goes to a digital pin of Arduino. This sensor is very easy to use because it uses the 1-wire protocol in order to communicate with Arduino. so we only need to connect one wire to a digital pin, and we are ready to go.

——————–
WHERE TO BUY
——————–

1. DS18B20 Temperature Sensor: https://educ8s.tv/part/DS18B20

2. Nokia 5110 LCD Display: https://educ8s.tv/part/NOKIA5110

3. Arduino Mega: https://educ8s.tv/part/ArduinoMega

4. Small Breadboard: https://educ8s.tv/part/SmallBreadboard

5. Wires: https://educ8s.tv/part/Wires

Full disclosure: All of the links above are affiliate links. I get a small percentage of each sale they generate. Thank you for your support!

[adsense]

So, let’s connect it. OK, I have now connected the module to the breadboard and now we are ready to plug in the wires. First, let’s plug in the negative. The negative wire goes to Ground of the breadboard, it is not connected yet but we connect it now Next, a positive wire goes from plus to Arduino Vcc. and we take another wire, let’s get the green one the green one will go to a digital pin on Arduino. I am going to connect it to digital pin 7 on Arduino. Digital Pin 7. Let’s now connect the power. We take 3.3V or 5V, 3.3V are better for the display and we connect it to the breadboard here and we take a Ground wire from Arduino to the breadboard Ground. That’s the basic setup. Now the sensor can work with the Arduino. But now let’s connect the LCD display. In order to see how to connect the Nokia 5110 LCD display please watch our previous, very detailed video about that. You can find the link in the description of the video. Now that we have connected all the wires we are ready to power this project up and see if it is working. Let’s see. It is working great! Now let’s see the code. It is easier than the wiring. Let’s do it.

——————–
LIBRARIES
——————–

? One Wire Library: http://www.pjrc.com/teensy/td_libs_OneWire.html

? DS18B20 Library: https://github.com/milesburton/Arduino-Temperature-Control-Library

First of all, we have to download 2 libraries in order to use this sensor. The first library is the OneWire library which can be downloaded from this link. You can find the links for the libraries in the description of the video. So we click download OneWire.zip and we unzip on the Desktop. Unzipping OneWire library.

The next library we have to download is the milesburton Arduino-Temperature-Control library. We download the zip from here and we unzip it on the desktop as well. That library has to be renamed to something else because it has invalid characters for library folders so let’s rename it to DS18B20. All we have to do is to cut those two libraries and paste them in the Arduino -> Libraries folder. Now we are ready to use the libraries. I have prepared two sketches for you.

The first one does not use the Nokia 5110 LCD display in case you don’t have one. So all you need to do it to open the SerialTemperature sketch in your Arduino IDE and compile and run it. If you then open the Serial Monitor you can see that Arduino reports back Temperature in both degrees C and F.

If you do have a Nokia 5110 LCD display you can load up the TemperatureNokia sketch that I provide and load it to your Arduino IDE. This project consists of two files. One is .ino file and the other is the temperatureicon.c file which contains the binary data for the little icon that we display along with the temperature. You need both of these files, as you can see, the temperatureicon.c file consists of binary data. When you open up the project as you can see it is very straightforward, we declare the pin that we have connected the sensor to we declare the Nokia LCD pinout we initialize the LCD and the sensor we draw the little icon and we request temperature, we get temperature and we get temperature in degrees C and convert it to degrees F. and then we convert this float number to a String and print it on the display. The default value for displaying the temperature is degrees F If you need to display the temperature in degrees C you have to comment this line here and uncomment this line here Now the sketch will display temperature in degrees C. It is very easy. You can find the code and all the files below.

——————–
CODE
——————–

 

 

 

——————–

SUBSCRIBE ON YOUTUBE

——————–

Never miss a video: Subscribe to educ8s.tv