Skip to main content

Transfer tables for LMT8x Temperature Sensors.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lmt8x-1.0.0.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

lmt8x-1.0.0-py2.py3-none-any.whl (7.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file lmt8x-1.0.0.tar.gz.

File metadata

  • Download URL: lmt8x-1.0.0.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for lmt8x-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5ad70ecb4fb00603552e877eea5b45a106b0d48e0121b8768c301349a7fbb39c
MD5 dc041d6daee805799b3123bc4f11b8c4
BLAKE2b-256 38b47ebee6cbfb85401221e91cd881b8b8626eb0f77c9571ab0e90109de808c7

See more details on using hashes here.

File details

Details for the file lmt8x-1.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: lmt8x-1.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using 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

File hashes

Hashes for lmt8x-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ce8130403d456bda4ee6218cf61cc80012e8488545c4e5d35a67e6b7d2f95d8c
MD5 f7a6b83acf070615cb65e15c2853dcff
BLAKE2b-256 52f8f2195b61106fd621e8ed98d9e80bf7698486ffd550534bf19e71ac6acb13

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page