Utility Bar

HC-SR04 Ultrasonic Distance Measuring Sensor

Zaitronics  |  SKU: Z0162
$1.90 AUD
$1.73 exc GST

No reviews yet

The HC-SR04 Ultrasonic Distance Measuring Sensor is a non-contact module that measures distances by emitting ultrasonic waves and timing the echo reflected back from objects. It is ideal for Arduino, ESP32, Raspberry Pi robotics, automation, and obstacle avoidance projects, offering reliable measurements for indoor and outdoor applications.

Key Features & Specifications

  • Non-contact Distance Measurement: Measures distances without physical contact
  • Sensing Range: 2cm – 400cm (1″–13ft), 30° measuring angle
  • Resolution: 0.3cm
  • Trigger Pulse: 10µs HIGH pulse to start measurement
  • Power Supply: +5V DC, Quiescent Current <2mA, Working Current 15mA
  • Interface: Simple 4-pin connection (VCC, Trig, Echo, GND) compatible with Arduino, ESP32, Raspberry Pi
  • Dimensions: 45mm x 20mm x 15mm

Pinout Description

  • VCC: +5V power supply input
  • Trig: Trigger input pin; send a 10µs HIGH pulse to start measurement
  • Echo: Echo output pin; outputs a pulse width proportional to the distance
  • GND: Ground connection

Getting Started

Using the HC-SR04 is straightforward with Arduino, ESP32, or Raspberry Pi:

  1. Connect VCC to 5V and GND to ground.
  2. Connect Trig and Echo to digital GPIO pins.
  3. Use libraries such as NewPing for Arduino or Python scripts on Raspberry Pi to measure distances.
  4. Calculate distance using the echo pulse duration (distance = time × speed of sound / 2).
  5. For multiple sensors, make sure each sensor has separate GPIO pins or trigger sequentially.

Troubleshooting Tips

  • If readings fluctuate, check wiring connections and ensure stable 5V power.
  • Objects with soft surfaces may reflect ultrasound poorly, test with flat, solid objects.
  • Ensure the sensor is not exposed to excessive noise or interference from other ultrasonic devices.
  • Verify correct libraries and board selection in your code.

Related Products

The HC-SR04 is a reliable, low-cost solution for robotics, obstacle avoidance, and distance measurement projects. Combined with Arduino or ESP32, it allows you to quickly implement automation, collision detection, and smart electronics experiments.



Customer Reviews