Overview
This is a custom-designed case/holder for the popular HC-SR04 ultrasonic sensor, commonly used in robotics and various other projects.
The HC-SR04 is one of those parts that shows up in nearly every beginner robotics kit, cheap, easy to wire to any microcontroller, and good enough for basic obstacle detection or distance measurement. What it does not come with is any kind of mount: it is a bare PCB with two open transducer cups on the front, meant to be glued, zip-tied, or otherwise improvised onto whatever chassis it ends up on. I got tired of improvising a new mounting solution every time I reused one of these sensors across different robots, so I designed a proper holder once and reused it since.
I printed it using TPU for its flexibility, and I’ve included a Bambu Lab P1S profile optimized for this material. A flexible holder is genuinely useful here: it can flex slightly to snap-fit around the sensor’s PCB edges rather than needing separate screws to clamp it, and it absorbs small vibrations from the robot’s motors instead of transmitting them straight into the sensor. However, the design is versatile, and if you would rather bolt the sensor down solidly, you can print it using PLA or other rigid materials instead.
The 3D CAD model is available for free customization on OnShape.
Mounting
- Size of the screws to fix the holder to a plate: M3
- Size of the screws to fix the sensor to the holder: M1.6
Dimensions

Printing
This is the position to be used on the printer bed:

Supports are required:

Supports settings:


Ultrasonic sensors are also directional; they need a relatively clear, unobstructed cone in front of the transducers to get a reliable echo back, so the holder’s angle on the chassis matters just as much as how securely it is mounted. Getting that angle wrong is an easy way to end up with a robot that reports phantom obstacles or misses real ones, so I designed the holder’s mounting geometry around the angles I actually needed on my own robot, rather than a generic flat bracket.
This is what they look like when installed on my robot

A small mount, but the difference between a sensor that reads reliably and one glued on at a guessed angle.
Download
The model is free to download and print, licensed under the Standard Digital File License.