Python bindings for the BYU Arduino Temperature Control Lab
Project description
The BYU Arduino Temperature Control Lab is designed as 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. Experiments can then be programmatically controlled using Python over a USB connection.
The TCLab modules provides access to the temperature control lab using Python, and includes the necessary Arduino firmware for device operation.
Installation
Install using
pip install tclab
To upgrade an existing installation, use the command
pip install tclab --upgrade
Hardware setup
Plug the Arduino (UNO or Leonardo) with the lab attached into your computer via the USB connection. Plug the DC adapter into the wall.
(optional) Install Arduino Drivers
If you are using Windows 10, the Arduino board should connect without additional drivers required.
Mac OS X users may need to install a serial driver. For arduino clones using the CH340G, CH34G or CH34X chipset, a suitable driver can be found here or here.
(optional) Install Arduino Firmware
If you are using your own Arduino board, you will need to flash the board with the custom firmware used by the lab. This is done using the Arduino IDE. The script that must be uploaded to the board is found in the sketch directory.
Checking that everything works
Execute the following code
import tclab tclab.TCLab().T1
If everything has worked, you should see the following output message
Connecting to TCLab TCLab Firmware Version 1.2.1 connected on port XXXX 21.54
The number returned is the temperature of sensor T1 in °C.
Next Steps
The notebook directory provides examples on how to use the TCLab module.
Course Website
For more information, instructional videos, and Jupyter notebook examples visit the
Arduino temperature control lab page on the BYU Process Dynamics and Control course website.
CBE 30338 for the Notre Dame Chemical Process Control course website.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for tclab-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a348fd18bcb0f5e6ef2a319478f522ac6ba67614ea311b8d24bd0c1cc2f9a91 |
|
MD5 | 3d6ef92d4ad62e6d394316c6b4fc6b1e |
|
BLAKE2b-256 | 55dac0b5d16f99cc0696f07cd460c56f1714f4af68ffc73f27d404c728894399 |