ULTRASONIC SENSOR INTERFACING(Distance measuring Device using ultrasonic system)



 Sound waves, which are all around us, are simply organized mechanical vibrations traveling through a medium, which may be a solid, a liquid, or a gas. This applies to both the everyday sounds that we hear and the ultrasound used for flaw detection.

What is ULTRASONIC?

Ultrasonic vibrations of frequencies greater than the upper limit of the audible range for humans—that is, greater than about 20 kilohertz. The term sonic is applied to ultrasound waves of very high amplitudes

Hey guys , some time we need to detect a measuring a object how much far from us as we have to detect enemy at Airforce RADAR or Marine RADAR and also used in industry to detect a defect in material etc.

Principle of ultrasonic detector

Ultrasonic sensors emit short, high-frequency sound pulses at regular intervals. If they strike an object, then they are reflected back as echo signals to the sensor, which itself computes the distance to the target based on the time-span between emitting the signal and receiving the echo

Distance = Speed Ă— Time


Now here we see how ultrasonic sensor used with ARDUINO UNO and how we can detect any object using ultrasonic sensor.

Distance measuring Device using ultrasonic system

The distance meter is used for accurately determining the distance of an object without contact by way of a laser. The distance meter is frequently used in the industrial sector and especially with professions relating to construction, such as architecture, surveying, carpentry, masonry, locksmiths, etc

Required components:-

  1. HC-SR04 ultrasonic sensor 
  2. 16 x 2 LCD Display
  3.    ARDUINO UNO 
  4. Bread Board 
  5.  Cables for Connection

Hardware connection of ultrasonic sensor and ARDUINO UNO as below




Do connection as pin connection write here After connecting all connection upload a program as we learn before ARDUINO SOFTWARE(HOW TO PROGRAM IN ARDUINO ?)..
#include <LiquidCrystal.h>
LiquidCrystal lcd(6, 7, 8, 9, 10, 11);
const int trigPin = 12;
const int echoPin = 13;
long duration;
int distanceCm, distanceInch;
void setup() {
lcd.begin(16,2);
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
}
void loop() {
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distanceCm= duration*0.034/2;
distanceInch = duration*0.0133/2;
lcd.setCursor(0,0);
lcd.print("Distance: ");
lcd.print(distanceCm);
lcd.print(" cm");
delay(10);
lcd.setCursor(0,1);
lcd.print("Distance: ");
lcd.print(distanceInch);
lcd.print(" inch");
delay(10);
} for any query Email to Innovativethnings@gmail.com

Comments

Popular posts from this blog

Arduino

ARDUINO SOFTWARE(HOW TO PROGRAM IN ARDUINO ?)

Soil moisture sensor with Arduino ( Automatic watering plant)