PiicoDev Ultrasonic Rangefinder | Getting Started Guide

I just shared a new tutorial: “PiicoDev Ultrasonic Rangefinder | Getting Started Guide”

Similar to how bats echo-locate and how submarines use sonar, the PiicoDev® Ultrasonic Rangefinder uses sound waves to measure the distance to an object. It sends out a high-pitched sound wave, which bounces off of the object and comes back to t…

Read more


Hi @Michael, really enjoying Piicodev in my projects!

Currently have a Piicodev laser sensor and Pi Pico set up to turn on a LED strip in a cubby storage when I stick my hand in.

It works fine, so I’m not going to change it, but I’m curious and wondering for what kinds of applications the ultrasonic rangefinder would be better suited as opposed to the laser distance sensor.

Hey @Steven - these are good questions. Both sensors have their own advantages and disadvantages.

The PiicoDev Laser Distance Sensor is high-accuracy, high-repeatability and has a higher cost.

The PiicoDev Ultrasonic Rangefinder has lower accuracy, repeatability and cost - but is more suitable for measuring eg. the height of a liquid (where the IR laser might just pass through or scatter).

1 Like

Hi @Michael,
I know that the laser rangefinder has a practical range out to about 3500mm or so, do you have any info on the practical range for the ultrasonic sensor?

I will be aiming at small people size targets :smiley:


Hey @Murray125532 - The sensor works most reliably up to about 2.5 metres. You can see in the tutorial video I’m working with a target about the size of a shoebox (310mm on the long edge). This is a great reflector because it’s a flat plane perpendicular to the sensor.

The rangefinder does work out to about 4m but results can become spurious due to eg. multiple reflections. It really depends on what you’re measuring and the surrounding environment at this point.

Hi @Michael,

Think Cub Scouts at night in an open space, with the odd animal noises as they wander about into the sensing fields … a bit of randomness / unreliability adds to the interest


1 Like

Cool project @Murray125532 :smiley:
You might find the Invisible Tripwire project interesting. Find it at the bottom of the guide.
The idea is that the tripwire responds to sudden changes in range. So it will adapt to new conditions, meaning you don’t have to hard program a setpoint. We achieve this with an Exponential Moving Average. Regardless of what distance sensor you choose, this is still a pretty useful technique to keep in the bag of tricks.


Yeah - a nice technique. Something for the resource book.

1 Like