So looking at SAMDcaliper.py I see that you just print these numbers as on US keyboard layout. That has two major problems:
1. If user's computer has a different keyboard layout that will enter garbage instead of numbers. For example, in Russian keyboard layouts there is usually a letter "ю" on the key which is used for dot on US keyboards, so instead of 7.31 you will get 7ю31.
2. Excel accepts numbers only if they are entered with a proper decimal separator which depends on Windows number format settings which are part of regional settings. So for example in Russia (and apparently most of the world: https://en.wikipedia.org/wiki/File:DecimalSeparator.svg) decimal separator is comma instead of dot, so even if user would switch to US keyboard layout Excel will not accept the numbers with decimal dots, it will think that they are just strings.
Both problems can be solved by using numpad keys instead: they are the same in all keyboard layouts and KEYPAD_PERIOD key will enter a proper decimal separator for Excel to accept.
I looked into the sensing mechanism used by these cheap digital verniers [1] - which involves overlapping capacitive plates.
What I couldn't figure out was how precisely the sensing worked, because it looked like it would have to measure capacitance at the femtofarad levels, and nothing I had access to could measure a capacitance that small - or monitor the sensing process without adding enough capacitance to mess it all up. It also looked like it'd be really sensitive to the distance between the plates, but it didn't seem to control that particularly precisely.
If anyone here knows how they measure such small capacitances and how control for the distance between the plates, I'd be fascinated to hear more about it!
You measure discharge times repeatedly ensuring the capacitor is never fully charged. Presuming you know the impedance, temperature and charge voltage you can get very precise. It's a frequency counter after all.
Distance control is sort of weak which is why these are no good against vibration.
Another way is to use contact resistance with very accurate bridge temperature corrected voltmeter. More expensive. Essentially a potentiometer. Dimensionality is less important, but contact still is. To do that you need a high-ish impedance wiper you can slide over.
So I think you don't need to measure the capacitance per se. Instead you use the capacitances to make a series of (AC) voltage dividers. The lines that are individually broken out (call these the vernier lines) will have different degrees of coupling to the sense node, depending on the caliper position. Assume the capacitance of the sense node is fixed. The controller pulses each vernier line in sequence and measures the sense node in turn. The higher the capacitance of a given vernier line, the more voltage will couple across to the sense node. The highest pulse tells the controller which vernier position it's in, so the absolute voltage levels don't matter, conceptually speaking.
As for the distance between plates, a caliper ought to be made to a high degree of repeatability. PCB thickness not so much though, probably 10%? To first order capacitance goes as ~1/d. But again, the measurement is relative, not absolute. As long as all the capacitances are affected by the same distance factor, the scheme still works.
Anyway, that's an informed guess based upon those scope shots.
Really interesting! I recommend checking out Yuriy toys [1]. He's famous for making an Arduino based DRO with these type of calipers. He goes in depth in his reverse engineering process too which was a fun read.
For others who are to lazy to link follow the linked article from the original article, there is a section of code in the function "loop" (modified for readability):
void loop () {
// if clock is LOW wait until it turns to HIGH
//
while (digitalRead(clockpin)==HIGH) {}
tempmicros=micros();
// wait for the end of the HIGH pulse
//
while (digitalRead(clockpin)==LOW) {}
// if the HIGH pulse was longer than 500 micros
// we are at the start of a new bit sequence
//
if ((micros()-tempmicros)>500) {
decode(); //decode the bit sequence
}
}
so it looks like the 24 bit sequence is indicated by a 500 us pause between a falling edge and a rising edge of the data stream.
Nice to see what model caliper Harbor Freight cloned, too. :D My cheapie HF special has the exact same case & access port. Time to find out if it is electrically the same as well!
Isn't it more likely white-labelled, ie the same product sold under a different brand, than it is cloned (reverse engineered from a product that's on sale)?
White labelled: these same calipers are also avaliable at most auto parts stores. Unfortunately they are all absolute garbage in my experience, simply due to poor battery life. Removing the battery when storing is almost required, as I have found they tend to drain the button cell in ~2 weeks even in standby. On the plus side, they are actually relatively accurate; all 3 pairs I have tested meet their specs when measuring guage blocks.
It's nice to have loaners, or ones you can share with people and not worry too much about it. And I'd rather have three in convenient locations that just one good one, as the accuracy is the same. That being said, the cheapies I have don't have the battery issue mentioned above, either. That would get annoying.
The board is probably powered by USB, because if the whole point is to emulate a keyboard and type in the numbers, then you're going to have USB anyways.
While the article is interesting, it's a site that's annoying.
I use the keyboard to navigate articles frequently. This site intercepts keyboard commands - page up/down does nothing, arrow keys select specific elements rather than letting me scroll down. Worse, the article does not load at all if you turn javascript off. I spent a few minutes trying to figure out where the actual content loads from (since the page itself doesn't contain it and just references JS) - but gave up.
I can't see why they've made these choices, it doesn't seem to give any better UX than just having HTML and some CSS would.
More irritatingly, Google's cache appears to have it available, but says "404" if you actually try to access the cached version (my usual workaround for these JS-only-app-sites.)
Though it's possible to "publish" or share your notes it doesn't look like a well designed use of the platform.
If you are actually editing the content then I agree that using JS makes sense and could be obligatory; but then, sharing/publishing content in what should obviously be a read-only form should really turn it into a static page. It'd save them some bandwidth too, given that readers really do not need all the functionality the JS has. (The app-*.js on that page is over 4MB!) Unfortunately common sense is not so common.
As a dumb workaround to just read the article, opening the print preview dialog makes it scrollable with the keyboard. Though, Ctrl-P seems to be intercepted to... search? sigh.
1. If user's computer has a different keyboard layout that will enter garbage instead of numbers. For example, in Russian keyboard layouts there is usually a letter "ю" on the key which is used for dot on US keyboards, so instead of 7.31 you will get 7ю31.
2. Excel accepts numbers only if they are entered with a proper decimal separator which depends on Windows number format settings which are part of regional settings. So for example in Russia (and apparently most of the world: https://en.wikipedia.org/wiki/File:DecimalSeparator.svg) decimal separator is comma instead of dot, so even if user would switch to US keyboard layout Excel will not accept the numbers with decimal dots, it will think that they are just strings.
Both problems can be solved by using numpad keys instead: they are the same in all keyboard layouts and KEYPAD_PERIOD key will enter a proper decimal separator for Excel to accept.