Skip to content

Elektroarzt/owon-xdm-remote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OWON XDM Remote

After I was a bit annoyed by the fact that the XDM1041 starts in low sampling mode and is not saving last settings at power down, I had the idea to have an ESP32 automatically set the sampling mode to high via SCPI after starting. During the development I came up with additionally integrating the multimeter into my home automation via WiFi/MQTT. It enables reliable SCPI communication over Wi-Fi, ideal for remote measurement retrieval and automation.

image

Features

  • Setting custom startup configuration: sampling mode set to high (can easily be modified and extended for measurement mode or range, etc.)
  • WiFi Manager feat. WiFi and MQTT credentials
  • MQTT integration:
    • Commands via xdm1041/cmd
    • Responses via xdm1041/resp
    • Device status via xdm1041/status (retained)
    • Wi-Fi quality via xdm1041/wifiquality
    • Heartbeat via xdm1041/heartbeat
  • LED feedback: startup states and errors indicated by onboard LED

Hardware

To connect the ESP32 to the multimeter via UART, the original UART module is removed and replaced by the custom PCBA provided in this repository. The PCBA is powered directly from the internal supply of the OWON XDM1041, so no external power source is required.

Original UART PCBA

image

Modified Communication PCBA

image

The PCB is a simple two-layer design. The bottom layer is a ground plane, while the top layer is split into V_IN and 3.3 V power planes.

image

image

The ESP32 module used is an ESP32-C3 Super Mini Plus, which includes an external antenna. This antenna is attached inside the case for improved signal strength. In contrast, the standard ESP32-C3 Super Mini (without external antenna) showed significantly poor Wi-Fi range in testing and is therefore not recommended.

image

The connection to the OWON Mainboard is done via a JST XH cable.

image

The USB connection of the ESP32 can be used for debugging while the board is powered by the multimeter, thanks to a Schottky diode that isolates the onboard supply from USB power.

All files required for production with JLCPCB are provided in the production folder. The ZIP file can be uploaded directly to the JLCPCB order interface.

Partslist

Reference Part Remark Source
D1 Schottky Diode Type: SS14 or similar Everywhere
J1 JST XH Connector 2,54mm pitch, 90° angled Ali Express
U1 ESP32 C3 Super Mini Plus Including Antenna Ali Express
JST XH Cable Type: Reverse side, 5 pin, XH 2,54mm Ali Express
PCB Production file has JLCPCB format JLCPCB

Compatibility

The hard- and software is tested on a XDM1041 and might be compatible to further OWON XDM models. Please confirm, if you successfully tested other models, and I will update this list.

Installation

  1. Flash MicroPython using Thonny or follow instructions on micropython.org

  2. Upload files to the ESP32:

    • main.py
    • wifi_manager.py
  3. Screw in and connect the PCBA via the JST cable and power up the XDM multimeter

  4. Enter your WiFi and MQTT Credentials in the opening WiFi Access Point named OWON-XDM-Remote-Setupand hit Save & Connect

    image

The ESP32 reboots and connects to your WiFi and MQTT Broker, initializes the multimeter, and starts processing commands.

MQTT Topics

To communicate with the multimeter over MQTT, send a valid command to the corresponding topic xdm1041/cmd. If there is an answer to the command, it will be returned on xdm1041/resp. The command set can be found at this OWON page.

Topic Description Type
xdm1041/cmd SCPI commands (e.g. MEAS1?) Publish
xdm1041/resp Response to SCPI commands Subscribe
xdm1041/status online / offline (retained) Subscribe
xdm1041/heartbeat Every 60 s: alive Subscribe
xdm1041/wifiquality Wi-Fi quality in percent (0–100) Subscribe

Typical Usage

In a Node-RED dashboard or a Home Assistant MQTT sensor, the ESP32 can be used as if the OWON XDM1041 was directly network-enabled.

Example command to xdm1041/cmd:

MEAS1?

Expected response on xdm1041/resp:

5.123456E-03

If you just like to have your custom parameters set at startup of the multimeter, simply don't use the WiFi / MQTT part.

Startup Behavior

On startup, the controller runs the following initialization:

  1. Check for valid network credentials in file system - if not valid or empty
  2. Start WiFi Manager and enter WiFi and MQTT credentials
  3. Check for UART line idle timeout
  4. Identify device via *IDN?
  5. Enable and verify fast-sampling mode (RATE F, RATE?)

Errors are indicated using LED signals (GPIO 8). A successful startup results in a retained MQTT online message.

Feature ideas not implemented yet

  • Web Interface to
    • select start configuration of the multimeter
    • select if last config is restored after power-on
  • Routing of the ESP32 USB-C to the backpanel to allow for
    • local SCPI over USB in parallel to MQTT
    • powering the multimeter via USB-C

Contribution

If you’d like to contribute to the project, you’re very welcome. The current firmware is written in MicroPython and was vibe-coded with GPT-5 Thinking. I’m open to improvements and collaboration.

Disclaimer

⚠️ WARNING: You may only USE THIS PROJECT AT YOUR OWN RISK. The information provided is meant to be helpful but may contain errors or may be misinterpreted. Neither myself nor any of the contributors to this project provide any warranty or will assume any responsibility for any damage you cause yourself or others by using this project.


License & Credits

This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.

Many thanks go to Igor Ferreira for the code for WiFi Manager

About

ESP32 based remote control for OWON XDM bench Multimeters feat. SCPI over WiFi and MQTT

Topics

Resources

License

Stars

Watchers

Forks

Languages