Jure Spiler's Vintage Spectrophotometer Gets a PC Interface — By Sniffing Its Display Signals
A cheap spectrophotometer came with the cost of a locked-down interface, but that wasn't going to stop Spiler.
Having picked a spectrophotometer up at an electronics flea market, Jure Spiler was faced with the task of getting useful data out of the device — a project that took a somewhat unusual direction, with efforts to sniff its communication with the on-board display.
"For simple measurement you enter the wavelength and read the result on LCD display," Spiler explains. "For absorbance/transmittance spectrum you set wavelength range and let the machine change the wavelengths and display results. Of course, I would like to have spectrum saved as XLS/CSV file and displayed as a graph on the computer screen."
You might think that pulling said data out of the device would be as easy as hooking up a USB cable, or — given that the Ultrospec 1000E Spiler bought is now 25 years old — a serial cable. Sadly, no such luck: A Centronics port to the rear would theoretically connect to a parallel printer for hard-copy output, but was disabled in the unit Spiler picked up — a restriction, he explains, added to units originally sold into the education market. Two pins doubled as analog outputs, but these offered only a varying voltage for absorbance — no information on wavelength.
"As there is no computer interface, I decided to sniff the LCD connection," Spiler writes. "[The] LCD display has standard 20-pin connector. I made a simple splitter to connect [a] 16-bit logic analyzer (Kingst and Saleae) to pins 4-16 (13 wires + ground) and observed the signals."
Data captured through the logic analyzer showed promise, but corresponded to no protocol known to the software. As a result, Spiler set about reverse-engineering the protocol and writing a decoder in Visual Basic. That was enough to recreate the image, a 128×64 two-dimensional array, which was then fed into a custom-written character recognition program capable of extracting the numerical digits.
"[The] presented approach works 'semi manually' reading LCD signals thru [the] Logic Analyzer with KingstVIS software, exporting timing data to CSV file and process[ing] it via [my] own analyzer routine," Spiler writes — followed by the note that attempts to make an Arduino-based hardware dongle failed owing to performance issues.
Finally, there came good news: the discovery of a custom Centronics adapter, which revealed non-standard serial communications, even on the "printing disabled" education model. Details of his work decoding this are to follow in a future post, Spiler has promised.
Spiler's full write-up is available on his website.