CAD CAM EDM DRO - Yahoo Group Archive

Hacking Cheap Digital calipers...

Posted by Lee Studley
on 2000-12-12 22:48:15 UTC
For those interested sorry this took so long,


Well, I figured out the serial format of cheap digital caliper I got
on Ebay. Hopefully this will be a start to people wanting to make
DRO's from this type of caliper and maybe the format is a common one
(ie like Digimatic)

It has and SPI interface with clock and data. The data "burst" has 2
sections of 24bits data equaling 48 bits per packet. The first 24bits
are shifted out on the rising edge and qualified on the falling edge
by the reading device. Bit timing was approx. 13uS clock cycle
yielding about 6.5us to detect the falling
edge and sample the data.

Section1:
Bits are lsb first of a 24bit record. The 1st section of 24bits is a
'relative' 24bit count subtracted from 0xFFFFFF with scaling relation
of 5000h(20480decimal) counts per inch.

Section2:
The second section of 24 bits is also shifted out lsb first. This
24bit record is an 'absolute' binary count with a constant error
offset, for example, when the caliper is fully closed (0.000) the
count was 007FD3h(32723 decimal). By subtracting this value
from the record then dividing by 5000h(20480decimal) you get
the 'inch' readout.

The mode buttons had no apparent affect on the data records sent out,
other than freezing the 'relative' section, so the micro in the
caliper must do a conversion by scaling for displaying the metric
value.

I wrote some quick and dirty Pic code to log data in hex format using
Hyperterm. I cheated and used an emulator.
I targeted a 16C558 running at 10Mhz, but may convert it to a 8pin
part. I used 1/2 of an LM339 quad comaparator(cheap) to level shift
the 1.5v logic to 5v for processing.

Let me know what you think...

-Lee

Discussion Thread

Lee Studley 2000-12-12 22:48:15 UTC Hacking Cheap Digital calipers... Lee Studley 2000-12-12 22:52:25 UTC Re: Hacking Cheap Digital calipers... diazden 2000-12-13 15:21:23 UTC Re: [CAD_CAM_EDM_DRO] Re: Hacking Cheap Digital calipers... Lee Studley 2000-12-13 15:54:06 UTC Re: Hacking Cheap Digital calipers... diazden 2000-12-14 06:02:55 UTC Re: [CAD_CAM_EDM_DRO] Re: Hacking Cheap Digital calipers... Lee Studley 2000-12-14 10:17:02 UTC Re: Hacking Cheap Digital calipers...