Keithley 2182A Nanovoltmeter - Basic Usage¶
This notebook demonstrates the essential functionality of the QCoDeS driver for the Keithley 2182A nanovoltmeter.
[1]:
# Import the driver
from qcodes_contrib_drivers.drivers.Tektronix.Keithley_2182A import Keithley2182A
1. Initialize the Instrument¶
[2]:
# Connect to the instrument
# Replace with your actual VISA address
k2182a = Keithley2182A(
'k2182a',
'GPIB0::1::INSTR',
pyvisa_sim_file='qcodes_contrib_drivers.sims:Keithley_2182A.yaml', # Comment for real instrument
)
# Check instrument identity
print("Connected to:", k2182a.IDN())
Connected to: KEITHLEY INSTRUMENTS INC. 2182A (serial:1234567, firmware:C01/B01) in 0.03s
Connected to: {'vendor': 'KEITHLEY INSTRUMENTS INC.', 'model': '2182A', 'serial': '1234567', 'firmware': 'C01/B01'}
2. Basic Voltage Measurement¶
[3]:
# Configure for basic voltage measurement
k2182a.mode('dc voltage')
k2182a.nplc(1.0) # 1 power line cycle for good balance of speed and accuracy
# Take a voltage measurement
voltage = k2182a.voltage()
print(f"Measured voltage: {voltage:.6f} V")
Measured voltage: 0.000001 V
3. MEASure vs FETCh Commands¶
[4]:
# MEASure command - triggers a new measurement
measured_value = k2182a._measure_voltage()
print(f"MEASure result: {measured_value:.6f} V")
# FETCh command - gets the last measurement from buffer
fetched_value = k2182a.fetch()
print(f"FETCh result: {fetched_value:.6f} V")
MEASure result: 0.000001 V
FETCh result: 0.000001 V
4. Noise Reduction Settings¶
[5]:
# Switch back to voltage mode
k2182a.mode('dc voltage')
# Enable filters
k2182a.analog_filter(True)
k2182a.digital_filter(True)
# Take a low-noise measurement
voltage = k2182a.voltage()
print(f"Low-noise measurement: {voltage:.6f} V")
Low-noise measurement: 0.000001 V
5. Quick Configuration Presets¶
[6]:
# Optimize for maximum accuracy (slower but more precise)
k2182a.optimize_for_low_noise()
voltage_accurate = k2182a.voltage()
print(f"High accuracy measurement: {voltage_accurate:.6f} V")
# Optimize for speed (faster but less precise)
k2182a.optimize_for_speed()
voltage_fast = k2182a.voltage()
print(f"Fast measurement: {voltage_fast:.6f} V")
High accuracy measurement: 0.000001 V
Fast measurement: 0.000001 V
6. Cleanup¶
[7]:
# Close the connection
k2182a.close()
print("Instrument connection closed.")
Instrument connection closed.