DIY Kalk Controller

OP
OP
Sisterlimonpot

Sisterlimonpot

Effortless Perfection
View Badges
Joined
Jul 15, 2009
Messages
4,260
Reaction score
8,615
Location
Litchfield Park
Rating - 0%
0   0   0
I am about a year or two behind you. I have been reading and watching alot of video on Chris Meckley's pH approach. At this point, I am looking to build just an arduino for pH tracking without the use of an APEX. Were you happy with the Atlas Scientific Gravity or Eno boards?
Definitely. I used the ezo board for this project. I do have a pH gravity circuit but never integrated that into a system, i wouldn'tbe able to speak smartly about the differences between the 2.

However, I found that there are a number of benefits with integrating the atlas scientific hardware into an arduino project.

The great thing I like about the pH circuit is that you're able to calibrate to any point, which made it perfect for this project.

Take Apex for instance, the pH calibration provides the user with 2 separate options to calibrate using easily available buffer packets, 4.00-7.00 or 7.00-10.00. However this becomes an issue when wanting to ensure calcium hydroxide saturation in a kalk reactor. If the apex was calibrated with 7.00-10.00 then it would have a good idea of the pH within that range, but anything outside of that becomes more skewed the further away from 10.00 you go... so 12.44 (saturated kalk) is only a guess with apex, plus I believe their software only displays up to 12.30.

That alone is the reason why people say you can't monitor saturation with a pH probe. However the Atlas circuit allows you to set the calibration points. And I purchased a 12.46 pH buffer solution that gives the software the ability to accurately track pH within (in my case) 10.00-12.46.

When pH inside the kalk reactor drops below 12.40, I get an alert telling me it's time to refill the reactor. If you were using an Apex to alert you, it would be already too late.
 

GuppyHJD

Valuable Member
View Badges
Joined
Jun 15, 2020
Messages
1,209
Reaction score
738
Location
North Port, FL
Rating - 0%
0   0   0
Definitely. I used the ezo board for this project. I do have a pH gravity circuit but never integrated that into a system, i wouldn'tbe able to speak smartly about the differences between the 2.

However, I found that there are a number of benefits with integrating the atlas scientific hardware into an arduino project.

The great thing I like about the pH circuit is that you're able to calibrate to any point, which made it perfect for this project.

Take Apex for instance, the pH calibration provides the user with 2 separate options to calibrate using easily available buffer packets, 4.00-7.00 or 7.00-10.00. However this becomes an issue when wanting to ensure calcium hydroxide saturation in a kalk reactor. If the apex was calibrated with 7.00-10.00 then it would have a good idea of the pH within that range, but anything outside of that becomes more skewed the further away from 10.00 you go... so 12.44 (saturated kalk) is only a guess with apex, plus I believe their software only displays up to 12.30.

That alone is the reason why people say you can't monitor saturation with a pH probe. However the Atlas circuit allows you to set the calibration points. And I purchased a 12.46 pH buffer solution that gives the software the ability to accurately track pH within (in my case) 10.00-12.46.

When pH inside the kalk reactor drops below 12.40, I get an alert telling me it's time to refill the reactor. If you were using an Apex to alert you, it would be already too late.
I have been talking with Atlas Science today. They are recommending the

Atlas Scientific Electrically Isolated EZO™ Carrier Board Gen 2 and the​

Atlas Scientific EZO-pH Embedded pH Circuit .001-14​

The Carrier board has a smaller connector, not the BNC but there is an adapter.
 
OP
OP
Sisterlimonpot

Sisterlimonpot

Effortless Perfection
View Badges
Joined
Jul 15, 2009
Messages
4,260
Reaction score
8,615
Location
Litchfield Park
Rating - 0%
0   0   0
I have been talking with Atlas Science today. They are recommending the

Atlas Scientific Electrically Isolated EZO™ Carrier Board Gen 2 and the​

Atlas Scientific EZO-pH Embedded pH Circuit .001-14​

The Carrier board has a smaller connector, not the BNC but there is an adapter.
Yep, they sale them on their website...


And there's other places to purchase 1 as well, but with shipping it might be moot.

 

GuppyHJD

Valuable Member
View Badges
Joined
Jun 15, 2020
Messages
1,209
Reaction score
738
Location
North Port, FL
Rating - 0%
0   0   0
Yep, they sale them on their website...


And there's other places to purchase 1 as well, but with shipping it might be moot.

I have the parts but I am not figuring out the arduino circuit. What I am finding is that the EZP pH Chip calibrates in UART mode. If you want to use the device in I2C mode, you have to change the wiring after calibartion. This concerns me if I need to calibrate, I have to unsolder parts.
 
OP
OP
Sisterlimonpot

Sisterlimonpot

Effortless Perfection
View Badges
Joined
Jul 15, 2009
Messages
4,260
Reaction score
8,615
Location
Litchfield Park
Rating - 0%
0   0   0
I have the parts but I am not figuring out the arduino circuit. What I am finding is that the EZP pH Chip calibrates in UART mode. If you want to use the device in I2C mode, you have to change the wiring after calibartion. This concerns me if I need to calibrate, I have to unsolder parts.
You can calibrate in i2c. Check out the data sheet starting on page 38.


It will provide you with the language the atlas chip needs to calibrate

Here is the snippet of the code that we used to run calibration for mid and high.
void mFunc_calMid(uint8_t param)
{
float setVal = configuration.midCalSolution / 100.0; //x.xx
if (LCDML.FUNC_setup())
{
calibrating = true; //disable periodic single value request
LCDML_UNUSED(param);
lcd.setCursor(0, 0);
lcd.print("Push SUSPEND to QUIT");
lcd.setCursor(0, 1);
lcd.print("- Put Probe in Mid");
lcd.setCursor(0, 2);
lcd.print("When pH is stable");
lcd.setCursor(0, 3);
lcd.print("push BACK");
lcd.setCursor(10, 3);
lcd.print("pH: ");

//set Probe serial parmeters
Serial1.print("C,1"); //continuous 1 reading per second
Serial1.print('\r');

LCDML.FUNC_setLoopInterval(500);
}
if (LCDML.FUNC_loop())
{
//pH reading done in main loop, not function loop
clearSpaces(5, 13, 3);
lcd.print(kalkTankpH);
}
if (LCDML.FUNC_close())
{
Serial1.print("Cal,mid,");
char buf[6] = { '\0' }; //size for "xx.xx + null terminator"
dtostrf(setVal, 5, 2, buf); //x.xx will print with leading space "Cal,mid, 7.00"
Serial1.print(buf);
Serial1.print('\r');
Serial1.print("C,0"); //disable 1 reading per second
Serial1.print('\r');
calibrating = false;
byte n = LCDML.MENU_getElementIDFromCursorPos();
LCDML.OTHER_setCursorToID(n + 1);
}
}

void mFunc_calHigh(uint8_t param)
{
float setVal = configuration.highCalSolution / 100.0; //xx.xx
if (LCDML.FUNC_setup())
{
calibrating = true;
LCDML_UNUSED(param);
lcd.setCursor(0, 0);
lcd.print("Push SUSPEND to QUIT");
lcd.setCursor(0, 1);
lcd.print("- Put Probe in High");
lcd.setCursor(0, 2);
lcd.print("When pH is stable");
lcd.setCursor(0, 3);
lcd.print("push BACK");
lcd.setCursor(10, 3);
lcd.print("pH: ");

//set Probe serial parameters
Serial1.print("C,1"); //continuous 1 reading per second
Serial1.print('\r');

LCDML.FUNC_setLoopInterval(500);
}
if (LCDML.FUNC_loop())
{
//pHReading done in main loop, not function loop
clearSpaces(5, 13, 3);
lcd.print(kalkTankpH);
}
if (LCDML.FUNC_close())
{
Serial1.print("Cal,high,");
char buf[6] = { '\0' }; //size for "xx.xx + null terminator"
dtostrf(setVal, 5, 2, buf); //dtostrf() adds null terminator
Serial1.print(buf);
Serial1.print('\r');
Serial1.print("C,0"); //disable 1 reading per second
Serial1.print('\r');
calibrating = false;
byte n = LCDML.MENU_getElementIDFromCursorPos();
LCDML.OTHER_setCursorToID(n - 4);
}
}

And that was basically derived from operating within the library that I'm using and the atlas data sheet. the ones to pay attention to are the "serial1.print"s which are the commands that get sent to the atlas chip.
 
OP
OP
Sisterlimonpot

Sisterlimonpot

Effortless Perfection
View Badges
Joined
Jul 15, 2009
Messages
4,260
Reaction score
8,615
Location
Litchfield Park
Rating - 0%
0   0   0
Here we are roughly 8 months later and here's a snapshot of my pH graph

Screenshot_20230521_223550_APEXFusion.jpg
 

GuppyHJD

Valuable Member
View Badges
Joined
Jun 15, 2020
Messages
1,209
Reaction score
738
Location
North Port, FL
Rating - 0%
0   0   0
You can calibrate in i2c. Check out the data sheet starting on page 38.


It will provide you with the language the atlas chip needs to calibrate

Here is the snippet of the code that we used to run calibration for mid and high.


And that was basically derived from operating within the library that I'm using and the atlas data sheet. the ones to pay attention to are the "serial1.print"s which are the commands that get sent to the atlas chip.
Thank you very much.
I built a test circuit over the weekend. The main loop provides time, temp, water leak detection, ATO level and ph with email updates and data out to a firebase datebase.
I have a demonstration circuit in the works to just do calibration. I am waiting for a touch screen LCD to arrive from Amazon. The plan is for - When the button for Calibration is pressed, the circuit waits 10 minutes for the probe to become stable and then tests for 10 readings that match. It sets the value for the mid calibration. It then repeats for Low and then HIGH.
I do not have the demonstration circuit working yet. I will read through your code and use it to improve my plan.
Thank you
 

MartinM

Valuable Member
View Badges
Joined
Jan 26, 2021
Messages
1,266
Reaction score
1,191
Location
Japan
Rating - 0%
0   0   0
Is there a reason you did all this DIY instead of using a Hydros?
 
OP
OP
Sisterlimonpot

Sisterlimonpot

Effortless Perfection
View Badges
Joined
Jul 15, 2009
Messages
4,260
Reaction score
8,615
Location
Litchfield Park
Rating - 0%
0   0   0
Is there a reason you did all this DIY instead of using a Hydros?
Can you explain?

I don't necessarily think hydros is a robust enough controller that is capable to do what apex does. But I'm curious to hear that it can work for my situation.

Neither apex nor ghl are capable to vary the effluent based on tank and reactor pH.

A big problem is the ability to read pH scale at saturated calcium hydroxide levels. And the other is controlling a peristaltic pump that can run continuously and change its rate on the fly based on inputs.

There are some bells and whistles that are so specific that neither Neptune, ghl nor hydros would implement unless there was a large demand for them.

It definitely can be implemented into a mainstream controller. But when we're discussing procedures that only the fringe of the hobby are doing. The controller engineers are focusing resources in places that cater to the masses.
 

MartinM

Valuable Member
View Badges
Joined
Jan 26, 2021
Messages
1,266
Reaction score
1,191
Location
Japan
Rating - 0%
0   0   0
Can you explain?

I don't necessarily think hydros is a robust enough controller that is capable to do what apex does. But I'm curious to hear that it can work for my situation.

Neither apex nor ghl are capable to vary the effluent based on tank and reactor pH.

A big problem is the ability to read pH scale at saturated calcium hydroxide levels. And the other is controlling a peristaltic pump that can run continuously and change its rate on the fly based on inputs.

There are some bells and whistles that are so specific that neither Neptune, ghl nor hydros would implement unless there was a large demand for them.

It definitely can be implemented into a mainstream controller. But when we're discussing procedures that only the fringe of the hobby are doing. The controller engineers are focusing resources in places that cater to the masses.
Maybe I missed something. Hydros can control a pump based on pH inputs, yes. But I might not be understanding everything that’s going in with this system. From what I understood, it was dosing a specific amount to maintain a specific tank pH?
 
OP
OP
Sisterlimonpot

Sisterlimonpot

Effortless Perfection
View Badges
Joined
Jul 15, 2009
Messages
4,260
Reaction score
8,615
Location
Litchfield Park
Rating - 0%
0   0   0
Maybe I missed something. Hydros can control a pump based on pH inputs, yes.
What type of pump? And how does it control it?

From what I understood, it was dosing a specific amount to maintain a specific tank pH?
It's not "dosing a specific amount" per say, it is operating a peristaltic pump and varying its speed based on tank and kalk reactor pH. So, 2 pH readings, one in the range of 8.3 (tank) and the other in the range of 12.44 (reactor).

And based on these readings, it calculates the effluent into the tank to maintain a targeted pH set by the user.

A less critical task that I'm certain none of the controller can do is operate a stepper motor that is connected to the paddle inside the reactor to stir and maintain the proper stratification line.

The biggest issue is the limit set for pH probes. Most are only accurate to 10.00 because that's the highest range in which we are allowed to calibrate to determine the slope between 7.00 and 10.00. Anything above 10.00 is skewed the further from 10.00 you go.

This controller allows for a calibration slope between 10.00 and 12.46. That way monitoring saturated calcium hydroxide is reliable.

Again, this is something that can be programmed into any controller if the software engineers wanted to. I don't think they're going to though because there are a lot of nuances that would open the door to question pH accuracy when you start allowing calibration above 10.00.

The controller with the best hope is the apex, when and if they allow mxm to operate and control the versa. But they would still have to solve for the pH for 12.44.
 
OP
OP
Sisterlimonpot

Sisterlimonpot

Effortless Perfection
View Badges
Joined
Jul 15, 2009
Messages
4,260
Reaction score
8,615
Location
Litchfield Park
Rating - 0%
0   0   0
On another note, I have been going down the rabbit hole of understanding pH probes and their limitations based on materials used in the manufacturing of it.

I'm finding out that the probes we use in the hobby aren't ideal for use in an environment with organic material.

And specifically for this application, probes in calcium hydroxide that use what's called a ceramic frit aren't accurate long because the calcium hydroxide clogs the ceramic frit.

I've been back and forth with a pH probe manufacturer and I've ordered a few probes to test this theory. They should arrive this coming week.

If it in fact works, we may be able to but to bed the theory that a pH probes can't sit in calcium hydroxide solution and expect it to remain accurate over time.
 

GuppyHJD

Valuable Member
View Badges
Joined
Jun 15, 2020
Messages
1,209
Reaction score
738
Location
North Port, FL
Rating - 0%
0   0   0
On another note, I have been going down the rabbit hole of understanding pH probes and their limitations based on materials used in the manufacturing of it.

I'm finding out that the probes we use in the hobby aren't ideal for use in an environment with organic material.

And specifically for this application, probes in calcium hydroxide that use what's called a ceramic frit aren't accurate long because the calcium hydroxide clogs the ceramic frit.

I've been back and forth with a pH probe manufacturer and I've ordered a few probes to test this theory. They should arrive this coming week.

If it in fact works, we may be able to but to bed the theory that a pH probes can't sit in calcium hydroxide solution and expect it to remain accurate over time.
Very interested in what your testing shows.
The probes you ordered are industrial or lab grade?
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
2,223
Reaction score
3,632
Location
Sacramento, CA area
Rating - 0%
0   0   0
On another note, I have been going down the rabbit hole of understanding pH probes and their limitations based on materials used in the manufacturing of it.

I'm finding out that the probes we use in the hobby aren't ideal for use in an environment with organic material.

And specifically for this application, probes in calcium hydroxide that use what's called a ceramic frit aren't accurate long because the calcium hydroxide clogs the ceramic frit.

I've been back and forth with a pH probe manufacturer and I've ordered a few probes to test this theory. They should arrive this coming week.

If it in fact works, we may be able to but to bed the theory that a pH probes can't sit in calcium hydroxide solution and expect it to remain accurate over time.
Once you have some data on the pH probes at that high of pH please share :).
 

n2585722

2500 Club Member
View Badges
Joined
Jun 17, 2013
Messages
3,957
Reaction score
2,267
Location
Cedar Park, Tx
Rating - 0%
0   0   0
What type of pump? And how does it control it?


It's not "dosing a specific amount" per say, it is operating a peristaltic pump and varying its speed based on tank and kalk reactor pH. So, 2 pH readings, one in the range of 8.3 (tank) and the other in the range of 12.44 (reactor).

And based on these readings, it calculates the effluent into the tank to maintain a targeted pH set by the user.

A less critical task that I'm certain none of the controller can do is operate a stepper motor that is connected to the paddle inside the reactor to stir and maintain the proper stratification line.

The biggest issue is the limit set for pH probes. Most are only accurate to 10.00 because that's the highest range in which we are allowed to calibrate to determine the slope between 7.00 and 10.00. Anything above 10.00 is skewed the further from 10.00 you go.

This controller allows for a calibration slope between 10.00 and 12.46. That way monitoring saturated calcium hydroxide is reliable.

Again, this is something that can be programmed into any controller if the software engineers wanted to. I don't think they're going to though because there are a lot of nuances that would open the door to question pH accuracy when you start allowing calibration above 10.00.

The controller with the best hope is the apex, when and if they allow mxm to operate and control the versa. But they would still have to solve for the pH for 12.44.
Here is 3 screenshots of the Kalk Reactor output type on a Hydros. I do not have one myself but I created it to get the screenshots. So the settings may not be where you would want them. I did select the inputs and outputs so they would be filled. This has both pH and alkalinity inputs but my understanding you can use just pH for this and leave the alkalinity at none. Also Hydros has dynamic dosing you can setup also based on a input. I do use that to vary my KH buffer and All For Reef based on the alkalinity readings from my KH Carer. It took three screenshots since I could not get it all in two.

IMG_9577.png

IMG_9578.png

IMG_9579.png
 
Last edited:
OP
OP
Sisterlimonpot

Sisterlimonpot

Effortless Perfection
View Badges
Joined
Jul 15, 2009
Messages
4,260
Reaction score
8,615
Location
Litchfield Park
Rating - 0%
0   0   0
Very interested in what your testing shows.
The probes you ordered are industrial or lab grade?
They're consumer grade and from what I was told, they sent the 1st shipment to Germany and not sure when they'll be available here in the states.

The only difference from these are that they don't use the ceramic frit. I don't necessarily know what it uses instead but was assured that it'll hold up in calcium hydroxide.

Once I have a link, I will share it. Although this may pan out to be a big nothing. But at this point I'm willing to try anything.
 
OP
OP
Sisterlimonpot

Sisterlimonpot

Effortless Perfection
View Badges
Joined
Jul 15, 2009
Messages
4,260
Reaction score
8,615
Location
Litchfield Park
Rating - 0%
0   0   0
When I look at what you are doing it goes straight over my head . But it does look good. Too much for my brain lol
Haha.. I think it's because this method is not mainstream. It can't encompass every tank... especially newer ones.

From my experience the people that have flocked to this are the sps coral farmers. The ones with large enough systems that have decent evaporation and high enough demand from their corals that they are able to achieve a stable targeted pH while keeping alkalinity in a low enough range that isn't killing corals.
 
OP
OP
Sisterlimonpot

Sisterlimonpot

Effortless Perfection
View Badges
Joined
Jul 15, 2009
Messages
4,260
Reaction score
8,615
Location
Litchfield Park
Rating - 0%
0   0   0
Here is 3 screenshots of the Kalk Reactor output type on a Hydros. I do not have one myself but I created it to get the screenshots. So the settings may not be where you would want them. I did select the inputs and outputs so they would be filled. This has both pH and alkalinity inputs but my understanding you can use just pH for this and leave the alkalinity at none. Also Hydros has dynamic dosing you can setup also based on a input. I do use that to vary my KH buffer and All For Reef based on the alkalinity readings from my KH Carer. It took three screenshots since I could not get it all in two.

IMG_9577.png

IMG_9578.png

IMG_9579.png
What pump are you using to dose. And when you say dynamic dosing, I assume that means constantly changing based on variables. Can these pumps run continuously and be dynamic?

Does hydros only allow certain pumps to operate within their ecosystem?

Can you elaborate more on the stirrer and how that works?
 
Back
Top