Skip to content

Latest commit

 

History

History
75 lines (48 loc) · 4.56 KB

README.md

File metadata and controls

75 lines (48 loc) · 4.56 KB

Raspberry Pi Based Logging Thermocouple

DOI:10.33774/chemrxiv-2021-cxs25 License: MIT

Publication

Detailed information about the design and testing of these files is available in the accompanying paper:

Paper | Supplementary Information

If you have used this project as a resource in your research, please cite:

David Lee Walmsley, Stephen Hilton, Emilie Sellier, Matthew Penny, Daniel Maddox (2021) “Control and Monitoring of Temperature in 3D-Printed Circular Disk Reactors for Continuous Flow Photochemistry using Raspberry Pi Based Software” ChemRxiv. DOI: 10.33774/chemrxiv-2021-cxs25

Assembly Instructions

Bill Of Materials

Description Product Number Source Price (£)
Raspberry Pi 4 Model B 2Gb SC0193 thepihut.com 33.90
Official UK Raspberry Pi 4 Power Supply (5.1V 3A) SC0212 thepihut.com 7.50
Raspbian Preinstalled 16GB Micro SD Card [Discontinued] SC0267 thepihut.com 8.00
Thermocouple Amplifier MAX31855 breakout board ADA269 thepihut.com 13.00
Thermocouple Type-K Glass Braid Insulated Stainless Steel Tip ADA3245 thepihut.com 8.70
RGB LCD Shield Kit w/ 16x2 Character Display ADA716 thepihut.com 20.80
3D Printing Filament Made in Germany 1.75 mm 2.85 mm PLA PETG HIPS 15 Colours 1 kg Spool or Refill 8719689844059 amazon.co.uk (24.88/ kg, 71 g used) 1.77
Total (116.78) 93.67

A modified version of a publicly available Raspberry Pi 4 case was designed to accommodate RGB LCD shield (ADA716) – allowing headless operation of the device and containment of all components. STL files and further instructions for this modified case are available in the Vernalis 3D-printing Files Repository. This was printed in PETG filament to provide good temperature resilience during operation even during high CPU usage.

Assembly

Raspberry Pi 4 containing 16Gb SD card (with operating system pre-installed) was fitted into the base of the case.

Thermocouple amplifier (ADA269) interfaces using SPI and was connected to 3V (Vin), Ground (Gnd), GPIO 9 (Do/MISO), GPIO 11 (Clk) and GPIO 5 (CS). Type-K class thermocouple (ADA3245) was connected to positive and negative terminals, noting correct polarity ref. Thermocouple threaded through side port included in upper portion of case.

RGB LCD Shield (ADA716) was constructed according to supplier instructions [ref]. The screen and buttons primarily interface using I2C, with the reset button operating as an independent switch monitored on a separate GPIO pin. Shield was connected to 5V, Ground, GPIO 2 (Data/SDA), GPIO 3 (Clock/SCL) and GPIO 17 (Reset, configured pin to be ‘pull up’). Screen was then mounted into upper portion of case using 4 screws (M2.5 nuts printed into the casing). Case could then be snapped together closed.

Fritzing and circuit diagrams follow below:

Fritzing_Diagram

Circuit_Diagram

Code & Usage

Datalogging code written and tested in Python 3.7.3 using Thonny IDE. Thermocouple interface code based on that supplied by manufacturer [ref]. Screen I2C interface code based on that supplied by manufacturer [ref].

By default the script will output a CSV to the user folder, however can also be configured to output to a defined location by either of two methods. First, by providing the path as a command line argument:

python logging_thermocouple.py /path/to/output/folder/

Or secondly by setting an environment variable:

export VER_THERM_LOG=/path/to/output/folder
python logging_thermocouple.py

Once started, the code will log a temperature every 15 seconds to a csv file in a pre-defined file location and update the LCD screen accordingly. To prevent log file corruption, press and hold the reset button to ‘break’ and stop the code loop.