Multiple on/off times
Re: Multiple on/off times
Steve, did you ever try my suggested fix?
Re: Multiple on/off times
I did not. Lee said to run the test he asked for.
I'll try it now.
I'll try it now.
Re: Multiple on/off times
First off sorry for the frustrations...If you can't control the unit with our code on, then you can try it tomorrow during a cycle and see...but based on the output you sent it should be good.
I recommend just take out the debug from the last code and see.
Colin, the override would not hold up the ato the way it was works but the order change I made may help.
I recommend just take out the debug from the last code and see.
Colin, the override would not hold up the ato the way it was works but the order change I made may help.
Re: Multiple on/off times
Good Morning. everyone.
I uploaded Colin's suggestion last night and checked the relay activity this morning.
I saw a little relay activity on port 6 at 5:15 am and the sump was at the max level.
I decided to run a little further test so unplugged port 6 because I didn't want to add RO water right now because the physical level was fine as was the salinity.
I drained a gallon of water of into a jug. Port6 turned on when I poured the water back in it turned off.
It seems like it is working, but I'm going to keep an eye on it.
Thanks again for everything. Sorry I was in a bad mood before I started working on this last night and the lack of knowledge working with the serial monitor along with the wireless being out added to it.
I'm better today.
I uploaded Colin's suggestion last night and checked the relay activity this morning.
I saw a little relay activity on port 6 at 5:15 am and the sump was at the max level.
I decided to run a little further test so unplugged port 6 because I didn't want to add RO water right now because the physical level was fine as was the salinity.
I drained a gallon of water of into a jug. Port6 turned on when I poured the water back in it turned off.
It seems like it is working, but I'm going to keep an eye on it.
Thanks again for everything. Sorry I was in a bad mood before I started working on this last night and the lack of knowledge working with the serial monitor along with the wireless being out added to it.
I'm better today.
Re: Multiple on/off times
Awesome! Try to catch the regular cycle and tell us how it goes!
--Colin
--Colin
Re: Multiple on/off times
cool! I have been following this thread a little and can completely understand your frustration. The nice thing though is that everyone here (or at least most everyone) are all willing to help. That's one of the things I love about it and I have had my controller since almost the beginning of the project a few years ago. Sorry to hijack the thread... just wanted to chime in a little.
Sent from my Nexus 7
Sent from my Nexus 7
Re: Multiple on/off times
Colin I caught the 1pm cycle and it looked good, but I'm not 100% certain yet becuse the level was at 29% for the entire exchange and as soon as the pump stopped sending water to the chamber it went to 30% so it never really got low enough to trigger the ATO, but I'll watch it and try to catch the 7pm cycle.cosmith71 wrote:Awesome! Try to catch the regular cycle and tell us how it goes!
--Colin
Binder; thanks for the comments. You're not hijacking the thread, you made a comment and a nice one at that.binder wrote:cool! I have been following this thread a little and can completely understand your frustration. The nice thing though is that everyone here (or at least most everyone) are all willing to help. That's one of the things I love about it and I have had my controller since almost the beginning of the project a few years ago. Sorry to hijack the thread... just wanted to chime in a little.
Sent from my Nexus 7
Colin and Lee have been great helping me. I sure there are others that chime in and help like you and Roberto, but in this case it was these two that put up with my lack of knowledge and it looks like they figured out something that works.
I would like to thank you for the work you put into the scene too. I can't wait to get my new phone so I can try out your Andriod App.
Re: Multiple on/off times
You're welcome.Sacohen wrote: I would like to thank you for the work you put into the scene too. I can't wait to get my new phone so I can try out your Andriod App.
btw, there's some more cool features coming soon in the app (if you haven't been looking at the Android Reef Angel Status thread on here).
Re: Multiple on/off times
I have been looking at the Andriod thread. I can't say I've been following yet, but I've been looking at it.
Re: Multiple on/off times
I caught the 7pm cycle and it worked perfectly.cosmith71 wrote:Awesome! Try to catch the regular cycle and tell us how it goes!
--Colin
While the water exchange was going on I drained about a quart of water out of the tank so that when it ended it was definitely going to be below 29% I also plugged a light into port6 to see when the port came on without actually dumping RO water in.
2 min after the exchange ended Port6 turned on and then I started putting the quart of water I drained back into the tank and when it reached 31% it turned of Port6 (the light).
Great job Colin.
Thanks for the help Lee.
I think we can close this case.
Re: Multiple on/off times
Awesome. Post up your full code now. Lets see what you ended up with.
Re: Multiple on/off times
This is the code that wound up working.
Code: Select all
////// Place global variable code below here
unsigned long ATOUpdate=0;
////// Place global variable code above here
Code: Select all
void loop()
{
ReefAngel.StandardLights( Port1,12,0,22,0 );
ReefAngel.StandardLights( Port2,13,0,21,0 );
ReefAngel.Relay.Set( Port3, !ReefAngel.Relay.Status( Port1 ) );
ReefAngel.StandardLights( Port7,13,0,21,0 );
ReefAngel.Relay.Set(Port5,(now()-3600)%21600<1200); // Runs for 1200s every 21600 seconds
ReefAngel.Relay.Set(Port8,((now()-3600)-1200)%21600<1200); // Runs for 1200s every 21600 seconds with 1200s offset
ReefAngel.WaterLevelATO(Port6,720,29,31); // Enable ATO the ATO
if (ReefAngel.Relay.Status(Port5)) // Check to see if port 5 is on and update time is empty
{
ATOUpdate = now(); // If so, set the update time to now
}
if (now() - ATOUpdate < 120) // If it hasnt been 120 seconds turn off the port
{
ReefAngel.WaterLevelATO(Port6,720,0,1);
}
ReefAngel.PWM.SetActinic(MyCustomWave(50));
if( ReefAngel.DisplayedMenu==FEEDING_MODE ) ReefAngel.PWM.SetActinic(0);
if( ReefAngel.DisplayedMenu==WATERCHANGE_MODE ) ReefAngel.PWM.SetActinic(0);
if (hour()<12 || hour()>=22) ReefAngel.PWM.SetActinic(30);
Re: Multiple on/off times
See, I told you we'd get it!
--Colin
--Colin
Re: Multiple on/off times
I knew we would get it, but I didn't want to take any more of your and Lee's time.
Glad we wrapped it up this quick.
Glad we wrapped it up this quick.
Re: Multiple on/off times
Can you set at partial # in the water level sensor.
like 29.5% or does it need to be full #'s?
If so would it be 295 or 29.5?
like 29.5% or does it need to be full #'s?
If so would it be 295 or 29.5?
Re: Multiple on/off times
Nope. Has to be a whole number. They're defined as byte type.Sacohen wrote:Can you set at partial # in the water level sensor.
like 29.5% or does it need to be full #'s?
If so would it be 295 or 29.5?
--Colin
Re: Multiple on/off times
Im still waiting to hear what happened with the priest and rabbi..
Re: Multiple on/off times
A rabbi, a priest, and a Lutheran minister walk into a bar. The bartender looks up and says, "Is this some kind of joke?"
or
the Priest asks the Rabbi "Have you ever tried a bacon sandwich or even fancied one? The Rabbi answers "Well i have speculated about it but my faith forbids me from trying, but father, have you ever fancied a nice night of sex with a good woman, i mean a really good woman?" The Priest thinks hard and answers " Well Rabbi, i have sometimes wondered but my vow of celibacy prevents it from ever occurring" The Rabbi answers "Sure as hell beats a bacon sandwich, don't it?"
or
the Priest asks the Rabbi "Have you ever tried a bacon sandwich or even fancied one? The Rabbi answers "Well i have speculated about it but my faith forbids me from trying, but father, have you ever fancied a nice night of sex with a good woman, i mean a really good woman?" The Priest thinks hard and answers " Well Rabbi, i have sometimes wondered but my vow of celibacy prevents it from ever occurring" The Rabbi answers "Sure as hell beats a bacon sandwich, don't it?"
Re: Multiple on/off times
Lee;
I've forgot how my code for the denitrification chamber is set up.
I want to change the amount of time that the pump is on from 20 min to 10 min.
This is the original code...
Do I change it at the DeNit_Doser Runtime or in this line...
To this....
I've forgot how my code for the denitrification chamber is set up.
I want to change the amount of time that the pump is on from 20 min to 10 min.
This is the original code...
Code: Select all
// DeNitrate Routine
int DeNit_Offset=3600;
int DeNit_Repeat=21600;
int DeNit_Doser_Offset=1200;
int DeNit_Doser_Runtime=1200;
int DeNit_Pump_Runtime=1200;
int DeNit_ATO_Offtime=1500;
// Pump comes on first
ReefAngel.Relay.Set(DeNit_Pump,(now()-3600)%21600<1200); // Runs for 1200s every 21600 seconds
// Doser comes on second
ReefAngel.Relay.Set(DeNit_Doser,((now()-3600)-1200)%21600<1200); // Runs for 1200s every 21600 seconds with 1200s offset
Code: Select all
// Doser comes on second
ReefAngel.Relay.Set(DeNit_Doser,((now()-3600)-1200)%21600<1200); // Runs for 1200s every 21600 seconds with 1200s offset
Code: Select all
// Doser comes on second
ReefAngel.Relay.Set(DeNit_Doser,((now()-3600)-1200)%21600<600); // Runs for 600s every 21600 seconds with 1200s offset
Re: Multiple on/off times
First off why don't we confirm that we're talking about the carbon source dosing pump and not the chamber fill/flush pump. Is yours like DrThompson? Are you dosing methanol?
Finally I believe you got it perfect it. What you should do now is change it ALSO in the Denit_Doser_Runtime and then at some point replace the numbers defined with the variable names so next time or for someone else who comes along you/them just need to change the variables.
Finally I believe you got it perfect it. What you should do now is change it ALSO in the Denit_Doser_Runtime and then at some point replace the numbers defined with the variable names so next time or for someone else who comes along you/them just need to change the variables.
Re: Multiple on/off times
I'm talking about changing the time on the dosing pump.
Yes it is like DrThompsons. I have an actual denitrification chamber and pump from NatuReef and am switching from the Nitragone that they sell to a 50% Methanol/RODI mix, like he runs.
So it would be like this...
Yes it is like DrThompsons. I have an actual denitrification chamber and pump from NatuReef and am switching from the Nitragone that they sell to a 50% Methanol/RODI mix, like he runs.
So it would be like this...
Code: Select all
// DeNitrate Routine
int DeNit_Offset=3600;
int DeNit_Repeat=21600;
int DeNit_Doser_Offset=1200;
int DeNit_Doser_Runtime=600;
int DeNit_Pump_Runtime=1200;
int DeNit_ATO_Offtime=1500;
// Pump comes on first
ReefAngel.Relay.Set(DeNit_Pump,(now()-3600)%21600<1200); // Runs for 1200s every 21600 seconds
// Doser comes on second
ReefAngel.Relay.Set(DeNit_Doser,((now()-3600)-1200)%21600<600); // Runs for 600s every 21600 seconds with 1200s offset
Re: Multiple on/off times
Yes, but let's use this finally...
And replace the DeNit_ATO_Offtime wherever you have that as well so you can just use the variables moving forward. You'll be less confused and you'll see what each number means.
Code: Select all
// DeNitrate Routine
int DeNit_Offset=3600;
int DeNit_Repeat=21600;
int DeNit_Doser_Offset=1200;
int DeNit_Doser_Runtime=600;
int DeNit_Pump_Runtime=1200;
int DeNit_ATO_Offtime=1500;
// Pump comes on first
ReefAngel.Relay.Set(DeNit_Pump,(now()-DeNit_Offset)%DeNit_Repeat<DeNit_Pump_Runtime); // Runs denitrator pump
// Doser comes on second
ReefAngel.Relay.Set(DeNit_Doser,((now()-DeNit_Offset)-DeNit_Doser_Offset)%DeNit_Repeat<DeNit_Doser_Runtime); // Runs denitrator doser