Making Electronic Calipers
kevinlynagh.com
kevinlynagh.com
I'd love to hear any advice/ideas re:
- approaches for figuring out what's currently limiting the accuracy (i.e., noise sources)
- the relative merits of averaging in time vs phase domain
- how to improve the analog frontend (See my collaborator Mitko's github repo for the hardware schematics: https://github.com/MitkoDyakov/Calipatron/blob/main/Hardware...)
https://hackaday.io/project/5283-potpourri/log/21475-laser-i...
https://hackaday.com/2015/07/24/self-built-interferometer-me...
Usually the way you want to set something like this up is with a low pass filter before you sample it and you want to sample at a high enough rate (some multiple of that filter frequency). This is due to the sampling theorem. Maybe I'm missing something.
I would aim for the highest possible sample rate and then post-process the signal (assuming that's computationally reasonable, i.e. you can keep up with real time).
There are general practices/principles for minimizing noise. Having a ground plane. Separating your digital electronics from your analog electronics. Clean power supply. Shielding.
Another thing I'd be concerned about is that this whole thing is a big antenna. Yet another concern is that motion might influence the results (any time you have conductors moving in the presence of fields you get some induced current).
Commercial positioning solutions are usually based on optics and gratings. I wonder if that's a better approach even for a hobbyist. Something like an optical mouse just linearized...
https://www.grant-trebbin.com/2014/04/digital-calliper-teard...
Which I guess is from here: (2006)
https://web.archive.org/web/20060923040306/http://www.yadro....
The only application I've encountered where digital tools work better for me is having a DRO on a mill is extremely convenient.
Personally, i use microns instead of 0.001mm, too, when measuring that small. I forget the accuracy of my good calipers, but i could detect errors of around 2 microns if memory serves. It's been a long time since i cared about anything that accurate so i have two pairs of cheap plastic ones - scale and digital.
For 0.01mm there are only electronic or dial calipers.
Microns are the domain of grinding and lapping, you rarely ever need to go there with cutting.
I've already started calling the fab size of my processor as 80 angstroms (or whatever), so i probably back-propagated that.
Architectural rulers tend to divide inches into tenths for some reason. I have no idea why, because lumber comes in multiples of 12 (e.g. 8', 10', 12', 16') so if you design in multiples of 10 you're likely to waste a lot. If anyone knows I'd be curious to hear about it, mostly it makes drawing things to scale a pain in my ass..
If you're making a floor plan drawing at 1:100, a 240 inch wall becomes 2.4 inches on the drawing. The scales [of the drawings] and the scales [the tools] evolved together. (Similar to "why do computer people work in base 2 or base 16 so often?")
What "micron" are you referring to here? The "micron" I am familiar with is exactly that one (i.e. 1 micron = 1µm = 0.001mm).
To be clear, for a measurement where accuracy to less than 0.001" actually matters use a micrometer! Otherwise you're likely to screw up the part. But the advertised precision of 0.001" is totally repeatable within 0.0005".
EDIT: ah, I see your confusion. A "micrometer" is an aliased term. It means both "a millionth of a meter" and "a tool for measuring very precisely". I used the latter meaning above. Although in terms of order of magnitude precision they're identical--a micrometer accurate to 0.0001" is accurate to 2.54e-6m. It's possible to get within a handful of µm with decent calipers. Easier with a micrometer.
The only problem? I'm left handed so I either end up using it upside down or trying it with my left hand and then switching to my right. They make left handed calipers but the cheapest I've found are over $40.
I think I'll keep fumbling with the cheap ones.
Interesting project. The hardware guy earlier built a rotary encoder and a vape pen. I am no metrologist (though by chance I once worked for the UK guy who brought Hexagon to China and made bank), this looks overall like quite a complex scheme that was probably referenced from an existing implementation. These days you can get 0.10mm pitch tracks and offsets ("4 mil") or 0.09mm ("3.5 mil") from JLC on 2 layer/4+ layer. With flex PCBs you can get still smaller pitch ("3 mil"). Combining a few rows of these with basic multi-track rotary encoder theory should give you portions thereof, ~0.01-0.02mm.
This back of hand calculation aligns well with my Mitutoyo's test report, which states maximum permissible error is 0.04mm @ 5mm diameter, 0.02mm @ 0-200mm, and 0.03mm @ 300mm. Indicated errors on the test report are all in the range of 0mm-0.02mm except inside radius which is 0.03mm. This would be a standard high grade caliper level of precision.
In practice, achieving these levels is going to require machining high grade steels and mounting them at high levels of parallelism, not simply working out the electronics.
See also: https://www.eevblog.com/forum/projects/absolute-capacitive-r... (see animation, GC7626C datasheet) https://github.com/littleboot/ACRE
What does that have to do with a Fab? Isn’t a fab the thing that creates ICs? PCBs aren’t made in a fab.
https://en.wiktionary.org/wiki/fab#Noun https://en.wiktionary.org/wiki/fab_lab#English https://en.wiktionary.org/wiki/fabricator#English and if you really want to understand the English culture don't miss https://en.wikipedia.org/wiki/Absolutely_Fabulous ;)
Printed circuit boards are made at a printed circuit board manufacturer / "fab house."
Also, nitpick: „ I’m stuck in the local optima of …“ should be „optimum“.
C++20 can do this in a consteval. It is a godsend for embedded table generation.
Kind of, but I'd like an 0.01mm precision please. It can be just a few Hz, I don't need 500 Hz.
Great project though!
The other side of it though is that you're starting to get down into the "everything needs to be temperature controlled" region as you squeeze that precision number. FR-4 and copper have thermal expansion coefficients around 15-20ppm/C. If I'm doing this mental math correctly, a 5 deg temperature rise would make a 1m long piece of FR4 expand by 0.1mm, or a 10cm piece of FR4 expand by 0.01mm.
[1]: https://www.st.com/resource/en/application_note/an4629-adc-h...
[2]: https://en.wikipedia.org/wiki/Successive-approximation_ADC
On that note: I'm looking for a mouse style camera sensor unit that can export full frame rate raw to a system where I can actually decode such an absolute positioning code.
Anyone got something in the sub-100$ range?
https://ardupilot.org/copter/docs/common-mouse-based-optical...
https://github.com/RCmags/ADNS3080_frame_capture
https://www.pixelelectric.com/sensors/distance-vision/adns-3...
If anyone has explored further how much the timing can be optimized, or maybe there are other mice sensors for with better frame dumping capabilities, I am curious to hear about it as well.
With that said even if you remove all the unnecessary delays data transfer over SPI will likely be a limiting factor for very high framerates. Assuming 4MHz SPI and 32x32 8bpp image that would be at most 500FPS. Few hundred FPS would still be nice, and you might push it a bit higher with increasing frequency but it's probably not possible to push it much further than 1000FPS without MIPI or some kind of other parallel data transfer protocol.
The ardupilot project in sibling comment seems to be using the mouse movement output directly instead of capturing the frame and then doing optical flow analysis on main CPU. The image dump is only being used to verify camera focus.
Tldr: understood that you think you don’t need 500 Hz, but there is a technological limitation why you need that frequency for these systems to work.
The reason these measurements need to be so fast is because the measurement is not absolute but periodic. Meaning that when you measure something it can’t tell you how large it is in absolute terms just how much larger it is than the closest integer period. In mathematical notation you can measure x where the whole distance is k*period+x, where k is an unknown integer, and period is a design parameter. It can’t natively tell you what is the value of k.
So to figure out the whole measurement you need to calculate k. And you can do that by keeping track of it. You know it is zero when they zero out the caliper, and you know that it just increased by one every time there was a falling discontinuity of x. (Meaning that every time x approaches the period and then suddenly drops to a low number it just crossed over one of these period boundaries.) Similarly you decrease k every time x had a positive discontinuity.
And you can only do that trick if the sampling rate is much higher than the speed the caliper is moved. If you sample too slow suddenly the caliper might move multiple whole periods between two samples and the code would loose track of the value of k.