SlideShare a Scribd company logo
HOW TO INTERFACE ARDUINO WITH AN
ULTRASONIC SENSOR?
Source:
HCSR04 ULTRASONIC SENSOR PINOUT
Source:
The Ultrasonic Sensor has 4 pins:
- VCC, Trig, Echo and GND. The
Pinout explanation is given as
below
• HC-SR04 Ultrasonic Sensor
Pinout
• VCC - The supply pin of the HC-
SR04 Module.
• GND - This is the Ground pin of
the module
• Trig - This is the trigger pin of
the HC-SR04 module
• Echo - This is the echo pin of
the HC-SR04 sensor module.
WORKING PRINCIPLES OF
ULTRASONIC SENSOR
Source:
The ultrasonic sensor operates by emitting high-frequency sound waves and detecting their
reflections. It comprises a transducer, which both emits and receives ultrasonic waves,
along with signal processing circuitry to measure the time taken for the waves to travel and
return.
CIRCUIT CONNECTION OF
ULTRASONIC SENSOR
Source:
Connect the ultrasonic sensor's trig and echo pins to Arduino pins 4 and 5, respectively.
This configuration allows the Arduino to trigger the sensor and measure the time taken
for the echo pulse to return.
ULTRASONIC SENSOR AND LCD
DISPLAY
Source:
Arduino Code:
Initialize serial
communication, set up
trigger and echo pins,
measure echo pulse
duration, calculate
distance based on
sound speed, and
display on Serial
Monitor.
LCD Display Addition:
Connect I2C LCD
display to Arduino using
SDA, SCL, VCC, and
GND pins for real-time
distance display
alongside serial output.
WORKING OF ULTRASONIC
SENSOR WITH ARDUINO
Source:
THANK YOU!!
Source:
https://circuitdigest.com/microcontroller-projects/interface-arduino-with-
ultrasonic-sensor
Full Tutorial:

More Related Content

PDF
Arduino-with-Ultrasonic-sensor.pdf
PPTX
Ultrasonic sensor
PPTX
Ultrasonic Sensor
PDF
ULTRASONIC SENSOR.pdf
PPTX
ultrasonic sensor.pptx
PPTX
Ultrasonic sensor
PDF
Ultrasonicsensor 170828140914
PPTX
Ultrsonic sensor_Arduino_DRKG.pptx
Arduino-with-Ultrasonic-sensor.pdf
Ultrasonic sensor
Ultrasonic Sensor
ULTRASONIC SENSOR.pdf
ultrasonic sensor.pptx
Ultrasonic sensor
Ultrasonicsensor 170828140914
Ultrsonic sensor_Arduino_DRKG.pptx

Similar to Discover How to Interface Ultrasonic Sensors with Arduino for Distance Measurement. (20)

PPTX
HC-SR04 Ultrasonic sensor with Arduino
PPTX
Distance measurement using Ultrasonic sensor on Arduino Uno
PPTX
ultrasonic sensor.pptx
PPTX
Physics project.pptx
PPTX
IOT_PPT_PRESENTATION_2025.pptx and radar using sensor
PPTX
81485Scanned.pptx
PPTX
Arduino Ultrasonic Sensor
PPTX
Final year Engineering project
PPTX
avoiding accidents on ghat roads and u turns by using IOT
PPTX
Ultrasonic security system by arduino
PPTX
Copy-of-Building-a-Basic-Radar-System-with-Arduino-and-Ultrasonic-Sensor.pptx
PPTX
Radar
PDF
Obstacle detection using ultra sonic sensor
PPTX
PPT Missile Radar System introduction.pptx
PPTX
Vex-Ultrasonic-Tutorial-new (1).pptx
PPTX
Ultrasonic_Sensor_Arduino_Project_Formatted.pptx
PPTX
Ultrasonic_Sensor_Arduino_Project_Final.pptx
PPTX
Computer networks unit III CHAPTER of frameworks
PPTX
Cs project ppt
PPTX
Ultrasonic-Radar-with-Arduino-project.pptx
HC-SR04 Ultrasonic sensor with Arduino
Distance measurement using Ultrasonic sensor on Arduino Uno
ultrasonic sensor.pptx
Physics project.pptx
IOT_PPT_PRESENTATION_2025.pptx and radar using sensor
81485Scanned.pptx
Arduino Ultrasonic Sensor
Final year Engineering project
avoiding accidents on ghat roads and u turns by using IOT
Ultrasonic security system by arduino
Copy-of-Building-a-Basic-Radar-System-with-Arduino-and-Ultrasonic-Sensor.pptx
Radar
Obstacle detection using ultra sonic sensor
PPT Missile Radar System introduction.pptx
Vex-Ultrasonic-Tutorial-new (1).pptx
Ultrasonic_Sensor_Arduino_Project_Formatted.pptx
Ultrasonic_Sensor_Arduino_Project_Final.pptx
Computer networks unit III CHAPTER of frameworks
Cs project ppt
Ultrasonic-Radar-with-Arduino-project.pptx
Ad

More from CircuitDigest (20)

PDF
Set a Static IP on Raspberry Pi TutorialPPT
PDF
Interfacing the A7672S GNSS Module With Arduino PDF
PDF
Arduino GPS Tracker Using SIM800L and NEO6M PPT
PPTX
Arduino Based Gas Leakage Detector Project
PDF
RFID based Attendance System Using Arduino
PDF
Understanding Amplitude Modulation : A Guide
PDF
Flip-Flop in Digital Electronics: Types, Truth Table, Logic Circuit and Pract...
PDF
DIY Gesture Control ESP32 LiteWing Drone using Python
PDF
Build an IoT-based Weather Monitoring System Using Arduino?
PDF
Build a Smart Helmet using Arduino
PDF
ESP32 Air Mouse using Bluetooth and MPU6050
PDF
Hand Gesture Recognition using ESP32 and Python
PDF
How to Build a Desktop Weather Station Using ESP32 and E-ink Display
PDF
Interfacing PMW3901 Optical Flow Sensor with ESP32
PDF
Send SMS with Arduino UNO R4 via Internet
PDF
How to use nRF24L01 module with Arduino
PDF
Complete Overview of Current Transformer Types
PDF
How to build Blind Stick using Arduino Nano and Ultrasonic sensor
PDF
How to Control Servo Motor using Arduino
PDF
How to use L298N Motor Driver with Arduino?
Set a Static IP on Raspberry Pi TutorialPPT
Interfacing the A7672S GNSS Module With Arduino PDF
Arduino GPS Tracker Using SIM800L and NEO6M PPT
Arduino Based Gas Leakage Detector Project
RFID based Attendance System Using Arduino
Understanding Amplitude Modulation : A Guide
Flip-Flop in Digital Electronics: Types, Truth Table, Logic Circuit and Pract...
DIY Gesture Control ESP32 LiteWing Drone using Python
Build an IoT-based Weather Monitoring System Using Arduino?
Build a Smart Helmet using Arduino
ESP32 Air Mouse using Bluetooth and MPU6050
Hand Gesture Recognition using ESP32 and Python
How to Build a Desktop Weather Station Using ESP32 and E-ink Display
Interfacing PMW3901 Optical Flow Sensor with ESP32
Send SMS with Arduino UNO R4 via Internet
How to use nRF24L01 module with Arduino
Complete Overview of Current Transformer Types
How to build Blind Stick using Arduino Nano and Ultrasonic sensor
How to Control Servo Motor using Arduino
How to use L298N Motor Driver with Arduino?
Ad

Recently uploaded (20)

PPTX
Welding lecture in detail for understanding
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
Lecture Notes Electrical Wiring System Components
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPT
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PPT
Project quality management in manufacturing
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
PPT on Performance Review to get promotions
PPTX
Construction Project Organization Group 2.pptx
PPTX
bas. eng. economics group 4 presentation 1.pptx
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Welding lecture in detail for understanding
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Lecture Notes Electrical Wiring System Components
Foundation to blockchain - A guide to Blockchain Tech
UNIT-1 - COAL BASED THERMAL POWER PLANTS
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
Internet of Things (IOT) - A guide to understanding
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
Project quality management in manufacturing
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPT on Performance Review to get promotions
Construction Project Organization Group 2.pptx
bas. eng. economics group 4 presentation 1.pptx
CH1 Production IntroductoryConcepts.pptx
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd

Discover How to Interface Ultrasonic Sensors with Arduino for Distance Measurement.

  • 1. HOW TO INTERFACE ARDUINO WITH AN ULTRASONIC SENSOR? Source:
  • 2. HCSR04 ULTRASONIC SENSOR PINOUT Source: The Ultrasonic Sensor has 4 pins: - VCC, Trig, Echo and GND. The Pinout explanation is given as below • HC-SR04 Ultrasonic Sensor Pinout • VCC - The supply pin of the HC- SR04 Module. • GND - This is the Ground pin of the module • Trig - This is the trigger pin of the HC-SR04 module • Echo - This is the echo pin of the HC-SR04 sensor module.
  • 3. WORKING PRINCIPLES OF ULTRASONIC SENSOR Source: The ultrasonic sensor operates by emitting high-frequency sound waves and detecting their reflections. It comprises a transducer, which both emits and receives ultrasonic waves, along with signal processing circuitry to measure the time taken for the waves to travel and return.
  • 4. CIRCUIT CONNECTION OF ULTRASONIC SENSOR Source: Connect the ultrasonic sensor's trig and echo pins to Arduino pins 4 and 5, respectively. This configuration allows the Arduino to trigger the sensor and measure the time taken for the echo pulse to return.
  • 5. ULTRASONIC SENSOR AND LCD DISPLAY Source: Arduino Code: Initialize serial communication, set up trigger and echo pins, measure echo pulse duration, calculate distance based on sound speed, and display on Serial Monitor. LCD Display Addition: Connect I2C LCD display to Arduino using SDA, SCL, VCC, and GND pins for real-time distance display alongside serial output.
  • 6. WORKING OF ULTRASONIC SENSOR WITH ARDUINO Source: