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.

  • 9,779 views
  • 3 comments
  • 14 respects

Components and supplies

HC-SR04 Ultrasonic Sensor
×1
Ph a000066 iso (1) ztbmubhmho
Arduino 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

  • 120,380 views
  • 44 comments
  • 151 respects

Ultrasonic Range Finder

Project tutorial by Saaket Poray

  • 15,712 views
  • 10 comments
  • 17 respects

Arduino Based IR Thermometer with TFT Display and TMP006

Project tutorial by antiElectron

  • 3,351 views
  • 0 comments
  • 10 respects

One Pixel Thermometer

Project tutorial by Ian Cumming

  • 2,651 views
  • 2 comments
  • 8 respects

Ultrasonic Map-Maker using an Arduino Yun

Project tutorial by Satyavrat Wagle

  • 68,030 views
  • 38 comments
  • 171 respects
Add projectSign up / Login