Virtuabotix Ultrasonic Proximity Sensor for Arduino

Rated 4.90 out of 5 based on 10 customer ratings
(10 customer reviews)


Ever get tired of your robots running into the wall over, and over, and over again? Need a way for your project to react before its too late? If the answer is yes than this little Ultrasonic Module is packed with all the power needed to end your detection

The Virtuabotix Ultrasonic Proximity sensor is perfect for a great number of short range applications including distance measurements, alarm systems, robotic navigation and many many more.

These sensors have been used in thousands of awesome projects so far, and the possible applications are all over the board. I would like to mention a few of our favorite customer projects though:
One awesome project was A cat and dog deterrent system that sprayed stray animals when they tried to pee on a customers porch, very clever usage I must say.
Another cool project used 8 Virtuabotix Ultrasonic Proximity Sensors to play piano notes as someone walked by each of them, an excellent crowd project, and a very interesting use of the sensors.
There have been several interesting capstones from various universities, ranging from the use of two of these sensors to act as peripheral vision for a GPS guided robot that dodged construction cones while attempting to reach it's destination as quickly as possible, to a robot that mapped out a whole room in memory using this sensor and the Versalino Uno.

Those are just a tiny portion of the things that have been done with the Virtuabotix Ultrasonic Proximity Sensor, and we know you will do awesome things with it too! So be sure to share your experience with everyone when you do.

20 in stock (can be backordered)


Package Contents:

Virtuabotix Ultrasonic Proximity Sensor for Arduino

Proximity Sensor Pin-out and Instruction Pamphlet

Technical Specifications:

Working Voltage :5V(DC)

Exclusive One Wire Support! (Only available using the Virtuabotix Ultrasonic Library)

Static current: Less than 2 mA

Sensor Angle: 15 to 35 Degrees

Detection Distance: 2 cm to 500 cm (500 cm is the absolute maximum, and will depend upon your sense angle and how open the space around your project is 300 cm is a realistic indoor expectation).

High Precision: As good as 0.3 cm accuracy

Documentation & Libraries

Basic Library and Datasheet:

Library for the Arduino IDE available for download.

Arduino Library Features:

Two and One wire modes

Built in distance conversions

Automatic timeout distance (for fast operations, and no hangups)

Easy to use examples

10 reviews for Virtuabotix Ultrasonic Proximity Sensor for Arduino

  1. Rated 5 out of 5

    Ultrasonic Rangefinder
    I have a small project and needed something to detect when an object was approaching. I decided on the HY-SRF05 since a) Amazon had it and b) it was cheaper than the older SRF04. Once I got it, I plugged it directly into my prototyping shield and had it working within 5 minutes based on the included library. Works perfectly and a great price. As with most ultrasonic rangefinders, it has some issues with things that are really close (<2cm) but that is disclosed and not an issue for me.

  2. Rated 5 out of 5

    Ultrasonic Rangefinder
    I have a small project and needed something to detect when an object was approaching. I decided on the HY-SRF05 since a) Amazon had it and b) it was cheaper than the older SRF04. Once I got it, I plugged it directly into my prototyping shield and had it working within 5 minutes based on the included library. Works perfectly and a great price. As with most ultrasonic rangefinders, it has some issues with things that are really close (<2cm) but that is disclosed and not an issue for me.

  3. Rated 5 out of 5

    Easy to use straight out of the package

    I downloaded the sample code and wired as shown. It worked perfect. Planning to use on a mobile platform with an Arduino next.

  4. Rated 4 out of 5

    Works as advertised (almost)
    These rangefinders work as well as much more expensive ones. It is precise to ~1cm. However, I do have 2 gripes:
    1) The maximum range seems to be ~250cm not the advertised ~500cm
    2) One of mine fell 3 or 4 feet to the ground and now reports alternating values between the correct one and 213 (the default value when it is maxed out)

  5. Rated 5 out of 5

    Great rangefinder

    Compared to other range finders this a very cost effective component. Many libraries to use and is pretty accurate. Many uses, but mine is used in a small robot and it performs great!

  6. Rated 5 out of 5

    I used this as the proximity sensor for an “insect” style walkerbot project from the MAKE Arduino project book.

    That book showed a 3-pin proximity sensor, where the pins were power, ground, and signal. The project books source code for distance measuring involved programmatically setting the signal pin to “output”, sending the signal, then programmatically setting the signal pin to “input” and reading the echo.

    This device has 4 pins. Instead of 1 data pin, it has a “ping” pin that you use to send the signal, and an “echo” pin that it uses to retrieve the bounceback.

    It took only a moment to find the arduino sketch code online to measure distance with this, and substitute that for the proximity measuring phase of the walk cycle for my insect bot. The little critter now walks forward until it detects an obstacle, at which point it backs up, turns 90 degrees, and marches on. Works like a champ. This is a very nice component.

  7. Rated 5 out of 5

    noob problems with 4 pins, library install and serial monitor

    I’m an arduino noob, so it took me a while to get this working.

    I’m using a Mac with OS X 10.6.8

    The first problem was that this sensor has 4 pins rather than the usual 3. On the 3-pin models, the input and output use the same pin. Fortunately the pins are labeled, so it wasn’t too hard to work out. Hook GND to ground, and Vcc to 5V power on Arduino. Trg needs to be a digital output. I used pin 11. Echo needs to be an analog input. I used A0.

    Figuring out where to put the library files I downloaded from the virtuabotix website was the hardest part. I never store files in my Documents folder. In [user]/Documents/Arduino, I had to create a new folder named _libraries_, and put the _Ulrasonic_ folder I downloaded from virtuabotix in that newly created _libraries_ folder (you will have to decompress it first if you have automatic decompression off). After quitting Arduino and relaunching it, the library was recognized.

    Finally, getting the Serial Monitor open took some time because of a misleading forum post. You can find the Serial Monitor under the _Tools_ menu in the Arduino application, or use SHIFT-COMMAND-M. It is NOT in an icon in the Sketch window. **CORRECTION. THERE IS A SERIAL MONITOR ICON IN THE SKETCH WINDOW. IT IS ON THE FAR UPPER LEFT OF THE WINDOW-IT LOOKS LIKE A MAGNIFYING GLASS.

    Now, it’s working great. I swiped some code from the example file and mixed it with my code, and I can detect objects within X inches of the detector. Mission *deter-porch-peeing-cat* is well on its way.

    FOLLOW-UP: I mounted the sensors with hot-glue, and they aren’t working very reliably. The problem could be the length of the wire I’m using between the Arduino and the sensors (about 2 meters), or bad pin connections (making the 4-pin molex 0.1″ female molex connectors was _insert curse here_ not easy) . Maybe I cooked or damped the sensors with the hot-glue. I ordered two more distance sensors, and I am going test them on my connectors to find out if it was the hot-glue or the connectors/wiring that is causing problems.

  8. Rated 5 out of 5

    Good sensor, haven’t gotten a chance to fully use it yet
    I got this sensor to just mess around with it and play with the Arduino platform. The sound it makes is audible but isn’t bad. It is just a quick clicking noise. It could probably go unnoticed with any background noise but I was listening for it specifically. I rated it 5 stars for now but will update if I feel it isn’t the full 5 once I really test it out. So far it has worked well, was packaged safely, and had great documentation. I recommend it.

    ***Original Problem***
    I initially had problems with setting it up (keep reading, it was my fault). I couldn’t seem to get any accurate values back from it from any further than like 6 inches. I was using the library that the pamphlet it came with told me to. It turns out that while the pamphlet says the sensor is good for 3-5V it really needs 5V to work accurately. At least that was my experience. I had it wired to a 3V digital output pin and when I rewired the power to the 5V rail on the arduino I instantly saw much more accurate values from a variety of distances on the console.

    The only thing I would like is if it would have worked better with just 3.3V. It fits perfectly on the arduino board without a breadboard except where the power pin is I only have output pins that go up to 3.3V. Minor complaint, and I just breadboard it anyway so no biggie.

    It turns out that it wasn’t because I re-wired it to 5V, it was because I re-wired it to a pin that could output more current and therefore drive the sensor as it is supposed to be driven, do not power your current hungry modules via I/O ports. I thought it was the voltage but the kind staff at Virtuabotix clued me onto this literally maybe an hour after I originally posted it. Great customer support!

    While it does fit nicely directly onto my Mega2560 with the power pin connecting to an I/O port, the fact is the Arduino simply cannot safely produce the necessary current through that port and therefore it just won’t work. Wired up correctly with the proper current and it works great!

    Also Virtuabotix has great customer service!

  9. Rated 5 out of 5

    Up and Running in 5 Minutes!

    I am delighted with this ultrasonic sensor module purchased from Virtuabotix. They provide pinout, data sheet, and documentation needed to get this part up and running.

    It is very simple to operate this sensor, and it takes just a few lines of code. The sensor basically tells you (in microseconds) the time between when it sends a ping, and hears the echo back. From this you can do all sort of interesting things. If you plug in speed of sound as a constant, you will can use the ping time to calculate the distance to the target. I found mine works reliably out to about 36 inches. The device can also be used as a tool to actually measure the speed of sound. Set a target at a fixed distance, and then you the ping time to calculate speed of sound. I have kept some high school students busy with this for several weeks.

    Once again, delighted with the products and support from Virtuabotix. I hope they continue to expand their product line.

    IMPORTANT! This review is specific to Virtuabotix as the supplier. Other suppliers do not provide the same documentation and support, which is needed to make this operate.

  10. Rated 5 out of 5

    good sensor
    used it on some school projects and it is a very good sensor it works good and its price is cheap

Add a review
SKU: 0609224531682 Category: Brand: