0% found this document useful (0 votes)
13 views

Tanishq Kanare EDA - Report - Format

Uploaded by

TANISHQ KANARE
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Tanishq Kanare EDA - Report - Format

Uploaded by

TANISHQ KANARE
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Name – Tanishq Kanare Class - B.

Tech III Year Branch - ECE Sem – VI


Subject – EC 364 (PCC) – ELECTRONIC DESIGN AUTOMATION LAB

Experiment No. – 09

 Aim:

 Apparatus Required: HC-SR04 Ultrasonic sensor,


Arduino Uno, Jumper wires, USB 2.0 cable type A/B,
breadboard, Arduino IDE installed in computer.

 Theory:

1. Description of sensor:

The HC-SR04 is a popular and economical ultrasonic


sensor used for non-contact distance measurement. It
operates by emitting ultrasonic sound waves and
measuring the time it takes for the sound to reflect off an
object and return to the sensor. The amount of time it
takes to send and receive waves will determine how far the
object is placed from the sensor. It mainly depends on the
sound waves working on “non-contact” technology. The
required distance of the target object is measured without
any damage, giving you accurate and precise details.
Name – Tanishq Kanare Class - B. Tech III Year Branch - ECE Sem – VI
Subject – EC 364 (PCC) – ELECTRONIC DESIGN AUTOMATION LAB

2. Pin-configuration of sensor:
Name – Tanishq Kanare Class - B. Tech III Year Branch - ECE Sem – VI
Subject – EC 364 (PCC) – ELECTRONIC DESIGN AUTOMATION LAB

3. Working of sensor:

 Trigger Pulse: The sensor has a trigger pin (TRIG)


that requires a short high pulse (typically 10
microseconds) to initiate a measurement cycle.

 Ultrasonic Burst: When triggered, the sensor


generates a burst of high-frequency sound waves
(usually around 40 kHz) that are inaudible to
humans.

 Echo Detection: The sound waves travel outwards


until they hit an object and reflect back towards the
sensor.

 Echo Reception: The sensor has an echo pin


(ECHO) that listens for the returning sound waves.

 Distance Calculation: The sensor measures the time


it takes for the sound wave to travel from the sensor,
hit the object, and return (round trip time). The speed
of sound is known (approximately 343 meters per
second at room temperature). By dividing the round
trip time by twice the speed of sound, the sensor
calculates the distance to the object.
Name – Tanishq Kanare Class - B. Tech III Year Branch - ECE Sem – VI
Subject – EC 364 (PCC) – ELECTRONIC DESIGN AUTOMATION LAB

4. Technical Specifications of the sensor:

 Operating Voltage: 5V DC (typical)

 Operating Current: 15mA (typical)

 Working Frequency: 40 kHz (typical)

 Minimum Measuring Distance: 2cm (may not be


accurate at this close range)

 Maximum Measuring Distance: 400cm (accuracy


might decrease at this distance)

 Measuring Angle: Approximately 15 degrees (cone-


shaped detection area)

 Trigger Pulse Width: 10 microseconds (minimum)

 Echo Output Signal: High pulse with duration


proportional to the measured distance

5. Applications of the sensor:


 Robot obstacle avoidance
 Object detection and ranging
 Level measurement in tanks or containers
 Security systems
Name – Tanishq Kanare Class - B. Tech III Year Branch - ECE Sem – VI
Subject – EC 364 (PCC) – ELECTRONIC DESIGN AUTOMATION LAB

 Connections of sensor with Arduino Uno:

1.) Connect +5 volt pin of Arduino to pin VCC of the sensor


2.) Connect GND pin of Arduino to GND of the sensor
3.) Connect Digital pin 7 of Arduino to TRIG pin of sensor
4.) Connect PWM pin no. 6 of Arduino to ECHO pin of sensor
Name – Tanishq Kanare Class - B. Tech III Year Branch - ECE Sem – VI
Subject – EC 364 (PCC) – ELECTRONIC DESIGN AUTOMATION LAB

 Arduino Code:
const int pingPin = 7; // Trigger Pin of Ultrasonic Sensor
const int echoPin = 6; // Echo Pin of Ultrasonic Sensor
void setup() {
Serial.begin(9600); // Starting Serial Terminal
}

void loop() {
long duration, inches, cm;
pinMode(pingPin, OUTPUT);
digitalWrite(pingPin, LOW);
delayMicroseconds(2);
digitalWrite(pingPin, HIGH);
delayMicroseconds(10);
digitalWrite(pingPin, LOW);
pinMode(echoPin, INPUT);
duration = pulseIn(echoPin, HIGH);
inches = microsecondsToInches(duration);
cm = microsecondsToCentimeters(duration);
Serial.print(inches);
Serial.print("in, ");
Serial.print(cm);
Serial.print("cm");
Serial.println();
delay(100);
}

long microsecondsToInches(long microseconds) {


return microseconds / 74 / 2;
}
Name – Tanishq Kanare Class - B. Tech III Year Branch - ECE Sem – VI
Subject – EC 364 (PCC) – ELECTRONIC DESIGN AUTOMATION LAB

long microsecondsToCentimeters(long microseconds) {


return microseconds / 29 / 2;
}

 Result:
Hence, the HC-SR04 sensor was successfully interfaced with
Arduino Uno and the distance measurement was obtained
successfully.

You might also like