This project shows you how to connect inexpensive calipers, micrometers and height gauges to PC through serial RS-232 interface and see the result using PC software. Its main part consists of minimal PIC to RS-232 interface, +5V/-1.5V power from serial port, and 1.5V to 5V logic level conversion. “The connector on the measuring instrument will have 4 pins, and the owner’s manual will typically describe the output as 24 bit 90 kHz synchronous,” said Kevin Timmerman, project designer.
The caliper sends a burst of data approximately three times each second. Each burst contains 48 bits of data. The first 24 bits are the position relative to the zero point set on the caliper. The second 24 bits are the position relative to an arbitrary zero that does not change. This is sort of an absolute position, but the zero point changes each time the caliper loses power. Each 24 bit value is in ones compliment form (1 sign bit, 23 data bits). This allows for a 0 and a -0. The unit of measure is 1/20480th of an inch.
The PIC microcontroller firmware has a synchronous receiver that handles the burst of data from the caliper. In binary mode the 48 bits are sent to the computer literally. For inches or mm mode the first 24 bits are scaled to real units. The raw value is multiplied by 125/256 for inches or by 127/1024 for mm. The result is then converted to BCD, then converted to ASCII and sent to the host computer. Sign and decimal are handled within the BCD to ASCII conversion routine. The asynchronous transmitter is implemented in the firmware like the synchronous receiver. This project does not work the name brand instruments – Fowler, Mitutoyo, Brown & Sharpe, etc. Download : Schematic & Firmware, PC Software