Skip to main content
Home / Sensors / HC-SR04 Ultrasonic Ranging Module 5V Distance Measurement Sensor Microcontroller Programming Development Board Accessories

Attributes

Brand -
Category Robotics / STEM Teaching Tools / Sensors
Origin -
Operating Voltage 5V DC
Static Current < 2mA
Measuring Angle 15 degrees
Measuring Range 2cm to 400cm
Resolution 0.3cm
Trigger Input Signal 10µS TTL pulse
Echo Output Signal TTL level signal proportional to distance
Dimensions 45mm x 20mm x 15mm
Interface Type 4-Pin Header (VCC, Trig, Echo, GND)
Compatibility Arduino, Raspberry Pi, STM32, ESP8266

6 reviews

A

Anonymous

Mar 29, 2026

Rating: 3/5

Works but requires calibration

The module functions as described, but I had to adjust the code slightly to account for temperature variations in my room. Once calibrated, it was much more accurate. Good budget option.

A

Anonymous

Mar 29, 2026

Rating: 5/5

Consistent readings

I tested this against a tape measure and the readings were consistently within a centimeter of the actual distance. The 4-pin layout makes wiring very straightforward.

A

Anonymous

Mar 21, 2026

Rating: 5/5

Easy to use for beginners

Bought this for my son's science fair project. We found plenty of tutorials online, and he had it working within an hour. Very durable too; it survived a few drops during testing.

A

Anonymous

Mar 20, 2026

Rating: 5/5

Perfect for Arduino robotics projects

This sensor works flawlessly with my Arduino Uno. The range is accurate up to about 3 meters in my testing, which is perfect for my obstacle-avoiding robot. Setup was easy using standard libraries.

A

Anonymous

Mar 10, 2026

Rating: 4/5

Reliable for low-altitude sensing

Using this on a small DIY drone for altitude hold. It responds quickly enough for slow movements. Not suitable for high-speed applications, but excellent for learning and static measurements.

A

Anonymous

Mar 03, 2026

Rating: 4/5

Great value but sensitive to angle

For the price, you can't beat it. It works well for basic distance measurement. Just note that the target needs to be relatively perpendicular to the sensor for the best readings; angled surfaces sometimes give erratic results.

5 FAQ

Q: Does this come with jumper wires?

A: This listing is for the sensor module only. Jumper wires are sold separately, but any standard male-to-female jumper wires will work with the 4-pin header.

Q: What library should I use for Arduino?

A: You do not strictly need a external library; you can use the built-in pulseIn() function. However, the 'NewPing' library is highly recommended for better performance and easier coding.

Q: Can this sensor work underwater?

A: No, the HC-SR04 is not waterproof and uses air as the medium for ultrasonic waves. It will not function correctly underwater and may be damaged.

Q: Can I connect multiple sensors to one microcontroller?

A: Yes, you can connect multiple HC-SR04 modules. You just need to ensure each sensor has its own unique Trigger and Echo pins connected to different digital pins on your board.

Q: What is the minimum detection distance?

A: The minimum measurable distance is approximately 2cm. Objects closer than 2cm may not be detected or may return invalid readings.

Explore your interests

View More
All Categories
Best Seller (30)
New List (30)
Youzhao Pai Creative Retro 3D Embossed House Number Plate – Custom Door Signs for Villas, Commercial Spaces, and Homes

Youzhao Pai Creative Retro 3D Embossed House Number Plate – Custom Door Signs for Villas, Commercial Spaces, and Homes

$200.00

Tianzheng DZ15LE-100/3N901T 100A Transparent Leakage Circuit Breaker, Molded Case Circuit Breaker 3901T 63A

Tianzheng DZ15LE-100/3N901T 100A Transparent Leakage Circuit Breaker, Molded Case Circuit Breaker 3901T 63A

$278.00

[Daimai Holds Micro-Needle Hair Transplant Patent] Little Red Cap Hydro Glow | Scalp Hydration and Repair

[Daimai Holds Micro-Needle Hair Transplant Patent] Little Red Cap Hydro Glow | Scalp Hydration and Repair

$880.00

Pelican Rolling Case pelican1560 - Waterproof Shockproof Safety Case for Photography Equipment and Instruments

Pelican Rolling Case pelican1560 - Waterproof Shockproof Safety Case for Photography Equipment and Instruments

$1,550.00

Disipulai Hot Air Circulation Vertical Food Warmer Display Cabinet - Adjustable Temperature Countertop Cooked Food Warming Equipment

Disipulai Hot Air Circulation Vertical Food Warmer Display Cabinet - Adjustable Temperature Countertop Cooked Food Warming Equipment

$2,023.00

Complete Pasteurization Production Line for Pomegranate, Grape, Orange, Apple Juice, and Mare's Milk

Complete Pasteurization Production Line for Pomegranate, Grape, Orange, Apple Juice, and Mare's Milk

$6,048.00

Portable Tire Stone Removal Tool - Essential Handheld Hook for Car Owners

Portable Tire Stone Removal Tool - Essential Handheld Hook for Car Owners

$13.73

Factory Direct Longan 160 Curved Hot Stamping Machine Fully Automatic Hot Foil Printer Pneumatic Heat Press Leather Embossing Machine

Factory Direct Longan 160 Curved Hot Stamping Machine Fully Automatic Hot Foil Printer Pneumatic Heat Press Leather Embossing Machine

$10,000.00

Bean Sprout Germinator Tray, Hydroponic Vegetable Growing Container, Soil-Free Pea Sprouting Pot

Bean Sprout Germinator Tray, Hydroponic Vegetable Growing Container, Soil-Free Pea Sprouting Pot

$14.06

TOPTOY Crayon Shin-chan Memory Echo Series Blind Box - Anime Figure Collectible Toy and Birthday Gift

TOPTOY Crayon Shin-chan Memory Echo Series Blind Box - Anime Figure Collectible Toy and Birthday Gift

$47.20

Natural Lightning Cat's Eye Yellow Tiger Eye Loose Beads, Single Crystal Beads for DIY Bracelets and Accessories

Natural Lightning Cat's Eye Yellow Tiger Eye Loose Beads, Single Crystal Beads for DIY Bracelets and Accessories

$3.91

Pirelli Tire 235/55R19, Original Equipment for Mercedes-Benz GLC, Genuine Tire Compatible with Audi/Land Rover/etc.

Pirelli Tire 235/55R19, Original Equipment for Mercedes-Benz GLC, Genuine Tire Compatible with Audi/Land Rover/etc.

$512.00

Biliansheng Hair Transplant: No-Shave Hairline Restoration, Top Thinning Density Enhancement, Nationwide Chain

Biliansheng Hair Transplant: No-Shave Hairline Restoration, Top Thinning Density Enhancement, Nationwide Chain

$9,999.00

Luru Authentic 15-Note Steel Tongue Drum - Professional Grade for Beginners, Adults, and Children

Luru Authentic 15-Note Steel Tongue Drum - Professional Grade for Beginners, Adults, and Children

$500.00

MOOCAT [Postage Stamp Stub] Hand-Drawn Blank Irregular Wood Pulp Fine-Texture Paper for Cyanotype, OC Signing, and Collage

MOOCAT [Postage Stamp Stub] Hand-Drawn Blank Irregular Wood Pulp Fine-Texture Paper for Cyanotype, OC Signing, and Collage

$9.90

Used Car Tires - Sizes 155/165/175/185/195/205/215 for 13/14/15/16 inch Rims

Used Car Tires - Sizes 155/165/175/185/195/205/215 for 13/14/15/16 inch Rims

$140.00

Pin Puller Extractor Mechanical Repair Tool Bearing Puller and Locating Pin Extractor

Pin Puller Extractor Mechanical Repair Tool Bearing Puller and Locating Pin Extractor

$76.50

Water Brush Pen Set with Large Capacity - Essential Tools for Beginners Using Gouache, Solid Watercolor Paints, and Line Drawing; Perfect for Art Students

Water Brush Pen Set with Large Capacity - Essential Tools for Beginners Using Gouache, Solid Watercolor Paints, and Line Drawing; Perfect for Art Students

$32.00

C9335 Automotive Brake Disc Lathe – Resurfacing, Boring, Grinding & Polishing Machine

C9335 Automotive Brake Disc Lathe – Resurfacing, Boring, Grinding & Polishing Machine

$16,005.00

Jaguar Tire Lug Nuts Compatible with XE/XF/XJL/F-TYPE/F-PACE - Wheel Hub Screw Caps for Modification

Jaguar Tire Lug Nuts Compatible with XE/XF/XJL/F-TYPE/F-PACE - Wheel Hub Screw Caps for Modification

$118.00

Three-Hook Tire Stone Removal Tool, Wheel Groove Cleaner for Removing Stones from Vehicle Tires

Three-Hook Tire Stone Removal Tool, Wheel Groove Cleaner for Removing Stones from Vehicle Tires

$4.80

Pad Printer Accessories: 4-Inch Blade Clamp, Blade Holder, and Doctor Blade Assembly

Pad Printer Accessories: 4-Inch Blade Clamp, Blade Holder, and Doctor Blade Assembly

$5.40

3M Industrial Scouring Pad 7447C, Metal Rust Removal, Stainless Steel Brushing and Polishing Cloth

3M Industrial Scouring Pad 7447C, Metal Rust Removal, Stainless Steel Brushing and Polishing Cloth

$4.00

Qinghe Blazing Rose Series

Qinghe Blazing Rose Series

$1,580.00

Cheddar Cheese Production Line, Front-End Processing and Deep Processing Machinery, Mozzarella Cheese Equipment

Cheddar Cheese Production Line, Front-End Processing and Deep Processing Machinery, Mozzarella Cheese Equipment

$25,480.00

MGQ Konjac Noodle Bubble Cleaning Machine, Fully Automatic Soaking and Lifting Washer

MGQ Konjac Noodle Bubble Cleaning Machine, Fully Automatic Soaking and Lifting Washer

$17,555.40

Industrial Large Meat Grinder Fresh Meat Mince Chopper Fruit Vegetable Crusher Meat Grinding and Mixing Integrated Meat Filling Mixer

Industrial Large Meat Grinder Fresh Meat Mince Chopper Fruit Vegetable Crusher Meat Grinding and Mixing Integrated Meat Filling Mixer

$32,030.00

Zhuolide D-302 UV Glue - Invisible Adhesive for Transparent Glass, Metal, Coffee Tables, and Crystal Glass, 250g Large Capacity

Zhuolide D-302 UV Glue - Invisible Adhesive for Transparent Glass, Metal, Coffee Tables, and Crystal Glass, 250g Large Capacity

$130.00

Hell Training Rock Guitar by Shinichi Kobayashi: Electric Guitar Tutorial for Speed Playing

Hell Training Rock Guitar by Shinichi Kobayashi: Electric Guitar Tutorial for Speed Playing

$106.00

[Buy One Get One Free] Natural Agarwood, Sandalwood, and Cypress Incense Powder Set with Electric Burner

[Buy One Get One Free] Natural Agarwood, Sandalwood, and Cypress Incense Powder Set with Electric Burner

$8.42