Ultrasonic Ranging Detector Mod HC-SR04 Distance Sensor
- 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~400 cm resolution : 0.3 cm
Ultrasonic ranging module HC - SR04 provides 2cm - 400cm non-contact measurement function, the ranging accuracy can reach to 3mm. The modules includes ultrasonic transmitters, receiver and control circuit. The basic principle of work:
- 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
Wire connecting directly as following:
- 5V Supply
- Trigger Pulse Input
- Echo Pulse Output
- 0V Ground
If you are sourcing a ultrasonic ranging module , the HC-SR04 is good choose . Its stable performance and high ranging accuracy make it a popular module in electronic market .
Compared to the Shap IR ranging module , HC-SR04 is more inexpensive than it . But it has the same ranging accuracy and longer ranging distance.
- power supply :5V DC
- quiescent current : <2mA
- effectual angle: <15°
- ranging distance : 2cm â€?500 cm
- resolution : 0.3 cm
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
Finally , look at the back of the module .All of the chip in the module have been burnish , maybe the author want to prevent the designed from plagiarism. But ultrasonic ranging module is nearly the same principle, so it's not hard to speculated that the role of the chip â€?I'm sure at least one 74series chip on it ; ) . It is not a difficult task to crack it , but â€?it's at so low a price , even cheaper than your copy.
Please, check its action on my robot: "Arduino-based light sensing and obstacle avoiding autonomous robot." on YoutubeDownside of this sensor: it occupies 2 pins on Arduino (trigger of the signal and sensor of the echo). Voltage and ground I do not count. More expensive model has only one pin - it triggers and receives the signal (plus voltage and ground pins, of course).Upsides: very cheap!, super precise!!! I measured with the tape distance it sends to computer - very accurate, almost to millimeters. The maximum distance is 6 meters. One cm further will show still 6 m. One cm closer will show 5m 99cm. So, it feels that 6m limit is not physical, but technical limit, it just "does not want" to measure anything beyond 6m. That is fine for my robot project.Downsides of this type of sensors in general: 1) it sends very narrow beam, so the obstacle a little on the side from the beam would not be seen; 2) soft fabric or wool absorbs the beam and sensor does not see the obstacle. For example, if you point it at the center of your chest and you have a sweater, than sensor would not see you and show 6m distance. That is why my robot needed not only ultrasonic sensor, but also "******" touch sensor.
I purchased this device to build the nagging device featured in the Spring 2012 issue of Make magazine. It's one of the many fun things I've built with the Arduino.
Bought two of these. They easily hook into the Arduino. Sketch/code is out there to easily program it. I had my $8 remote control Walmart car ripped apart, combined with $15 Arduino, $12 motor shield, and this in less than an hour. Then programmed it to detect obstacles 2 feet away (does 4 inch, maybe less, to 20 feet/size-of-medium room or more), backup turning left, and go forward trying again. Car was bad, so it only did a 15 degree turn or so. But enough times it would go around most obstacles in my room. It did not detect small rods or tubes. But for nearly everything else it worked great. Getting a Gyroscope module to detect when it is stuck (how it shakes stuck vs const velocity should give me what I need).
This sensor is really smaller than it looks on the site and that was good for the project that I was building.
For less than $6.00 this distance sensor is a steal. You will need to find a third party library to get it working (try newPing.h). It is remarkably accurate and sensitive for an ultrasonic sensor, especially for the price. It does have a few weaknesses, but nothing that probably couldn't be accommodated for by using two sensors. Enjoy!
Works as intended, not the best quality but gets the job done.
No instructions but a good price on this sensor.
This is cool and really quite accurate. The Sunfounder site has a good sketch to use with it. Output is displayed on the PC via a serial link. Then I took some code from a sketch that runs a small IM161 LCD display to eliminate the need to hooked up to the PC. The project is now a self contained rangefinder.