Micrometer and Force: a time-stamped interface

For a special application that I can’t name here, we need to measure both deflection (length) with about 0.01 mm resolution, and force in the range of 200 N (=20 kg). The force measurement is needed with a few 10s of Hz of temporal resolution, for deflection ~10 Hz will be sufficient.

All this needs to be accomplished at a budget, so I decided to use a China load cell (20 kg range), with an HX711 converter board, and a digital micrometer dial (13 mm range, 0.01 mm resolution).

First, to the HX711. As per the datasheet, it can be run from an external clock source, not sure if this is necessary, but thought I give it a try. Spec range for the clock is up to 20 MHz (normally running at about 11 MHz), but the HX711 works well to 70 MHz and above. You don’t need to couple a lot of power, even at -10 dBm, it is still working. Anyway, by setting the clock control pin to HI, the HX711 will provide a data rate of 80 Hz. As with all analog-digital converters, there will be a trade-off for frequency vs. noise-free resolution, but for the application discussed here, even 10 bit would be enough, to serve the purpose.

For the digital dial – unfortunately, the industry (the Chinese digital caliper and dial industry) has not yet come to a decision to use a commonly available connector to get the signal for a digital caliper or dial into a cable. At least, they offer various types of data protocols, and with not too much sense detective work, you can figure out how to interpret the data. I user a Micro-USB connector, carefully soldered to the data output pads of the micrometer dial.

Some small wires were used to connect the USB connector to the board, to allow for some movement, and to ensure longevity even in an environment that has vibration, and people connecting the USB cable with not much care.
The dial is running on 1.5 V (a single button cell), so we need a small converter board, using half of a MC3302P quad comparator, to convert the 1.5 V logic to good old 5 V TTL logic. You can use any type of comparator of logic conversion circuit, even a single transistor may work. Anyway, I didn’t want to load the dial any more than necessary, and to improve noise immunity, added a 20 MHz low-pass (330 Ohm with 22 pF) to the input.

Here the rising edges, logic conversion board input (blue), vs. output (yellow). For the faster traces, the internal pull-up resistors of the ATMega8 were enabled. Not much effect anyway.

All the data are collected by a ATMEGA8-16PU, and sent to a host PC via a 115.2k RS232 link. This allows even wireless connections, with a serial-to-RS232 converter. Data are send in one direction only, from the ATMEGA8 to the PC. All measurements have a 16 bit time stamp, using the ATMEGA8 16 bit timer.

The 8 bit timer of the ATMEGA8 is used to capture the data from the micrometer, which uses a synchronous clock to transmit data – the risking edge of the clock will trigger an interrupt, INT0, and the timer will ensure that each data Frame is received properly (the timer will overflow after each received data package, to signal that the next clock edge will be the start of a new data package).

The dial transmission pattern: one data block is send every ~100 ms.

Some detail of the timing, for the current dial indicator interface, data are valid at the rising edge of the clock.

For the last bit, there is no falling edge of the clock.

For “0” logic state, the dial interface pulls down the data line for each clock pulse, and then releases it again for high. Not sure why that is, maybe it saves some battery power?

The data is transmitted as binary number, 24 bit, 0.01 mm or 0.005″ per count. The last 4 bits are uses for status and indicate a “-” display, and mm vs. inch.

That’s the full pattern of a transmission sequence from the HX711. Blue is data, yellow is clock.

Timing – data line changes states quickly after the rising edge of the clock signal.

This is the final data stream as received. Notice the time-stamped load cell and dial transmissions.

For those interested, here is the MCU code (AVG-GCC): loadc_d0.c

Jansjö Reading Light Conversion: running on 12 V, and never running out of light again, even in remote places!

How any would it be to have nice reading light at the garden house (or in the car), especially, a light without any smoke and hazard and hazzle like candle light! A light that keeps your eyes healthy. Well, at home, you can just use an IKEA Jansjö light for this purpose, which has a single 3 W LED installed.

All that is needed is a 12 V constant current board, LED driver. These are really cheap, so there is no need to build one yourself, you can just get it shipped from China directly, for a very reasonable price.

This board has a few nice components: 5 SS14 diodes (Schottky), 4 are used a bridge rectifier, 1 is used for the buck converter. There is a 47 Microhenry inductor, a 220 Mikrofarad (25 V) capacitor – and, the magic switch and regulator, a PT4115 device.

The PT4115 features a pretty straightforward design. It’s a step-down converter, can can drive over 1 Amp of current. The board I am using has a 0.22 Ohms current sense resistor, i.e., it is set to 0.1 V/0.22 Ohms = 0.46 A of current. This is plenty to drive the IKEA lamp.

The lamp itself will remain completely unmodified, just using a socket to connect to the original plug (which used to plug into a mains-powered LED driver of similar current rating). The connection to the 12 V system of the garden house is done via a “cigarette lighter” plug.

To protect the driver board, all sealed up in hot glue! It’s not perfect, but it works!

Finally, not much more to say, it works just fine!

SME Tonearm Series V: a really THIN wire!

A rare guest in my workshop, a high class “SME Series V” tonearm, a great item for the audiophile! Unfortunately, the arm we are dealing with is not working – easily traces the issue to a broken wire. Wait – with the tone arms, you can’t just pull out the old wire and put in some odd wire – it needs to be 0.0127 mm2 seven-strand silver wire!

sme tonarm 1

sme wire

After some careful disassembly action, one of the wires was found broken at the needle end, easy enough, soldered it back on, followed by even more gentle and careful re-assembly of the unit.

tonarm wiring

All in all, nothing too difficult, but not an everydays’ task, and it made a friend of mine, the proud owner, happy again!