Skip to content

abdullahsumbal/ph-monitor

Repository files navigation

ph-monitor

This program talk to a Knick Protavo 904 ph meter and Hei_FLOW Precision 01 pumps. Depending on the hp value read from the ph meter, the pump flow is controlled. The program is capable of controlling multiple pumps. This application will only work on Windows.

Knick Protavo 904 ph meter setup

Download and install application called Paraly SW 112 using this link.

This is how the application looks like alt text Image of Knick Protavo 904 ph meter alt text

Connect Knick Protavo 904 ph meter using micro-usb. Start the application Paraly SW 112 and device should atomically connect. Click on the start button to start logging ph.

Note: this project is not maintained. If the link does not work, just google Knick Protavo 904.

Hei_FLOW Precision 01 pump setup

Computer talks to pump using RS232 connection. No Other set up required.

Program Prerequisites for (our code)

Install Anaconda

  1. Download Anaconda from here. Make sure to select Windows and Python <3.5.
  2. Install Anaconda.
  3. Start Command Prompt as administrator. It is important to start Command Prompt as administrator because , we need to install some python packages that requires permission fro windows.
  4. Run the following commands in command prompt to create anaconda environment.
conda create -n ph python=3.5

where ph is the name of the environment 5. Enter environment

conda activate ph
  1. Run the following commands to install python packages.
conda install -c conda-forge pyautogui pyperclip
conda install -c anaconda pyserial 
conda isntall numpy

Before running Program

Please follow the following steps before running the program.

  1. Make sure Paraly SW 112 is running and logging in the background
  2. Make sure the log interval and the ph_read_interval variable value is inside the configuration.json file matches. configuration.json file is in the root directory of this project. You can add multiple COM ports if you have more pumps.
  3. Pump is stopped (Not turned off).
  4. Go inside Device Manager and under Ports(COM & LPT) you will find COMX (where X is a number) for the pump.
  5. Put this COMX inside the configuration.json file.

Running Program

The program can be run using an IDE like pycharm, but you will have to install pycharm and set the environment to ph (which we created earlier). Or you can run it on the terminal using the following command

python3 Controller.py

When the program start it asks user to continue only when they have performed the steps on the screen. So please follow the steps.

Some things to look for

  1. When the Paraly SW 112 is logging, the row are the same. You need to scroll to the bottom to see the new values.
  2. Your COM port is not correct.
  3. Google things if you do not understand.
  4. It talks to Paraly SW 112 in every hacky way. The program take controls of your mouse and copies (Ctrl + C) the logging row from the Paraly SW 112.

How to make changes.

This program is very customized to specific need. The code is well commented and structured. It uses a observer design pattern. Email me if you want to make changes: muhammad.sumbal@mail.mcgill.ca

About

PH pump interface application for tank reactor.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages