DIY optical link cable for the Fluke Scopemeter 190 series

> Update 10/2004: I wrote a new Win95..XP/2k3 tool named ScopeGrab32. It is GNU GPL and includes all C++ source code. Features: download screenshots to the clipboard or to BMP or PS files. Provides a simple serial console, too.
> Background info:
> This is an easy-to-build DIY Scopemeter 190 series link cable, intended as an alternative to the "real" PM9080 adapter kit which costs between $150 and $200, and the $150 "real" OC4USB if you lack a serial port and buy any cheap ($30?) USB-RS232 converter, or use tge CP2102 based USB<->IR converter further below. The RS232 circuit can be built for around $15 in about an hour (incl all double- and triple-checking :o). The circuit is a slightly modified and improved(?) version of Robert Lacoste's circuit, which you can find on his ScopeMeter Link page.

> Here's a bit of crucial information, copied directly from the FlukeView 4.0 software PDF manual (which is not available at www.fluke.com anymore, I just wonder why... ;-) :

> > optical port: infrared 800nm
> > signal levels: (RXD, TXD, optical):
> > lSPACE (0) = (U_rs232 > 4V) = light
> > MARK (1) = (U_rs232 < -4V) = no light
> > port settings: 1200 baud, Xon/Xoff software handshake

> Additional notes:
> - optical port on the SM196: the upper hole contains the IR transmitter, and the lower the IR receiver, and one could assume all 190(C) and 90 series have this arrangement
> - optical port on the SM123: I was pointed out (thanks to Leif K.) that on the 123 the upper is receive and lower is transmit, i.e. reverse of arrangement of the 190 series
> - while the user manual states 800nm IR, in practice anything from 700..880nm (for rx&tx) should work just fine, as these things aren't exactly monochromatic like lasers...
> - if you use a really crappy USB<=>RS-232 converter that doesn't give out valid +/- RS232 signal levels or want to use a microcontroller with UART instead of a PC, you may need to change LM393 '-12V' pin 4 and the '-12V' end of R4 connections to 'GND', and may leave out D2 and D4 (though I have not yet tested if the circuit then will still work on such a dongle/converter)
> - FlukeView offers 1200 to 56kBaud, but at least ScopeMeter 196 supports only 1200 and 19200
> - some of the 'odd' DB9 pin interconnects in the schematic are what FlukeView needs in order to detect a 'PM9080'
> - 08/2006: an USB version of the cable is even simpler to build and requires less components. It uses Silabs' cheap CP2102 chip, the only problem is that this chip is tricky to solder (no leads)! Pre-made USB<->IR boards might be available for sale at some point... The circuit requires: female USB connector, 2 resistors, IR components, one or two 100nF capacitors. Download board PCB layout and schematics for Cadsoft Eagle. Single side board. CP2102 drivers are available via Windows Update (XP detects automatically). A Silabs module is already included in the linux kernel source, too. Spark Fun Electronics has (had?) some CP2102 breakout boards if soldering the CP2102 is too challenging.
> As a reference, here are typical (?) signal states of the serial port, as a few people have already inquired about this. I measured on a laptop, without the link cable connected. Signals were measured before FlukeView was executed, and during connection attempts:

> initial state (may vary in your case) |  | FlukeView connecting
> pin 1 | 0V |  | pin 1 | 0V
> pin 2 | 0V |  | pin 2 | 0V
> pin 3 | +6.5V |  | pin 3 | -5V, with short +6.5/-5V bursts during TX
> pin 4 | +6.5V |  | pin 4 | +6.5V, with short -5V pulses
> pin 5 | 0V |  | pin 5 | 0V
> pin 6 | 0V |  | pin 6 | 0V
> pin 7 | -5V |  | pin 7 | +6.5V
> pin 8 | 0V |  | pin 8 | 0V
> pin 9 | 0V |  | pin 9 | 0V

> Parts:

> X1 | female DB-9 connector
> D1,2,3,4 | 1N4148
> C1,2 | ≥100uF 16V electrolytic or tantal
> LED1 | 3mm IR LED
> PT1 or PD1 | 3mm IR photodiode in reverse, or IR phototransistor (collector at +12v) e.g. BPW42: short lead or biggest chunk inside = collector = +12V
> IC1a | LM393 analog comparator
> R1 | 270ohm 1/4W
> R2 | 10kOhm 1/4W (pull-up, only needed for open-collector comparators i.e. the LM393)
> R3 | 5.6kOhm 1/4W
> R4 | ≥47kOhm trimmer/pot

> Circuit description:
> The circuit works without batteries or any external supply, and you MUST NOT connect either to the circuit while it is plugged into the PC serial port. Doing so could damage the port.
> The circuit derives its '+12V' and '-12V' rails from the PC serial port. The actual rail voltages will vary, depending on the particular PC, laptop, or USB dongle used.
> The rails are set up via D1, D2, D4, and C1, C2. Wire all +12V lines together. The same applies to -12V, and GND (but obviously, don't interconnect +12V and -12V and GND...). The comparator chip supply pins must be connected as well, to +12V (=comparator +Vcc/Vdd) and -12V (=comparator gnd/Vee/Vss). For the LM393, you connect pin 8 to +12V and pin 4 to -12V.
> The connector & supply rails and RS-232 <=> optical sections can be soldered on the same vero board. A 4-wire data cable (GND, IR diode in, IR detector in & out) is ok for connecting the optical connector section to the circuit.

> Potentiometer R4 is adjusted for the best output signal from the LM393 (output = pin 1). Use a TV remote control pointed at the receiver, and your ScopeMeter to scope the LM393 output signal while the circuit is plugged into the PC serial port and scopegrab32 is running and powers the circuit. If you suspect the IR detector (diode, transistor) doesn't work, scope voltage waveform accross R3. You should see a >2Vpp square wave with high DC offset.
> All diodes are 1N4148 fast small-signal diodes. D1, D2, D4 set up the rails. D3 protects the IR LED, as they often won't tolerate >5V of reverse voltage.
> The cheap LM393 comparator could probably be replaced by LM193/LM293, a cheap TL072 or TL082 op-amp, or some other comparator. Depending on the chip, the circuit will work down to +5V<=>-5V rails, as typical for e.g. laptop PCs (where the LM393 will work). If you use a part other than the LM393, be sure to check the datasheet first, and confirm that the comparator is rated to work with +-15V i.e. 30V rails without getting damaged!
> The IR LED is a garden variety IR diode, as found in all TV remote controls etc. As an IR detector you can use either an IR photodiode plugged in in "reverse" i.e. reverse biased, or an IR phototransistor. The phototransistor must be connected correctly or it will eventually fry: the collector is usually the short lead and needs to go to '+12V'. A phototransistor has higher gain than the diode, which means the detected signal is cleaner. Nevertheless a photodiode will work just equally well. The choice depends on which happens to be cheaper or best available... :o)
> Use 3.5mm diameter optical components. You would have to grind down 5mm components to make them fit inside the Fluke connector. (Using a piece of sanding paper this is possible, but tedious. Tried it. :)
> The alignment of the optical board (IR detector and diode) inside the Scopemeter connector is critical. Diode and detector should be close to the mirror which is found inside the Fluke. They should be sticking straight in into the connector holes, without being tilted at an angle.
> Here's a pic of the finished board:
> [my version]
> [J. Friedrich]
> [Leif K.'s SMD version]

> Here's a very simple test program written in VisualBasic: executable FlukeConn.exe (24kb), mscomm.ocx ActiveX control (102kb), source code fluke-conn.zip (52 kb). The standard Windows HyperTerminal might work too.
> You can use the program to send a command to the scopemeter and then see if anything happens. Commands are, for example, RI (reset instrument), GD (get down = power off), SO (switch on). Fluke has released a complete list of commands - you can find these in the Remote Control and Programming Reference (PDF, 142kb). New: There's also a keypress simulation command (only for the 190 series). This is a command not documented in the above reference. The command is used to simulate keypresses. This can be useful for e.g. setting up one or more scopemeters to identical hardware configs.
> Here are some screen transfers made with the FlukeView demo software. Just to prove that the adapter works in FlukeView too!

> Links:
> ScopeGrab - Fluke ScopeMeter Screen Capture, a good screen capture tool for unix/linux to replace the excessively expensive FlukeView package. GPL'ed source code.
> ScopeGrab32 a GNU GPL Windows (95/98/ME/2k/XP/FX) tool for downloading screenshots to the clipboard or to a graphics file. Includes a very simplistic terminal. Currently 190(C) series are supported, and there's alpha 'support' for all other series.
> Also see the Remote Control and Programming Reference (PDF, 142kb) which contains REALLY A LOT of QBasic programs i.e. their source code, for screen shots and parameter queries, and more (http://www.filesearch.ru , qbasic.zip ;-)
> Here's also info on the keypress simulation command.

(C) 2003 Jan Wagner - jwagner[át]cc.hut.fi