Loggin it

No, that’s not a euphemism.

Recently, I purchased a new multimeter, the now widely used UNI-T UT61E, which as far as cheap chinese multimeters go is pretty darn good. After watching various teardowns and tests courtesy of Mr. Martin Lorton, I was actually reasonably impressed with the functionality and accuracy of the meter and really wanted one to replace my Mastech “shitty piece of shit” meter which I’ve grown to loathe over the years. Most annoyingly, it had stopped displaying decimal points almost entirely. An internal inspection revealed it to be the switch contacts not quite making contact on the volts ranges (which is… the most important range!). This led to some almost-accidents as I had to guess where that decimal point would be. Is it 2V? 20V? 200V? Bugger this, time to upgrade and get a decent meter. Not that I won’t use the Mastech still, always good to have two meters, and the Mastech measures temperature which the UT61E doesn’t.

Enter the 61E

Apart from its plethora of usual features, it also includes a PC connection for datalogging. Not something I’ve had before, and certainly a nice treat. Naturally, when I buy anything I want to leverage its technology to its fullest and I set about trying to get it to work. There were a number of stumbling blocks. First and foremost, the included cable is RS-232 serial. Lacking such a port on any of my machines, I had to get an appropriate serial to USB conversion cable, which I ordered from Amazon. That was slightly annoying, since other more expensive models of UNI-T meters come with the same cable but USB. Shaved a few pennies on that one. I chose a decent quality serial to USB with an FTDI chipset in it. Plugged it in, and OSX recognized it just fine, already including the drivers and making a virtual COM port for me. Marvellous.

That was a bit of a boon, as the included driver CD with the cable was one of those tiny CDs which only work in tray loading optical drives. I HATE those. Namely because the few optical drives I have are slot-loading. Seriously, why even bother bundling a crappy tiny CD with something? Nine times out of ten we will visit the website to get the most recent version anyway.

Software blocked

The next hurdle I was aware of – the software is windows only. For those that know me, you’ll know I hate windows with a passion that’s almost holy and refuse to use it unless I absolutely have to. Like having a gun held to my head. So I had two options: get OSX software that will work, or get windows software working in OSX. Both are possible.

The first thing I tried was getting QtDMM working. I was able to get it listening to my meter by some cajoling and setting the proper baud rate, bits and etc. For anyone interested, it’s 19200 baud, 7 bits with odd parity bit, no handshake. The protocol is 14bit continuous. However, despite being able to get data from the meter, QtDMM wasn’t able to actually decode the protocol of the 61E. I did get the numbers coming in correctly, but without units. A bit disappointing that. Nevertheless it sort-of works. I know I could do better though!

The next step was to see if there was something new upstream in the project from where the last mac binary was made, so I checked out the project on GitHub and sure enough, it had upgraded to using Qt5 and has had a number of improvements. One clever chap even said he pushed some code in for the UT61E specifically which was the missing link! Excited, I downloaded the source and gave a go at compiling it. Sadly, it seemed to like spitting out errors rather than actually compiling. After beating my head off the desk repeatedly, I gave up. I got stuck at one error where it wants to use the gold linker, but it seems gold doesn’t work on OSX. I tried using other linkers but no dice there either.

The second option, and solution

As mentioned, the second option was to try to get the windows software working on OSX. This is where I felt more hopeful. I had in hand two programs to get working: the included, rather arse software fro UNI-T, and the lovely UltraDMM project which I was eager to get working. The first, obvious method was to get them working with wine which us OSX and Linux people make use of from time to time. I chose to use the Wineskin Winery because I didn’t have a full-blown wine installation on my machine, and I really love how wineskin makes self contained app wrappers with everything you need to run the bugger. The installs proceeded just fine, as expected, but then the problems began, as expected.

Its always something

Both pieces of software seemed to install and run just fine, except they couldn’t read from my multimeter. Reason being – there was no serial port to tell the software to listen to. I knew that the FTDI driver helpfully created me a serial port at /dev/tty.usbserial-A058585 or something like that (I forget the exact serial address). Just getting one to talk to the other. The first thing I tried was to create a symlink in /dosdevices, adding the /dev/tty.usbserial-… as com1. This *should* have worked, but sadly didn’t for some reason. I should theoretically add anything from /dev into there.

After some googling, the Wine docs came to the rescue with the following:

To override Wine’s default device mapping, run wine regedit and create string entries in HKEY_LOCAL_MACHINE \Software\Wine\Ports where the entry name is the Windows device name and the entry value is the path to the Unix device. Continuing with the above example, to make COM1 the first USB-attached serial port, create an entry with the name COM1 and the value /dev/ttyUSB0. You might also want to create an entry named COM5 with no value to remove the COM5 device which is now a duplicate of COM1. After editing the registry, shut down Wine with wineserver -k and the next time Wine runs a program, your changes will take effect.

That was it! I simply added the string into the registry as com1 and it worked fine after that. What a nuisance, but I won in the end.


UltraDMM working on my craptop, measuring the awful ripple on my crap power supply

UltraDMM working on my craptop, measuring the awful ripple on my crap power supply

I couldn’t be more pleased. I finally got a solution working, and it works well and reliably. All without having to resort to Windows. I’d rather have a skin disease. Now I’ll be able to log a whole variety of data, graph it, export it, tabulate it – you name it. More than likely the numbers will end up on this blog.

Comments are closed.