Re: Wave patterns
Posted: Fri May 31, 2013 10:05 am
Can they go to zero then?
Community discussion about Reef Angel Controllers and reefing related subjects
https://forum.reefangel.com/
Thanks. For what I have in mind that would be very usefulrimai wrote:Not with this function.
We can code it differently to get the same results in order to go down to zero.
Code: Select all
byte Jebao=(now()%(20*2)<20?0:30);
ReefAngel.PWM.SetActinic(Jebao);
ReefAngel.PWM.SetDaylight(Jebao==0?30:0);
Sorry Roberto how does that code work the parameters, just so I can tweak itrimai wrote:Use this instead then:Code: Select all
byte Jebao=(now()%(20*2)<20?0:30); ReefAngel.PWM.SetActinic(Jebao); ReefAngel.PWM.SetDaylight(Jebao==0?30:0);
Code: Select all
#define JebaoDuration 20
#define JebaoMin 0
#define JebaoMax 30
byte Jebao=(now()%(JebaoDuration*2)<JebaoDuration?JebaoMin:JebaoMax);
ReefAngel.PWM.SetActinic(Jebao);
ReefAngel.PWM.SetDaylight(Jebao==JebaoMin?JebaoMax:JebaoMin);
And what do I do about the lines I have already put in? Sorry its national daft question day in the UKrimai wrote:This is easier:Change what's in the define sectionCode: Select all
#define JebaoDuration 20 #define JebaoMin 0 #define JebaoMax 30 byte Jebao=(now()%(JebaoDuration*2)<JebaoDuration?JebaoMin:JebaoMax); ReefAngel.PWM.SetActinic(Jebao); ReefAngel.PWM.SetDaylight(Jebao==JebaoMin?JebaoMax:JebaoMin);
OK will give it a try and let you knowrimai wrote:Remove them and replace with the post above
That worked brilliantly and taught me a bit too, do you thnk that dropping the speed to zero over long periods could cause wear on the pumps?coolbird wrote:And what do I do about the lines I have already put in? Sorry its national daft question day in the UKrimai wrote:This is easier:Change what's in the define sectionCode: Select all
#define JebaoDuration 20 #define JebaoMin 0 #define JebaoMax 30 byte Jebao=(now()%(JebaoDuration*2)<JebaoDuration?JebaoMin:JebaoMax); ReefAngel.PWM.SetActinic(Jebao); ReefAngel.PWM.SetDaylight(Jebao==JebaoMin?JebaoMax:JebaoMin);
Code: Select all
static int speed=0;
byte speeds[4] = { 93, 81, 72, 63 };
if (millis()%1000=0) speed++;
if (speed>=4) speed=0;
ReefAngel.PWM.SetActinic(speeds[i]);
Will give it a go and post. Thanksjerry27 wrote:since theyre DC pumps they start properly everytime and the wear shouldnt be an issue. if youre worried about it just drop it to around 20 or so. the water movement at that speed for mine is not even noticable but they keep turning.coolbird wrote: That worked brilliantly and taught me a bit too, do you thnk that dropping the speed to zero over long periods could cause wear on the pumps?
I remember having 2 sicce voyager pumps and over a period of time they would not start up and you ended up having to change the impellers.
Just a thought but this is working fine until I can work out a wave pattern that suits the tank better.
regards
Dave
if youre using the standard menu and you want to experiment with how low your pumps will go and find the minimum that they will turn back on, use thiscomment out your wave patterns then go to lights>led pwm and the "ap:" will control one pump and the "dp:" will control another.Code: Select all
ReefAngel.PWM.Override(OVERRIDE_DAYLIGHT, InternalMemory.LEDPWMDaylight_read()); ReefAngel.PWM.Override(OVERRIDE_ACTINIC, InternalMemory.LEDPWMActinic_read());
you can comment out an entire block of code by using /**/.
/*
code
code
code
*/
instead of line by line using //
if you give it a shot post your minimums so roberto can better adjust the libraries.
Will give it a go and post. Thanksjerry27 wrote:since theyre DC pumps they start properly everytime and the wear shouldnt be an issue. if youre worried about it just drop it to around 20 or so. the water movement at that speed for mine is not even noticable but they keep turning.coolbird wrote: That worked brilliantly and taught me a bit too, do you thnk that dropping the speed to zero over long periods could cause wear on the pumps?
I remember having 2 sicce voyager pumps and over a period of time they would not start up and you ended up having to change the impellers.
Just a thought but this is working fine until I can work out a wave pattern that suits the tank better.
regards
Dave
if youre using the standard menu and you want to experiment with how low your pumps will go and find the minimum that they will turn back on, use thiscomment out your wave patterns then go to lights>led pwm and the "ap:" will control one pump and the "dp:" will control another.Code: Select all
ReefAngel.PWM.Override(OVERRIDE_DAYLIGHT, InternalMemory.LEDPWMDaylight_read()); ReefAngel.PWM.Override(OVERRIDE_ACTINIC, InternalMemory.LEDPWMActinic_read());
you can comment out an entire block of code by using /**/.
/*
code
code
code
*/
instead of line by line using //
if you give it a shot post your minimums so roberto can better adjust the libraries.
Roberto, can we make this number a define or mem location that can be overidden? I'm using these functions to feed the Custom mode on my mp40s and don't need to be constrained at all though I wouldnt mind setting it to 10 or something..rimai wrote:Thanks for contributing!!!
If I don't hear anyone else, I'll lower it to 25 on the next update.
tomek77pl wrote:Hi Is it possible to have a both wave patters for one pump? I want it to run nutrition export for 2 hrs a day then go back into the reef crest mode. Is this possible? If yes how can this be done? Thanks
Code: Select all
if (hour()>=8 && hour()<11)
{
vtechmode=6;
ReefAngel.PWM.SetDaylight( TidalSwellMode(40,true) ); // Tidal Swell at 40% on sync mode
ReefAngel.PWM.SetActinic( TidalSwellMode(40,false) ); // Tidal Swell at 40% on anti-sync mode
}
else if (hour()>=11 && hour()<12)
{
vtechmode=2;
ReefAngel.PWM.SetDaylight( ReefCrestMode(50,20,true) ); // ReefCrest at 50% + - 20 on sync mode
ReefAngel.PWM.SetActinic( ReefCrestMode(50,20,false) ); // ReefCrest at 50% + - 20 on anti-sync mode
}
else if (hour()>=12 && hour()<13)
{
vtechmode=0;
ReefAngel.PWM.SetDaylight( millis()%1000>800?80:0); // WaveMode on sync mode
ReefAngel.PWM.SetActinic( ElseMode(70,30,true) ); // ElseMode at 70 on anti-sync mode
}
else if (hour()>=13 && hour()<14)
{
vtechmode=2;
ReefAngel.PWM.SetDaylight( ReefCrestMode(70,20,true) ); // ReefCrest at 70% + - 20 on sync mode
ReefAngel.PWM.SetActinic( ReefCrestMode(70,20,false) ); // ReefCrest at 70% + - 20 on anti-sync mode
}
else if (hour()>=15 && hour()<18)
{
vtechmode=0;
ReefAngel.PWM.SetDaylight( ElseMode(70,30,true) ); // Else on sync mode
ReefAngel.PWM.SetActinic( millis()%1000>800?80:0); // Wave on anti-sync mode
}
else if (hour()>=18 && hour()<21)
{
vtechmode=5;
ReefAngel.PWM.SetDaylight( NutrientTransportMode(77,90,3000,true) ); // Nutrient Transport on sync mode
ReefAngel.PWM.SetActinic( NutrientTransportMode(77,90,3000,false) ); // Nutrient Transport on anti-sync mode
}
else if (hour()>=21 && hour()<24)
{
vtechmode=1;
ReefAngel.PWM.SetDaylight( millis()%1000>800?70:0); // Wave on sync mode
ReefAngel.PWM.SetActinic( ElseMode(70,30,true) ); // Else on anti-sync mode
}
else
{
vtechmode=4;
ReefAngel.PWM.SetDaylight( LongPulseMode(40,40,10,true) ); // Long pulse at 40% with 10s pulse on syncy mode
ReefAngel.PWM.SetActinic( LongPulseMode(40,40,10,false) ); // Long pulse at 40% with 10s pulse on on anti-sync mode
}
if (ReefAngel.DisplayedMenu==FEEDING_MODE)
{
ReefAngel.PWM.SetActinic(0);
ReefAngel.PWM.SetDaylight(0);
}
if (ReefAngel.DisplayedMenu==WATERCHANGE_MODE)
{
ReefAngel.PWM.SetActinic(0);
ReefAngel.PWM.SetDaylight(0);
}
Code: Select all
if (hour()>=16 && hour()<18)
{
ReefAngel.PWM.SetDaylight( NutrientTransportMode(77,90,3000,true) ); // Nutrient Transport on sync mode
ReefAngel.PWM.SetActinic( NutrientTransportMode(77,90,3000,false) ); // Nutrient Transport on anti-sync mode
}
else if (hour()>=18 && hour()<16)
{
ReefAngel.PWM.SetDaylight( ReefCrestMode(50,20,true) ); // ReefCrest at 50% + - 20 on sync mode
ReefAngel.PWM.SetActinic( ReefCrestMode(50,20,false) ); // ReefCrest at 50% + - 20 on anti-sync mode
}
Code: Select all
if (hour()>=16 && hour()<18)
{
ReefAngel.PWM.SetDaylight( NutrientTransportMode(77,90,3000,true) ); // Nutrient Transport on sync mode
ReefAngel.PWM.SetActinic( NutrientTransportMode(77,90,3000,false) ); // Nutrient Transport on anti-sync mode
}
else if (hour()>=18 && hour()<16)
{
ReefAngel.PWM.SetDaylight( ReefCrestMode(50,20,true) ); // ReefCrest at 50% + - 20 on sync mode
ReefAngel.PWM.SetActinic( ReefCrestMode(50,20,false) ); // ReefCrest at 50% + - 20 on anti-sync mode
}
Code: Select all
else if (hour()>=18 || hour()<16)
Code: Select all
if ((hour()>=18 && minute()>=30) || (hour()<16 && minute()==0)) // >=6:30pm ||(OR) <4:00pm