Skip to product information
1 of 6

Keszoox

HC-SR04 Ultrasonic Distance Sensor Module — 2–450cm, 0.3cm Precision, 5V, Arduino (50-Pack)

HC-SR04 Ultrasonic Distance Sensor Module 2–450cm, 0.3cm Precision, 5V, Arduino (50-Pack)

Regular price $395.76 USD
Sale price $395.76 USD
Save Liquid error (snippets/price line 138): divided by 0% Sold out
Taxes included. Shipping calculated at checkout.
Default Title

HC-SR04 Ultrasonic Distance Sensor Module — 2–450cm, 0.3cm Precision, 5V, Arduino (50-Pack)

The HC-SR04 is the most widely used ultrasonic distance sensor module in the Arduino and robotics community. Using 40kHz ultrasonic pulses, it measures distances from 2cm to 450cm with 0.3cm precision and a 15° beam angle. With a simple 4-pin interface (VCC, Trig, Echo, GND) and 5V operation, it integrates directly with Arduino, ESP32, Raspberry Pi, and STM32 for obstacle detection, distance measurement, and level sensing applications.

Key Specifications

Parameter Value
Measuring Range 2cm – 450cm
Precision 0.3cm
Ultrasonic Frequency 40kHz
Beam Angle 15°
Supply Voltage 5V DC
Trigger Input 10μs HIGH pulse on Trig pin
Echo Output HIGH pulse width proportional to distance
Quiescent Current <2mA
Operating Temperature -15°C to +70°C
Quantity 50 modules

HC-SR04 vs HC-SR04P vs JSN-SR04T

Feature HC-SR04 HC-SR04P JSN-SR04T
Supply Voltage 5V only 3.3V – 5V 5V
ESP32/Pi compatible Needs level shifter Direct 3.3V Needs level shifter
Waterproof No No Yes (probe type)
Best for Arduino 5V projects ESP32/Raspberry Pi Outdoor/liquid level

Why Choose HC-SR04?

  • 2–450cm range — covers most robotics and automation distance sensing needs
  • 0.3cm precision — sufficient for obstacle detection, parking sensors, and level measurement
  • Simple 4-pin interface — Trig + Echo + VCC + GND, works with any MCU digital pin
  • Extensive library support — NewPing, HCSR04, and built-in pulseIn() for Arduino
  • 50-pack value — ideal for classroom kits, robotics clubs, and bulk project builds

Compatible With

  • Arduino UNO/Nano/Mega: NewPing library or pulseIn(echoPin, HIGH) — distance = duration × 0.034 / 2
  • ESP32 / ESP8266: 5V VCC, Echo pin needs 1kΩ+2kΩ voltage divider to 3.3V for ESP GPIO
  • Raspberry Pi: RPi.GPIO with voltage divider on Echo pin (5V→3.3V)
  • STM32: HAL_TIM input capture or GPIO pulseIn equivalent
  • MicroPython: machine.time_pulse_us() for echo measurement

Frequently Asked Questions

Q: How do I calculate distance from HC-SR04 echo pulse width?
A: Send a 10μs HIGH pulse to Trig. Measure the Echo pin HIGH pulse duration in microseconds. Distance (cm) = duration × 0.034 / 2 (speed of sound = 340m/s = 0.034cm/μs, divide by 2 for round trip). Arduino code: digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); long duration = pulseIn(echoPin, HIGH); float distance = duration * 0.034 / 2;

Q: Can HC-SR04 be used directly with ESP32 (3.3V GPIO)?
A: The VCC must be 5V, but the Echo output is 5V which can damage ESP32 GPIO (3.3V max). Use a voltage divider (1kΩ + 2kΩ) or a level shifter on the Echo pin. The Trig pin accepts 3.3V input from ESP32 GPIO directly (5V logic threshold is ~2V). Alternatively, use HC-SR04P which operates at 3.3V.

Q: What is the minimum distance HC-SR04 can measure?
A: The minimum reliable distance is 2cm. Objects closer than 2cm may not be detected because the echo returns before the sensor finishes transmitting. For close-range sensing (<2cm), use an IR proximity sensor (TCRT5000, Sharp GP2Y0A21) instead.

Package Contents

  • 50× HC-SR04 Ultrasonic Distance Sensor Module
visa
View full details
  • ★Product Description
  • ★About us
  • ★Custom cable

HC-SR04 Ultrasonic Distance Sensor Module — 2–450cm, 0.3cm Precision, 5V, Arduino (50-Pack)

The HC-SR04 is the most widely used ultrasonic distance sensor module in the Arduino and robotics community. Using 40kHz ultrasonic pulses, it measures distances from 2cm to 450cm with 0.3cm precision and a 15° beam angle. With a simple 4-pin interface (VCC, Trig, Echo, GND) and 5V operation, it integrates directly with Arduino, ESP32, Raspberry Pi, and STM32 for obstacle detection, distance measurement, and level sensing applications.

Key Specifications

Parameter Value
Measuring Range 2cm – 450cm
Precision 0.3cm
Ultrasonic Frequency 40kHz
Beam Angle 15°
Supply Voltage 5V DC
Trigger Input 10μs HIGH pulse on Trig pin
Echo Output HIGH pulse width proportional to distance
Quiescent Current <2mA
Operating Temperature -15°C to +70°C
Quantity 50 modules

HC-SR04 vs HC-SR04P vs JSN-SR04T

Feature HC-SR04 HC-SR04P JSN-SR04T
Supply Voltage 5V only 3.3V – 5V 5V
ESP32/Pi compatible Needs level shifter Direct 3.3V Needs level shifter
Waterproof No No Yes (probe type)
Best for Arduino 5V projects ESP32/Raspberry Pi Outdoor/liquid level

Why Choose HC-SR04?

  • 2–450cm range — covers most robotics and automation distance sensing needs
  • 0.3cm precision — sufficient for obstacle detection, parking sensors, and level measurement
  • Simple 4-pin interface — Trig + Echo + VCC + GND, works with any MCU digital pin
  • Extensive library support — NewPing, HCSR04, and built-in pulseIn() for Arduino
  • 50-pack value — ideal for classroom kits, robotics clubs, and bulk project builds

Compatible With

  • Arduino UNO/Nano/Mega: NewPing library or pulseIn(echoPin, HIGH) — distance = duration × 0.034 / 2
  • ESP32 / ESP8266: 5V VCC, Echo pin needs 1kΩ+2kΩ voltage divider to 3.3V for ESP GPIO
  • Raspberry Pi: RPi.GPIO with voltage divider on Echo pin (5V→3.3V)
  • STM32: HAL_TIM input capture or GPIO pulseIn equivalent
  • MicroPython: machine.time_pulse_us() for echo measurement

Frequently Asked Questions

Q: How do I calculate distance from HC-SR04 echo pulse width?
A: Send a 10μs HIGH pulse to Trig. Measure the Echo pin HIGH pulse duration in microseconds. Distance (cm) = duration × 0.034 / 2 (speed of sound = 340m/s = 0.034cm/μs, divide by 2 for round trip). Arduino code: digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); long duration = pulseIn(echoPin, HIGH); float distance = duration * 0.034 / 2;

Q: Can HC-SR04 be used directly with ESP32 (3.3V GPIO)?
A: The VCC must be 5V, but the Echo output is 5V which can damage ESP32 GPIO (3.3V max). Use a voltage divider (1kΩ + 2kΩ) or a level shifter on the Echo pin. The Trig pin accepts 3.3V input from ESP32 GPIO directly (5V logic threshold is ~2V). Alternatively, use HC-SR04P which operates at 3.3V.

Q: What is the minimum distance HC-SR04 can measure?
A: The minimum reliable distance is 2cm. Objects closer than 2cm may not be detected because the echo returns before the sensor finishes transmitting. For close-range sensing (<2cm), use an IR proximity sensor (TCRT5000, Sharp GP2Y0A21) instead.

Package Contents

  • 50× HC-SR04 Ultrasonic Distance Sensor Module

  • ♥Hear From Our Happy Customers
  • ♥Verified Buyer Reviews
  • ♥Trusted by Professionals and Engineers