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

All Categories
Best Seller (30)
New List (30)
HVAC Fan VFD Control Cabinet with Power Frequency to Variable Frequency Conversion

HVAC Fan VFD Control Cabinet with Power Frequency to Variable Frequency Conversion

$1,238.00

Export Quality Original Bathroom Paint Pens, Yellow and Green (2-Pack), Draw on Tiles and Glass

Export Quality Original Bathroom Paint Pens, Yellow and Green (2-Pack), Draw on Tiles and Glass

$4.93

Imported Automotive Transmission Differential Bearing B39-4 580704A

Imported Automotive Transmission Differential Bearing B39-4 580704A

$338.00

Fully Automatic Carbon Steel and Stainless Steel Filter, Self-Cleaning Vertical Filter, Automatic Blowdown Filter

Fully Automatic Carbon Steel and Stainless Steel Filter, Self-Cleaning Vertical Filter, Automatic Blowdown Filter

$37,500.00

Sheepskin Rattle for Babies 0-3 Years - Chewable Intangible Cultural Heritage Handmade Toy with Solid Wood and Brass Shaker Stick, Newborn Gift Box

Sheepskin Rattle for Babies 0-3 Years - Chewable Intangible Cultural Heritage Handmade Toy with Solid Wood and Brass Shaker Stick, Newborn Gift Box

$12.78

Swiss ITI Dental Implant / Korean Imported Dentium Implant Package with Crown - Shanghai Hospital

Swiss ITI Dental Implant / Korean Imported Dentium Implant Package with Crown - Shanghai Hospital

$3,980.00

Yandi Retainer Storage Case - Double-Layer Drain & Soak Box for Invisible Aligners and Orthodontic Cleaning

Yandi Retainer Storage Case - Double-Layer Drain & Soak Box for Invisible Aligners and Orthodontic Cleaning

$30.50

Leaf-Shaped Template Stamp for Kids - Transparent Silicone DIY Mold with Sponge for Maple Leaf Rubbing and Painting

Leaf-Shaped Template Stamp for Kids - Transparent Silicone DIY Mold with Sponge for Maple Leaf Rubbing and Painting

$4.93

High-Speed Internal Clamping Double Diaphragm Coupling High Torque Servo Motor Leadscrew Module Elastic Coupler

High-Speed Internal Clamping Double Diaphragm Coupling High Torque Servo Motor Leadscrew Module Elastic Coupler

$367.30

Eye-Care Journaling Highlighters for Students - Colorful Markers for Note-Taking and Key Points

Eye-Care Journaling Highlighters for Students - Colorful Markers for Note-Taking and Key Points

$3.02

Natural Stone Abacus Beads with Large Holes 5*10mm White Crystal Rose Crystal Flat Beads Jewelry Accessories Semi-Precious Stones

Natural Stone Abacus Beads with Large Holes 5*10mm White Crystal Rose Crystal Flat Beads Jewelry Accessories Semi-Precious Stones

$1.50

Heavy-Duty Lifting Chain with Shackles at Both Ends - Manganese Steel Hoist for Pipes, Rebar, and Stones

Heavy-Duty Lifting Chain with Shackles at Both Ends - Manganese Steel Hoist for Pipes, Rebar, and Stones

$72.00

Industrial Large Roll Oil-Absorbent Paper, Jumbo Lint-Free Wiping Rolls, Cleaning Paper, Wholesale Industrial Jumbo Rolls

Industrial Large Roll Oil-Absorbent Paper, Jumbo Lint-Free Wiping Rolls, Cleaning Paper, Wholesale Industrial Jumbo Rolls

$150.00

5-Inch Flocked Scouring Pad, Stainless Steel Rust Removal and Polishing Disc, Circular Brush Cloth with Backed Flocking for Polishing

5-Inch Flocked Scouring Pad, Stainless Steel Rust Removal and Polishing Disc, Circular Brush Cloth with Backed Flocking for Polishing

$25.00

High-Temperature Fire-Resistant Cotton Incense Burner Mat, Flame-Retardant Pad for Stick Incense Boxes and Aromatherapy Burners, Heat Insulation for Burning Incense

High-Temperature Fire-Resistant Cotton Incense Burner Mat, Flame-Retardant Pad for Stick Incense Boxes and Aromatherapy Burners, Heat Insulation for Burning Incense

$2.98

80 Pairs Zhuji Ankle Socks, Solid Color All-Season Trendy Student Casual Sports Boat Socks, Disposable Short Socks

80 Pairs Zhuji Ankle Socks, Solid Color All-Season Trendy Student Casual Sports Boat Socks, Disposable Short Socks

$9.14

Smart Toilet Storage Rack for Bathroom, Multi-Tier Floor-Standing Organizer with Waterproof Tissue Holder

Smart Toilet Storage Rack for Bathroom, Multi-Tier Floor-Standing Organizer with Waterproof Tissue Holder

$273.00

Yihuashu Calligraphy Felt Mat - Thickened Grid Cloth for Student Practice, Brush Writing Pad

Yihuashu Calligraphy Felt Mat - Thickened Grid Cloth for Student Practice, Brush Writing Pad

$1.98

Xiankan Yunshu [Danran] Ceramic Brush Washer - Hand-Painted Elegant Lily Design under Glaze for Calligraphy Supplies

Xiankan Yunshu [Danran] Ceramic Brush Washer - Hand-Painted Elegant Lily Design under Glaze for Calligraphy Supplies

$32.90

Chunfei Grocery Store Commuter Hard Fork Low-Step Mountain Bike for Road, City, Suburb, School, and Outings

Chunfei Grocery Store Commuter Hard Fork Low-Step Mountain Bike for Road, City, Suburb, School, and Outings

$2,224.64

Zhang Xiaofeng 'Fu Lu' Hotpot Inkstone Set – Covered Ceramic Ink Well for Calligraphy and Chinese Painting

Zhang Xiaofeng 'Fu Lu' Hotpot Inkstone Set – Covered Ceramic Ink Well for Calligraphy and Chinese Painting

$38.00

Invisalign Orthodontic Retainer Case, Portable Storage and Cleaning Box for Aligners and Dentures

Invisalign Orthodontic Retainer Case, Portable Storage and Cleaning Box for Aligners and Dentures

$12.30

Natural 7A Lavender Loose Beads Single Round Bead DIY Amethyst Spacer Beads Jewelry Making Semi-Finished Accessories

Natural 7A Lavender Loose Beads Single Round Bead DIY Amethyst Spacer Beads Jewelry Making Semi-Finished Accessories

$0.88

Paint Brush Cleaner - Mini Toilet Style Rinser for Watercolor and Gouache, Art Supply with Circulating Water System

Paint Brush Cleaner - Mini Toilet Style Rinser for Watercolor and Gouache, Art Supply with Circulating Water System

$16.90

Traditional Wooden Rattle Drum with Sheepskin Head for Early Education, Visual Tracking and Hearing Training for Newborn Boys and Girls

Traditional Wooden Rattle Drum with Sheepskin Head for Early Education, Visual Tracking and Hearing Training for Newborn Boys and Girls

$10.80

Car Tire Stone Removal Hook, Stainless Steel Multi-Function Tool for Cleaning Pebbles from Tires

Car Tire Stone Removal Hook, Stainless Steel Multi-Function Tool for Cleaning Pebbles from Tires

$6.21

Factory Direct Mining Round Link Chains - High Cost-Performance Lifting Chains for Mining Applications

Factory Direct Mining Round Link Chains - High Cost-Performance Lifting Chains for Mining Applications

$153.00

Hangzhou Stomatological Hospital Dental Implant Initial Consultation Package – CT Scan, Missing Tooth Exam, and Custom Implant Plan Design

Hangzhou Stomatological Hospital Dental Implant Initial Consultation Package – CT Scan, Missing Tooth Exam, and Custom Implant Plan Design

$1.00

Rockschool Acoustic Guitar Method Book (Chinese Edition) – Folk & Rock Guitar Grading Curriculum for Schools

Rockschool Acoustic Guitar Method Book (Chinese Edition) – Folk & Rock Guitar Grading Curriculum for Schools

$145.00

Commercial Food Warmer Cabinet, Small Heating Thermostat Display Counter for French Fries, Egg Tarts, Enlarged Chestnuts, and Fried Chicken

Commercial Food Warmer Cabinet, Small Heating Thermostat Display Counter for French Fries, Egg Tarts, Enlarged Chestnuts, and Fried Chicken

$334.00