Arduino Analog Thermometer

Home/Arduino Projects/Arduino Analog Thermometer

Arduino Analog Thermometer

In this Arduino Tutorial we are going to modify this analog Voltmeter and convert into an Arduino Analog Thermometer. We are using an Arduino and a DS18B20 temperature sensor. Without any further delay, let’s get started!

Arduino Analog Thermometer – The Parts

Today we are going to learn how to use this analog voltmeter with Arduino and make it show the temperature instead of the voltage. As you can see, in this modified voltmeter, we can see the temperature in degrees Celsius. The temperature is measured by this digital sensor, a DS18B20 and it is then displayed on the voltmeter. I really like analog dials like this one, because they give a vintage look to the projects. Let’s now see how to achieve that result.

The parts that we are going to need today are the following:

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

 

Arduino Uno: http://bit.ly/Cheap_Uno

DS18B20 Sensor: http://bit.ly/2kxEwgy

Analog Voltmeter: http://bit.ly/AnalogVoltmeter

3 in 1 wires: http://bit.ly/Wires3InOne

Power Bank: http://bit.ly/PowerBank_XiaoMi

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!

——————–

LIBRARIES
——————–

📥 Dallas Library:  https://github.com/milesburton/Arduino-Temperature-Control-Library

 

Let’s now take a quick look at the code of the project in order to understand how it works. We need the DallasTemperature library in the code to compile. The code is very simple. We first read the temperature from the sensor. Next we pass the temperature value to the temperatureToPWM function. This functions converts the temperature to a PWM value from 0 to 255 using the map function. Next, all we have to do is to write this PWM value out at the voltmeter. You can also define the maximum and the minimum temperatures that your panel meter can display by changing the values of these variables. The smaller the gap between these two values, the bigger the resolution the panel meter will offer.

I really love the looks of these analog panel meters so I am going to build a lot of projects with them. In a future video I will design and 3d print a vintage enclosure for this analog thermometer we built today. I am going use an Arduino nano to make things more compact and add some yellow diffused LEDS to illuminate the panel at night. I think it will be cool.

——————–

CODE OF THE PROJECT
——————–

Download

 

 

 

——————–

SUBSCRIBE ON YOUTUBE

——————–

Never miss a video: Subscribe to educ8s.tv

2017-03-31T11:55:06+00:00

Leave A Comment

Close