We have developed the first-of-its-kind pH robot capable of small-scale batch titrations for viscous liquid formulations. The fully autonomous, closed-loop pH adjustment is driven by a "physics-informed" ML-driven titration algorithm. The work is detailed in an article undergoing publication and this GitHub repository is part of the electronic supplementary information (ESI) released with the project.
It should be noted that the pH robot can titrate a wide variety of systems, including aqueous solutions, but the focus has been presented on viscous formulations as the robot's design, along with mixing and cleaning protocols, were optimised to overcome the engineering challenge of titrating viscous systems. Furthermore, the titration algorithm can generally work with the use of any strong-strong or weak-strong acid/base pairs. A standalone web application is also linked if you wish to use the hybrid ML algorithm to accelerate bench top pH adjustments, without additionally adopting the robotic technology.
Please find enclosed a bill of materials and assembly guide with the paper's SI. Several components need to be 3d-printed and their designs can be found under the CAD_DesignFiles
directory. Please follow the pHBotAssemblyGuide.pdf
to build the robot yourself.
- Clone the repo
git clone https://github.com/sustainable-processes/pHbot.git
- Create a virtual environment and install the dependencies
Firstly, follow the steps to create a virtualenv for your respective OS system (Mac/Windows). Then install the required package dependencies for this project.
pip install -r requirements.txt
It is recommended to use Python version 3.9 or 3.10 to avoid package installation conflicts.
- Open and run
pHRobot_Operation.ipynb
The Jupyter Notebook is a completely commented-out self-contained file to guide the reader to operate the pH robot. The notebook is divided into sections:
- Importing Packages and Hardware Objects
The pH robot operates using an object-oriented framework and calls upon the various class object definitions under the hardware
directory:
PlatformMovement.py
controls the robot's movement in a cartesian geometry.C3000_SyringePumpsv2.py
controls high-precision TriContinent C-series syringe pumps to dose acid/base.Sentron_pHmeter.py
logs data from the Sentron MicroFET pH probe.Stirrer_WashPump.py
controls two pumps (inlet/outlet) to the robot's washing station, as well as the impeller for mixing the analyte.
- Initialising Hardware and Protocol Functions
i) Initaites communication with the hardware objects; ii) Defines fixed co-ordinates for the sample jars; iii) Defines functions to be called within the titration algorithm for autonomous execution of the robot's unit operations.
- Titration Algorithm
The "physics-informed" ML titration algorithm is defined. Please see the manuscript (to be published) with this work for details.
- Platform Operation and Results
Finally, the pH robot can be called to titrate a single sample at a time, or a batch of samples (up to 12). pHRobot_Operation.ipynb
has been provided with some sample output to show you what successful execution of a batch of pH adjustments on the robot should look like.
A separate web application (https://aniketchitre-accelerate-titrations-titrationalgo-webapp-z383g2.streamlit.app) has been developed and hosted on Streamlit to accelerate traditional pH adjustment workflows. This is the same algorithm as run on the pH robot and found in the Jupyter Notebook, except it's for those interested parties that may wish to adopt the algorithm, without necessarily reproducing the pH platform we have presented. Please note if the web application has gone to sleep, you may simply "wake up" the app from your end.
Submit an issue or email Aniket Chitre for any software-related issues (e.g., titration algorithm/web app, control of the pH robot) and Jayce Cheng for any hardware related questions (e.g., assembly of the pH robot).
If you find this project useful, we encourage you to:
- Star this repository ⭐
- Cite our paper (https://doi.org/10.26434/chemrxiv-2023-c46mv)