joseph.dattilo// lansing · mi

Virtuabotix Ultrasonic 5V 1 or 2 Wire Rangefinder for Arduino

The Ultrasonic library shipped alongside Virtuabotix's HC-SR04-class rangefinder during the same run as the DHT11 library. It's Joseph's rewrite of an earlier HC-SR04 library by cnobile, itself building on concepts from ITead Studio, adding one-wire mode, Versalino bus support, and automatic timeout on top of that lineage. Source is on GitHub as arduino-ultrasonic (GPL-3.0-or-later). This is the original product page and library reference.

Virtuabotix ultrasonic rangefinder module next to a US quarter for scale

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 sensor is perfect for a great number of short range applications including distance measurements, alarm systems, robotic navigation and many many more.

Product Description

Package Contents:

Virtuabotix Ultrasonic Obstacle Detection 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

Virtuabotix ultrasonic rangefinder module, additional product angle Virtuabotix ultrasonic rangefinder module, additional product angle Virtuabotix ultrasonic rangefinder module, additional product angle

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

Check out the Ultrasonic wiki, it has loads of resources!

Get the latest Ultrasonic Library for the Arduino IDE

Pinout and protocol information is available from the Wiki

Code to make the Ultrasonic Theramin with the Sense and Move

What people who’ve used it say

The Virtuabotix Ultrasonic sensor picked up ten customer reviews (4.9/5) on the original product page, including from Arduino educator Paul McWhorter of toptechboy.com, who wrote:

“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… I have kept some high school students busy with this for several weeks… This review is specific to Virtuabotix as the supplier. Other suppliers do not provide the same documentation and support.”

— Paul McWhorter, February 1, 2013

Open source

The Virtuabotix Ultrasonic Library (GPL v3) is Joseph’s rewrite of an earlier HC-SR04 library by cnobile, itself building on concepts from ITead Studio — it adds one-wire mode, Versalino bus support, and timeout handling on top of that lineage. It is published as arduino-ultrasonic, containing:


Restored from the josephdattilo.com archive — original publish date May 28, 2014, preserved. Lightly cleaned up for the modern site; the words are period-correct. The library is released under GPL-3.0-or-later, carrying forward lineage credit to cnobile and ITead Studio per the original GPL v3 header.