Getting Serial Data Out Of An Old Spectrophotometer

[Jure Spiler] came into possession of an old spectrophotometer, which measures the absorbance and transmittance of light in a sample. Getting data out of the device was difficult, particularly as the model in question was an educational version missing some functionality. However, perseverance got the old machine talking happily to a PC.

After an earlier experiment with sniffing the signals being sent to the LCD, [Jure] did some more research. It turned out that a special expensive cable could hook up to the device’s parallel port and deliver serial data, for the low price of € 356 Euros. Now knowing a serial output was present, [Jure] was able to find the data stream desired.

Hooking up a logic analyzer to the “parallel port” on the machine revealed that the device would actually send serial data out over certain pins on the port. The trick that made it harder was that it was in Inverted RS232 form. Thus, all it took was a simple TTL inverter hooked up to a USB-TTL adapter to get the device talking to a modern PC.

With that achieved, [Jure] was able to whip up a simple VB6 program to collect data from the spectrometer and put it in a CSV file for further analysis. There’s even a program to graph the data right off the bat, making the scientific instrument easier and quicker to use than ever!

Oftentimes, old scientific hardware like this isn’t especially difficult to hack. It’s usually just hard enough to make busy scientists stump up the cash for the fancy adapters and cable, while being no match for the dedicated hacker!

15 thoughts on “Getting Serial Data Out Of An Old Spectrophotometer

  1. Visual Basic 6! Wow, I’m not knocking the use of it, I used it nearly 30 years ago myself, but there’s zero reason why this couldn’t be done in Visual Studio Community edition today, for free, even if you think forcing it down the. NET path is a bad thing. Yes, serial connectivity is still there.

    He’ll even in ultra modern C# it’s still doable.

      1. There arw a few more that come to mind.

        A typical VB6 application needs no installation most of the time.

        At its core, MSVBVM60.DLL is all it needs.

        That DLL is part of every Windows installation from Windows 98SE up to Windows 11.

        It will run on any PC with Windows 95 onwards with a 386SX or higher CPU.

        Plus, the produced executable is tiny by today’s standard.
        No matter if it was compiled with P-Code or not.

        VB applications also use GDI by default, which can be accelerated on most old 2D graphics cards from the mid-90s.
        Windows 7 re-introduced GDI acceleration again.

        1. >> A typical VB6 application needs no installation most of the time.
          also
          >>That DLL is part of every Windows installation from Windows 98SE up to Windows 11.

          I didn’t know that. Are there any C-based languages who have the same feat?

          1. MS’s own C (and maybe MFC?) is the same era as VB5/6, which includes usually relies on MSVCRT.DLL and that comes with many flavours of Windows as well. However with MSVC you can stick to pure WinAPI and not require the runtime – making true standalone apps.

    1. “but there’s zero reason why [..]”

      VB Classic has an user friendly syntax, for example.
      Similar to Quick Basic, GW-BASIC etc.

      It has a long tradition among people that thinker with hardware, do low-level bit-banging stuff.

      For example, to read the value of an analogue temperature sensor (NTC, maybe PTC too) directly attached to game port (on a soundcard).

      Modern additions like PORT.DLL make it easy to read/toggle RS232 pins etc.
      Download site: http://www.b-kainka.de/schnfaq.htm

      IMHO: VB.NET never is, never was a substitute for VB6.
      It’s a completely different language.
      It lacks all the features that attracted VB Classic programmers.

      By ~2000, VB had a huge user base of various groups of people and all ages. It was very popular.
      Then VB.NET came along and everything ended.
      That’s why many petitions were made to update VB6.
      Unfortunately, Microsoft never cared.

      Someone in the web once drew the comparison that VB6 programmers were like bus drivers, and C++/.NET people were like fighter jet pilots.
      The VB6 programmers were just happy to get their jobs well done and come home to their families at the end of the day.

      Heck, there’s no longer an conversion tool included. How poor!
      VB2005 and VB2008 did at least contain a VB5/6 to VB.NET converter that did automatically translate simple forms and such.

  2. It’s also frowned on by management to hack hundreds of thousands of dollars worth of equipment with the risk of a sljp wrecking it when the cable “only” costs a piffling $365.

    Me, I’d have been in there with a ‘scope and LA as soon as I could have been sure management wasn’t watching if I’d had an idea the serial data could be useful.

  3. I doubt the connector being referenced corresponds to a parallel port. Before the popularization of the DE-9 connector by PCs, the serial ports used DB-25 connectors. Heck, I even used a cable with two of thise connector to connect a MicroVax computer to one of the first HP Laser Jet Printers (at 9600 bps) in 1989. The first external serial modems I used (2400 bps) only had that type of connector as did computer terminals such as the DEC VT100. It was pretty straightforward to make DE-9 to DB-25 cables (in either of the two types, DTE-DCE or DTE-DTE) with just a few dollars and a soldering iron.

    1. Same here, I modified an HP LaserJet 500 with a tiny toggle switch wired across one of the DIP switches and mounted through a vent slot. The toggle allowed switching between serial and parallel interfaces, with the parallel going to the tech writer’s PC and the serial to the VAX via a DECserver terminal server. Prior to that I hooked up a Texas Instruments printing terminal as a printer to a VAX. I forget the model number of the terminal (860 or similar?) but as I recall it used a single DB-25 connector for both RS-232 serial and parallel communications, it all depended on which pins you wired up.

      1. “as I recall it used a single DB-25 connector for both RS-232 serial and parallel communications, it all depended on which pins you wired up.”

        That reminds me of the AEA PK-232 TNC from 1986.
        It also has both serial and parallel pins on the same DB-25 connector. That’s what most amateurs don’t realize, I’m afraid, if they attach a standard serial cable. Even the PK-232 manual warns about that special wiring (has schematic). The individual (and optional), ground connections for the serial port were re-purposed for carrying D0-D7 signals of a basic Centronics port (except one common ground, of course). That’s intended for a simple printer connection: The FAX mode used for receiving weather fax etc. can use a parallel printer for drawing weather charts. Alternatively, the FAX data can be outputted in serial form, too. But that needs a special software (PK-FAX, MacRatt) etc. And a computer.

Leave a Reply to JoshuaCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.