Skip to content
EAD Fritz edited this page Feb 27, 2015 · 4 revisions

Cheap Chinese digital caliper

serial protocol

It sends a package of 24 bits every 126ms. LSB first on rising edge of the clock.

  • Bit -1=high indicate inches.
  • Bit -3=high indicates negative values.
  • Bit -4 to -24 is an unsigned int (lsb first) 100*(measured value in mm) or 2000*inch measurment.

I'm counting bits relative to the end of the block. Like this: bit -1 = last sent (msb), bit -24 = oldest (lsb)

To extract the data i use this method:

int32_t result = bitseq_sliceBits(-1,-24,false);

This method slices out the bits and put them in an int, and since i sliced in reverse the int is now in the correct order (bit 0 == lsb)

Circuit

The caliper runs at about 1.5V so some cuircutry is needed to read the data.

You can power the caliper with two diodes and a 400:ish ohm resistor. Try to find diodes that has a combined voltage drop of about 1.5volt.

A description on how to build an inverting amplifier can be found at this blog. This signal can be used by the code if you just flip a boolean indicating negative logic. Or you can connect the signal to a inverting schmitt trigger inverter (SN74HC14N or similar) and you'll get a non-inverted clean signal.

A TXB0108 Bidirectional Voltage-Level Translator works too.

Clone this wiki locally