The Uni-T UT60E is a true RMS digital multimeter available from Maplin (R.I.P.) and probably other places. It has an optically coupled RS-232 connection for data logging applications.
The UT60E appears to based on some variation of the FS9721_LP1 DMM chip from Fortune.
The Operating Manual has a sticker reading “N81CB IS SAME AS UT60E”, so perhaps N81CB is another name for the meter, or it may just be a Maplin reference.
The meter comes with a special cable with a normal 9-pin D connector on one end for plugging into a computer.
The manual says serial communications should be set up as 2400 7O1. This is wrong. It should be 2400 8N1. 7 bits isn't enough to hold sequence numbers above 7. (See Data Protocol below.)
For some reason, the presence of RTS on the serial line causes problems with data transmission, so this line should be cut, or monitoring software should make sure RTS is not asserted.
The data from the meter is a frame of 14 bytes sent about three or four times a second.
The high nibble of each byte is a sequence number from 0x1 to 0xe. All-zero and all-one high bits should not occur.
The low nibble of each byte carries the state of each segment on the LCD display. There is a bit for every segment of the digits, as well as the negative sign, decimal points and units symbols.
This table shows the bits used for most of the non-digit symbols:
|Frame Offset||Sequence Id||0x8||0x4||0x2||0x1|
|11||0xc||F||Ω (ohm)||Δ (relative)||Hold|
Each segment of each digit is encoded in a similar way. There is a bit position for every segment. This can be spelled out, but it is easier to just use a lookup table. An encoded byte for a digit is assembled by taking the two low nibbles of adjacent data bytes, and shifting the lower-offset nibble left 4 bits.
encoded = (frame << 4) | (frame & 0xf)
The four digits begin at offsets 1, 3, 5 and 7 (sequences 0x2, 0x4, 0x6 and 0x8) within the frame.
The negative sign is encoded in the high bit of the first digit, and the decimal points are encoded in the high bits of the other three digits.
|Encoded Byte (with 0x80 cleared)||Digit|
parse-ut60e.c is a unix program to parse and log data from a UT60E.
-f path specifies the input device or file. Input can be the attached meter, or it can be a file containing previously recorded binary data from a meter.
If the program input is a tty line, the line is configured for 2400 8N1 operation and RTS is cleared. (DTR is automatically asserted on open.)
Then input is read and scanned for legitimate frames. “Legitimate” simply means a sequence of 14 bytes containing the correct sequence numbers. There is no other error checking possible since the protocol has no provision for checksums.
Each frame is parsed and the results are printed on stdout. If
-t has been passed on the command line, each line will be prefixed with a timestamp derived from
If you are piping output to another process and you want output to be line buffered, use the
-u option. Without
-u, output is only line buffered if stdout is a tty.
Raw hex output from the meter is available with the
-d program option.
Output lines usually look like this:
[timestamp] value [prefix]unit [additional ...]
Values like 0L or 0.L indicate overrange.