P19318: Thermochemical Conversion of Food Waste
/public/

User Manual

Table of Contents

Software

Program Overview

On the final product given to the customer, the software will be set up to be easily run from the desktop.

The program is located within the code section (see Software Subsystem) of the EDGE site. In the folder called 'Full Build' there is a collection of files required for operation. The main executable file is called 'ui_main.py'. It was written for Python 3 but may work with different Python versions. It requires pandas, numpy, matplotlib, and Raspberry Pi GPIO and SPI packages.

Steps for Operation

In the current way the software was given to the customer, the following steps are taken to start the code.
  1. The Raspberry Pi is plugged in and launches to the desktop.
  2. In the folder called "Full Build" a file called ui_main.py is double-clicked.
  3. This opens Thonny. In Thonny, the green play button is pressed to start the software.

The software is now running. The remaining steps are related to the software itself and not the file system setup.

  1. In the startup page, the configuration options are checked and modified if desired (i.e., active probes, sampling rate, etc.).
  2. The directory for save files may be changed (if this was previously on a different drive, like a USB drive, and that drive was disconnected, this step is required or the software will likely not start or run properly).
  3. After adjusting the configuration options, the start button is pressed.
  4. Pressing the start button begins the data logging operation of the software.
  5. In the logging operation different tasks may be performed, such as scaling the y-axis of the data being displayed, or turning off the display of different probes (the data is still logged, this is just a visual aid to the user).
  6. After a test run finishes, or the user wishes to end the logging of data, the save/close button is clicked, closing the software and saving the data to the chosen directory.
  7. In the case of an incorrect close, the save file may be corrupted. In this case, there is a backup provided that only gets cleaned up during proper termination of the program. This is to prevent against data loss when the system encounters problems.

The data is now saved in a predetermined folder (chosen by the user during the startup/configuration page). The data is in the format described below. It may be read with different software and is a text file containing the data in a comma-separated-value format (csv). Each column represents a different data set (either time or one of the probe channels).

Startup/Configuration Page

The startup page (code: ui_startup.py) is the first page encountered when running the software. This allows the user to control different aspects of the software, such as active probes and data collection rate. It has a few button and text fields that act as named as well as boxes for each probe. These boxes have a circle that, when clicked, toggle between empty and green. The green probes are the active probes that will be used in data logging. Additionally, each probe has a text box that is used to name the probe for both display during the operation of the software and also in the save file.
Startup Page

Startup Page

Data Logging Page

On the data logging page the data from each enabled probe is displayed in a graph. The most recent values are also displayed to the right. Additionally, the display of a probe can be turned off by clicking on the respective probe's information box. There is also a slider bar to control the width of the plotted data, for easier visualization. Setting this slider to zero will show all data. Lastly, there is a save and quit button, which saves the program, deletes the temporary file (which is there in case the system crashes), and exits safely.
Example Data Logging

Example Data Logging

Saved Data

The data is expored as a .csv file, with the data in labelled columns. The first column, labelled time, is time, in seconds. The remaining columns are labelled by the name given in the startup/config page and are in °C. As the reference temperature is just a guess, it may not give the most accurate results, but the data can be adjusted afterwards to assume a different reference temperature.

Voltage Calibration

This has been performed already and the result is included as 'calibration.csv'. This is automatically used by the main program.

There is also a file called 'calibration.py' that is used to generate the calibration curves for the 14 physically designed thermocouple channels. This code is run and it asks for the number of voltage levels to be analyzed as well as the reference voltage (which can be measured from the Raspberry Pi's 3.3V). Then for each level the inputs should be connected to the same voltage and measured with a multimeter to tell the program the actual voltage levels. This will generate a 'calibration.csv' file that is used by the main software to adjust the read voltage levels.

Configuration File

The config.json file controls many of the software's specifications. Some of it is changed when using the startup/configuration page in software. The rest has been designed to meet requirements but may be changed as deemed necessary. The meanings of each configuration parameter is listed below.

†Controlled by startup page.

Hardware

Overview

Included are two daughter boards and a main board. The main board is attached the the Raspberry Pi and the daughter boards are connected to the main board. The daughter board with the thermocouple connectors (and larger resistors) is denoted as the first daughter board and corresponds to probes 1-7 while the other (without the thermocouple connectors and with smaller resistors) corresponds to probes 9-15.

Troubleshooting

In the case that the system does not start, the main board can be removed from the Raspberry Pi and then powered on, and then re-attached. If this does not work, a different power supply (5V USB) can be used.

If the probes are not connected they should be grounded. If they are floating this will interfere with the data for the rest of the probes, rendering it invalid. Thus, if a probe is not being used its terminals should be shorted to achieve this.

Reference Temperature

A digital temperature sensor is included within the system but is not used by the software as it is not calibrated. Instead the system assumes a reference temperature of 20°C (or whatever is specified during startup). For information on this sensor and how to use it see https://www.adafruit.com/product/374 and https://learn.adafruit.com/adafruits-raspberry-pi-lesson-11-ds18b20-temperature-sensing/software. It is connected to the Raspberry Pi's pin 4, and works in the same manner as described in the aforementioned article.
Overall Design

Electrical Subsystem

Software Subsystem

Mechanical Subsystem

Customer Handoff & Final Project Documentation