Description
The Uni-Trends UT61E multimeter includes an optical output so that data can be read using a computer. The multimeter ships with an RS232(-ish) cable that clips into the multimeter and provides a DB9 connector.
This module plugs into the DB9 connector on the supplied cable, and reads the data using an ESP8266 on a Wemos D1 Mini. The data can then be reported via USB or WiFi.
The example firmware reports the raw data via the USB port and also to an MQTT broker. It also shows the boot state using the RGB LED, and then blinks each time a data packet is processed.
This project was collaboratively designed on the SuperHouse livestream with the assistance of viewers.
Features
- Fully assembled including the Wemos D1 Mini and a cable.
- DB9 plug for connection to multimeter cable.
- Wemos D1 Mini with USB and WiFi.
- Powered via USB cable.
- WS2812B RGB LED to show connection status and activity.
Resources
Quickstart Guide
Multimeter Connection
The UT61e WiFi adapter relies on the grey serial cable supplied with your multimeter to make the connection.
Remove the grey plastic cover from the top of the multimeter, and clip in the cable in its place. Unroll the cable, and plug the 9-pin D-sub connector into the WiFi adapter.
The WiFi adapter is not powered by the multimeter. It requires external power via its USB port. You can connect it to a USB hub or computer, or use a phone charger to power it.
Data Via USB
Although the WiFi adapter is designed to report data from your multimeter via WiFi, you can also see the live data stream via USB. Use a USB cable to connect the adapter to your computer, and open a serial terminal at a baud rate of 115200bps.
The Arduino IDE has a built-in serial terminal, so that’s an easy way to do it if you don’t have other serial terminal software such as CoolTerm.
On startup, the WiFi adapter also reports various configuration info to the serial console including the MQTT topics that it will use for publishing data.
Connecting To WiFi
To have the WiFi adapter connect to your WiFi network and MQTT broker, you will need to edit the configuration file and upload the firmware to the adapter.
Download or clone the UT61EWiFi repository from GitHub: github.com/SuperHouse/ut61ewifi
Inside your local copy of the repo, go into Firmware -> UT61EWiFiD1Mini and find the file called “config.h-example”. Make a copy of that file, and name it “config.h”.
Open the main source file called “UT61EWiFiD1Mini.ino” using the Arduino IDE. You will see that it automatically opens a number of tabs at the top of the editor window.
Select the tab called “config.h”, and look at the options you can change. The most important ones are the WiFi SSID and password. Change these to match your network.
The adapter relies on having access to an MQTT message broker for sending values from the multimeter to other software or devices. If you have a local MQTT broker, you can put in the IP address in the config file. If it uses authentication, you can also put in the required username and password.
There are other options in the config file, but in most cases you shouldn’t need to change them.
With the WiFi adapter connected to your computer via USB, use the Arduino IDE to compile and upload the firmware after making your required config changes.
The WiFi adapter will then reboot and attempt to connect to your WiFi. You can see the status of the connection using the LED colour on the adapter. Typically it will go through this sequence in order, although some steps may be so fast you don’t even see them:
- RED means the adapter is trying to connect to WiFi, but hasn’t yet connected.
- BLUE means it has successfully connected to WiFi, and is now trying to connect to MQTT.
- GREEN flashes each time it publishes a new value.
If your adapter stops at red, it can’t connect to your WiFi network. Check the values you set in the config file, and that your network supports 2.4GHz connections.
If your adapter stops at blue, it has connected to WiFi but it can’t connect to an MQTT broker. Make sure your broker is running, and that the IP address and authentication are set correctly in the config file.
If your adapter starts flashing green, everything is working and it’s publishing live data from your multimeter to MQTT!
Accessing Data Via MQTT
With the WiFi adapter publishing your live multimeter data to your MQTT broker, you can watch the datastream using an MQTT client.
First, check what topic is being used by the multimeter. The topic is generated using the chip ID of the ES8266 in the adapter, so it’s different for every adapter. Use a serial terminal to connect to the adapter at 115200bps as described above, and reset the adapter. The first messages it outputs before sending any data include the MQTT topics for both raw values and JSON messages.
Do this with the multimeter turned off so values don’t make the startup messages scroll off the terminal.
Once you know the topics, you can subscribe using an MQTT client. The command line clients included with the Mosquitto MQTT broker are good for testing. For example, you could use the mosquitto_sub client like this, with your own broker IP address and WiFi adapter device ID substituted:
mosquitto_sub -h <your_broker_address> -t "tele/<your_device_id>/JSON"
Node-RED Client
An MQTT client gives you access to the raw data, but to display it in a friendly way you need a client that can process the messages and show them in a readable form. Included in the WiFi adapter repository is a Node-RED client.
The Node-RED client has its own README file that explains some of the configuration options. You can find it in the “Clients” section of the WiFi adapter repository: github.com/SuperHouse/UT61EWIFI/tree/main/Clients/Node-RED
Reviews
There are no reviews yet.