DIY Digital Caliper Measures Up

You might wonder why [Kevin] wanted to build digital calipers when you can buy them for very little these days. But, then again, you are reading Hackaday, so we probably don’t need to explain it.

The motivation, in this case, was to learn to build the same mechanism the commercial ones use for use in precise positioning systems. We were especially happy to see that [Kevin’s] exploration took him to a Hackaday.io project which led to collaboration between him and [Mitko].

The theory behind the mechanism is simple but does get into some ugly-looking trigonometry. Electrically, you feed eight sine waves with different phases into the assembly and measure the phase of the signal you receive.

Pulse density modulation is sufficient for the driving signals. The math is a bit more complex, but nothing you can’t do with a modern CPU. To set the correct parameters, a PC-based test setup allowed different runs to determine the best parameters for the final implementation.

Of course, the whole thing still needs some packaging to use as either a practical pair of calipers or for unrelated positioning duty. But it does work and it should be straightforward to adapt it for any purpose.

We’ve looked inside calipers before. If you are only making measurements with calipers one way, you may be missing out.

15 thoughts on “DIY Digital Caliper Measures Up

    1. His DIY build is cool and educational.

      But your idea of using linear encoders in CNC and similar applications is nothing novel or interesting. Quite opposite. Not using them even in 3d printers is interesting because it is INSANE.

      Even cheap inkjet printers in the 90s used a few cents barcode like optical stripes with IR reader for positioning with GREAT accuracy and precision being moved with just shittiest DC motors and plastic gears. Closed loop is f’ing cheap compared to a heavy open loop stepper.

        1. Because you get .1mm precision without… Why would you do that? Closed loop makes sense when the tool “sees” forces. On a properly set up belt driven system there’s no real need for it, especially when you’re just moving a printhead at reasonable speeds. Just adds cost.

          1. This, and the fact that current FDM probably wouldn’t be more precise anyway. Why add complexity and cost then?
            Perhaps the only valid reason to do so would be to crank up the speed by using BLDC or linear motors instead of steppers.

          2. As Roger Roger says it is cheaper.

            To get guaranteed precision on open loop you need to over build, now everything is bigger & heavier than it really needs to be.

            That’s why printers have been cheap crap for decades but still work very well.

        2. PID loops are hard, steps are easy.

          Large CNC machines and robots use servos for power & speed but 3D printers are not under any load (cutting forces on even small CNC machines are HUGE) so you can get away with the simplicity of steppers.

  1. Ironically, the easiest way to experiment with this is to buy a cheap digital calipers, or use one from your junk box, the cheap ones break all the time) and then replace the electronics.

    Where this would become really useful in the DIY part of the world is by bending the thing into a circle to measure angles. These are also available commercially, but not at “affordable” prices. For examples see:
    https://duckduckgo.com/?hps=1&q=zettlex+incoder&iax=images&ia=images

    A lot of the Zettlex Incoders (there are other brands too) use weirdly curved PCB tracks. I guess these use an inductive system, instead of capacitive. The water / coolant proof digital calipers also use an inductive system, but I have never looked into the details.

    Another extension which could be really useful is to make two of these, with different scale factors. The goal is to make an absolute positioning system by storing some phase shift values in EEprom inside the uC. Having a real absolute positioning system has several advantages. You never have to home your CNC machine (robot / 3D printer) again, and it can detect and correct disturbances due to EMC and such.

    I do have an original Mitutoyo, and was able to get it for a fair price (EUR100), but you can rarely get them for such a price. Even simple things such as a connector for the data output (mine does not have that) easily cost EUR25 extra. Quite ridiculous. I really do like the “Absolute” part of the Mitutoyo though. I would not want to buy calipers without this function. Although I suspect it is not really an absolute measurement, but it “secretly” keeps tracking the scale even when the calipers is “off”.

    Because I both wanted calipers with a data output, and some spare (I want to use my calipers at home and at my work shop), I recently bought some extra. Igaging is apparently one of the best among the <EUR50 category, but a bit difficult to obtain in Europe. In the end I settled for Terma, and bought them from Aliexpress. These are still quite affordable, and probably the best quality you can get for a modest price (Ignore all the crappy cheap stuff, it really is garbage). The Terma I bought also has an “absolute” measurement, but it is fake for sure, but it’s close enough that it does not matter. I verified it by removing the plate at the end and sliding the slider off the end (the display goes haywire), and then putting it back on (Display has some random value), so I am certain it can’t re-sync on the track.

    Another thing I quite like is that the display goes off automatically, but it also goes on automatically. As a result, you do not have to turn the display on or off during use. You just use the calipers and it “works”. But with one limitation. If the calipers is not used for 2 or three days, then it turns itself off further. If that happens, then you do have to push a button to turn it on, and you also have to re-zero it. This is a quite nice compromise I’d say. As a result, I just do not ever turn the display off. When I am finished measuring, I just put it back in it’s box, and the display goes off after a few minutes.

    DMM Auto -off rant.

    I really dislike the “auto turn off” function of DMM’s for example (Including my BM869s) When I’m working on some electronic project those bloody things beep at you every 10 minutes (which is quite distracting if you are writing some microcontroller code at that time), and you have to give them some attention 20 to 30 times a day because of this. Replacing batteries once a month would be far less distracting and well worth the extra cost. Most DMM’s have some function to turn this “auto off” function off, but if you’re using 4 different brands of DMM’s, it’s still a nuisance to manage.

  2. I think there is a reason why most explanations of these are wrong (to date, this is right) … People see capacitors and think they are capacitive sensing not realizing its travelling wave ac. The original patents by Nils Ingvar Andermo (spelling?) show a clever arrangement for summing charges to capacitors before a very low resolution adc (6 bit). This is the first work I’ve seen come close to replicating something insanely cheap and yet misunderstood. I’ve lightly tried myself. Good work. I hope people expand on this work and the mysticism and lies of digital calipers being capacitive sensing (as in measuring capaticance… They don’t) go away. The potential cost reduction and ease of making huge encoders using this tech is surprisingly only used by a few companies. Never expected to look at the frequency tuning.

  3. He does a lot of math do determine the phase of the reflected signal. Wouldn’t the naive approach of sampling a full cycle and locating/interpolating the position of the max (or min) also work?

  4. This seems like it’d be extremely easy for any manufacturer of LED strips to make a super cheap strip that can be cut to length. Then pair it with another cheap board with an rp2040 for a dirt cheap absolute position sensor.

  5. Sometimes in past I try to find materials about resolver, digital caliper and analog heidenhain encoders.
    Its hard to find anything, only some patents from USA and commercial IC cost lot or out of production.

    But I think the way to increase amature machine quality is to make copy of Spherosyn linear encoders make width tube filed width steel balls and dreaded width some coils. PCB stripes are cheap but in machine full of grease and metal parts have hard life and steal tube and bearings ball its hard to break.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.