Auto Ph

by xanderPe in Circuits > Electronics

332 Views, 2 Favorites, 0 Comments

Auto Ph

IMG_20200615_122935.jpg

WARNING: github link doesn't exist anymore

Hello, I am a MCT studenst from Howest Belgium.

Have you ever wanted to automate the Ph in your pool/jacuzzi/hottub? Then this might be something for you.

I've made a device that will automatically adjust the Ph level.

Supplies

IMG_20200612_094022.jpg

You need the following items:

  • Raspberry pi4
  • Arduino Uno
  • LCD display 16*2
  • 16gb SD card
  • 5v usb-c power supply for raspberry pi
  • Ph sensor
  • 12v peristaltic pump (2x)
  • DS18B20
  • 20kg weight sensor (2x)
  • HX711 module (2x)
  • L298N motor driver module
  • 4.7k ohm resistor
  • 10k ohm potentiometer
  • breadboard
  • jumper wires
  • filament for your 3d printer
  • paint (optional)

Tools I used:

  • 3d printer
  • saw
  • brushes
  • drill

Housing

IMG_20200615_123145.jpg

I made a housing out of wood. You can adapt the design to your Ph containers

Beginning

IMG_20200607_140801_1.jpg
IMG_20200607_141758.jpg

For the case I've got help some help from my grandpa. We started by making a frame. I made my housing 70cm tall, 30cm wide and 15cm deep. The housing has to be at least 15cm deep otherwise you won't be able to fit all the electronics easily. For connecting all the pieces of the frame we used wood glue and nail. For extra stability while the glue was drying we added a couple of screws.

The back of the case is glued and nailed on the frame.

On the right side we made 1 hole to pass through the 2 power cables. The top get 4 holes. 1 for the Ph sensor, 1 for the temperature sensor and 2 for the Ph tubes

Adding the Weight Sensors

IMG_20200607_144523.jpg
IMG_20200607_150003.jpg
IMG_20200607_150956.jpg
IMG_20200615_123447.jpg

While the front is still open we added a piece of wood to the bottom for the weight sensors. The wheight sensors are screwed in place. For the top we first added a small piece of wood as a spacer and the a larger peice where we can fit the bottles on.

The Front

IMG_20200607_154257.jpg
IMG_20200607_154449_1.jpg

the front consists of 3 pieces. A smaller piece on the bottom to cover the weight sensors. A door in the middle and at the top another piece of wood to cover the rest of the ellectronics. The door gets hinges, the top and bottom get screwed in place. The top piece received some extra attention. We needed to make a hole for the LCD.

Painting

received_182477029846332.jpeg
received_625737011355370.jpeg
IMG_20200612_115500.jpg
IMG_20200612_115506.jpg
IMG_20200612_115511.jpg

Because mdf wood isn't that appealing I've painted the housing white

3d Print

holder.PNG

I made a mount for the peristaltic pumps. You could also make this out of wood.

To connect the tube to the pumps I used https://www.thingiverse.com/thing:2945382/files from Boerni.

Downloads

Adding the Circuit to the Case

received_2628782544036423.jpeg
received_2628782544036423.jpeg

To mount the RPI, arduino, lcd, motor controller and pumps I used screws. For everything else I used hot glue. If anything would break it can easily be replaced.

Wiring

juiste_bb.png
schematic.png

For my project I used the arduino to to send the Ph and weight values to my RPI through serial communication over USB. The LCD, temperature and motor controller are directly connected to the RPI.

Database

Capture.PNG

My database isn't big: I just needed to save the sensor data. This data i could later use for a history garph.

All the sensor names are stored in device, the measurements are stored in measurements (what a suprise :p). These 2 tables are connected with a anonther table. By doing it this way I could easily expand the database later.

Code

IMG_20200615_123149.jpg