Float switches in parallel

Basic / Standard Reef Angel hardware
CASPAR
Posts: 56
Joined: Wed May 09, 2012 12:24 pm

Re: Float switches in parallel

Post 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?
Image
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Float switches in parallel

Post 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?
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Float switches in parallel

Post 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
CASPAR
Posts: 56
Joined: Wed May 09, 2012 12:24 pm

Re: Float switches in parallel

Post 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
Image
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Float switches in parallel

Post 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.
CASPAR
Posts: 56
Joined: Wed May 09, 2012 12:24 pm

Re: Float switches in parallel

Post 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
Image
CASPAR
Posts: 56
Joined: Wed May 09, 2012 12:24 pm

Re: Float switches in parallel

Post 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?
Image
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Float switches in parallel

Post by Sacohen »

That's correct.
Post Reply