Now, digital calipers with wired interfaces to capture the current reading are nothing new. But the good ones are expensive, and really, where’s the fun in plugging a $75 cable into a computer? So when [Max Holliday] was asked to trick out some calipers for automating data capture, he had to get creative.
[Max] found that cheap Harbor Freight digital calipers have the telltale door that covers a serial connector, making them a perfect target for hacking. A little Internet sleuthing revealed the pinout for the connector as well as some details on the serial protocol used by most digital calipers: 24-bit packets is six four-bit words. [Max] used his SAM32, a neat open-source board with both a SAMD51 and an ESP32 that can run CircuitPython. An inverting buffer interfaces the serial lines to the board, which is just the right size to mount on the back of the caliper head. It’s hard to tell how [Max] is triggering readings, but the SAM32 is mounted as a USB device and sends keystrokes directly to a spreadsheet – yes, with the ESP32 it could have been wireless, but his client specifically requested a wired setup. Taking multiple readings is easy now that the user never has to swap calipers for a pen.
Cheap calipers like these are pretty hackable – you can add Bluetooth, turn them into DROs for a milling machine, or even make them talk.
Nice chindogu
too bad harbor freight digital calipers are awful.
you can’t trust them when the battery starts to get low, and they draw like 10X the current of nice ones.
analog dial calipers don’t lie.
like you say, i couldn’t believe how quickly my crap digital calipers ate batteries, and how poorly it behaved as the battery holder itself died from too many insertion cycles. so i bought analog dial calipers which i like pretty well even though the local store only had a set in inches.
but then i had an insight, i actually never use better than 0.1mm precision, and truthfully more like 0.3mm. well, that’s easy to come by! so i just removed all the electronics from my digital calipers and replaced it with a window with a notch in it (made out of some HDPE from my recycling bin). it had an mm ruler sticker on the slide already. i’ve been using it that way for a year and i’m satisfied.
a) vernier calipers are cheap and good
b) you can 3D-print a little box on the back of the caliper to insert a AAA or two for much better life.
I figured this a while back so have a few sets of verniers around my workshop. robust and simple.
I bought 100 of similar type to sell in our shop but they could run a battery down in a week. I still have 93 I think. I have a Craftsman CD-6 from 30 years ago (Mitutoyo) and I bet I have not replaced the battery more than twice – like an HP calculator. 10 times the price and 1000 times the battery life and reliability.
I’ve always heard this said about the Harbor Freight calipers, that “off” is not really off, and they chew through batteries. But that hasn’t been my experience. Granted I replaced the battery with a real name-brand cell rather than use the pack-in one, but that was at least two years ago with no problems.
There was an older model with the same breakout that wasn’t always-on. Only had to replace the battery once in 5 years or so.
I just put the battery in backwards when I’m done working. Haven’t had to change one yet.
“It’s hard to tell how [Max] is triggering readings”
I dunno. Maybe if there was a gif animation on the page that showed a button next to the battery door that he presses…
As for the software side, there’s different versions. Some send data only when you supply them with a clock signal, others just stream out data all the time at regular intervals, or any time the reading on the display changes.
Some keep sending out data even when they’re turned “off”, because not all calipers have absolute encoders. Apparently the measurement itself takes such a small amount of energy that they just keep doing. (It’s basically just measuring an RC delay with a C that’s in the picofarads)
It seems he’s going by this example:
https://sites.google.com/site/marthalprojects/home/arduino/arduino-reads-digital-caliper
That code simply waits for the clock signal to remain high for longer than 500 microseconds, then starts recording the incoming bits, then starts again. The calipers are sending the data continuously.
Powered from a button cell no less :P I’m hoping there’s a battery somewhere inside that 3d-printed casing… Shouldn’t be much overall power consumption assuming the ESP can do a fast wakeup on button press.
The folks over at EasyReadTools.com have a similar precision digital caliper with a large, high-contrast remote display that makes measurements easy. Don’t know if they’re still available or not.
The newer Harbor Freight digital caliper that’s grey, with Inch, Millimeter, and Fractional Inch readout seems to be very battery frugal. It’s also auto power on. Just move the slide. It turns the display on in the mode it was in when the user turns it off. Unlike the older black version the mode can’t be changed with the display off.
To me that suggests the gray model’s off state should be lower power than the black one.
The caliper hack I want to see is adding a display to the back side so it will be far more convenient to use on a lathe close to the chuck. There are left handed digital calipers, but no cheap ones.
I have an old blue HF caliper that’s pretty frugal with batteries and has an absolute encoder. It has better repeatability than my black one, that as you say, kinda eats batteries, and my version does not have an absolute encoder. Wherever you turn it on is zero. I’ll look for one of the grey ones with fractional, purely for the battery life.
I have a couple of older black HF calipers that have absolute encoders. Never have had one with a relative encoder. Those would be very annoying to use except for use cases where you want to put the caliper on something, then turn it on, then measure other items for + – VS the first item. But one can do that just as easy with an absolute encoder caliper by hitting the zero button, and that type won’t lose your zero setting when it sleeps.
“It’s hard to tell how [Max] is triggering readings,”
The massive button sticking out the top and pressing it right before the value appears on the screen wasn’t enough of a clue?
Neat idea.
I was going to observe that the SAM32 board is massive overkill… then I thought about price and size, ease of development, and how nicely it all came together… and in light of all that… what’s to complain about? The author didn’t suffer enough?
RAD is rad!
Agreed – well wireless would be nifty, config and/or the involved pc-side app would be much more complicated for the end user than ‘plug it in, and it’ll enter the text when you push the button’. Very nice and simple.
What a nice idea! I’m always trying to imagine the next practical IoT project. I work with my caliper every day and never thought about that. I must learn to think that way more often…
I thinking an ATTiny + RF (+ button) on the caliper and the same as a USB dongle. That should give you wireless while reducing weight.
Or you can buy Mitutoyo calipers with USB cable – it behaves like a keyboard out of the box
Ok but Binary 0001000001111001 = Decimal 4217 so is he dividing by 200 in software, I’m wrong with my Math or that 1 with an horizontal line means division by 2?