. Software .

1. Overview

Good software is required to guide users to use our project NAIADS better and make our hardware more integrated. This year, our teams constructed the co-culture hardware, FermentX, for continuous fermentation with broad users, including researchers, farmers, and companies. This encouraged us to design a software that meets different people's needs. Our software, designed to control the co-culture bioreactors, has an online database and graphical user interface software with two versions that work on cell phones and personal computers. The online database powered by the Flask enables API programming to control bio-reactor since the ESP-32 in the hardware regulates the bioprocess according to it. Now, different people can choose different versions of software to achieve their goals, even integrated into other systems.

2. Computer Software Manual [PDF Version]

1.Introduction

FermentX is a fermentation reactor designed and constructed by XMU-China 2023. It consists of several parts, roughly divided into software and hardware. To help user better understand this reactor and how it operates, this user manual was written down.

Table 1 Here is some description of the parts in this reactor.
Parts Description
Anaconda Powershell Prompt (anaconda3) The operation program of FermentX
Initiation A section in main page of the control panel, a new project is created or an old project is opened here.
Calibration A section in page of the control panel, calibration of pumps can be controlled here.
Dashboard A section in page of the control panel, an overview of fermentation and a real time data can be seen here.

Part 1:Software manual

1. Install the software FermentX.
2. Open the program: Anaconda Powershell Prompt (anaconda 3)
*Notes: The program file is under a file named Anaconda 3 (64 bit), you can find this file in the menu of “start”.
3. Type in the command “cd (file location)”, then press enter.
4. Type in the command “streamlit run. \Initialization. py”, then press enter.

Fig.1 Start the computter software from command line

5. Wait a moment for redirection to the control panel of FermentX.
6. At the “Initialization” page of the control panel, you can choose to load old or create new.
a. Create new: select “create new” then press “OK”
b. Load old: enter a Project_ID, then press “OK”

Fig.2 Initialization part of the computter software

7. Wait until it shows “success”

Fig.3 Successful finish the Initialization part of the computer software

8. Start calibration. (Part 2)

Matters needing attention

(1)Network connection is needed as the data collected is transferred from program to your computer through network.
(2)The program Anaconda Powershell Prompt (anaconda 3) cannot be shut down during the fermentation.
(3)The Project_ID is a Linux timestamp, which represent the time you create a new project, and it can be converted into exact time by any Linux timestamp converter.
e.g. 1696416575 represents a time 2023-10-04 18:49:35.

Part 2:Calibration

1. Click the calibration section on the menu

Fig.4 Calibration part of the computter software

2. The calibration page is as below.

Fig.5 Start to calibration

Overview: an overview of the calibration, each data of the calibration will be shown here.
Pump 1: A pump to control the addition of base.
Pump 2: A pump to control the addition of acid.
Pump 3: A pump to control the addition of antibiotic 1.
Pump 4: A pump to control the addition of antibiotic 2.
Pump 5: A pump to control the addition of feeding solution.
Pump 6: A pump to control the speed of removal of waste solution.
Pump 7: A pump to circulate fermentation liquid for OD monitoring.
pH detector: A section to calibrate pH detector.

3. Calibration of pump 1
a. Click “Start Prefill Tube”, then the tube will start to be filled with alkali solution.
b. When the tube is filled with alkali solution, click “Stop Prefill Tube”
c. Prepare a 100 or 200 mL volumetric cylinder to receive the flow out liquid from the tube.
d. Click “Start Calibration”, liquid will flow continuously for 1 min.
e. When the liquid stops to flow out from the tube, click “Stop Calibration”.
f. Input the volume of liquid received in to the dialog box.
g. Click “Submit”, wait until it shows “success”
h. Repeat steps a~f for the calibration of pump 2 to pump 7 using corresponding liquid

Table 1 Here is some description of the parts in this reactor.
pump Liquid used in calibration
2 Acid
3 Feeding solution
4 Feeding solution
5 Feeding solution
6 Water
7 Fermentation liquid
Fig.6 Pump calibration

4. Calibration of pH detector
a. Prepare calibration solution of pH detector, e,g. pH= 4.00, 6.86, 9.18
b. Take the pH detector out from its buffer (usually a saturated solution of KCl).
c. Clean the electrode carefully with distilled water, then wipe it with tissue paper gently.
d. Insert the electrode into a calibration buffer, for example the one with pH=4.00.
e. Click “Start Calibration”.
f. Wait for 3 min to have a more accurate calibration.
g. Click “Stop Calibration”.
h. The data collected will be in a normal deviation, record the peak value.
i. Input the data of the calibration buffer used and the peak value recorded into the dialog box.
j. Click “Submit”, wait until it shows “success”.
k. Clean the electrode as step c.
l. Repeat the calibration with the buffer pH= 6.86 and 9.18.

Fig.7 pH calibration

Matters needing attention

(1)Prefill and calibration must be carried out before every fermentation.
(2)A data must be input during the calibration, if not, fermentation cannot be started.
Note: For the pump which is not used in your fermentation, input a number “0” into the dialog box will be OK.
(3)The electrode of the pH detector have to be cleaned every time before and after used to maintain its accuracy.
(4)During the second calibration of pH detector, there will be an overlap of data on the graph shown, highlight the area which has no overlapping and then record its peak value.
(5)The graph of voltage in pH detector calibration will be hidden once you start to input the data of pH buffer and voltage. Hence, we suggest you to record the value before you start to input data. If you forget the value, click “Stop Calibration”, then the graph will be shown again.

Part 3:Dashboard—Starting a fermentation

1. After setting up everything, click “Start”.

Fig.8 Begin to fermentaion

2. The data of every pump will be shown in the “Overview” section. You can monitor the trend and the real-time situation here.
3. Click “Refresh” to show the latest data.
4. The input speed of pump 5, 6, air pump, the desired pH and temperature can be adjusted here.
a. Select the pump you want to adjust.
b. Input a desired number.
c. Click “Submit”.
d. Wait until it shows “success”.

Fig.9 Adjust the pump speed

Matters needing attention

(1)“Start” and “Stop” can only be clicked once during the fermentation.
(2)The number shown under the label “Control Device” indicates that how long the data has not been uploaded to the database. Hence, after clicking “Refresh”, the number should decrease. If it increases gradually after clicking “Refresh”, this means the network connection should have some problem.
Ways to solve this problem:
a. Check whether your network is working.
b. Click the “EN” button on the chip.
c. Reconnect the chip with USB.
(3)The “Refresh” button should be clicked at least once every half day after the fermentation starts.
(4)Wait until it shows “Success” every time you submit a number before proceeding to the next step.

3. Cell-phone APP

According to the feedback from farmers who are the end users of BC/HA cross-link compounds, the network is the main problem if it works in a wild environment. We then run a local database in the ESP-32 chips of Controller in FermentX and turn the chips into STA-AP mode, which can set up a Wi-Fi connection while also connecting to the Wi-Fi of the cell phone. So that the cell phone APP is built to examine the device quickly, but pump adjustment is cancelled (Fig.10). The cell phone APP is much more suitable for people who has less concern about adjustment but check, like the final product users.

Fig.10 Cell phone app for examing the FermentX quickly

4. API Programming

To control the FermentX by model, the API programming function should be developed, also providing the possibility to integrate the Bio-Reactor to other devices. Since the control schedule of FermentX directly connects to the online database, we create a Python Package to change the control single in the database to realize high frequency adjustment. The following table describes the function in the package with a code sample.

Table 1 Here is some description of the parts in this reactor.
Name Paramater Return Function
update_index time: creacion time (type: Linux timestamp); index: pump index (type: int, 1-7); data: data (type: float) 0 or 1 change the pump speed to the value data
lookup_database time: creacion time (type: Linux timestamp); index: pump index (type: int, 1-7); cur: request tine (type: Linux timestamp, -1 represents all) a list of data (max: 1000 points) consult the time series data of pump's additional volume after request time




Code Sample

import FermentX as F
dataset1 = F.lookup_database(1696960959, 5, -1)
dataset2 = F.lookup_database(1696960959, 5, 1696961000)
work = F.update_index(1696960959, 5, 100)
print(work)