HC-SR04 Ultrasonic Ranging Module – Technical Specifications:
| Module Type | – Ultrasonic Distance Sensor |
| Operating Voltage | – 5V DC |
| Operating Current | – 15mA (Typical) |
| Operating Frequency | – 40kHz |
| Measuring Range | – 2cm to 400cm |
| Measuring Accuracy | – ±3mm |
| Measuring Angle | – 15° (Effective Cone) |
| Trigger Input Signal | – 10µs TTL Pulse (HIGH) |
| Echo Output Signal | – TTL PWM Signal |
| Interface | – 4-Pin Header (VCC, Trig, Echo, GND) |
| Dimensions | – 45 × 20 × 15mm |
| Weight | – ±9g |
| Compatible Platforms | – Arduino, ESP8266, ESP32, Raspberry Pi, STM32 |
Handy Tips for Using the HC-SR04 Ultrasonic Ranging Module:
1: The HC-SR04 has four pins — VCC (5V power), Trig (trigger input), Echo (distance output), and GND (ground). To take a measurement, send a 10 microsecond HIGH pulse to the Trig pin. The module will emit 8 ultrasonic pulses and the Echo pin will go HIGH for a duration proportional to the distance of the detected object. Use the formula: Distance (cm) = Echo Duration (µs) ÷ 58 to convert the pulse width into a distance reading.
2: The HC-SR04 operates at 5V, which means the Echo pin also outputs a 5V signal. If you are using a 3.3V microcontroller (such as an ESP8266, ESP32, or Raspberry Pi), you must use a voltage divider or logic level shifter on the Echo pin to avoid damaging your board. The Trig pin is input-only and will accept 3.3V signals without issue.
3: For best accuracy, mount the sensor so the two transducer "eyes" are facing the target surface perpendicularly. Angled surfaces, soft materials (fabric, foam), and very small objects can absorb or deflect the ultrasonic pulses, causing missed readings or inaccurate results.
4: The minimum reliable measuring distance is 2cm — objects closer than this fall within the sensor's blind spot and will return inaccurate or no readings. If your application requires detection of very close objects, add a software check to discard any readings below 2cm.
5: When taking continuous readings in a loop, add a delay of at least 60ms between measurements. This gives the ultrasonic pulse time to fully dissipate before the next trigger cycle, preventing the sensor from picking up echoes from a previous pulse and returning false distance readings.
Free Shipping for orders over R1500 & Standard Shipping R99!
