Skip to main content

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

  1. Plug the Arduino with the lab attached into your computer via the USB connection. Plug the DC adapter into the wall.

  2. (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.

  3. (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 connected on port XXXX
20.58

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

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

tclab-0.1.0.dev4.tar.gz (12.8 kB view hashes)

Uploaded Source

Built Distributions

tclab-0.1.0.dev4-py3.6.egg (25.1 kB view hashes)

Uploaded Source

tclab-0.1.0.dev4-py2.py3-none-any.whl (13.4 kB view hashes)

Uploaded Python 2 Python 3

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