Page 1 of 1

Help with setting up Reef Angel for use as pH controller

Posted: Fri Mar 16, 2012 5:22 pm
by gumyulow
I saw some threads with suggestions, but I can't seen to get it working correctly. Anyone have this functionality already coded?

Re: Help with setting up Reef Angel for use as pH controller

Posted: Fri Mar 16, 2012 7:15 pm
by binder
It monitors PH by default out of the box. It may need to be calibrated properly first, but it is functionality that's built in and not removable.

Re: Help with setting up Reef Angel for use as pH controller

Posted: Sat Mar 17, 2012 12:03 am
by gumyulow
Sorry, I should have been more clear. I need to use this to control my calcium reactor. More specifically I need it to turn on and off my CO2 solenoid to keep the pH in the reactor between 6.5 and 6.8. I found some code that someone posted but it was just a snippet and I cannot figure out how to add it to the stock code and get it to work? Someone else out there has to have needed this to?

I kind of need this quickly so if anyone can help me with a working .ino file I'm willing to Paypal over some $$$. I'll learn as I go after that :)

Re: Help with setting up Reef Angel for use as pH controller

Posted: Sat Mar 17, 2012 3:58 am
by binder
Ok. That makes sense. This is relatively simple to add to your INO file. What you need to do is post your existing INO file here that you want it added. Then spell out exactly what you want.

Example: I want to turn on Port2 (calcium reactor) when the pH drops below 6.5 then turn it off when the pH gets to 6.8.

Is that what you are wanting? That would be handled like this:

Code: Select all

void loop()
{
    //  ... rest of code goes here

    if ( ReefAngel.Params.PH < 650 )    ReefAngel.Relay.On(Port2);
    if ( ReefAngel.Params.PH >= 680 )    ReefAngel.Relay.Off(Port2);

    ReefAngel.ShowInterface();
}
Just make sure that Port2 is not used for another device and that it's only used for this setup. You can obviously change the ports around.

If this is not what you want or you need more specific help, just let us know. Roberto may have a better solution for you.

Re: Help with setting up Reef Angel for use as pH controller

Posted: Sat Mar 17, 2012 8:53 am
by rimai
Yeah, that should work for you.

Re: Help with setting up Reef Angel for use as pH controller

Posted: Sat Mar 17, 2012 3:55 pm
by gumyulow
Thanks, you guys are a lifesaver. So just add that code to the bottom and upload it? Do I need to modify the internal memory code at all yet?

Re: Help with setting up Reef Angel for use as pH controller

Posted: Sat Mar 17, 2012 5:27 pm
by rimai
Yeah, just above ShowInterface() should work.

Re: Help with setting up Reef Angel for use as pH controller

Posted: Sun Mar 18, 2012 5:12 pm
by binder
No Internal Memory modifications are needed.

Internal Memory only needs to be loaded once. Once it is loaded and the controller is up and running, you can use any of the wifi enabled apps to update and change the values in the memory on the controller.

Re: Help with setting up Reef Angel for use as pH controller

Posted: Mon Mar 19, 2012 6:42 pm
by chort55
binder wrote:No Internal Memory modifications are needed.

Internal Memory only needs to be loaded once. Once it is loaded and the controller is up and running, you can use any of the wifi enabled apps to update and change the values in the memory on the controller.
I am looking to accomplish basically the same thing as the OP, but I do not have a wifi module.... would I need to make a modification to the internal memory file then? Currently my internal mem file has port 8 as always on, and that is the port I would like to use for the solenoid on my co2 regulator.

Re: Help with setting up Reef Angel for use as pH controller

Posted: Mon Mar 19, 2012 6:50 pm
by rimai
Just use that code but change Port2 to Port8

Re: Help with setting up Reef Angel for use as pH controller

Posted: Mon Mar 19, 2012 6:54 pm
by chort55
Ok great thank you Roberto!