Skip to main content

TCLab: Temperature Control Laboratory

Master:

https://travis-ci.org/jckantor/TCLab.svg?branch=master https://readthedocs.org/projects/tclab/badge/?version=latest https://badge.fury.io/py/tclab.svg

Development:

https://travis-ci.org/jckantor/TCLab.svg?branch=development

TCLab provides a Python interface to the Temperature Control Lab implemented on an Arduino microcontroller over a USB interface. TCLab is implemented as a Python class within the tclab package. The tclab package also includes:

  • clock A Python generator for soft real-time implementation of process control algorithms.

  • Historian A Python class to log results of a process control experiment.

  • Plotter Provides an historian with real-time plotting within a Jupyter notebook.

  • TCLabModel An embedded model of the temperature control lab for off-line and faster-than-realtime simulation of process control experiments. No hardware needs to be attached to use TCLabModel.

The companion Arduino firmware for device operation is available at the TCLab-Sketch repository.

The Arduino Temperature Control Lab is a modular, portable, and inexpensive solution for hands-on process control learning. Heat output is adjusted by modulating current flow to each of two transistors. Thermistors measure the temperatures. Energy from the transistor output is transferred by conduction and convection to the temperature sensor. The dynamics of heat transfer provide rich opportunities to implement single and multivariable control systems. The lab is integrated into a small PCB shield which can be mounted to any Arduino or Arduino compatible microcontroller.

Installation

Install using

pip install tclab

To upgrade an existing installation, use the command

pip install tclab --upgrade

The development version contains new features, but may be less stable. To install the development version use the command

pip install --upgrade https://github.com/jckantor/TCLab/archive/development.zip

Hardware setup

  1. Plug a compatible Arduino device (UNO, Leonardo, NHduino) with the lab attached into your computer via the USB connection. Plug the DC power adapter into the wall.

  2. (optional) Install Arduino Drivers

    If you are using Windows 10, the Arduino board should connect without additional drivers required.

    For Arduino clones using the CH340G, CH34G or CH34X chipset you may need additional drivers. Only install these if you see a message saying “No Arduino device found.” when connecting.

  3. (optional) Install Arduino Firmware

    TCLab requires the one-time installation of custom firmware on an Arduino device. If it hasn’t been pre-installed, the necessary firmware and instructions are available from the TCLab-Sketch repository.

Checking that everything works

Execute the following code

import tclab
with tclab.TCLab() as lab:
    print(lab.T1)

If everything has worked, you should see the following output message

Connecting to TCLab
TCLab Firmware Version 1.2.1 on NHduino connected to port XXXX
21.54
TCLab disconnected successfully.

The number returned is the temperature of sensor T1 in °C.

Troubleshooting

If something went wrong in the above process, refer to our troubleshooting guide in TROUBLESHOOTING.md.

Next Steps

The notebook directory provides examples on how to use the TCLab module. The latest documentation is available at Read the Docs.

Course Websites

Additional information, instructional videos, and Jupyter notebook examples are available at the following course websites.

Release files for tclab 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 tclab 1.0.0
File Size Uploaded
tclab-1.0.0.tar.gz 23.0 kB Details

Built distribution (wheel)

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

Total release size: 43.8 kB

Release files / tclab-1.0.0.tar.gz

Download URL tclab-1.0.0.tar.gz
Size 23.0 kB
Tags Source
SHA-256 checksum
How to use checksums
714cc0f7a18e6915922242daa76626148613107ef3c344c301b67e8a69cee63b
BLAKE2b-256 checksum
How to use checksums
84822790f9830074b673c656a50c65f5ce93b5e39f1364ffdba53ae67fa3450e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.31.0 requests-toolbelt/0.9.1 tqdm/4.65.0 CPython/3.8.10

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

Download URL tclab-1.0.0-py2.py3-none-any.whl
Size 20.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
40fa767e1ebfe49d8124f83774d0af1b3928cd3c753d8d9ae04e19118e202b82
BLAKE2b-256 checksum
How to use checksums
15c3c9eda299ce9ae2edff6bda60ce6e81a0d69aea9471611f88941741ad740e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.31.0 requests-toolbelt/0.9.1 tqdm/4.65.0 CPython/3.8.10

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.4.9

2 release files

0.4.8

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.3

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