• For a Limited Time the R2R Partner Membership is NOW OPEN! Get some cool swag and chances to win part of over $20,000 in prizes! Click here for more details

#reefpi any one use PH to control CO2 injection?

Devin_Tesla

New Member
View Badges
Joined
Sep 25, 2020
Messages
10
Reaction score
10
Location
Canada
HI all

Got my Robo tank reef-pi set up loving it.
the backwards macros make my head spin a little but I think I'm getting it but I'm stuck on on thing
I want to use the control from the ph probe to turn off the co2 if there is to much and I'm having a hard time getting such a simple function to work the.

ultimately all I want it if ph below 7.1 turn of this plug maybe if it goes back above turn back on HELP!


@Ranjib @robsworld78
 
Zoanthids.com

robsworld78

Active Member
View Badges
Joined
Feb 14, 2020
Messages
218
Reaction score
472
Location
Edmonton, Canada
HI all

Got my Robo tank reef-pi set up loving it.
the backwards macros make my head spin a little but I think I'm getting it but I'm stuck on on thing
I want to use the control from the ph probe to turn off the co2 if there is to much and I'm having a hard time getting such a simple function to work the.

ultimately all I want it if ph below 7.1 turn of this plug maybe if it goes back above turn back on HELP!


@Ranjib @robsworld78
Hi Devin, good to hear.

If you only want to turn an outlet on/off based on pH you should be able to select the outlet directly from the pH settings. Instead of selecting "macro" change it to "equipment" and select the outlet from the list. That will turn the outlet on/off based on a set value.
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,159
Reaction score
2,777
I dont use the ph controller to turn on my injection, only use timers in reef pi. Havent had the chance to play with macros to run co2 based on time and to have a bottom ph failsafe number to turn co2 injection off.

Id only want a failsafe otherwise I time injection to match when the plants will use the co2.
 

robsworld78

Active Member
View Badges
Joined
Feb 14, 2020
Messages
218
Reaction score
472
Location
Edmonton, Canada
HI all

Got my Robo tank reef-pi set up loving it.
the backwards macros make my head spin a little but I think I'm getting it but I'm stuck on on thing
I want to use the control from the ph probe to turn off the co2 if there is to much and I'm having a hard time getting such a simple function to work the.

ultimately all I want it if ph below 7.1 turn of this plug maybe if it goes back above turn back on HELP!


@Ranjib @robsworld78
Here's a better description of how you can set this up.

 
OP
D

Devin_Tesla

New Member
View Badges
Joined
Sep 25, 2020
Messages
10
Reaction score
10
Location
Canada
OK i think I have it working still have the CO2 running on the timer for the moment and watching how the pi reacts as it runs the normal daily cycle

is there a reason the upper limit fires the lower function and the lower limit fires the upper function?

Screenshot from 2020-10-08 18-21-16.png

so this is my set up and when I go above my upper threshold 7.12 the co2 comes on and below it it turns off. in testing I found if I go below the the lower threshold the upper function comes on. I'm guessing it not actually up and lower function but rase and lower PH.
also is there a way to not have a funtion in the unused spot right not I have an extra outlet I'm not using as my do nothing port
 
Last edited:

robsworld78

Active Member
View Badges
Joined
Feb 14, 2020
Messages
218
Reaction score
472
Location
Edmonton, Canada
OK i think I have it working still have the CO2 running on the timer for the moment and watching how the pi reacts as it runs the normal daily cycle

is there a reason the upper limit fires the lower function and the lower limit fires the upper function?

Screenshot from 2020-10-08 18-21-16.png

so this is my set up and when I go above my upper threshold 7.12 the co2 comes on and below it it turns off. in testing I found if I go below the the lower threshold the upper function comes on. I'm guessing it not actually up and lower function but rase and lower PH.
also is there a way to not have a funtion in the unused spot right not I have an extra outlet I'm not using as my do nothing port
The lower/upper function might be backwards due to the "reverse" setting on the pH connector. Try going to the connector tab, at the bottom you'll see the analog connectors, the one listed is for the pH. Edit it and tick the reverse setting and see if that sorts it out.

I think you also want to add a hysteresis of 0.1 so it doesn't keep switching, here's an explanation of it. This speaks of temps but it's the same for pH.


Why does checked every second cause a Pi heart attack? :) It should be ok like that but with that said the pH circuit only updates every 3 seconds so even though you check every second 2 of them are duplicates.
 
OP
D

Devin_Tesla

New Member
View Badges
Joined
Sep 25, 2020
Messages
10
Reaction score
10
Location
Canada
I have set hysteresis to 0.1 but every time I save it it goes to 0 I'm hopping it's just a display thing.

The pi hit 95-80 cpu when I had it at 1 sec it's back to 20 sec or so
 

robsworld78

Active Member
View Badges
Joined
Feb 14, 2020
Messages
218
Reaction score
472
Location
Edmonton, Canada
I have set hysteresis to 0.1 but every time I save it it goes to 0 I'm hopping it's just a display thing.

The pi hit 95-80 cpu when I had it at 1 sec it's back to 20 sec or so
I read that from someone else not long ago, @Ranjib is this an issue or am I explaining it wrong?

I wonder if the CPU goes high because it's continually running the control. If you turn off the control and set to a second do it run ok?
 
Lazys Coral House
OP
D

Devin_Tesla

New Member
View Badges
Joined
Sep 25, 2020
Messages
10
Reaction score
10
Location
Canada
I read that from someone else not long ago, @Ranjib is this an issue or am I explaining it wrong?

I wonder if the CPU goes high because it's continually running the control. If you turn off the control and set to a second do it run ok?
Yeah once it disables it drops the cpu

I did chack there is no check for the ph to inverse not Shure what up with that

I did just try 1 setting it to 1 and it still just goes to 0 after save so I set it back to 0.1 I have not played with it enough to see if it's working or not.
 

robsworld78

Active Member
View Badges
Joined
Feb 14, 2020
Messages
218
Reaction score
472
Location
Edmonton, Canada
Yeah once it disables it drops the cpu

I did chack there is no check for the ph to inverse not Shure what up with that

I did just try 1 setting it to 1 and it still just goes to 0 after save so I set it back to 0.1 I have not played with it enough to see if it's working or not.
Sorry I was wrong about the reverse setting. Let's see what Ranjib thinks of this.
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
8,264
Reaction score
14,719
Location
Palo Alto, Bay Area
I read that from someone else not long ago, @Ranjib is this an issue or am I explaining it wrong?

I wonder if the CPU goes high because it's continually running the control. If you turn off the control and set to a second do it run ok?
It depends on what being read or acted upon. Different sensor and drivers have different overhead. This along with what else is running on the controller drives total load. And all of this assuming pi is runnng in server mode (no GUI) . Pi zero is pretty easy to exhaust, for pi 3 , it has to be decent amount of workload, otherwise a handful of 1s check interval should be doable,
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
8,264
Reaction score
14,719
Location
Palo Alto, Bay Area
Yeah once it disables it drops the cpu

I did chack there is no check for the ph to inverse not Shure what up with that

I did just try 1 setting it to 1 and it still just goes to 0 after save so I set it back to 0.1 I have not played with it enough to see if it's working or not.
I’ll check , sounds like an ui /validation bug . Thank for informing us.
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
8,264
Reaction score
14,719
Location
Palo Alto, Bay Area
OK i think I have it working still have the CO2 running on the timer for the moment and watching how the pi reacts as it runs the normal daily cycle

is there a reason the upper limit fires the lower function and the lower limit fires the upper function?

Screenshot from 2020-10-08 18-21-16.png

so this is my set up and when I go above my upper threshold 7.12 the co2 comes on and below it it turns off. in testing I found if I go below the the lower threshold the upper function comes on. I'm guessing it not actually up and lower function but rase and lower PH.
also is there a way to not have a funtion in the unused spot right not I have an extra outlet I'm not using as my do nothing port
The control logic is a common part across temperature and ph module. It originated in temperature modules. In temperature controller, heater is turned on when sensor reading goes below the minimum threshold and chiller/fan is turned on sensor reading goes above the maximum threshold. Controller is trying to keep the sensor value within a range (homeostasis ), hence lower function is invoked when upper threshold is breached and vice versa. When sensor value is within range then neither of the function is called. Hysteris is used to avoid flapping
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
8,264
Reaction score
14,719
Location
Palo Alto, Bay Area
If I understand correctly you want to keep ph below 7.1. Decide what’s the lowest acceptable value . Assuming this is 6.5, I’ll go with something like:
Lower threshold : 6.8, hysteresis: 0.3, upper function : co2 pump.

If you don’t select anything for the upper threshold and function it should be ok. Just keep them blank.
 
OP
D

Devin_Tesla

New Member
View Badges
Joined
Sep 25, 2020
Messages
10
Reaction score
10
Location
Canada
If I understand correctly you want to keep ph below 7.1. Decide what’s the lowest acceptable value . Assuming this is 6.5, I’ll go with something like:
Lower threshold : 6.8, hysteresis: 0.3, upper function : co2 pump.

If you don’t select anything for the upper threshold and function it should be ok. Just keep them blank.

No quite I'm running a fresh water tank

So co2 reactor comes on 30min before the lights and if the ph goes below 7.1 ish I turn it off (should only happen if I over dose) so 7.1 is a uper limit below that it turns off above it turns back on.
I do now have the lower limit get to 6.8 and it runs my air stone if it goes below 6.8 the air stone comes on to save the fish.

Next up auto water changes
Thanks.
Devin



Once I figured out that timmers run macros in reverse and that the lower function what to lower the ph and the upper function was to raise it it all seams to work as expected except the hysterisis that looks to just be a UI thing like you said.
 

How vigilant are you when it comes to the TDS of your RODI water?

  • It is VERY important to me

    Votes: 324 62.9%
  • It is somewhat important to me

    Votes: 150 29.1%
  • It is NOT important to me

    Votes: 31 6.0%
  • Other (please explain in thread)

    Votes: 10 1.9%

Online statistics

Members online
731
Guests online
2,635
Total visitors
3,366
Top