Hi All,
I have two tanks and having one temp probe for 1st tank and second temp probe for 2nd tank. For 1st tank for chilling I use: ReefAngel.StandardFan( Box1_Port3,245,250 ); - it works great
I want to make same effect as I'm getting with first one. I've tried such code:
if (ReefAngel.Params.Temp[T2_PROBE] >= 245)
ReefAngel.Relay.On(Box2_Port4);
else
ReefAngel.Relay.Off(Box2_Port4);
Seems that it works, but when temp reaches almost 24,5 Celsius it begins to on/off my port, it happens due to temperature (which is not stable). Temperature varies from 24,4 Celsius to 24,5 Celsius.
Maybe there is another possible solution for this one?
Fans with second temp probe
Re: Fans with second temp probe
You have to have it in a range. If you look in the libraries at ReefAngel/ReefAngel.cpp you can copy the StandardFan function
Basically you don't want to use the else. If the heat gets over 245 then turn on BUT put another if statement for when the temp gets lower than X then you can turn off the port. This will give you a range just like we do with the heater to make sure that it's not on/off/on/off all day.
Basically you don't want to use the else. If the heat gets over 245 then turn on BUT put another if statement for when the temp gets lower than X then you can turn off the port. This will give you a range just like we do with the heater to make sure that it's not on/off/on/off all day.
Re: Fans with second temp probe
Maybe you can describe how to get library and how to check code in it? Yes it is a bit a shame
And actually didn't understood what you meant with ranges
And actually didn't understood what you meant with ranges
Re: Fans with second temp probe
He meant that you need some sort of hysteresis or you will get what you are experiencing. If you make a range where it needs to travel lower than a single point, it will work as expected.
Just like the function you are using: ReefAngel.StandardFan( Box1_Port3,245,250 );
The 245 is the lower end of the range and the 250 is the upper end of the range.
Code: Select all
if (ReefAngel.Params.Temp[T2_PROBE] >= 250) ReefAngel.Relay.On(Box2_Port4);
if (ReefAngel.Params.Temp[T2_PROBE] <= 245) ReefAngel.Relay.Off(Box2_Port4);
The 245 is the lower end of the range and the 250 is the upper end of the range.
Roberto.
Re: Fans with second temp probe
In your computer, under Documents\Arduino\Libraries is the folder ReefAngel and inside that is the file ReefAngel.cpp which has the functions StandardFan, StandardHeater, etc.
And roberto took care of the rest
And roberto took care of the rest
Re: Fans with second temp probe
Thank you all