Qty:1

Other Sellers on Amazon
Add to Cart
$7.25
& FREE Shipping on orders over $35.00. Details
Sold by: fieldkun
Add to Cart
$7.25
+ Free Shipping
Sold by: HoopChina US
Add to Cart
$7.77
& FREE Shipping on orders over $35.00. Details
Sold by: JSPayne
Have one to sell? Sell on Amazon

SainSmart HC-SR04 Ranging Detector Mod Distance Sensor (Blue)

4.3 out of 5 stars 285 customer reviews
| 25 answered questions

List Price: $12.00
Price: $7.25 & FREE Shipping on orders over $35. Details
You Save: $4.75 (40%)
In Stock.
Ships from and sold by Amazon.com. Gift-wrap available.
Standard Packaging
  • Using IO trigger for at least 10us high level signal
  • The Module automatically sends eight 40 kHz and detect whether there is a pulse signal back
  • IF the signal back, through high level ,time of high output IO duration is the time from sending ultrasonic to returning. Test distance = (high level time velocity of sound (340M/S) /2
  • Power supply :5V DC, quiescent current : <2mA,effectualangle: <15 ranging distance : 2cm~500 cm resolution : 0.3 cm
See more product details
50 new from $1.00 1 used from $2.17
$7.25 & FREE Shipping on orders over $35. Details In Stock. Ships from and sold by Amazon.com. Gift-wrap available.

Frequently Bought Together

  • SainSmart HC-SR04 Ranging Detector Mod Distance Sensor (Blue)
  • +
  • microtivity IB401 400-point Experiment Breadboard w/ Jumper Wires
  • +
  • Arduino UNO R3 Board Module With DIP ATmega328P(Blue)
Total price: $36.68
Buy the selected items together

Special Offers and Product Promotions

Product Packaging: Standard Packaging
  • Buy Used and Save: Buy a Used "SainSmart HC-SR04 Ranging Detector Mod Distance Se..." and save 81% off the $12.00 list price. Buy with confidence as the condition of this item and its timely delivery are guaranteed under the "Amazon A-to-z Guarantee". See all Used offers.

Product Description

Product Packaging: Standard Packaging

There are 4 pins out of the module: VCC , Trig, Echo, GND . So it's a very easy interface for controller to use it ranging. The all process is : pull the Trig pin to high level for more than 10us impulse , the module start ranging ; finish ranging , If you find an object in front , Echo pin will be high level , and based on the different distance, it will take the different duration of high level. So we can calculated the distance easily :Distance = ((Duration of high level)*(Sonic :340m/s))/2

Product Information

Product Packaging:Standard Packaging

Technical Details

Item Weight 0.3 ounces
Product Dimensions 1.3 x 0.4 x 0.1 inches
Origin Imported (China)
Item model number HC-SR04

Additional Information

ASIN B004U8TOE6
Customer Reviews
4.3 out of 5 stars 285 customer reviews

4.3 out of 5 stars
Best Sellers Rank #245 in Electronics > Car Electronics > Car Audio
Shipping Weight 0.3 ounces (View shipping rates and policies)
Domestic Shipping Item can be shipped within U.S.
International Shipping This item is not eligible for international shipping. Learn More
Date First Available March 29, 2011

Customer Reviews

Top Customer Reviews

Package Type: Standard Packaging Verified Purchase
Does exactly as promised. Very accurate. I had to slightly modify the Ping sketch that came with Ardiuno software, so here it is. Look at the constants for the correct pin placement.

/* Ping))) Sensor

This sketch reads a PING))) ultrasonic rangefinder and returns the
distance to the closest object in range. To do this, it sends a pulse
to the sensor to initiate a reading, then listens for a pulse
to return. The length of the returning pulse is proportional to
the distance of the object from the sensor.

The circuit:
* +V connection of the PING))) attached to +5V
* GND connection of the PING))) attached to ground

[...]

created 3 Nov 2008
by David A. Mellis
modified 30 Aug 2011
by Tom Igoe

This example code is in the public domain.

*/

// Pin number constants
const int triggerPin = 5;
const int echoPin = 6;

void setup() {
// initialize serial communication:
Serial.begin(9600);
}

void loop()
{
// establish variables for duration of the ping,
// and the distance result in inches and centimeters:
long duration, feet, inches, cm;

// The PING))) is triggered by a HIGH pulse of 2 or more microseconds.
Read more ›
4 Comments 86 of 88 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Package Type: Standard Packaging Verified Purchase
In my physics class, there came an experiment that required measuring the speed of a cheap toy car, with post its, rulers, a timer, and the close coordination of three people.

Needless to say, it wasn't working out.

Unsatisfied with our utter lack of experimental rigor, I bought this sensor.

The library written by cnobile ([...]) is the most important step in getting this running. To an electronics newbie, or a * moderately* experienced coder (myself), banging out the protocol would be a HUGE pain.

If arduino throws an error along the lines of "wiring.h does not exist", look for \HCSR04Ultrasonic\Ultrasonic.h in the library folder, open it in a good text editor, and change wiring.h to "Arduino.h". The Arduino IDE changed a few things since this library was released, and this worked for me.

Lastly, if you want to ditch the breadboard (assuming arduino UNO R3), plug Trig into 12 and Echo into 13. Conveniently this puts GND at the digital ground. To power the module, we can call 'pinMode(11, OUTPUT);' followed by 'digitalWrite(11, HIGH);' in our setup method, which will configure pin 11 to act as a low current source!

If you want to see my source code, throw me an email: alexander@riccio.com
Comment 64 of 68 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
By Ratiocrat on November 15, 2011
Package Type: Standard Packaging Verified Purchase
This was very easy to set up and use with an Arduino Uno board. (Make the following connections from the HC-SR04 to the Arduino, respectively: VCC to 5V; GND to GND; Trig to any digital output; Echo to any digital input.) It was somewhat unstable using the Arduino 5V when running off USB power (it would fluctuate and even dip to a 0 cm reading for no reason), but this was fixed by using a 9v/650mA adapter, instead. I have only had it for a few hours, so I can't vouch for its reliability, but for 13 bucks, it's looking great so far!
4 Comments 51 of 54 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Package Type: Standard Packaging
These SR-04s are readily available now for under two dollars each. I have a dozen of them from various importers. They work OK with various Arduino libraries. It's an extremely useful sensor for countless project.

As some people noted, they also return garbage data at times, especially right after the distance to the target changes. Some of the units are better than others that way, some are quite bad. What the issue seems to be is not responding fast enough for the software, or not at all. Many example sketches translate the invalid state to "0 cm". A filter in the code to discard bad results helps, but that slows average response. If you use the NewPing library's timer interrupt mode, you get no "0 cm", the code waits, sometimes a second or more. I'm not 100% clear on this yet. It's best to buy several and use the better ones. For me, the more expensive 3 pin "Ping" module, that the SR04 apparently copied, performs much better.
4 Comments 16 of 16 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Package Type: Standard Packaging Verified Purchase
This module should be relisted as something other than a toy (it has to be rated as a toy in the review process). Regardless of that, I bought this module instead of the Ping sensor, mostly because this one was less expensive and cost was an issue for this project. It easily integrated with an Arduino and I quickly coded it up to convert the output to distance. It works quite well so far.
1 Comment 28 of 32 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Package Type: Standard Packaging Verified Purchase
This is a great product that had simplicity in mind when it was developed. Once you get around the initial overhead of setting it up (a learning overhead), its usage is plain and simple.

The distance measurement is fairly accurate to the millimeters. I couldn't in fact determine if the difference in millimeters was my ruler measurement or if it was actual error of the device.

Like many ultrasonic devices, you can't measure the first few centimeters and I think that's expected.
All in all, I recommend this product for any projects. I used it with a netduino board with no hassle.
1 Comment 16 of 18 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse

Most Recent Customer Reviews

Set up an Amazon Giveaway

Amazon Giveaway allows you to run promotional giveaways in order to create buzz, reward your audience, and attract new followers and customers. Learn more
SainSmart HC-SR04 Ranging Detector Mod Distance Sensor (Blue)
This item: SainSmart HC-SR04 Ranging Detector Mod Distance Sensor (Blue)
Price: $7.25
Ships from and sold by Amazon.com
Want to discover more products? Check out these pages to see more: xbee projects, sonics gift card, gps india, electronic mods, fpga kit usb