Arduino Interface for Mitutoyo SPC Data Port

I started looking for an inexpensive electronic indicator with digital output port, and ended up splurging for a genuine Mitutoyo. Sure it is over five times the cost of the Harbor Freight alternative, but I thought it would be worth the price for two reasons. One: Mitutoyo is known for high quality precision instruments, and two: they are popular enough that the data output port should be documented somewhere online.

The second point turned out to be moot because the data output port was actually documented by pamphlet in the box, no need to go hunting online. But I went online anyway to get a second opinion, and found this project on Instructables. Most of the information matched up, but the wiring pinout specifically did not. Their cable schematic had a few apparent inconsistencies. (Example: one end of the cable had two ground pins and the other end did not.) They also had a “Menu” button that I lacked. These may just be the result of different products, but in any case it is information on the internet to be taken with a grain of salt. I took a meter to my own cable to ensure I have the pinout described by the pamphlet in my own instrument.

Their Arduino code matched the pamphlet description, so I took that code as a starting point. I then released my derivative publicly on GitHub with the following changes:

  • Calculate distance within numeric domain instead of converting to string and back.
  • Decimal point placement with a single math expression instead of a list of six if statements.
  • Their code didn’t output if value is inch or millimeter, I added units.

A limitation of their code (that I did not fix) is a recovery path, should the Arduino falls out of sync. The Mitutoyo protocol was designed with a recovery provision: If the communication gets out of sync, we can sync back up using the opening 0xFFFF. But since there’s no code watching for that situation, if it falls out of sync our code would just be permanently confused until reset by the user.

For debugging I added the capability to output in raw hex. I was going to remove it once I had the distance calculation and decimal point code figured out, but I left it in place as a compile-time parameter just in case that would become handy in the future. Sending just hexadecimal data and skipping conversion to human-readable text would allow faster loops.

Note that this Mitutoyo Statistical Process Control (SPC) protocol has no interactive control — it just reports whatever is on the display. Switching units, switching direction, zeroing, all such functions are done through device buttons.

Once it all appears to work on the prototyping breadboard, I again soldered up a compact version and put it inside a custom 3D printed enclosure.

This image has an empty alt attribute; its file name is mitutoyo-spc-arduino-compact.jpg

Mitutoyo 543-783B Indicator with SPC Data Port

Freshly encouraged by data gathering via Node-RED with serial communications, I investigated getting another set of data points. In the packing bubble squish experiment I could see pressure data from the load cell, which showed me the bubble relaxing (and thus reducing pressure) over time. What I could not see was the physical displacement corresponding to that reduction in pressure. I assume the Z-axis carriage did not move, so the reduction likely took the form of flex in the acrylic plate. How might I measure that kind of data for future experiments?

An answer could be found from the field of machining, indicators are used to measure linear displacement precisely. How precise? In the world of machining, I can have any precision I want, but precision costs money. How precise do I want to afford for this project? I started by looking at cheap electronic indicators like Harbor Freight item #63613. ($30) But while the manual hinted at a data output port, there’s no further information about it.

I started looking further and further up the food chain and, while I could find indicators with digital output, they have the similar problem of either a poorly documented or proprietary undisclosed format. Eventually I passed the $100 mark and I started getting discouraged. I was not willing to spend that kind of money on an instrument made by a company I have not known for quality precision.

And that’s when a brand I have known for quality precision popped up in my search: Mitutoyo. I know that name well from my machining course and other precision contexts, but they have all been very expensive at several hundred dollars and up. I didn’t know they made a low-end model (with corresponding lower precision) available at around $150. Certainly many times more than the Harbor Freight item, but it is a name I trust to be precise, and popular enough that details of their data port (called SPC or Statistical Process Control port) would be documented somewhere.

For extra reassurance I decided to pay a little extra to buy from known vendor McMaster-Carr, and when it arrived I got my first surprise: the data port interface instructions were in the box! This was a great good start to a successful project connecting Mitutoyo SPC data port.