Site Guide

Find your way around the Engineering Club.

Know what you need? Search for a component, concept or project.

Around the site

Start

Labs

TestingExperimental

Build

Club

LearnExperimental

Go a little deeper

Entry points to larger collections. Use Search for individual records.

Learning paths & reference

Inside PiCrawlerExperimental

Inside Inventory

← Club inventory
HC-SR04 ultrasonic distance sensor module

Sensors

HC-SR04 ultrasonic distance sensor module

An HC-SR04-compatible module estimates distance by timing the round trip of an ultrasonic burst reflected from a target.

Owned by clubQuantity: 5

trigger/echo digital pins · Trigger input; timed Echo output

What it does

It gives a controller an Echo pulse whose width represents acoustic travel time. This supports obstacle detection and rough range measurements without touching the object; it measures the first usable reflection within its beam, not necessarily the point directly ahead.

Useful specifications

Typical supply
5 V
Typical advertised range
2–400 cm
Burst frequency
40 kHz
Trigger pulse
At least 10 µs
Echo
Typically supply-level pulse
How it works

A piezoelectric transmitter converts voltage into a short ultrasound burst. A second transducer converts a returning pressure wave into an electrical signal. The carrier times the echo and reports its duration; distance ≈ sound speed × time/2 because sound travels out and back.

Two piezoelectric transducers and analog receiver/control circuitry on a carrier; maker and electrical revision are unconfirmed.

Recognize the part

Two round metal acoustic cans side by side on a narrow board, normally with VCC, Trig, Echo and GND labels. The can pair distinguishes it from reflective infrared sensors.

Also called: HC-SR04, HC-SR04 ultrasonic ranging module, Ultrasonic Sensor, ultrasonic ranging module, ultrasonic sensor, Ultrasonic Module

How to use it

Typical compatible carriers use 5 V power. Share ground with the controller, apply at least a 10 µs trigger, and time Echo with a timeout. Divide or level-shift a 5 V Echo before a 3.3 V input. Space measurements to let old echoes decay; temperature changes sound speed.

Know before using

Limits

  • Close-range dead zone and broad beam.
  • Soft material absorbs sound; angled surfaces can reflect away.
  • Air temperature, multipath and other ultrasonic sensors cause errors.

Common mistakes

  • Connecting Echo directly to 3.3 V GPIO.
  • Blocking indefinitely when no echo arrives.
  • Interpreting a timeout as zero distance.

Care and safety

  • Many modules use 5 V echo signals; verify board voltage and level shifting before connecting 3.3 V GPIO.
  • Verify Echo voltage before connecting low-voltage logic.

What you need with it

required

1 kΩ resistor

required for 3v3 host

Use one 1 kΩ series resistor with the owned 2 kΩ shunt resistor to reduce a nominal 5 V Echo to about 3.33 V.

  • Measure loaded/high voltage and tolerance against the host limits; this example is for a unidirectional Echo line.
Owned type; verify quantity, rating and fit for this use.

2 kΩ resistor

required for 3v3 host

A 2 kΩ Echo-to-ground shunt completes the 1 kΩ/2 kΩ divider.

  • The divider is not a bidirectional I²C translator.
Owned type; verify quantity, rating and fit for this use.

What can I build?

Related owned hardware

Read the conditions before connecting parts. A relationship can involve a driver, controller or a redesigned circuit.

controller

Arduino Uno R3

  • Uno can generate Trigger and time Echo in the common 5 V HC-SR04 environment.
  • HC-SR04 adds a timed acoustic distance input for an Uno sketch.

Connection conditions

  • Verify clone supply/output; use timeouts and leave time between bursts.

wireless controller

Raspberry Pi Pico 2 W

  • Pico 2 W can time range pulses and publish measurements over Wi-Fi.
  • The ranging module provides distance telemetry to a networked Pico 2 W application.

Connection conditions

  • Verify actual output/pull-up voltage before connecting to 3.3 V GPIO; use suitable level translation where required.
  • Reduce the usual 5 V Echo to a GPIO-safe voltage; Trigger recognition must also be checked.

mechanical scanning

SG90 micro servo

  • A servo-mounted sensor samples distance at commanded angles for a scanning range map.
  • The sensor makes servo angle commands observable as an angle/distance map.

Connection conditions

  • Use a supply matched to the actual load voltage and startup/stall current, with common signal ground. GPIO and breadboard signal wiring are not high-current power paths.
  • A bracket and dwell time after each motion are needed; do not expect exact angular metrology from an SG90.

local display

2.42-inch SSD1309 128×64 OLED Display Module (I²C)

  • A controller can render distance/timeout state on the 128×64 display.
  • Acoustic range readings supply a concrete numerical instrument display task.

Connection conditions

  • Check the carrier supply, address and pull-up rail. Use one compatible pull-up network for the bus and avoid pulling 3.3 V GPIO to 5 V.
  • Sensor and display communicate through a controller; this is not a direct signal connection.

support hardware

1 kΩ resistor

  • Use one 1 kΩ series resistor with the owned 2 kΩ shunt resistor to reduce a nominal 5 V Echo to about 3.33 V.

Connection conditions

  • Measure loaded/high voltage and tolerance against the host limits; this example is for a unidirectional Echo line.

support hardware · voltage divider

2 kΩ resistor

  • A 2 kΩ Echo-to-ground shunt completes the 1 kΩ/2 kΩ divider.
  • 2 kΩ to ground paired with 1 kΩ series reduces a nominal 5 V Echo to about 3.33 V.

Connection conditions

  • The divider is not a bidirectional I²C translator.
  • Nominal value does not establish resistor watts/tolerance; check the complete circuit.

kit learning anchor

AliExpress UNO R3 Starter Kit (generic)

  • The frozen kit contribution establishes this lesson component. Measure Trigger/Echo timing, timeout states and controller voltage-domain limits.

Connection conditions

  • Current web BOMs do not override the frozen source holding; check voltage/driver needs per component.

kit learning anchor

Arduino / Raspberry Pi 45-in-1 sensor assortment

  • The frozen kit contribution establishes this lesson component. Measure Trigger/Echo timing, timeout states and controller voltage-domain limits.

Connection conditions

  • Current web BOMs do not override the frozen source holding; check voltage/driver needs per component.

When would I use each?

Detection Sensors

Measurement-method choice; motion, distance, contrast and beam events are not equivalent outputs.

Choose the physical quantity you need: PIR for motion events, sonar for acoustic range, reflective IR for a threshold or line contrast, and a slot for a passing flag. Their outputs cannot be substituted as equivalent occupancy or distance measurements.

If you outgrow it

Researched external products, separate from club inventory. Price and availability are not promised.

STMicroelectronics

VL53L1X

Not owned by club

The design needs optical ranging or a controllable measurement region rather than an acoustic range estimate or IR threshold event.

What improves

  • Adds optical time-of-flight distance measurement with a programmable region of interest.
  • I²C control and a compact optical package offer a different ranging geometry; up to 4 m is conditional on measurement settings and target/environment.

The design needs optical ranging or a controllable measurement region rather than an acoustic range estimate or IR threshold event. Choose this path only when the stated improvement is a requirement.

Tradeoffs

  • Ambient light, reflectance, cover-glass crosstalk and timing budget affect range.
  • ROI can restrict the optical measurement region, but no blanket narrower-than-every-HC-SR04-beam claim is made.

Additional hardware

  • Suitable breakout/regulated supply, I²C-compatible signals and driver; optical mounting and calibration if a window is used
Migration steps
  • Review the exact product documentation and chosen carrier before purchase.
  • Rework connections, firmware/library configuration, power and mechanics as required by this path.
  • Validate the new subsystem against the project measurement or timing requirement.

Official product / documentation ↗

Documentation

Inventory record and image evidence

Quantity: 5 · quantity confidence: probable

Known countable purchase/BOM contributions. Each source line is a total; do not multiply by container count or add photo observations.

Ownership: source-backed club holding. Identity confidence: high.

Identity follows exact kit sheet/BOM; expected quantity is not a physical stocktake.

V1 establishes the catalog identity. Technical references explain the named device or component class; unverified carrier-specific ratings and pinouts are not asserted.

Source holdings

Parent kits

Original V3 image confidence: 90% · high. Component crop tied to an owned kit and its source mapping; selected by form rather than filename alone.

Original V3 image source: ELEGOO Mega reference (owned kit reference). Images describe identity and form; they do not establish quantity.

Displayed image source: User-supplied HC-SR04 ultrasonic distance sensor module reference photograph.

User-selected HC-SR04 form reference retaining both transducers and all four pins.

User-supplied reference image; original rights retained.