rtd-acquire
rtd-acquire is a hardware-agnostic acquisition layer for resistance
temperature detectors (RTDs). Its job is to obtain the best trustworthy
estimate of an RTD element's resistance from real or simulated acquisition
hardware and report acquisition-level diagnostics.
It intentionally stops at resistance. RTD characteristic interpretation,
resistance-to-temperature conversion, tolerance, model calibration, and
model-level uncertainty belong in
rtd-sensor.
physical RTD
↓
converter / ADC / transmitter / controller
↓
rtd-acquire
↓
resistance + acquisition diagnostics
↓
rtd-sensor
↓
temperature / RTD-model interpretation
Initial targets
The first implementation target is the Analog Devices MAX31865, with Python hardware testing on a Raspberry Pi 4 Model B and portable C hardware testing on Arduino-compatible HERO boards.
The second planned hardware family is the TI ADS124S08 precision ADC/front end. Later targets cover industrial resistance inputs, 4–20 mA transmitters, industrial digital interfaces, and configurable custom acquisition circuits.
Installation
rtd-acquire requires Python 3.11 or later and is published on
PyPI:
python -m pip install rtd-acquire
A minimal hardware-free acquisition uses the deterministic simulator:
from rtd_acquire import Measurement
from rtd_acquire.simulation import SimulatedAcquisitionDevice
device = SimulatedAcquisitionDevice([Measurement(resistance_ohms=100.0)])
measurement = device.read()
print(measurement.resistance_ohms)
For Raspberry Pi/Linux SPI support, install the optional backend dependency:
python -m pip install "rtd-acquire[raspberry-pi]"
Developers working from a source checkout can instead use uv sync; see
docs/DEVELOPMENT.md for the project quality gates.
Raspberry Pi Linux SPI
The Python Raspberry Pi path uses the normal Linux spidev userspace API, not
direct SoC register access. Install the raspberry-pi extra shown above before
using this backend. In a development checkout, the equivalent command is
uv sync --extra raspberry-pi.
A MAX31865 on SPI0/CE0 can then be wired through the generic Linux adapter:
from rtd_acquire.max31865 import MAX31865, MAX31865Config
from rtd_acquire.transports import LinuxSpidevDevice, SpiSettings
settings = SpiSettings(
clock_polarity=0,
clock_phase=1,
clock_frequency_hz=1_000_000,
)
config = MAX31865Config(
reference_resistance_ohms=430.0,
wire_count=3,
filter_frequency_hz=60,
)
with LinuxSpidevDevice("/dev/spidev0.0", settings) as spi:
measurement = MAX31865(spi, config).read()
SPI must first be enabled in Raspberry Pi OS. The implementation targets the same Linux interface on Raspberry Pi 4 and 5; physical validation is currently pending on Pi 4 and has not yet been performed on Pi 5.
Deterministic simulation
Applications can exercise the same AcquisitionDevice contract without
hardware by replaying validated measurements and explicit acquisition failures:
from rtd_acquire import Measurement
from rtd_acquire.simulation import SimulatedAcquisitionDevice
simulated = SimulatedAcquisitionDevice(
[
Measurement(resistance_ohms=100.0),
Measurement(resistance_ohms=101.0, standard_uncertainty_ohms=0.02),
],
repeat=True,
)
measurement = simulated.read()
This generic simulator works at the measurement boundary. The separate
MAX31865SpiEmulator exercises MAX31865 register/SPI behavior through the real
driver. Neither simulator performs RTD temperature-model interpretation.
Integration with rtd-sensor
rtd-acquire and rtd-sensor remain independent packages. Applications pass
the acquired resistance explicitly into the desired RTD model:
from rtd_sensor import pt100
measurement = device.read()
if measurement.resistance_ohms is not None:
temperature_c = pt100.resistance_to_celsius(measurement.resistance_ohms)
See examples/rtd_sensor_pt100.py for a runnable hardware-free example.
rtd-sensor is not an rtd-acquire runtime dependency.
Physical MAX31865 validation is tracked separately in
docs/HARDWARE_VALIDATION.md.
See:
- DESIGN.md — architecture and project contracts
- ROADMAP.md — implementation sequence
- HARDWARE.md — acquisition hardware catalog
- DIAGNOSTICS.md — native diagnostic survey and normalization research
- HARDWARE_VALIDATION.md — physical validation gate
- REFERENCES.md — external technical bibliography
- DEVELOPMENT.md — development and release automation gates
- CHANGELOG.md — release history
Status
0.2.0 adds the independent portable C11 implementation, fault-checked
MAX31865 acquisition, shared Python/C conformance with an explicit binary32
numeric profile, and an Arduino AVR / HERO platform adapter to the Python
acquisition stack introduced in 0.1.0a1. The portable C sources and adapter
ship in the source distribution; the Python wheel remains Python-only.
Physical Raspberry Pi/MAX31865 and HERO/MAX31865 validation is still pending.
rtd-acquire remains pre-1.0, and public APIs may change before 1.0.
License
Mozilla Public License 2.0 (MPL-2.0), matching rtd-sensor.
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 rtd_acquire-0.2.0.tar.gz.
File metadata
- Download URL: rtd_acquire-0.2.0.tar.gz
- Upload date:
- Size: 178.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e072b3ac4f66bb6d90519e036fb867658aa272754576ba7712c6a6a89a3becb4
|
|
| MD5 |
3c433e91133e653a6cec11638b85bc15
|
|
| BLAKE2b-256 |
fa230d9816da33d491b9183ecb9c3c60ae93f569fa8a9530a3446266035ff21b
|
Provenance
The following attestation bundles were made for rtd_acquire-0.2.0.tar.gz:
Publisher:
release.yml on GregRR/rtd-acquire
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rtd_acquire-0.2.0.tar.gz -
Subject digest:
e072b3ac4f66bb6d90519e036fb867658aa272754576ba7712c6a6a89a3becb4 - Sigstore transparency entry: 2595651355
- Sigstore integration time:
-
Permalink:
GregRR/rtd-acquire@7692d114054a690cfa13ff3f8abb96ed7f17b881 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/GregRR
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7692d114054a690cfa13ff3f8abb96ed7f17b881 -
Trigger Event:
release
-
Statement type:
File details
Details for the file rtd_acquire-0.2.0-py3-none-any.whl.
File metadata
- Download URL: rtd_acquire-0.2.0-py3-none-any.whl
- Upload date:
- Size: 26.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39734df17095590197f28c9fb99c10b5f252ecc4ccb65b7e11bc0a9e2fab8b18
|
|
| MD5 |
f659958f8974579b5b9c9cf2078b992d
|
|
| BLAKE2b-256 |
e569de80243609a8437210efeb5e8347600074ca0f5256d60b7b44d058490aa9
|
Provenance
The following attestation bundles were made for rtd_acquire-0.2.0-py3-none-any.whl:
Publisher:
release.yml on GregRR/rtd-acquire
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rtd_acquire-0.2.0-py3-none-any.whl -
Subject digest:
39734df17095590197f28c9fb99c10b5f252ecc4ccb65b7e11bc0a9e2fab8b18 - Sigstore transparency entry: 2595651680
- Sigstore integration time:
-
Permalink:
GregRR/rtd-acquire@7692d114054a690cfa13ff3f8abb96ed7f17b881 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/GregRR
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7692d114054a690cfa13ff3f8abb96ed7f17b881 -
Trigger Event:
release
-
Statement type: