Electronics, hardware, Linux system development, Software

Data logger for UNI-T UT800 multimeters

I have been using my uni-t ut804 bench multimeter for a while.
My current tasks requires collecting different kinds of measurements for further analysis.
I decided to connect my multimeter to a computer for data capture.

 

On the back panel of the multimeter, there are two communication ports: USB type B and RS232.

I don’t have a spare RS232 port on my machine, so I chose the USB.
After the connection, I found a new device represented as Dallas 1-wire HID. It’s not what I expected.
Let’s open the multimeter to see what’s inside.

The Communication board mounted on the back panel:

We can see an optocoupler on the IR diode/photodiode pair. It’s a simple TX-only channel.

Bottom of the board:

The USB interface is Holtek HE2325U – an HID-based USB Serial Converter. Also, there is a photodiode amplifier with two buffers – for USB and RS232 lines.

I couldn’t find a lot of information about this HE2325U. It seems that all the code that I found is outdated. It’s not working on my modern Debian system. And there is no straightforward way to get serial data.

Interestingly, the newer versions of the multimeter use a regular CH9325 UART to USB converter.

The board uses a dual-power supply option for USB and RS232. USB 5V is fed directly to the amplifier section and the Holtek interface.
For RS232, they used a DTR line that remains active (3 to 25 Volts) when the host is ready to receive the data.

Block diagram of the interface board:

To work with RS232 without an RS232 port, it’s possible to use MAX232/MAX3232 converter plus any UART to USB interface.

Luckily, I have plenty of cheap MAX3232 interface boards.

To solve the power problem, I connected the DTR pin directly to the input VCC line, which is 5V in my case. This voltage is enough for the photodiode amplifier and RS232 buffer.

This simple operation helped me to get the multimeter data out of my /dev/ttyUSBx interface.

Software

I wrote a small program ut-reader [GitHub] to read the multimeter data. The program prints the data in CSV or tab-separated format. Also, it’s possible to configure a timestamp format.
This program is designed for the UT800 series but might also work with other models like UT61. I need to test this.

There are no special requirements, so the program could be compiled on all modern Linux distros and macOS.

Here is some real usage example:

ut_reader -d /dev/ttyUSB2 -c
Serial device /dev/ttyUSB2 with baud rate = 2400
Starting capture, press Ctrl-C to stop2022-07-17 01:29:37,00.280,A
2022-07-17 01:29:38,00.283,A
2022-07-17 01:29:39,00.298,A
2022-07-17 01:29:39,00.315,A
2022-07-17 01:29:40,00.318,A
2022-07-17 01:29:41,01.191,A
2022-07-17 01:29:41,01.188,A
2022-07-17 01:29:42,01.186,A
2022-07-17 01:29:43,01.194,A
2022-07-17 01:29:43,01.194,A
2022-07-17 01:29:44,02.090,A
2022-07-17 01:29:45,02.089,A
2022-07-17 01:29:45,02.088,A
2022-07-17 01:29:46,02.086,A
2022-07-17 01:29:47,02.084,A
2022-07-17 01:29:47,00.366,A
2022-07-17 01:29:48,00.364,A
...

Now it’s possible to build a nice current consumption graph with gnuplot.
ut-reader output was saved to a unit-t.csv file.

gnuplot> set xdata time
gnuplot> set timefmt “%Y-%m-%d %H:%M:%S”
gnuplot> set format x “%H:%M:%S”
gnuplot> plot ‘unit-t.csv’ using 1:2 with lines title ‘Current consumption’

Thanks for reading.

Tagged , , , ,

1 thought on “Data logger for UNI-T UT800 multimeters

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.