Package: tclab
Master:Development:TCLabprovides a Python interface to theTemperature Control Labimplemented on an Arduino microcontroller over a USB interface.TCLabis implemented as a Python class within
thetclabpackage.  Thetclabpackage also includes:clockA Python generator for soft real-time implementation of
process control algorithms.HistorianA Python class to log results of a process control
experiment.PlotterProvides an historian with real-time plotting within a
Jupyter notebook.TCLabModelAn 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 useTCLabModel.The companion Arduino firmware for device operation is available at theTCLab-Sketch repository.TheArduino Temperature Control Labis 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
anyArduinoor Arduino compatible
microcontroller.InstallationInstall usingpip install tclabTo upgrade an existing installation, use the commandpip install tclab --upgradeThe development version contains new features, but may be less stable. To install the development version use the commandpip install --upgrade https://github.com/jckantor/TCLab/archive/development.zipHardware setupPlug 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.(optional) Install Arduino DriversIf 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.macOS.Windows.(optional) Install Arduino FirmwareTCLabrequires 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 theTCLab-Sketch repository.Checking that everything worksExecute the following codeimport tclab
with tclab.TCLab() as lab:
    print(lab.T1)If everything has worked, you should see the following output messageConnecting 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.TroubleshootingIf something went wrong in the above process, refer to our troubleshooting guide
in TROUBLESHOOTING.md.Next StepsThe notebook directory provides examples on how to use the TCLab module.
The latest documentation is available atRead the Docs.Course WebsitesAdditional information, instructional videos, and Jupyter notebook
examples are available at the following course websites.Arduino temperature control lab pageon the BYU Process Dynamics and Control course website.CBE 30338for the Notre Dame
Chemical Process Control course website.Dynamics and Controlfor notebooks developed at the University of Pretoria.