Skip to content

Python program that uses PyVISA to connect to a PSU & DMM and step through output voltages recording DMM voltages.

Notifications You must be signed in to change notification settings

jwidess/PSU-DMM-PyVISA-Data-Capture

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PSU-DMM PyVISA Data Capture

This Python program is designed to automate voltage sweeps and data logging using Keysight bench equipment. It controls a Power Supply Unit (PSU) to step through a voltage range while recording voltage measurements from a Digital Multimeter (DMM). The program outputs the collected data to a CSV file.

Supported Instruments

  • Power Supply: Keysight E36313A
    • (Will probably work with similar models)
  • Digital Multimeter: Keysight EDU34450A
    • (Will probably work with similar models)

Features

  • GUI Control: Built with Tkinter for ease of use and configuration.
  • Automated Sweeps: Configurable start voltage, stop voltage, step size, and settle time.
  • Data Logging: Automatically saves measurements to a CSV file.
  • Instrument Discovery: Scans and lists connected VISA instruments.

Example Image:

Example Image

Quick Setup (Windows)

The included PowerShell script, launch.ps1, handles environment setup and dependency installation automatically.

  1. Clone or download the repository.
  2. Open a PowerShell terminal and navigate to the install directory.
  3. Run the launch script:
    .\launch.ps1
    • This will create a virtual environment, install the required dependencies, and launch the application.

Manual Setup (Windows)

  1. Clone or download the repository.
  2. Install Python (3.x). Either from Python.org or via the Microsoft Store.
  3. Open a PowerShell terminal and navigate to the install directory.
  4. Install dependencies:
    pip install -r requirements.txt
    Note: You must have a VISA backend installed (like NI-VISA or Keysight IO Libraries Suite) for PyVISA to communicate with instruments.
  5. Run the script:
    python visa_logger.py

Connecting Instruments

Connect the PSU and DMM to your PC via USB (USBTMC), Ethernet, or GPIB, and power them on. If required, install a VISA backend (NI‑VISA or Keysight IO Libraries) and any required USBTMC/GPIB drivers. Put instruments in remote/SCPI mode if required, then verify connectivity with PyVISA using:

import pyvisa
rm = pyvisa.ResourceManager()
rm.list_resources()

You should see resource strings that look something like USB0::...::INSTR, GPIB0::5::INSTR, or TCPIP::192.168.x.x::inst0::INSTR

Sample CSV Output

Timestamp Set Voltage (V) Measured Voltage (V)
2026-01-27T14:53:14.875122 1 0.465121354
2026-01-27T14:53:16.174611 1.01 0.473769145
2026-01-27T14:53:17.474557 1.02 0.48230575
2026-01-27T14:53:18.774583 1.03 0.492258699
2026-01-27T14:53:20.074599 1.04 0.500748839
2026-01-27T14:53:21.373732 1.05 0.509241539

To-do

  • Add support for more instruments, currently tightly coupled to Keysight models listed above.
  • Support for different measurement types (current, resistance, etc.)
  • More granular step sizes over specified ranges (logs, custom lists, etc.)

About

Python program that uses PyVISA to connect to a PSU & DMM and step through output voltages recording DMM voltages.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published