Sigrok and Pulseview in Ubuntu 14.04 with UNI-T UT61E Digital Multimeter

A couple of months ago, I received a new digital multimeter UNI-T UT61E that can send data to a computer via a serial cable, and allows you draw some nice charts. I’ve already done that in Windows 7 with the provided tools, and reported on the power consumption of some Chinese Android TV boxes. However, since I use Ubuntu 14.04 as my main operating system, Linux based tools would be more convenient, and open source sigrok-cli command line client and its graphical interface pulseview are supposed to support UT61E DMM, so I had to give it a try.

A Quick Look at UNI-T UT61 Digital Multimeter

Before going into Sigrok, I’ll quickly show what the multimeter received from DealExtreme . It took longer than expected to ship because of of  included 9V battery, and at the first shipping attempt it was returned to DX, but after 8 weeks or so, I finally received the package.
UNI-T_UT61E_Package
The multimeter came with test leads, an adapter for transistor and capacitor, D02 serial cable to connect between the multimeter and the serial port of your PC, and an operating manual in English. Most sellers don’t include the required 9V PP3, but DX did. It seemed more convenient at the time of purchased, but as mentioned above custom issues completely ruined this little convenience.

UNI-T UT61E Digital Multitmeter with Cables, Adapter, and User's Manual (Click to Enlarge)
UNI-T UT61E Digital Multitmeter with Cables, Adapter, and User’s Manual (Click to Enlarge)

I had read review saying test leads where pretty poor, so I performed a continuity test, and the results were pretty bad, so I asked a partial refund from DX to buy another pair of test leads which are much better.

Linux issues with CH340/CH341 USB to Serial Adapters

DB9 serial connector are a thing of the past in most computers and laptops, so I had to use that RS232 to Serial USB adapter between UNI-T D02 cable and a USB port of my computer. I’ve been using with Wandboard and SABRE Lite boards a few time without any issues, but when I started run sigrok-cli, I got some error messages:


So I mentioned the issue to Sigrok developers, who could not reproduce the issue. But then I shared some details about the adapter:


And HL-340 USB-Serial adapter are known not to work properly. Why is that? While in most case you’d use some baud rate with 8N1 (8-bit / no parity / 1-stop bit), UNI-T multimeters are using 19200 7O1 connection (with odd parity), and so far the parity bit is simply ignored in ch341.ko driver, so my PC would just receive incorrect data.

Luckily there’s now a patch, and I’ve shown how to build the driver for Ubuntu 14.04 with Linux kernel 3.18, and that part is working fine.

Sigrok-cli Command Line

Installing sigrok-cli command is very easy as sigrok is part of Ubuntu 14.04 package repositories:


At first, you may want to check the vesion as it will also list supported drivers, and available options:


The libraries version are still 0.2.0, while the latest release is 0.3.0. So I tried to build sigrok-cli 0.5.0 from github instead with 0.3.0 version libs (more on that later), but it failed to scan my DMM, so I kept using the version packaged for Ubuntu 14.04.

The good news is that the client can detect UT61e:


and even better I could capture a few samples


If you want to capture more, simply changed the samples value, or use “continuous” instead.

But if you want to draw a chart in a spreadsheet, or other software the analog output is not really suitable. Fortunately sigrok-cli support multiple output formats with csv (comma-separated values), gnuplot, or its own default format that can be loaded in pulseview GUI. In theory, you could capture 10 sample in csv format and load the resulting file into a spreadsheet with the following command.


But in my case, all formats others than Analog failed, and all I got was empty files.

Pulseview in Ubuntu 14.04

Contrary to sigrok, pulseview graphical user interface is not part of Ubuntu 14.04 packages, and can only be found in Ubuntu Utopic (14.10) or Vidid (15.04):


I completely forgot to look for PPA before I built from source, and there’s already pulseview & sigrok packages for Ubuntu 13.10 and 14.04, so that would make it much easier. Instead I decided to build, as I though it should probably straightforward, but it turned out there are quite a few dependencies, and libraries to buid, and that’s the steps I had to follow in Ubuntu 14.04:

  1. Install dependencies

    sudo apt-get install build-essential cmake git autoconf-archive qt4-dev-tools libboost-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-test-dev libglibmm-2.4-dev doxygen python-gobject-dev swig clang python-numpy

  2. Retrieve libsigrok source code:
  3. Since autoconf-archive packahe is too old, you’ll need to manually download ax_cxx_compile_stdcxx_11.m4, copy it in a directory (e.g. m4), before completing the build:

    at this stage make sure the configure ends with C++ and Python bindings enabled

    Please note that I had some issues at first during make due to doxygen generating duplicate enums, but I was finally able to compile and install libsigrok:
  4. Now do the same with libsigrokdecode:
  5. And pulseview:
  6. You can now run pulseview, and for some reasons (installation prefix of libsogrok?) I also add to define LD_LIBRARY_PATH:
PulseView with Demo Device (Click to Enlarge)
Pulseview Demo Device (Click to Enlarge)

By default Pulseview will “connect” to a demo device emulating a logic analyzer. You can then click on Run and see a few signals as shown in the screenshot above. But obviously it’s more interesting to play with a real device like UT61E multimeter.

Pulseview_Ubuntu_14.04So you can go to the top menu to select File->Connect to Device to select your instrument. It seems I was out of luck again, as UNI-T drivers are not listed at all, despite being shown in the “About” section. I have not been able to investigate the reason, but if you have one of the device above it should work.

PulseView and Sigrok can also automatically decode signals like CAN, I2C, UART, USB, S/PDIF, and so on, which would be most interesting for logic analyzers.

So Pulseview and Sigrok look quite promising on paper, but the combination Ubuntu 14.04 + UNI-T UT61E multimeter + HL-340 USB to serial adapter made it quite challenging to setup, and mostly unusable after installation. I’ve also tried it in the development version of Ubuntu 15.04 with Linux 3.19, and both sigrok and pulseview install easily, but I would have to re-build ch341 driver again, which I’m too lazy to do for now. Maybe I’ll give it another try lateron.

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK Pi 4C Plus
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
15 Comments
oldest
newest
zoobab
9 years ago

I bought the same multimeter, will try to make it work with sigrok. Do you have any idea why the Digital mode failed with sigrok?

zoobab
9 years ago


Have you tried with more recent package version via the PPA? I will try to give it a shot, as i have pl2303 12v adaptors, and sabayon/gentoo with the latest (even head of the git) versions.

zoobab
9 years ago

@zoobab
on my sabayon i have the following versions:

sigrok-cli 0.5.0

Using libsigrok 0.3.0 (lib version 2:0:0).
Using libsigrokdecode 0.3.0 (lib version 2:0:0).

Al
Al
9 years ago

Very nice
Any chance of reviewing some oscilloscopes ?
Could do with replacing my HP52504 with something a lot smaller and quieter.

myf
myf
6 years ago

Sigrok doesn’t capture the usb signal (not the rs232 link) out-of-the box from a ut-61c with ubuntu 16.04 on a lenovo x220. Eval this script after the plug in the usb-link allows sigrok to get data : #!/usr/bin/python3 import usb.core # installed by the command line : pip install pyusb import fcntl import os USBDEVFS_RESET = ord('U') << 8 | 20 dev = usb.core.find(idVendor=0x1a86, idProduct=0xe008) compl00 = lambda n : ('000'+str(n))[-3:] path='/dev/bus/usb/%s/%s' % (compl00(dev.bus), compl00(dev.address)) fd = os.open(path, os.O_WRONLY) try: fcntl.ioctl(fd, USBDEVFS_RESET, 0) finally: os.close(fd) 123456789101112131415161718 #!/usr/bin/python3 import usb.core  # installed by the command line : pip install pyusb import fcntlimport os USBDEVFS_RESET… Read more »

Red
Red
6 years ago

Mine was shipped with a normal serial cable so ttyS0 worked for me. Also add your user to the dialout group so that you can have access to the serial port

Khadas VIM4 SBC