Get the latest tech news

Making Electronic Calipers


Have you ever wished for a 500 Hz, millimeter-precise linear position sensing system? Well you're in luck --- all you need is some circuit board, a basic microcontroller, and a wee bit of maths!

(“Well” as far as embedded goes — there was a side quest tracking down an intermittent freeze that locked out the debugger, which seems to be a genuine hardware bug triggered only on older ARM core silicon revisions.) While in this static test increasing the window size and ADC sampling period looks best, that does mean it’ll reduce the rate at which we can actually calculate the phase, which limits how fast the slider can move before it loses track of its absolute position. I’m not super-well versed in the Python ecosystem, and it was spectacular asking LLMs like Claude stuff like, “Can you please plot an FFT of these data samples”, “Run these bad boys through a low pass filter at with cutoff at 1000 Hz”, “Can you please write an a phase accumulator that handles wraparound correctly”, etc.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Electronic Calipers

Electronic Calipers