Digital caliper data collection

(Backdated: Nov. 10, 2016)

In order to measure the diameter of our filament, we decided to use digital calipers with a data output port.

Data plug port on our digital calipers

For the unnecessarily high price of over $50, you can buy a USB data cable to fit into the calipers, but where’s the fun in that? So, Isaac and I set out to make our own connection. The first problem was actually connecting wires to the PCB traces inside the data port.

Ever the skilled 3D print wizard, Isaac whipped up a little Onyx cable housing on the Markforged and I stripped some 24AWG solid core wire to act as the terminals.

Close up of our data cable’s wire termination inside the calipers

Once we got the connections inside the calipers, the next challenge was to turn the calipers’ 24 bit digital dataframe into something an Arduino could read. The main issue is that since the calipers are powered by a tiny coin cell, their digital signals were at ~1.8V, which is below the digital threshold of the Arduino I/O pins. In addition to that, the calipers are a current-sink output, meaning they pull their output voltage low when they’re sending data.

To deal with the current-sink, I first started by setting up a 1.8V linear regulator from the Arduino’s 5V logic level to 1.8V, and referencing the ground pin of the calipers to the 1.8V output.

Voltage regulator to offset caliper signal

This way, instead of going from 0V to negative 1.8V, the caliper signal would go from 1.8V to 0 relative to the Arduino ground. Unfortunately, that signal still wouldn’t be enough to trigger an Arduino digital I/O pin. Hence, I set up two 5V output op-amp comparators (one for the data line and one for the clock line) with a reference voltage of ~1V. These act as a level shifter to convert a 0 to 1.8V signal into a 0 to 5V signal.

While I had been working on shifting the data level, Isaac worked on Arduino code to read the dataframe from the calipers, inspired by this code by MakingStuff. Once we hooked everything up, we were astounded to find a neat column of caliper measurements in the serial monitor! It just worked!

--

--