Core 4-wire resistance measurement algorithm using Keithley K2450 and DAQ6510
Project description
Dip Measurement Core Algorithm
Core 4-wire resistance measurement module using current reversal technique for high-accuracy offset-compensated measurements.
Instruments
- Keithley K2450 SourceMeter — programmable current source
- DAQ6510 with 7702 Multiplexer — multi-channel voltage measurement
Features
- Current reversal technique: V_true = (V+ − V−) / 2 to cancel thermal EMF
- 4-wire relay addressing on 7702 multiplexer (up to 20 channels)
- Dynamic per-channel current calibration to target 2 mV excitation
- PT100/PT1000 resistance-to-temperature conversion
- Support for PT1000, PT100, Thermistor, Diode, and Zirconium Oxynitride sensors
Installation
From PyPI (after publishing)
pip install dip-measurement-core
From GitHub
pip install git+https://github.com/YOUR_USERNAME/dip-measurement-core.git
Local development install
git clone https://github.com/YOUR_USERNAME/dip-measurement-core.git
cd dip-measurement-core
pip install -e .
Dependencies
numpyki488— GPIB interface layerk2450-gpib— Keithley K2450 driverdaq-gpib— DAQ6510 driver
Note: The
ki488,k2450-gpib, anddaq-gpibpackages must also be pip-installable (either on PyPI or installable viapip install git+https://...).
Quick Start
from dip_measurement_core import DipMeasurement
dip = DipMeasurement()
# Connect to instruments via GPIB
success, msg = dip.connect(k2450_address=18, daq_address=20)
# Configure measurement
dip.configure(current_ma=0.1, sensor_type='ZIRCONIUM')
# Measure a single channel
result = dip.measure_channel(1)
print(f"Channel 1: {result['resistance']:.4f} Ω")
# Measure multiple channels
results = dip.measure_all_channels([1, 2, 3, 4, 5])
for ch, data in sorted(results.items()):
print(f" Ch {ch}: R={data['resistance']:.4f} Ω")
# Disconnect
dip.disconnect()
Dynamic Current Calibration
To automatically adjust excitation current per channel (targeting 2 mV):
dip.configure(current_ma=0.01, dynamic_current=True)
success, msg = dip.calibrate_currents(channels=[1, 2, 3, 4, 5])
print(msg)
# Subsequent measurements use calibrated currents
results = dip.measure_all_channels([1, 2, 3, 4, 5])
Publishing to PyPI
# Install build tools
pip install build twine
# Build the package
python -m build
# Upload to PyPI (you'll need a PyPI account and API token)
python -m twine upload dist/*
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dip_measurement_core-1.0.0.tar.gz.
File metadata
- Download URL: dip_measurement_core-1.0.0.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36c7e12f5768fad8841bdc9717743a53026710b92c19eae393b6d697088739b0
|
|
| MD5 |
87cdaced4ed745d44a6bcb2025bdbfd9
|
|
| BLAKE2b-256 |
52bc02d0a48ee644171431a898b7c229d0a190b71375c1c85ef144b18c9ce914
|
File details
Details for the file dip_measurement_core-1.0.0-py3-none-any.whl.
File metadata
- Download URL: dip_measurement_core-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7885db42f9c1cf96543a53f69e3856bf80c1a9fd2be6d136fb326420d97df299
|
|
| MD5 |
c42a6e76dc6ba8b3517d19efbd126ce4
|
|
| BLAKE2b-256 |
6b3541c992f52c60b6dfbc5fa476337a0fcb816043f432c87948fa6a580c0328
|