SlideShare una empresa de Scribd logo
1 de 7
Descargar para leer sin conexión
Project Name: Distance Measuring Project using Arduino and Sonar Sensor.
Objective:01. To create an electronic measuring device using Arduino and Sonar
Sensor.
02. To determine the distance of any object with Sonar sensor for
indoor use.
03. To get an accurate measurement of distance.
04. To inform user about the total distance by displaying on Liquid
Crystal Display(LCD).
Components: 01. Arduino UNO.
02. Sonar Sensor.
03. 16x2 Liquid Crystal Display(LCD).
04. PCB Board.
05. 1K Resistor.
06. Male Connector Single Row.
07. Female Connector Single Row.
08. Connecting Wires.
09. Male To Male Jumper Wires.
10. Male To Female Jumper Wires.
11. 9 volt Battery/Adepter.
Components Description and Working Procedure:
Sonar Sensor Module:Sonar sensor(HC-SR04) is used here to determine
distance to an object like a wall or any kind of object surface. It measure distance in
range of 2cm-400cm 1” to 13 feet . It operation is not affected by sunlight or black
material like Sharp rangefinders are (although acoustically soft materials like cloth
can be difficult to detect) The sensor module consists of ultrasonic transmitter,
receiver and the control circuit. The working principle of ultrasonic sensor is as
follows:
01. High level signal is sent for 10us using Trigger in 30 degree Measuring Angle.
02. The module sends eight 40 KHz signals automatically, and then detects whether
pulse is received or not.
03. If the signal is received, then it is through high level. The time of high duration is
the
time gap between sending and receiving the signal.
LCD:16x2 Liquid Crystal Display is used for displaying the measuring distance.
Procedure I prefer to build my own Arduino based circuit and make my
constraction smaller.
In circuit connections Sonar sensor module’s “trigger” and “echo” pins are directly
connected to pin A4 and A5 of arduino. A 16x2 LCD is connected with arduino in 4-
bit mode. Control pin RS, RW and E are directly connected to arduino pin
respectively 2, GND and 3. And data pin D4-D7 is connected to 4, 5, 6 and 7 of
arduino.
First of all we need to trigger the ultrasonic sensor module to transmit signal by
using arduino and then wait for receive ECHO. Arduino reads the time between
triggering and Received ECHO. We know that speed of sound is around 340m/s. so
we can calculate distance by using given formula:
Distance= (travel time/2) * speed of sound.
Project and Full Report Complited by:
Name: Ananda Mohan Shil.
University of Science and Technology Chittagong.
Bachelor of Science (BSc)
Field Of Study: Electrical and Electronic Engineering
Facebook contact link: https://web.facebook.com/Ananda.Mohan.shil
Program:
#include <LiquidCrystal.h>
#define trigger 18
#define echo 19
LiquidCrystal lcd(2,3,4,5,6,7);
float time=0,distance=0;
void setup()
{ Serial.begin(9600);
lcd.begin(16,2);
pinMode(trigger,OUTPUT);
pinMode(echo,INPUT);
lcd.print(" Ultra sonic");
lcd.setCursor(0,1);
lcd.print("Distance Meter");
delay(2000);
lcd.clear();
lcd.print("Ananda");
delay(2000);
}
void loop()
{
lcd.clear();
digitalWrite(trigger,LOW);
delayMicroseconds(2);
digitalWrite(trigger,HIGH);
delayMicroseconds(10);
digitalWrite(trigger,LOW);
delayMicroseconds(2);
time=pulseIn(echo,HIGH);
distance=time*340/20000;
lcd.clear();
lcd.print("Distance:");
lcd.print(distance);
Serial.print(" distance");
Serial.print(distance);
lcd.print("cm");
lcd.setCursor(0,1);
lcd.print("Distance:");
lcd.print(distance/100);
Serial.print(" Centimeter");
Serial.print(distance/100);
lcd.print("m");
delay(1000);
}
Discussion: I have faced some common problem. I make some mistakes in
programming time.I didn’t get the perfect value of measuring distance in LCD
because of LCD connection,sensor connection,sound speed variation, surface layer
of the object and the time interval between sending the signal and receiving the
echo to determine the distance tothe object.I got the measuring distance 5.25cm,
11.36cm, 22.47cm,25.52cm respectively for 5cm,10cm,20cm,25cm etc.
Ardunio based distance measurement project LAB REPORT

Más contenido relacionado

Más de Ananda Mohan (12)

Cmos fabrication process
Cmos fabrication processCmos fabrication process
Cmos fabrication process
 
VSAT- Very Small Aperture Terminal
VSAT- Very Small Aperture TerminalVSAT- Very Small Aperture Terminal
VSAT- Very Small Aperture Terminal
 
Source channel-huffman coding
Source channel-huffman codingSource channel-huffman coding
Source channel-huffman coding
 
Interference in communication
Interference in communication Interference in communication
Interference in communication
 
CDMA
CDMACDMA
CDMA
 
Satellite system models
Satellite system modelsSatellite system models
Satellite system models
 
Radar
RadarRadar
Radar
 
History of satellite & Radar
History of satellite & RadarHistory of satellite & Radar
History of satellite & Radar
 
Geosynchronous earth orbit(geo)
Geosynchronous earth orbit(geo)Geosynchronous earth orbit(geo)
Geosynchronous earth orbit(geo)
 
FDMA
FDMAFDMA
FDMA
 
Categories of satellite
Categories of satelliteCategories of satellite
Categories of satellite
 
Arduino based distance measuring project
Arduino based distance measuring projectArduino based distance measuring project
Arduino based distance measuring project
 

Último

Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 

Último (20)

VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 

Ardunio based distance measurement project LAB REPORT

  • 1. Project Name: Distance Measuring Project using Arduino and Sonar Sensor. Objective:01. To create an electronic measuring device using Arduino and Sonar Sensor. 02. To determine the distance of any object with Sonar sensor for indoor use. 03. To get an accurate measurement of distance. 04. To inform user about the total distance by displaying on Liquid Crystal Display(LCD). Components: 01. Arduino UNO. 02. Sonar Sensor. 03. 16x2 Liquid Crystal Display(LCD). 04. PCB Board. 05. 1K Resistor. 06. Male Connector Single Row. 07. Female Connector Single Row. 08. Connecting Wires. 09. Male To Male Jumper Wires. 10. Male To Female Jumper Wires. 11. 9 volt Battery/Adepter.
  • 2. Components Description and Working Procedure: Sonar Sensor Module:Sonar sensor(HC-SR04) is used here to determine distance to an object like a wall or any kind of object surface. It measure distance in range of 2cm-400cm 1” to 13 feet . It operation is not affected by sunlight or black material like Sharp rangefinders are (although acoustically soft materials like cloth can be difficult to detect) The sensor module consists of ultrasonic transmitter, receiver and the control circuit. The working principle of ultrasonic sensor is as follows: 01. High level signal is sent for 10us using Trigger in 30 degree Measuring Angle. 02. The module sends eight 40 KHz signals automatically, and then detects whether pulse is received or not. 03. If the signal is received, then it is through high level. The time of high duration is the time gap between sending and receiving the signal. LCD:16x2 Liquid Crystal Display is used for displaying the measuring distance. Procedure I prefer to build my own Arduino based circuit and make my constraction smaller. In circuit connections Sonar sensor module’s “trigger” and “echo” pins are directly connected to pin A4 and A5 of arduino. A 16x2 LCD is connected with arduino in 4- bit mode. Control pin RS, RW and E are directly connected to arduino pin respectively 2, GND and 3. And data pin D4-D7 is connected to 4, 5, 6 and 7 of arduino. First of all we need to trigger the ultrasonic sensor module to transmit signal by using arduino and then wait for receive ECHO. Arduino reads the time between triggering and Received ECHO. We know that speed of sound is around 340m/s. so we can calculate distance by using given formula: Distance= (travel time/2) * speed of sound.
  • 3. Project and Full Report Complited by: Name: Ananda Mohan Shil. University of Science and Technology Chittagong. Bachelor of Science (BSc) Field Of Study: Electrical and Electronic Engineering Facebook contact link: https://web.facebook.com/Ananda.Mohan.shil
  • 4. Program: #include <LiquidCrystal.h> #define trigger 18 #define echo 19 LiquidCrystal lcd(2,3,4,5,6,7); float time=0,distance=0;
  • 5. void setup() { Serial.begin(9600); lcd.begin(16,2); pinMode(trigger,OUTPUT); pinMode(echo,INPUT); lcd.print(" Ultra sonic"); lcd.setCursor(0,1); lcd.print("Distance Meter"); delay(2000); lcd.clear(); lcd.print("Ananda"); delay(2000); } void loop() { lcd.clear(); digitalWrite(trigger,LOW); delayMicroseconds(2); digitalWrite(trigger,HIGH); delayMicroseconds(10); digitalWrite(trigger,LOW); delayMicroseconds(2);
  • 6. time=pulseIn(echo,HIGH); distance=time*340/20000; lcd.clear(); lcd.print("Distance:"); lcd.print(distance); Serial.print(" distance"); Serial.print(distance); lcd.print("cm"); lcd.setCursor(0,1); lcd.print("Distance:"); lcd.print(distance/100); Serial.print(" Centimeter"); Serial.print(distance/100); lcd.print("m"); delay(1000); } Discussion: I have faced some common problem. I make some mistakes in programming time.I didn’t get the perfect value of measuring distance in LCD because of LCD connection,sensor connection,sound speed variation, surface layer of the object and the time interval between sending the signal and receiving the echo to determine the distance tothe object.I got the measuring distance 5.25cm, 11.36cm, 22.47cm,25.52cm respectively for 5cm,10cm,20cm,25cm etc.