#reefpi any one use PH to control CO2 injection?

Devin_Tesla

New Member
View Badges
Joined
Sep 25, 2020
Messages
20
Reaction score
16
Location
Canada
Rating - 0%
0   0   0
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
 

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,280
Location
Edmonton, Canada
Rating - 0%
0   0   0
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,189
Reaction score
2,826
Rating - 0%
0   0   0
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

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,280
Location
Edmonton, Canada
Rating - 0%
0   0   0
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
OP
D

Devin_Tesla

New Member
View Badges
Joined
Sep 25, 2020
Messages
20
Reaction score
16
Location
Canada
Rating - 0%
0   0   0
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

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,280
Location
Edmonton, Canada
Rating - 0%
0   0   0
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
OP
D

Devin_Tesla

New Member
View Badges
Joined
Sep 25, 2020
Messages
20
Reaction score
16
Location
Canada
Rating - 0%
0   0   0
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

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,280
Location
Edmonton, Canada
Rating - 0%
0   0   0
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?
 
OP
OP
D

Devin_Tesla

New Member
View Badges
Joined
Sep 25, 2020
Messages
20
Reaction score
16
Location
Canada
Rating - 0%
0   0   0
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

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,280
Location
Edmonton, Canada
Rating - 0%
0   0   0
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
9,825
Reaction score
17,041
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
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
9,825
Reaction score
17,041
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
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
9,825
Reaction score
17,041
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
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
9,825
Reaction score
17,041
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
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
OP
D

Devin_Tesla

New Member
View Badges
Joined
Sep 25, 2020
Messages
20
Reaction score
16
Location
Canada
Rating - 0%
0   0   0
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.
 

Raf714

New Member
View Badges
Joined
Feb 12, 2021
Messages
15
Reaction score
10
Location
Essen, Belgium
Rating - 0%
0   0   0
Hi guys,
I have set up my CO2 injection for my freshwater tank like described and it does the job.
Now I like to stop the CO2 injection overnight when the aeration starts and restart it in the morning when the aeration stops. I made a macro disabling the pH-sensor, stop the CO2 and start the aeration. A second macro does the opposite. I inserted temporally an alert to control it.
The problem is the macro' started.
Same situation in the morning, the pH sensor doesn't get enabled and I keep getting alerts, 1 every minute = sampling frequency?
When I later try to enable the pH-sensor manually, it jumps back to disabled after my back a few whiles.

Is there something I missed or did wrong? Are there better ways to come to the same result?
I use a Robo-tank deluxe pH-measurement.
 

A worm with high fashion and practical utility: Have you ever kept feather dusters in your reef aquarium?

  • I currently have feather dusters in my tank.

    Votes: 64 36.8%
  • Not currently, but I have had feather dusters in my tank in the past.

    Votes: 59 33.9%
  • I have not had feather dusters, but I hope to in the future.

    Votes: 25 14.4%
  • I have no plans to have feather dusters in my tank.

    Votes: 26 14.9%
  • Other.

    Votes: 0 0.0%
Back
Top