Skip to main content

Transfer tables for LMT8x Temperature Sensors.

LMT8x (LMT84, LMT85, LMT86, LMT87) are a series of analog temperature sensors made by Texus Instrument. These sensors can provide -50°C ~ 150°C with ±0.4°C accuracy. Although the output voltage is nearly linear to the temperature, it does have a slight umbrella parabolic shape. Therefore transfer tables are required to convert the voltage to the temperature.

Datasheets:

This package provides tranfer functions for LMT84, LMT85, LMT86, and LMT87 based on their transfer tables. These funcitons basically do a binary search through the transfer tables and return the match. If no match found, linear interpolation will be used to generate an approximate value.

Installation

pip install lmt8x

You can also install the in-development version with:

pip install https://github.com/charlee/python-lmt8x/archive/master.zip

Usage

lmt8x package provides functions lmt84_v2t, lmt85_v2t, lmt86_v2t, and lmt87_v2t for converting voltage to temperature.

  • input voltage must be in mV.

  • output temperature is in celsius.

from lmt8x import lmt87_v2t     # or `lmt86_v2t`, `lmt85_v2t`, `lmt84_v2t`

# read voltage from sensors.
# v = read_sensor()

# convert v to temperature.
# the pamaeter must be in mV. Return value is in celsius.
temp = lmt87_v2t(v * 1000)

print('Temperature is %s C.' % temp)

Documentation

https://python-lmt8x.readthedocs.io/

Development

To run all the tests run:

tox

Note, to combine the coverage data from all the tox environments run:

Windows

set PYTEST_ADDOPTS=--cov-append
tox

Other

PYTEST_ADDOPTS=--cov-append tox

Changelog

1.0.0 (2021-04-02)

  • First release on PyPI.

Release files for lmt8x 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lmt8x 1.0.0
File Size Uploaded
lmt8x-1.0.0.tar.gz 17.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lmt8x 1.0.0
File Interpreter ABI Platform
lmt8x-1.0.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 24.3 kB

Release files / lmt8x-1.0.0.tar.gz

Download URL lmt8x-1.0.0.tar.gz
Size 17.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5ad70ecb4fb00603552e877eea5b45a106b0d48e0121b8768c301349a7fbb39c
BLAKE2b-256 checksum
How to use checksums
38b47ebee6cbfb85401221e91cd881b8b8626eb0f77c9571ab0e90109de808c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

Release files / lmt8x-1.0.0-py2.py3-none-any.whl

Download URL lmt8x-1.0.0-py2.py3-none-any.whl
Size 7.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
ce8130403d456bda4ee6218cf61cc80012e8488545c4e5d35a67e6b7d2f95d8c
BLAKE2b-256 checksum
How to use checksums
52f8f2195b61106fd621e8ed98d9e80bf7698486ffd550534bf19e71ac6acb13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page