← Back to list

DiaDisp — Displacement Sensor Gen2

I’ve decided it’s finally time to revisit the displacement sensor project I shared a couple of years ago. Overall, that design performed…

BubsBuilds · 2026-06-24 21:19 · 141 claps · 7.9 min read
#engineering #design #metrology #3d-printing #makers
Open on Medium ↗
Wiki topics: DSN · Design · General 📟 · Gadgets & IoT 🛠️ · Crafts & DIY

DiaDisp — Displacement Sensor Gen2

[embed]

I’ve decided it’s finally time to revisit the displacement sensor project I shared a couple of years ago. Overall, that design performed pretty well (I’ve made and used several of them since), but one significant frustration I’ve had with it is the form factor/mounting.

The above picture shows one option I’ve gone with when using it, just clamping the back in a Panavise. But it’s intended to be rigidly mounted with the fastener holes showing close to camera (and their mirrored buddies on the other side). Unfortunately, that means the mounts for it have to be pretty large. On top of that, there’s no good reference surface to align the sensing axis to whatever is being measured.

All that to say, time I wanted something round.

Having a cylindrical outer body, concentric with the sensing axis means I can just mount it up in a Vee block of some sort. That will make aligning test setup MUCH easier. Not only will this make mounting easier, but it also will reduce the error that mounting will introduce into the measurements. For Gen1, the differences between the plane along the bottom of the sensor and the plane of the mount will induce some deformation in the sensor body. The impact on the sensor readings should only be a small fraction of the actual alignment error of the mount, but not nothing.

So, I needed a way to roll up my flexures into a tube, and to do that, I decided to switch up my flavor of flexure and go with some diaphragm flexures.

The below cross-section shows a bit of what’s going on inside of the new sensor.

The two diaphragm flexures and the Housing come together to make a sub-assembly. For a stylus tip, I used a 6mm airsoft BB. Honestly, I hadn’t labeled the bin they were in well enough, and designed for them thinking they were ceramic…they were not. A hardened material would be preferable. As it is, the stiffness of the Hertzian contact for that plastic ball is acting like a spring in series with the flexures. So that deformation will be contributing measurement error, since the amount of deformation will depend on the material it’s measuring against and the stiffness of the flexures. But this deformation should be on the order of 10s or low 100s of nanometers in total, and it’s really only the difference in this deformation between materials/setups that is the error. So the error should be a fraction of those 10s/100s of nanometers…I can live with that.

On the back side, the knife edge is printed into the flexure’s hub. I refer to it as a ‘knife edge’ out of habit, but I actually intentionally went with a relatively blunt edge for this version. This is really the one kind of ‘experimental’ feature I tossed into this one.

One thing I discovered thanks to the comments from the video I shared on the Gen1 build is that PETG is naturally transparent to the IR wavelength being used. From the datasheet on the opto I used in Gen2 (RPI-352), the target wavelength is 800nm. And as the plot below (from this 2023 thesis) shows, PETG is highly transmissive at 800nm. So I think any taper in the ‘knife edge’ is going to result in additional nonlinearity in my signal since it’s only attenuating, not completely blocking, the light.

As I write this, it occurs to me I really need to just test out some options for fixing this correctly….but alas…

Anywho, I went with the dull knife.

Both flexures attach to the Housing with an array of 6 M3 fasteners. The goal with the overkill collection of fasteners was to try and force the stiff outer rims of the flexures and the housing to act as a single rigid body.

The Hub Link has 3mm dowels pressed in to each end, and these dowels then have a tight, but sliding fit into the flexure hubs. I also intentionally slightly oversized the Hub Link, ensuring it is under slight compression between the two flexures. The combined depth of the holes for the dowels is deeper than the length of the dowels to ensure the Hub Link body defines the spacing between the hubs.

On the back side of the knife edge flexure are three pads with M3 heat sets. These pads are the reference surface for the Opto Mount. If I ran into problems with the spacing between my knife edge and opto, my plan was to adjust these pads and/or add shims to dial it in.

Speaking of the Opto Mount, here’s how that looks. I designed it so that the opto is inserted from the back side. The goal here was to have the reference surface for setting it’s ‘depth’ be closer to the optical axis of the opto.

I slid the opto into position, and the put a small tack of CA glue in two corners to hold it in place while I got the leads soldered on.

But before I soldered on my leads, I attached the strain relief bracket and used it to hold the wires in place while I did my soldering.

After that, it was just a matter of attaching the tail cone and tossing on a couple more zip ties to support the jacketed cable.

and then it was on to…

Test & Cal

So far, the only testing I’ve completed is a first iteration of calibration and short term repeatability testing. And here is a look at the setup I put together for that.

I mounted an aluminum block on a linear translation stage. I then mounted the new displacement sensor to the same breadboard that the translation stage was on, with the sensing direction parallel to my linear stage motion. So translating the stage moves the block, which displaces the sensor. Looking at the other side of that block is a chromatic confocal sensor.

The sensor I am using is a Micro Epsilon IFS2403–10, coupled with their IFC2421 controller. Below us a table from the datasheet, showing the key specs for it.

To minimize any potential error contributions from rotation error motions of my translation stage, I tried to align my two sensors to be coaxial.

The great part about this setup, is I can then just stream both the confocal and DiaDisp signals into my data capture device (I’m using a Saleae Logic 8 for this testing). So all I need to do to get a calibration curve is move my translation stage throughout the opto’s signal range in both directions and I’m off to plotting.

I tried to move the stage slowly, to minimize errors coming from the rise/fall time of the opto, but otherwise I was just twisting a knob back and forth.

And this is what that twisting did for me.

This pretty much matches the response curve shape shown on the opto datasheet, so no huge surprises here…I’ll take no surprises any day.

Zooming in on the linear region, and tossing a trendline on it.

And then subtract this trendline from my datapoints to get myself a deviation from linear fit plot. These would be the errors I’d be looking at if I just use a simple sensitivity (90µm/V, based on the above trendline) to convert my voltages to distances. The F.S. linearity error came out to ~+/- 30µm.

However, if I use a look up table, I can significantly reduce this measurement error, at the cost of some complexity and a little compute cost. Doing so, I can cut my expected short term error to be the deviation from average, as shown here.

Conclusions (for now) and other musings

All-in-all, I’m pretty happy with my new displacement sensor. The short term performance is at least as good as it’s predecessor (as a function of range), and it has the easier mounting I was after.

An added benefit of the much more enclosed design is that it also just feels much more robust.

One comment I got a lot on the original video, and again on the new one, is of concern about how the high CTE of the plastic will impact measurements. So I wanted to take a quick second to comment on that particular aspect.

Because the full stack up on both sides of the path (both through the housing to the opto and through the hub stack to the knife edge) are PETG, there is no net movement between them due to thermal expansion. This assumes no thermal gradients, and with the open air exchange thanks to the flexures, I think this is a reasonable assumption. So the only measurement drift I expect mechanically from thermal drift comes from the length of plastic between the supported edge of the sensor and the target being measured…so basically the length of my stylus (as highlighted in red below).

That distance is about 30 mm. Assuming the worst-case CTE given by Matweb of 94 µm/m·°C, that would contribute 2.8 µm/°C of thermal drift…which is quite bad :) Using a more common CTE number I see for PETG of 60 µm/m·°C would cut that drift to 1.8 µm/°C. So it’s definitely not great, but I think it may not be as bad as some folks might suspect.

Swapping the stylus tip out for something more commonly seen in probe tips, stainless steel, would cut this down closer to 0.5 µm/°C.

But anywho, I think that’s enough for now on this one.

Thanks for hangin out, and if you have any questions, comments, etc., lemme hear em!

** Some of the links above are “Affiliate Links”, and I receive a small commission (usually ~1–3%) of any sales from them.


메타데이터
post_id
b590e2fa5fd8
slug
diadisp-displacement-sensor-gen2-b590e2fa5fd8
url
https://medium.com/@bubsbuilds/diadisp-displacement-sensor-gen2-b590e2fa5fd8
canonical_url
https://medium.com/@bubsbuilds/diadisp-displacement-sensor-gen2-b590e2fa5fd8
author_url
https://medium.com/@bubsbuilds
status
ok
fetched_at
2026-08-25 16:46:06