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.
- Power Supply: Keysight E36313A
- (Will probably work with similar models)
- Digital Multimeter: Keysight EDU34450A
- (Will probably work with similar models)
- 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.
The included PowerShell script, launch.ps1, handles environment setup and dependency installation automatically.
- Clone or download the repository.
- Open a PowerShell terminal and navigate to the install directory.
- Run the launch script:
.\launch.ps1
- This will create a virtual environment, install the required dependencies, and launch the application.
- Clone or download the repository.
- Install Python (3.x). Either from Python.org or via the Microsoft Store.
- Open a PowerShell terminal and navigate to the install directory.
- Install dependencies:
Note: You must have a VISA backend installed (like NI-VISA or Keysight IO Libraries Suite) for PyVISA to communicate with instruments.
pip install -r requirements.txt
- Run the script:
python visa_logger.py
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
| 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 |
- 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.)
