This is an electronic digital caliper to computer (RS-232) interface. This will work with the inexpensive calipers, micrometers and height gauges that are typically made in China. 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. This does not work the name brand instruments - Fowler, Mitutoyo, Brown & Sharpe, etc.
The code contains examples of:
The circuit contains examples of:
The caliper sends a burst of data approximately three times each second. Each burst contains 48 bits of data as shown in timing.pdf. 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 caliper is normally powered by a small 1.55 volt battery. The positive of the battery is connected to the metal parts of the caliper making it positive ground. The logic levels are -1.55 volts low and 0 volts high. The clock and data signals from the caliper are AC coupled by C1 and C2. The AC coupling effectively moves the logic levels above ground so they can be easily converted to standard CMOS logic levels (0 and +5 volts). Three gates of IC1 are used as a 3.3x linear amplifier. The amplifier is driven to saturation by the low logic levels from the caliper. The data and clock signals are then sent to the 12C509 microcontroller.
The 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.
While idle the interface checks for data from both the host computer and the caliper. The first one to initiate communication gets the full attention of the interface. The host computer should send a 10ms break to get the attention of the interface. A '?' will be send to the host when the interface has seen the break and entered command mode. The most common commands issued are 'I' for inches, 'M' for mm, or 'B' for binary. The initial mode is set by jumper block JB1 pins 1,2,3 and 4. The interface will remain in command mode until an 'E' is sent to return to normal operation.
Power for the interface and optionally the caliper is supplied by the host computers' RS-232 port. The RTS and DTR line supply power through D1 and D2 to voltage regulator IC3. The regulated 5 volts from IC3 is supplied to the 12C509 microcontroller (IC2) and the 4049 hex inverter (IC1). D3 is normally not used. Power for the caliper is supplied from the host computers TxD line. Since this line changes state while in command mode, C5 stores enough energy to power the caliper during those times. Diode D4 prevents the C5 for being discharged. A simple shunt regulator consisting of silicon diodes D5 to D7 and resistor R8 regulates the voltage to approximately -2.0 V. Diode D8 ensures that current from the battery will not flow in to the shunt regulator and also drops the voltage to approximately -1.5V. A battery should not be installed in the caliper if it is being powered by the interface. Jumper block JB1 pins 5 and 6 determine if power is supplied from the interface to the caliper.
Download schematic, PCB and code files
Software - currently incomplete - COM1 only
Revision 2 PCB
Revision 2 PCB
Revision 1 PCB
Single sided - 2 jumpers on back
Connector soldered to caliper PCB - 2.0mm Hirose DF-3 series SMT right angle - DigiKey H2129-ND
Connector mounted inside caliper housing. This requires disassembly of the caliper and some work with a Dremel tool.
Questions? Comments? Email me -
3 Axis DRO by ShumaTech
GPS Display Utility