In this note, we are going to learn a topic called “What is Ultrasonic Sensor?“, also its pin details and working principle. Welcome to Poly Notes Hub, a leading destination for polytechnic notes and engineering notes.
Author Name: Arun Paul.
What is Ultrasonic Sensor Arduino?
An Arduino Ultrasonic Sensor is a device that emits high-frequency sound waves and then detects how long it takes for those waves to bounce off an object and return to the sensor. This data can then be utilized to determine the distance to the object.
![About Ultrasonic Sensor - Pin Details, Working | New Topic [2024] Poly Notes Hub what is ultrasonic sensor arduino - poly notes hub](https://polynoteshub.co.in/wp-content/uploads/2024/04/polynoteshub-2024-04-24T230413.364.jpg)
The ultrasonic sensor is normally made up of a transmitter and a receiver. The transmitter sends ultrasonic pulses, and the receiver catches their echoes. The sensor can calculate the distance by measuring the time it takes for the pulses to travel to and from the object using the speed of sound in air.
Ultrasonic Sensor Pins
![About Ultrasonic Sensor - Pin Details, Working | New Topic [2024] Poly Notes Hub ultrasonic sensor pins - poly notes hub](https://polynoteshub.co.in/wp-content/uploads/2024/04/polynoteshub-2024-04-24T230350.472.jpg)
The Ultrasonic Sensor has four pins and each pin has their own function –
- VCC: This pin is connected to the Arduino‘s positive voltage supply (often 5V) or the power source you are utilizing.
- Trig (Trigger): This pin is used to signal the sensor to emit an ultrasonic pulse. It is generally connected to the Arduino’s digital output pins.
- Echo: This pin receives ultrasonic pulse echoes. The duration of this pin’s high state (or pulse duration) is related to the sensor’s distance from the item. This pin is frequently attached to an Arduino’s digital input pin.
- GND: This pin is connected to the Arduino’s ground (0V) or the common ground in your design.
Meaning of HC-SR04 in Ultrasonic Sensor
- “HC” is most likely an abbreviation for “High-Capacity,” implying that it can handle a range of uses.
- “SR” could stand for “Sound Ranging,” which is consistent with its purpose of measuring distances with sound waves.
- “04” is commonly used to designate the sensor’s version number or series.
This is a basic connection setup of Ultrasonic Sensor with Arduino –
- Connect the sensor’s VCC pin to the 5V output pin on the Arduino.
- Connect the sensor’s GND pin to any ground (GND) pin on an Arduino.
- Connect the sensor’s Trig pin to an Arduino digital output pin (such as pin 7 which is assigned as OUTPUT).
- Connect the sensor’s Echo pin to an Arduino digital input pin (such as pin 6 which is assigned as INPUT).
- Once the pins are connected, you can use Arduino code to activate the sensor, record the length of the pulse on the Echo pin, and use that information to determine how far away the object is.
Ultrasonic Sensor Working Principle
An ultrasonic sensor uses echolocation, similar to how bats navigate in darkness. It consists of a piezoelectric transducer that, when activated by an electrical pulse, creates ultrasonic waves at a high frequency that is typically outside the human auditory range. These waves spread outward in a conical or cylindrical shape until they hit an item. When waves hit an object, they bounce off its surface and return to the sensor. The sensor’s receiver detects the reflected waves and converts them to electrical impulses.
The sensor determines the distance to the object by precisely measuring the time it takes for ultrasonic waves to travel from the sensor to the object and back. This figure is based on the known speed of sound in air, which is approximately 343 meters per second at ambient temperature. With this information, the sensor generates an output that represents the distance to the item.
This distance data can be used by microcontrollers such as Arduino for a variety of purposes, including obstacle avoidance, object tracking, and distance measurement. Overall, the ultrasonic sensor operates by emitting, detecting, and analyzing ultrasonic waves to calculate the distance between nearby objects, allowing for a variety of practical applications in robotics, automation, and beyond.
Application of Ultrasonic Sensor
There are various applications of Ultrasonic Sensor which are listed below –
- Measurement of distance
- Identifying and avoiding objects
- Tank liquid level detection
- systems for parking assistance
- Sensing proximity in robotics
- Pipeline flow rate measuring
- Collision prevention in self-driving cars
- Interfaces for gesture recognition
- Security system presence detection
- Measurement of the thickness of the material.
Fantastic site A lot of helpful info here Im sending it to some buddies ans additionally sharing in delicious And naturally thanks on your sweat