Trinket EDC Contest: USB Calipers

[Lou]’s entry for the Trinket EDC Contest is a great addition to the ubiquitous digital calipers found on workbenches and eBay resellers the world over. It translates the value displayed on the calipers to a USB HID interface for logging all those tricky measurements at the push of a button.

Most of the digital calipers you’ll find at Harbor Freight or on eBay are pretty much the same. There are two pads on the caliper’s PCB that give any microcontroller the ability to read what is being measured. It’s done with a 24-bit encoding scheme, where each bit is a nearly-BCD measurement in units of 1/1000 of an inch or 1/100 of a millimeter. After decoding the value, [Lou]’s trinket sends a few numbers to a computer over a USB HID interface.

Simply sending a measurement to a computer over USB wasn’t enough for [Lou]. He added three buttons to the project for typing multiple characters. The first button just sends Enter to the computer, the second sends a comma, and the third sends “/2 (Enter)”, exactly what you need to input the radius of something when measuring the diameter.

This was a project for the Trinket EDC Contest that ended a few hours ago. Nobody knows who the winner is, but there are some pretty cool prizes up for grabs including the new Rigol scope, a Fluke 179, and a soldering station.

Reverse engineering salvaged part footprints

reverse-engineering-component-footprints

So you just pulled a fancy component off of a board from some broken electronics and you want to use it in your own project. What if the data sheet you found for it doesn’t include measurements for the footprint? Sure, you could pull out your digital calipers, but look at the measurements in the image above. How the heck are you supposed to accurately measure that? [Steve] found an easy answer for this problem. He uses microscope software to process an image of the board.

One common task when working with a microscope is measuring the items which are being viewed under magnification. [Steve] harnessed the power of a piece of free software called MiCam. One of its features is the ability to select an area of the photograph so serve as the measuring stick. To get the labels seen in the image above he selected the left and right edges of the board as the legend. He used his digital calipers to get a precise measurement of this area, then let the software automatically calculate the rest of the distances which he selected with his cursor.

MiCam is written for Windows machines. If you know of Linux or OSX alternatives please let us know in the comments.

Reading a digital caliper with a microcontroller

[Maris] wanted a way to read measurements from a digital caliper electronically. He ended up using the TI Launchpad to accomplish this, but not all of the necessary hardware is seen above. The calipers cost him about $7 on eBay, and they have four interface pins which made this hack quite a bit easier. After a bit of probing he established their purpose; voltage, ground, clock and data. A bit of scoping proved that data was being sent in 24-bit burst in packets that are quite easy to decode.

From there it’s just a matter of interfacing with a microcontroller. The chip he’s using is an MSP430G2231 that runs at 3.3V, but the caliper’s logic high is only 1.5v. By constructing an adapter using a pair of transistors, the data and clock from the calipers are able to pull pins on the MSP430 low. This is collected and analyzed by [Maris’] firmware and can be read on a PC using a terminal program.

[Thanks Chris]