Uni-T UT61D for Linux

UT61D

I recently purchased a digital multimeter called Uni-T UT61D.
It’s a fairly nice model with decent precision and a build quality that feels good. It’s auto-ranging and measures a little bit of everything. It’s a real improvement to my old basic device and this one also has auto power-off which was a requirement for my new DMM. I’m so tired of putting new batteries in the old one whenever I forget to turn it off (which is all the time). It’s also good to have access to two DMM’s at the same time.

The UT61D has also got a serial interface that connects the DMM to a computer via RS232 or USB. This seemed like a cool feature but of course there were no drivers or applications included for Linux so I started to scan the web for solutions. I could have used a Windows computer but where’s the challenge in that?
Some guys have figured out and written tools for the UT61A, UT61B, UT61C & UT61E which are similar but none seemed to have done much work with the 61D.

he2325u printing raw data from the UT61D
he2325u printing raw data from the UT61D

HE2325U

I could find one driver that after some tweaking extracted data over USB. It was the he2325u by Rainer Wetzel.
His package also included a parser and a plotter that could be used to process the raw data coming out of the he2325u software.
They didn’t work with the 61D because they were written for 61E which has an entirely different protocol.

However the protocol for the B, C, D models is identical. I found a few apps that should work with these models but they were all using RS232 and not the USB HID connection that I wanted to use.

dmmut61b

After going through my options I decided to modify one of them so that instead of reading data from RS232 it would read from stdin so that I could pipe data from he2325u to it and use it as a pure parser. The one I settled with was a perl script called dmmut61b which was written by H.P. Stroebel. It had a nice feature set and was easy to modify. Mr Stroebel was also helpful during later troubleshooting because unfortunately it turned out that I was loosing some information somewhere and in the end that turned out to be because the he2325u software wasn’t fully compatible with the B,C,D models protocol. It was masking out bits that contained the micro prefix for μF and μA so they turned up like F and A instead.
With that fixed it finally worked as I wanted.

dmmut61bcd parsing data from he2325u
dmmut61bcd parsing data from he2325u

I have collected modified tools, scripts and source code in an archive in case anyone else needs it: ut61d.zip
The he2325u binary in that archive is my modified version that is working well on my 32-bit Ubuntu 12.04 setup.

Resources

Protocols documented by Henrik Haftmann
dmm61b by H.P. Stroebel
he2325u by Rainer Wetzel
Uni-Trend documentation
How to get the USB PID device running in Linux

21 thoughts on “Uni-T UT61D for Linux

  1. The ones who uses W7 (Ultimate) meets same problems with USB functionality, as for example i have W7Ultimate and bought recently the UT61D with usb adapter, when i plugged in the adapter the response i get from windows is “USB device is not reconized” and that´s that! I have been searching the net for a solution but it seem far fetched to find any. I´ve tried several solutions but i can´t get the USB Hub to reconize the usb cable. I must be doing something very wrong as some of UT61D owners out there obviously get it to work? A usb solution for a windows 7 is preciated. Or i have to settle for RS232 connectivity!

    1. I don’t see that problem in Windows 7 and I’ve tried both x86 and x64 versions of Windows 7 with SP1.
      When I plug the device into a Windows 7 computer it is searching for and installing a driver from Windows Update.
      The device installed is a standard HID device called USB Input Device and is sorted under the Human Interface Devices class.
      PNP Hardware ID: USB\VID_1A86&PID_E008

  2. In the properties for the “Unknown Device” i get code 43 (This device has been stopped), at one time when i ran the autoupdate for the driver i got a hit with one driver but it failed to install. And when i run it now it says i got the appropiate driver already. (Catch 22???) and i tried to look in the list of general drivers this one you speak of isn’t there???
    My system consist of W7 Ultimate, Intel I5,8 GB ram, ASUS 530TI PCIE16, Cardreader, SATA drives 2 HDD & 1 DVDRW, Soundblaster XiFi Fatal 1TY with frontpanel. (in case of some of these can interfer with the USB) Although i have a lot of usb devices attached as WIFI, Printer, Internet via windows mobile, wireless mouse and keyboard but i don’t think this is the problem, my other portable devices work? as my MP4 watch, usb flashmems asf. the problem lies in the ability to install the driver, you don’t know of any standalone driver that might work to replace the existing “Unknown Device” i have searched for one but haven’t had any luck so far!

  3. Thanx anyway for all your help! but i have given up on usb, i went with the rs232 interface instead, and it works like a charm. Dough it’s not as fast as USB but it serves me well enough.
    With kind regards
    Jorgen

  4. Hi, I just bought one of these toys today and thanks to this post I made it work like a charm in my laptop. This is wonderful. However, I didn’t manage to make it work in any of my Raspberry Pi’s. The code and the driver are fine. I compile and run the tool. But it never manages to read. The reason seems to be on the suspend.HE2325U.sh which points to ${dat}/power/level file and, well, it happens that the Raspberry Pi do not have such file. It says:

    sudo ./suspend.HE2325U.sh
    ./suspend.HE2325U.sh: 6: ./suspend.HE2325U.sh: cannot create /sys/bus/usb/devices/1-1.3/power/level: Directory nonexistent

    Do you happen to know any alternative way to suspend the device so it can be used in the Raspberry Pi?

  5. Hi,
    I tried to run the programs from your .zip file but I always get this error:
    Can’t locate Device/SerialPort.pm in @INC (you may need to install the Device::SerialPort module) (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at ./dmmut61bcd/dmmut61bcd.pl line 68.
    BEGIN failed–compilation aborted at ./dmmut61bcd/dmmut61bcd.pl line 68.

    Can you help me with that?
    Btw: I am using a serial to USB converter.

      1. Err, I am sorry, but what is this module? Is it a package which I have to install?

      2. Yes, it’s a module that may need installation. Your error message indicates that you need to install it. Google your error message to find the solution for your Linux flavor.

      3. Ok, I found the correct package. It was libdevice-serialport-perl
        Now it just says ‘aborted without match’ after starting the bash script. What does this mean?

      4. It probably means that you don’t get any output from he2325u program that is meant to read data from the USB interface of the UT61D. It sounds like you are trying to use the RS232 interface over some Serial-to-USB adapter which is not what this version does.
        You should use the original version of the dmmut61b perl script from H.P. Stroebel which is for RS232. There’s a link to that script in my article.

      5. In the meantime I found another solution which works fine for me. I installed wine and the original (windows) multimeter program.
        Thanks for your help anyway.

  6. For my Uni-T UT61D, the Perl script dmmut61b by by H.P. Stroebel discards voltage readings if the range setting has three digits in the fractional part. Apparently, these messages have only 11 characters instead of 12. Commenting the line containing “next; # discard the reading” seems to fix it for me.

    Another thing that is bugging me is a 100% CPU usage of the Perl script. Is this normal? Is there a way to fix it?

    1. I should have mentioned that I’m using the original script to read from the serial port, so maybe I’m not quite in the right place. My device didn’t came with an USB cable, so I can’t test for the message length problem over USB.

      For now I have solved the CPU problem by adding ‘sleep(0.001);’ to the end of the loop that starts with ‘until (“” ne $dmm_input) {‘. This requires ‘use Time::HiRes qw (sleep);’.

  7. This still kinda works in 2017! Had to recompile and make some modifications. Briefly:

    1. Installed perl Device::SerialPort -> “sudo cpan Device::SerialPort”
    2. Installed libhidapi-dev -> “sudo apt-get install libhidapi-dev”
    3. Commented out COBJS in the Makefile, updated the CFLAGS and LIBS lines to read: “CFLAGS+=-Wall -g -c `pkg-config libusb-1.0 hidapi-hidraw –cflags` -pthread” and “LIBS=`pkg-config libusb-1.0 libudev hidapi-hidraw –libs` -pthread”.
    4. Recompiled he2325u -> “make clean && make”
    5. Plugged in my UT61B, activated serial link by holding [REL] and tested the new he2325u out. “sudo ./he2325u” now spits out data for the first time ever!
    6. Modified the startdmm.sh script to do -> “sudo ./he2325u/he2325u | ./dmmut61bcd/dmmut61bcd.pl”
    7. Success!

    If you get “aborted without match”, it means the perl script couldn’t read anything from stdin. Make sure “he2325u” gives proper output; you might need to sudo it to get access to the device. It should be possible to do all this WITHOUT sudo by creating new udev rules, but I’m not sure what to put for those. Maybe someone else has an idea 🙂

    Also, for those who has lost the manual, you will get no data from the multimeter unless you activate serial link by holding [REL]!

    On a sidenote, the DB9 adapter cable uses +12V taken from the serial port to power its logic, meaning most cheap USB-to-DB9 Serial adapters will not work. If you are feeling adventurous, you can actually re-solder the logic board to work at lower voltages. This should also letyou put on a FTDI or similar instead of the DB9. For that, there is a nice guide at http://blog.avrnoob.com/2014/03/uni-t-ut61e-rs232-serial-interface.html

    Thanks for the guide! I’ve been knee deep in weird translations of German sites ever since I tried to get the serial link working!

    1. Thanks for the update!
      I haven’t used these tools in a long time. Good to know that it’s still possible to get things running.

Leave a reply to Thomas Frössman Cancel reply