Hi guys, I'm fairly new to the world of Arduino,
I've used one in the past to control relays on simple timer based logic.
I'm now looking into making a logic loop.
The project is an automated PH up/down doser. That only doses at specified times. (so it doesn't dose during the night)
Ideally it would check if a PH dose is needed, dose if needed, then run a circulation pump in the water reservoir so the next PH check is accurate.
The hardware is an Uno R3
2 12v Peristaltic pumps
A 12v 5A power supply
5v 4 channel relay board
A Ds3231 RTC
An Atlas scientific Gravity PH sensor/board (5V powered)
2 40mm 12v fans for moving air through the project box when pumps are running.
120V Circulation pump
I had originally bought a 12v to 5v Buck converter to power the Arduino
but I think i'm going to use a 1 A amp phone charger to power the Arduino through the usb port instead of using the buck converter.
The questions I have are as follows:
Could I potentially power the relay board, and PH board just from the buck converter,
But still control the relay coils from the Arduino, and still receive output from the PH board safely?
Would I run into any issues with the Phone charger ground that would be in the usb port, not being tied to the ground of the buck converter?(recirculating current is my first thought)
Or should I also tie the ground from the Buck converter to a ground pin on the Arduino?
(powering them from the buck converter would be just to lighten the ma load on the Arduino)
Or should I just power them from the Arduino?
Second, I posted my logic below, I believe what I'm wanting to do would be feasible with an Arduino
but if someone could put eyes on it and check that would great.
I would like to keep the PH between 5.6 and 6.4
Relay 4 Cooling fans
Relay 3 PH up pump
relay 2 PH down pump
Relay 1 reservoir Circulation pump
Check the time
If the time equals one of the specified times 1pm,2pm,3pm etc, Check PH
If time is not equal to one of the specified times go back to checking the time.
If Ph is above 6.4 then perform PH down dosing,then go back to checking time.
If PH is below 6.4 then check if PH is above 5.6
If PH is below 5.6 Perform PH up dosing,then go back to checking time.
If PH is above 5.6 go back to checking time
PH down dosing :
Close relay 2 and relay 4, and run for X amount of time, then
Close relay 1 and relay 4, and run for x amount of time, then go back to checking time
PH up dosing :
Close relay 3 and relay 4, and run for X amount of time, then
Close relay 1 and relay 4, and run for x amount of time, then go back to checking time
I've attached pictures of the project, I don't have the Circulation pump installed yet as I don't want to lug it around with box,
and the phone charger is not installed yet, and alot of the wiring isn't there. The switches above the dosing pumps will be for manual operation/priming.
Let me know what you think, Cheers!