Using Eagle, the PCB I designed is a caliper data interface. This board works with several models of inexpensive Chinese calipers and tire depth gauges.
The board allows for either a TTL serial and/or an I2C interface. Through either interface you can perform several functions, such as zeroing the caliper, turning it on/off, getting the current reading, or receive notification only when a change occurs.
The connection to the caliper is made via the calipers data port. Ive designed a 3D printed connector for this purpose with detailed instructions below on how to make one.
How it works:
The boards vcc can be anywhere from 3 to 5 volts (although Ive only tested it at 5V.)
The caliper data port has data and clock signals. These signals are at 1.5V and need to be level shifted to the mcus vcc. To do that I use a TLC3702 comparator chip. The comparator threshold for both signals is set to half the caliper voltage or 0.75 volts by way of a resistor voltage divider of the 1.5 volts output by the boards AMS1117-1.5 LDO voltage regulator chip. The comparators vcc is set to the mcus vcc, so when the caliper signal value is at or above 0.75 the comparator shifts this to vcc, and when the caliper signal is below 0.75 the comparator shifts this to 0 volts.
Note that there are lots of ways to level shift signals. I chose the TLC3702 because it requires very few additional parts (just 2 resistors.)
As long as the caliper has power applied to it, it will periodically send a packet of data representing the current value being displayed on the caliper. The mcu reads one packet bit whenever the clock pin goes from high to low (vcc to 0V.) Each packet is composed of 24 bits. See CaliperUtils.cpp within the attached for the routine that unpacks the packet.
The board is software configurable to output only when the value changes in the case of TTL serial, and for I2C an interrupt line goes high whenever the value changes and stays high till the host reads the current value. For either type of connection to the host, the host can read the current value whenever it needs to.
To zero the caliper the board simply turns it off and on via a BSS138 N-channel MOSFET.
The only thing the board cant do is set the mm/inches units being displayed on the caliper. For that youd have to hack the caliper to simulate a button press on the units button. The default on power up is mm, so it shouldnt be much of an issue.
There arent a lot of parts. This could easily be built on a breadboard. All of the chips except for the voltage regulator and MOSFET, are available in DIP packages. You could substitute a 2N7000 MOSFET in a TO-92 package for the BSS138. The 1.5V regulator could be replaced by a AA battery. In fact all of the parts could be replaced with something else.
The Eagle files, software, and parts list are enclosed in the next step.”