Project showcase
Make it Possible with Physics - Ultrasonic Thermometer!

Make it Possible with Physics - Ultrasonic Thermometer! © GPL3+

In this tutorial, I will be giving the basics for an ultrasonic thermometer and the idea behind it.

  • 5,692 views
  • 3 comments
  • 13 respects

Components and supplies

HC-SR04 Ultrasonic Sensor
×1
A000066 iso both
Arduino UNO & Genuino UNO
×1

Apps and online services

About this project

Introduction

This simple project is based on the idea that "speed of sound in air strictly depends on the ambient temperature" and this difference can be calculated by a short equation:  

Speed of sound(meters/second)=331,4 + 0,6 x (ambient temperature in degrees celsius)

Things to keep in mind:

  • Speed of sound also depends on air flow (i.e. wind speed). If the environment you're planning to do this is windy, then do not expect accurate results.
  • The sensor module used in the project is quite cheap and low-end. So be aware that the readings are expected to be unstable. 

Even so, it's possible to get acceptable readings +/-  2°C

Although the video is in Turkish language, it's useful to see the project working.

Code

Main Arduino SketchArduino
Calculates the speed of sound and converts it to ambient temperature as mentioned in the description.
#define echo 7
#define trigger 8
double delaytime, temperature, speedofsound;

void setup(){
pinMode(trigger,OUTPUT);
pinMode(echo,INPUT);
Serial.begin(9600);
}

void loop(){
digitalWrite(trigger,LOW);
delayMicroseconds(2);         //Standard trigger-echo cycle provided by                              the manufacturer
digitalWrite(trigger,HIGH);
delayMicroseconds(10);
digitalWrite(trigger,LOW);

delaytime=pulseIn(echo,HIGH);
speedofsound=370000/delaytime;
temperature=(speedofsound-331.4)/0.6;
Serial.println(temperature);
delay(500);
}

Schematics

Sensor connections
Simple connection between Ardıuino UNO and the rangefinder module.
Screen%20shot%202016 08 09%20at%2011.42.36

Comments

Similar projects you might like

Detecting Obstacles and Warning - Arduino and Ultrasonic

Project tutorial by Ammar Atef Ali

  • 71,760 views
  • 40 comments
  • 110 respects

Ultrasonic Range Finder

Project tutorial by Saaket Poray

  • 9,417 views
  • 8 comments
  • 10 respects

One Pixel Thermometer

Project tutorial by Ian Cumming

  • 1,518 views
  • 1 comment
  • 7 respects

Ultrasonic Map-Maker using an Arduino Yun

Project tutorial by Satyavrat Wagle

  • 51,861 views
  • 37 comments
  • 152 respects

Arduino Based IR Thermometer with TFT Display and TMP006

Project tutorial by antiElectron

  • 2,363 views
  • 0 comments
  • 9 respects
Add projectSign up / Login