Project 9 · Sensor Catalog (Vol III)

HC-SR04 Ultrasonic Distance

Master the world of echolocation by building a digital ruler that sees with sound!

Easy 30 min 5 components
HC-SR04 Ultrasonic Distance wiring diagram

What you'll learn

  • Understand how ultrasonic waves are used to calculate distance via 'Time of Flight'.
  • Be able to use the pulseIn() function to measure the duration of a digital signal.
  • Learn to convert raw time data into physical measurements (centimeters) using mathematical constants.
  • Identify the difference between Trigger (output) and Echo (input) pins in sensor communication.

What's in the kit

  • Arduino UNO
  • HC-SR04 Ultrasonic Sensor
  • Breadboard
  • Jumper Wires (M-M)×4
  • USB Cable (Type A to B)

Protocol: digital