NOTES on UNI-T UT81 ScopeMeter - building an RS-232 cable
---------------------------------------------------------
This information has been obtained unofficially from observation of the
characteristics of a UT81B unit, and has not been endorsed or validated
by UNI-Trend in any way. It is presented "as is" and with absolutely no
guarantee that it is correct, or that use of it will not damage your
device. Make use of it entirely at your own risk.


This note describes how to construct a cable which will communicate with
the UT81 via a standard RS-232 serial port (The meter comes with a USB
cable which contains an FTDI USB to serial adapter).

When looking at back of unit, there is a "slot" at the top with two round
"windows" in it - this is the IR interface slot. The leftmost window is
the IR LED from which the meter transmits serial data. The rightmost window
is the IR receiver from which the meter receives serial data.

Physical encoding is very simple, absense of IR represents a MARK
condition, presense of IR represents a SPACE condition - IR is "DC"
there is no carrier.

The first step is to build a small plastic board which will fit into the
interface slot, and position an IR DETECTOR over the leftmost window, and
an IR LED over the rightmost window.

               +------------------------+  ^
               |                        |  |
               |                        |  |
               |                        |  Approx 0.8 " (not critical)
               |   /\              /\   |  |
               |   \/              \/   |  |
               +------------------------+  v

               <----- Approx 1.2 " ----->

The easiest way to get the size of the required board and the positioning
of the holes for the LEDs is to trace the slot portion of the included USB
cable onto a piece of paper, and carefully trace the holes "by feel".

Once you have the board cut out, simply glue the detector and LED into
place on it (It may be easier to solder to wires and glue the wires in
place. I used small right-angle devices taken from the optical encoder
of an old computer mouse. RS232.JPG shows photos of my cable ends.

At the other end of the cable, you need a DB-9 female connector for the
serial port. You will also need a length of fine 4-conductor wire to
complete the cable (I used a piece of flexible 4-conductor "flat" wire
normally used to connect telephone sets).

Wire the cable as follows:

                             //
      TXD (3) ---/\/\/\/-----[|<]----|<---- (5) GND
                 1kohm     IRled   Diode

      RXD (2) ---/\/\/\/--+--[>|]---->|---- (4) DTR
                  220ohm  | IRdet   Diode
                          |
      RTS (7) ---/\/\/\/\-+
                 33kohm

The purpose of the IRled and IRdetector are obvious.

The Diodes serve to prevent reverse bias of the IRled/IRdet in the event
that the RS-232 signals are mismanaged.

The 1k resistor is a current limiter for the IRled.

The 220ohm resistor serves to limit the current in case the device is
connected to a DCE (which drives RXD).

The 33k resistor serves to improve the "off" waveform of the RXD signal,
and to provide some swing past zero for RS-232 specs (My cable did not
work reliably without it).

This cable does not conform to EIA RS-232 specs, and may not work on some
ports. It will also be dependant on the characteristics of the IRled and
IRdetector that you use, so you may have to experiement with resistor
values... So far mine has worked very well.

NOTE: This cable RELIES on DTR being asserted (+12v) and RTS being de-
      asserted (-12v) by the controlling software. Make sure you set these
      conditions in any software you write to communicate with the meter.


Dunfield Development Services (DDS) offers software and firmware
development services specializing in systems and embedded applications.
For more information, visit: http://www.dunfield.com

