Page 2 of 2

Re: Float switches in parallel

Posted: Sat Oct 12, 2013 1:44 pm
by CASPAR
Ok just tried code, changed time on controller to tomorrow at 12:59 pm box1_port5 came on at exactly 1pm ran for 2 minutes and box1_port6 has yet to come on......any ideas?

Re: Float switches in parallel

Posted: Sat Oct 12, 2013 2:52 pm
by lnevo
Yes the code sacohen gave for the second pump is way incorrect...

The -1200 should be -120

The %219600 i think thats what it was should be the same as the first pump...

Sorry doing this on the phone.

Can you try making the change and posting the two lines for me to check?

Re: Float switches in parallel

Posted: Sat Oct 12, 2013 2:53 pm
by lnevo
Also the <1200 in the second line should also be <120

I think hard to check post and i'll be able to scrutinize

Re: Float switches in parallel

Posted: Sat Oct 12, 2013 3:18 pm
by CASPAR
// Box1_Port5 comes on first
ReefAngel.Relay.Set(Box1_Port5,(now()-3600)%129600<120); // Runs for 120s every 36 Hours
// Box1_Port6 comes on second
ReefAngel.Relay.Set(Box1_Port6,((now()-3600)-120)%121900<120); // Runs for 120s every 36 Hours with 120s offset

Also check my attached .ino would like to know if I can disable port3 on main box for say 10-15 after controller has initiated water exchange through box1_port 5&6

Re: Float switches in parallel

Posted: Sat Oct 12, 2013 3:37 pm
by Sacohen
lnevo wrote:Yes the code sacohen gave for the second pump is way incorrect...

The -1200 should be -120

The %219600 i think thats what it was should be the same as the first pump...

Sorry doing this on the phone.

Can you try making the change and posting the two lines for me to check?
Sorry I got the 2nd port real wrong.

It should be

Code: Select all

// Box1_Port6 comes on second
  ReefAngel.Relay.Set(Box1_Port6,((now()-3600)-120)%129600<120); // Runs for 120s every 36 Hours with 120s offset
As for the ATO disable, I really wasn't sure how to do that. I tried to modify mine, but lnevo is correct we had to tric my ATO into being disabled with that code.

I'm really not sure how to do that.

Re: Float switches in parallel

Posted: Sat Oct 12, 2013 4:40 pm
by CASPAR
Ok changed this part of code and port 6 is still not coming on......

////// Place your custom code below here
// Water Exchange Routine
int Box1_Port5_Offset=3600;
int Box1_Port5_Runtime=129600;
int Box1_Port6_Offset=120;
int Box1_Port6_Runtime=120;

// Box1_Port5 comes on first
ReefAngel.Relay.Set(Box1_Port5,(now()-3600)%129600<120); // Runs for 120s every 36 Hours
// Box1_Port6 comes on second
ReefAngel.Relay.Set(Box1_Port6,((now()-3600)-120)%121900<120); // Runs for 120s every 36 Hours with 120s offset


////// Place your custom code above here

Re: Float switches in parallel

Posted: Sat Oct 12, 2013 4:51 pm
by CASPAR
ok got it working here is what I did........

// Water Exchange Routine
int Box1_Port5_Offset=3600;
int Box1_Port5_Runtime=129600;
int Box1_Port6_Offset=120;
int Box1_Port6_Runtime=129600;

// Box1_Port5 comes on first
ReefAngel.Relay.Set(Box1_Port5,(now()-3600)%129600<120); // Runs for 120s every 36 Hours
// Box1_Port6 comes on second
ReefAngel.Relay.Set(Box1_Port6,((now()-3600)-120)%129600<120); // Runs for 120s every 36 Hours with 120s offset

now if I only want it to run for say 1minute would I just change the 120's to 60?

Re: Float switches in parallel

Posted: Sat Oct 12, 2013 5:33 pm
by Sacohen
That's correct.