Automatic Purification
A pool a dream come true. But how to keep your
water clean it’s often an annoying job.Therefore a thought of this project: an automatic purification system. It checks the ORP value and pH value, if the values are below the standard values of a pool it automatically corrects them by injecting chloride or pH until the standard values are met.
Supplies
*Raspberry pi 4B
*T-cobbler + flat cable
*1 X breadbord
*1 X breadbord power supply
*1 X 4 channel relais board
*1 X DS18B20 temperature sensor
*2 X waterflow sensor
*1 X orp sensor
*1 X pH sensor
* 1 X LCD 16x2
*1 X MCP3008
* 1 X potentiometer 10KΩ
Building the Circuit
We start by connecting all components.
The schematics above show how to connect all the components.
Some components use 3.3V and some use 5V.
The pumps have there own circuit that works on 230V.
This separate circuit is controlled by 4 relays.
I use four because my project has water near it and it’s safer.
Code
For my project i use python. I use some library's such as flask and socketio for my webserver. On my webserver i show the orp, pH and the temprature values. And i also show graphs of the values in the last 10 minutes.
In my code i also send my values to a mariadb server hosted on the raspberry pi. I use threading to separate these tasks.
Building the Housing
For the housing I chose for plastic boxes.
I created two boxes 1 with all the sensors and electronics and one with the Ph and chloride tanks.
It’s important that the tanks are perfectly sealed because of the toxic gasses of the liquids.
In the second box is a small box with the 4 relays too control the pumps.