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)
Daxiang Machinery Top-Flow Pillow Packaging Machine for Vegetables, Bread, Mooncakes, Cakes, Food, and Fruit Sealing

Daxiang Machinery Top-Flow Pillow Packaging Machine for Vegetables, Bread, Mooncakes, Cakes, Food, and Fruit Sealing

$35,475.00

50 Pcs Market Commodity Price Tag ers Advertising Tags Paper

50 Pcs Market Commodity Price Tag ers Advertising Tags Paper

$45.37

Fountain in the Rain by Kaoru Sudo, Mr. Chui Saxophone, Three-Piece Precise Transcription Service

Fountain in the Rain by Kaoru Sudo, Mr. Chui Saxophone, Three-Piece Precise Transcription Service

$37.00

No-Clean Airbrush Set Electric Spray Gun Mini Bottom-Feed Airbrush for Furniture Leather Repair Paint and Art

No-Clean Airbrush Set Electric Spray Gun Mini Bottom-Feed Airbrush for Furniture Leather Repair Paint and Art

$225.00

Rubber Cable Raceway Speed Bump for Ground Crossing

Rubber Cable Raceway Speed Bump for Ground Crossing

$15.05

Replacement Blade Holder and Rotating Wheel for Butter Tea Maker - Includes Waterproof Gasket; Compatible with Milk Separators and Switch Assemblies

Replacement Blade Holder and Rotating Wheel for Butter Tea Maker - Includes Waterproof Gasket; Compatible with Milk Separators and Switch Assemblies

$56.50

Commercial Hanging Roast Duck Warmer Crispy Pork Belly Insulation Box Stainless Steel Countertop Roasted Meat Heater Cooked Food Display Cabinet

Commercial Hanging Roast Duck Warmer Crispy Pork Belly Insulation Box Stainless Steel Countertop Roasted Meat Heater Cooked Food Display Cabinet

$317.00

2MM 3MM 4MM Natural Color-Gradient Amethyst Soccer-Cut Faceted Loose Beads - Semi-Finished Amethyst Cuts

2MM 3MM 4MM Natural Color-Gradient Amethyst Soccer-Cut Faceted Loose Beads - Semi-Finished Amethyst Cuts

$17.00

Educational Toys for Babies 0-3 Years - Newborn Rattle and Musical Stick for Boys and Girls (0-12 Months)

Educational Toys for Babies 0-3 Years - Newborn Rattle and Musical Stick for Boys and Girls (0-12 Months)

$12.80

Variable Frequency Drive Cabinet for Fans with Energy-Saving VFD Control

Variable Frequency Drive Cabinet for Fans with Energy-Saving VFD Control

$11,334.00

Pure Water Bucket Stand with Manual Pump, Inverted Dispenser Rack for Large Bottles, Simple Water Dispenser

Pure Water Bucket Stand with Manual Pump, Inverted Dispenser Rack for Large Bottles, Simple Water Dispenser

$4.65

Spray Tower Exhaust Gas Treatment System - Industrial Air Purification for Dust, Acid Mist, and Alkali Scrubbing

Spray Tower Exhaust Gas Treatment System - Industrial Air Purification for Dust, Acid Mist, and Alkali Scrubbing

$1,738.00

Acrylic Markers Opaque Overlapping Colors Art Drawing Pens Specialized Ink Cores

Acrylic Markers Opaque Overlapping Colors Art Drawing Pens Specialized Ink Cores

$49.90

Cute Portable Invisible Aligner Case - Storage Box for Orthodontic Retainers, Teeth Correctors, and Dentures

Cute Portable Invisible Aligner Case - Storage Box for Orthodontic Retainers, Teeth Correctors, and Dentures

$5.78

SolidWorks Software Remote Installation Service - Versions 2025/2024/2023/2022/2021/2020/2018

SolidWorks Software Remote Installation Service - Versions 2025/2024/2023/2022/2021/2020/2018

$10.00

Nylon Paint Small Brush Painting Brush Computer Cleaning Dust Brush Sweeping Gray Size Brushes BBQ Flat Brush

Nylon Paint Small Brush Painting Brush Computer Cleaning Dust Brush Sweeping Gray Size Brushes BBQ Flat Brush

$0.90

Compact Home Range Hood - Portable USB Desktop Smoke Extractor for Hot Pot & BBQ

Compact Home Range Hood - Portable USB Desktop Smoke Extractor for Hot Pot & BBQ

$41.00

Large Area Hollow Advertising Sign Spray Paint Stencil Customizable Bendable Lettering Board Wall Slogan Brushing Soft Mold

Large Area Hollow Advertising Sign Spray Paint Stencil Customizable Bendable Lettering Board Wall Slogan Brushing Soft Mold

$5.00

Heavy-Duty Kitchen Sink Storage Rack, Dust-Proof Dish Drainer, Multi-Function Bowl Organizer

Heavy-Duty Kitchen Sink Storage Rack, Dust-Proof Dish Drainer, Multi-Function Bowl Organizer

$85.00

Xinda Outdoor Waterproof Backpack - IPX7 Wet/Dry Separation Rucksack for River Trekking, Mountaineering, Snorkeling, Swimming, and Rafting

Xinda Outdoor Waterproof Backpack - IPX7 Wet/Dry Separation Rucksack for River Trekking, Mountaineering, Snorkeling, Swimming, and Rafting

$109.55

[Damai Patented Microneedle Hair Transplant] Hairline + Eyebrow Planting | 1000 Grafts Hairline + Both Eyebrows

[Damai Patented Microneedle Hair Transplant] Hairline + Eyebrow Planting | 1000 Grafts Hairline + Both Eyebrows

$17,800.00

Pure Wool Calligraphy Felt Mat – Thickened, Wear-Resistant Fabric for Chinese Painting and Brush Writing; Custom Desk Pad

Pure Wool Calligraphy Felt Mat – Thickened, Wear-Resistant Fabric for Chinese Painting and Brush Writing; Custom Desk Pad

$1,440.00

Welding Fume Purifier – Effective Collection and Control of Welding Smoke and Dust

Welding Fume Purifier – Effective Collection and Control of Welding Smoke and Dust

$12.40

FRP Stair Nosing, Yellow Anti-Slip Stair Treads with Granular Surface

FRP Stair Nosing, Yellow Anti-Slip Stair Treads with Granular Surface

$64.00

Stainless Steel Reaction Kettle, Emulsifying Tank, Electric Heating Reactor, Enamel-Glass Silicone Oil Reactor, and Mixing Vessel

Stainless Steel Reaction Kettle, Emulsifying Tank, Electric Heating Reactor, Enamel-Glass Silicone Oil Reactor, and Mixing Vessel

$2,700.00

Wholesale Acrylic Markers in Bags, Student Water-Based Ink Pens, Eco-Friendly Non-Toxic Drawing Pens with Layering Capability

Wholesale Acrylic Markers in Bags, Student Water-Based Ink Pens, Eco-Friendly Non-Toxic Drawing Pens with Layering Capability

$5.80

Oil Pastel Blending Pen and Smudge Tool Set - Soft Tip Sponge Balls and Scrapers for Heavy Color Wax Crayon Blending and Painting

Oil Pastel Blending Pen and Smudge Tool Set - Soft Tip Sponge Balls and Scrapers for Heavy Color Wax Crayon Blending and Painting

$12.50

Lechuang Commercial Electric Heated Display Warmer - Countertop Food Warmer for Cooked Foods, Bread, and Pizza

Lechuang Commercial Electric Heated Display Warmer - Countertop Food Warmer for Cooked Foods, Bread, and Pizza

$1,250.00

Model 2500-480 Independent Rotary Die Second-Hand Special Sale Independent Light Pressure Front Edge with Die Cutting Speed 120-150

Model 2500-480 Independent Rotary Die Second-Hand Special Sale Independent Light Pressure Front Edge with Die Cutting Speed 120-150

$2,000.00

Fishing Alarm Portable Electronic Fishing Bite Alarm Night

Fishing Alarm Portable Electronic Fishing Bite Alarm Night

$60.27