Skip to main content

TC2100 Thermometer Interface

Receive measurements from your TC2100 or other compatible digital thermometer over USB.

Motivation

The TC2100 is a digital thermometer which supports

  • two simultaneous measurement channels; and
  • seven standard types of thermocouples.

Although it is usable as a standalone meter, it also includes a USB interface for real-time computer output.

The manufacturer provides software for the USB interface. This is not it. This is unsupported, third-party software which was developed by reverse engineering.

The tc2100 module is a python 3.9 software development kit for receiving real-time temperature measurements. It includes a console script, tc2100dump, for logging measurements to csv files.

Supported Devices

At present, only one device is supported by this module.

Name Vendor ID (hex) Product ID (hex)
TC2100 10c4 ea60

Other devices have not been tested and are unlikely to work. If you have another device which works, open a bug report and ask that it be added to this table.

The Fine Print

In case you missed it above, this project is not affiliated with the original manufacturer(s). To our knowledge, the telemetry format is not specified in any [other] public documents. It has been reverse-engineered without assistance or support from the manufacturer. Read the license carefully, as it may affect your rights. There is no warranty.

Use of these programs in safety-critical applications is strongly discouraged.

Installation

pip3 install tc2100

This module requires twisted and pyserial. The pip package will automatically install these dependencies.

Quick Start

Using the supplied USB cable, connect a TC2100 thermometer to your computer. Hold down the "PC-Link" button until the meter beeps and the "USB" indicator illuminates. Then run:

tc2100dump --out temperatures.csv

If you receive "permission denied" errors on Linux, you need to grant your user account permission to use serial devices. On most distributions, including Ubuntu and CentOS, this can be accomplished by adding yourself to the dialout group:

sudo usermod -a -G dialout "$USER"

Once you perform the above modification, you will need to log out and log back in again. Never run this program as root!

When running tc2100dump, you may omit the --out argument to write measurements to standard output. You may also call this module as an executable with

python3 -m tc2100 --out temperatures.csv

The script will attempt to auto-detect the correct port for your thermometer. If auto-detection fails, you may specify the port manually:

tc2100dump --port /dev/ttyUSB0 --out temperatures.csv

If the script detects your thermometer, but no data is printed, check to make sure you have pressed the "PC-Link" button and that the "USB" indicator is illuminated.

Development Status

This module is likely feature-complete. It does what I need it to do, and additional features are not planned. Bug reports which are broadly categorized as feature requests will probably be rejected. I am also unable to support the inclusion of additional devices—even similar ones.

If you observe inconsistencies or other issues with the telemetry output, and can identify them, please submit a bug report. If able, please include a capture of the serial data stream and the expected behavior with your report.

Pull requests within the scope of this project are welcome, especially if they fix bugs. Please ensure that your PRs include tests and pass the included tox checks.

Technical Details

The TC2100 incorporates a UART-to-USB chipset, which emulates a serial port over USB. When plugged in, most computers will automatically detect it as a serial port, like /dev/ttyUSB0 or COM1. No additional drivers are required.

The thermometer has a USB vendor ID of 0x10c4 and a product ID of 0xea60. The meter's serial adapter uses 9600 baud with the common 8N1 format: eight data bits, no parity, and one stop bit.

Once the "PC Link" button is pressed, updates begin to stream immediately, at regular intervals. Each update is an 18 byte packet which begins with the hex bytes b"\x65\x14" and ends with a CRLF (b"\x0d\x0a"). Multi-byte quantities are sent big endian.

This is an example update, in hex:

65 14 00 00 00 00 8D 09 0C 01 81 88 40 00 02 05 0D 0A

Bytes are decoded as follows:

Offset (dec) C Type Description
0 uint8[2] Header
2 uint8[3] Unknown—always zeros
5 int16 Channel 1 measurement
7 int16 Channel 2 measurement
9 uint8 Thermocouple type, other data
10 uint8 Display unit, other data
11 uint8 Channel 1 flags
12 uint8 Channel 2 flags
13 uint8 Hours
14 uint8 Minutes
15 uint8 Seconds
16 uint8[2] CRLF
  • The update message cannot be expressed as a C struct, as it lacks the proper alignment.
  • Measurement values are
    • expressed in tenths of degrees
    • in sign-magnitude format. The sign bit is part of the flag bytes (11 and 12)
    • expressed in the same units as the thermometer is set to display. Byte 10 indicates the unit of measure.
  • Channel flags are OR'd together:
    • Valid measurement: 0x08
    • Invalid measurement: 0x40. Channels which do not have a thermocouple connected will have this flag.
    • Negative measurement: 0x80
  • The thermocouple type and temperature units are stored in the least significant nibble of those bytes. The upper nibble contains other data.

The above measurement is in degrees Celsius. The channel 1 measurement is -14.1 °C, and the channel 2 measurement is invalid.

Further details are included in the python class tc2100.Observation. Unit tests include more sample data.


License - MIT

Metadata

Release files for tc2100 0.1.5

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

Source distribution (sdist)

Source distribution for tc2100 0.1.5
File Size Uploaded
tc2100-0.1.5.tar.gz 13.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tc2100 0.1.5
File Interpreter ABI Platform
tc2100-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 25.8 kB

Release files / tc2100-0.1.5.tar.gz

Download URL tc2100-0.1.5.tar.gz
Size 13.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ee62f0c5eea3cbfbed5836d030586b487e5a94d22246a7fdf79442c3e0082602
BLAKE2b-256 checksum
How to use checksums
ac26acccf0d92264fa2d0ac4934f13d5f957018597fb10ba59e000f7f9c30bb2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.9.7 Linux/5.13.0-41-generic

Release files / tc2100-0.1.5-py3-none-any.whl

Download URL tc2100-0.1.5-py3-none-any.whl
Size 12.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
52514617ee45ba40cfb4615b9dfb5493d30acdd88716ad722733d67c4047b55a
BLAKE2b-256 checksum
How to use checksums
37f8ccf743d9ead3f4d856aa6a7db8ace565b2bbefb19e3b4eb9fce2ae9e6ade
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.9.7 Linux/5.13.0-41-generic

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

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