DC return pumps
DC return pumps
Does anyone have a list of DC return pumps that can be controlled by the RA? Have the Jebao DCS now, but want one that can be controlled so I can use Roberto's standpipe code.
Re: DC return pumps
Just received a waveline DC12000 today. It's apex ready so I should be able to control it with the RA. On the waveline controller there is a RJ45 port that says 0-10V. Does this mean I don't need the Jebao speedwave cable? If I can hook it directly to one of the dimming ports, what colors and/or pins do I need to wire to the two pin connector?
Re: DC return pumps
If it takes 0-10v, then you should be good without the Jebao cable. I have no clue on the Apex RJ45 hookup, but I bet a Google search will come up with the pinout.
Re: DC return pumps
I tried about every combination of wires but I still can't get my reef angel to communicate with the waveline. I tried pins 3 and 4 , 7 and 8 on the rj45 connector with no luck. Should the yellow and green lights on the waveline rj45 connector be lit up?
Re: DC return pumps
I finally got this to work but I have to tweak my code a little bit. Right now I have my drain restricted enough to match what my code is set for. This works for awhile, but eventually the level in my overflow keeps getting higher. I have the water level sensor in my overflow so when it gets to level 89 it turns off port 1, which is my return pump, and then it turns right back on. For some reason the waveline doesn't like this quick off and on of power, so the light on the waveline controller starts flashing and it won't run anymore. If I turn off port 1 and wait a few seconds to turn it back on, the waveline will continue to work again. I want to change my code to when my port 1 turns off because the level of my overflow reach's 89, to wait a few seconds before turning back on. What do I need to change in my code to do this?
Code: Select all
#include <ReefAngel_Features.h>
#include <Globals.h>
#include <RA_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <InternalEEPROM.h>
#include <RA_NokiaLCD.h>
#include <RA_ATO.h>
#include <RA_Joystick.h>
#include <LED.h>
#include <RA_TempSensor.h>
#include <Relay.h>
#include <RA_PWM.h>
#include <Timer.h>
#include <Tide.h>
#include <Memory.h>
#include <InternalEEPROM.h>
#include <RA_Colors.h>
#include <RA_CustomColors.h>
#include <Salinity.h>
#include <RF.h>
#include <IO.h>
#include <ORP.h>
#include <AI.h>
#include <PH.h>
#include <WaterLevel.h>
#include <Humidity.h>
#include <DCPump.h>
#include <PAR.h>
#include <ReefAngel.h>
#define Level 80
#define MinPWM 50
#define OperatingPWM 70
long nummillis=5000;
byte PWMValue=0;
unsigned long lastmillis=millis();
boolean override=false;
////// Place global variable code below here
////// Place global variable code above here
void setup()
{
// This must be the first line
ReefAngel.Init(); //Initialize controller
ReefAngel.Use2014Screen(); // Let's use 2014 Screen
ReefAngel.DDNS("Damien");
ReefAngel.AddMultiChannelWaterLevelExpansion(); // Multi-Channel Water Level Expanion Module
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port1Bit | Port6Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port2Bit | Port3Bit | Port4Bit | Port6Bit | Port7Bit | Port8Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port5Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port3Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 800 );
InternalMemory.WaterLevelMax_write(1800);
// Feeeding and Water Change mode speed
// Ports that are always on
ReefAngel.Relay.On( Port1 );
ReefAngel.Relay.On( Port6 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.StandardHeater( Port3,780,785 );
ReefAngel.WaterLevelATO(4,Port4,240,28,31);
ReefAngel.Relay.Set(Port8, (now()%(6*SECS_PER_HOUR))<(30*SECS_PER_MIN));
////// Place your custom code below here
PWMValue=OperatingPWM;
if (ReefAngel.WaterLevel.GetLevel(2)<Level-4)
{
override=true;
lastmillis=millis();
PWMValue+=4;
}
if (ReefAngel.WaterLevel.GetLevel(2)>Level+4)
{
override=true;
lastmillis=millis();
PWMValue-=4;
}
if (millis()-lastmillis>nummillis && override)
{
override=false;
}
if (!override) PWMValue=OperatingPWM;
if (ReefAngel.WaterLevel.GetLevel(2)>Level+10) PWMValue=MinPWM;
PWMValue=constrain(PWMValue,MinPWM,100);
ReefAngel.PWM.SetActinic(PWMValue);
if (ReefAngel.WaterLevel.GetLevel(1)<5) //Disable the port until overriden manually
ReefAngel.Relay.Override(Port8,0); //Saltwater Reservoir
if (ReefAngel.WaterLevel.GetLevel(1)>80) // Set port back to auto
ReefAngel.Relay.Override(Port8,2);
if (ReefAngel.WaterLevel.GetLevel(2)>89) //Overflow
ReefAngel.Relay.Off(Port1);
else
ReefAngel.Relay.On(Port1);
if (ReefAngel.WaterLevel.GetLevel(3)>87) //ATO Reservoir
ReefAngel.Relay.Off(Port5);
if (ReefAngel.WaterLevel.GetLevel(3)<1)
ReefAngel.Relay.On(Port5);
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "Ismaclst" );
ReefAngel.ShowInterface();
}
Re: DC return pumps
Also I want to change this part of the code so it goes up +2 but down -4. Is this possible?
Would it be something like this?
Code: Select all
PWMValue=OperatingPWM;
if (ReefAngel.WaterLevel.GetLevel(2)<Level-4)
{
override=true;
lastmillis=millis();
PWMValue+=4;
}
if (ReefAngel.WaterLevel.GetLevel(2)>Level+4)
{
override=true;
lastmillis=millis();
PWMValue-=4;
}
if (millis()-lastmillis>nummillis && override)
{
override=false;
}
if (!override) PWMValue=OperatingPWM;
if (ReefAngel.WaterLevel.GetLevel(2)>Level+10) PWMValue=MinPWM;
PWMValue=constrain(PWMValue,MinPWM,100);
ReefAngel.PWM.SetActinic(PWMValue);
Code: Select all
PWMValue=OperatingPWM;
if (ReefAngel.WaterLevel.GetLevel(2)<Level-4)
{
override=true;
lastmillis=millis();
PWMValue+=2;
}
if (ReefAngel.WaterLevel.GetLevel(2)>Level+2)
{
override=true;
lastmillis=millis();
PWMValue-=4;
}
if (millis()-lastmillis>nummillis && override)
{
override=false;
}
if (!override) PWMValue=OperatingPWM;
if (ReefAngel.WaterLevel.GetLevel(2)>Level+10) PWMValue=MinPWM;
PWMValue=constrain(PWMValue,MinPWM,100);
ReefAngel.PWM.SetActinic(PWMValue);
Re: DC return pumps
I think I found the problem. I thought that the overflow was getting too high, but I think it's when my RO/DI valve turns on. After I changed my filters today,. I manually turned on the port that's for the rodi valve so I could flush the filters. After I did this I noticed that the RA was only putting out 20% on the atintic channel. When I turned off the port the atintic number when back to normal. Any Ideas?
Re: DC return pumps
I thought maybe there was noise from the cord of the rodi valve so I moved the Ethernet cable. Still does the same thing as before.
Re: DC return pumps
Anyone? Also noticed that the daylight channel is showing 20% all the time, even though I don't have that channel anywhere in my code.
Re: DC return pumps
In the graphs? it doesn't register 0's so it may show your level as the last value it had registered.
Re: DC return pumps
If you don't use the channel( not set any value), by default they will come up as 20%.
Just add this line:
Just add this line:
Code: Select all
ReefAngel.PWM.SetDaylight(0);
Roberto.
Re: DC return pumps
I think a better way of doing this is doing the same thing as I did. I set value to 50% when level reach high.
I also have an inline float switch in the normally closed position with the dimming channel that controls the return pump. If float is triggered, the circuit is going to open and the signal going to the pump will be 0 and it will turn off the pump. It is better to use the dimming signal to turn the pump off than cutting off the power as you are doing.
I also have an inline float switch in the normally closed position with the dimming channel that controls the return pump. If float is triggered, the circuit is going to open and the signal going to the pump will be 0 and it will turn off the pump. It is better to use the dimming signal to turn the pump off than cutting off the power as you are doing.
Roberto.
Re: DC return pumps
I have it in my code already to default to 50%. The problem is when another port, the rodi port, turns on it drops my atintic channel down to 20%. Once it turns back off it goes back to 74%. The daylight channel was always at zero, but like the atintic channel it goes to 20% too when the rodi port is on. I'm not concerned with the daylight channel since I'm not using it. I'm concerned about the atintic one because once my rodi valve turns on, it will leave my main display without flow for an extended period of time.
Re: DC return pumps
Just checked a few things to rule them out. I unplugged the return port and the ro/di port separately to rule out noise from either one. It didn't matter which one was unplugged, it still went to 20% when I toggled on the rodi port. I'm lost at what it could be. Any other things I should try?
Re: DC return pumps
I need some help coding. I want port 1 to power off for 5 seconds and turn back on. I want this to happen when channel three of the water level sensor reach's 50 and is on longer than 20 minutes. I want to ignore this though when I'm in feeding mode or I manually turn off port one.
Re: DC return pumps
What do you mean is on longer than 20 minutes? I can attempt some code later this week.
Re: DC return pumps
Sorry should have worded it better. If the level in my sump has been 50 for 20 minutes or longer , I want to turn off port 1 for 5 seconds then turn it back on. It will be like a reset when my pump starts acting up.
Re: DC return pumps
Gotcha. Shouldn't be too tough, just give me a few days, been a long few days back at work after a looong vacation exhausted already.
Re: DC return pumps
Hey Lee, Did you ever get a chance to look into this?
Re: DC return pumps
No I haven't even been here on the boards. Been so backed up at work with end of year. I do owe you a solution... will try by this weekend. Feel free to harass me on FB too
Re: DC return pumps
Thanks! Appreciate you helping me on this.
Re: DC return pumps
Ok, I think this should be good to get started. I've reviewed it a few times in my head. Let me know what you think.
Code: Select all
static unsigned long levelHigh;
static unsigned long pumpOff;
static boolean pumpBool;
if (ReefAngel.WaterLevel.GetLevel(3) < 50) levelHigh=now();
if (now()-levelHigh > 20*SECS_PER_MINUTE && !pumpBool) {
pumpBool=true;
pumpOff=now();
}
if (now()-pumpOff() < 5*SECS_PER_MINUTE) {
ReefAngel.Relay.Off(Port1);
} else {
ReefAngel.Relay.On(Port1);
pumpBool=false;
}
Re: DC return pumps
It appears to be what I was wanting. I will upload this later and let you know for sure.
Re: DC return pumps
I added this to my code but it did not compile. The first error was I had to change MINUTES to MIN. Now I get a few more.
Re: DC return pumps
Here is my code:
Code: Select all
#include <ReefAngel_Features.h>
#include <Globals.h>
#include <RA_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <InternalEEPROM.h>
#include <RA_NokiaLCD.h>
#include <RA_ATO.h>
#include <RA_Joystick.h>
#include <LED.h>
#include <RA_TempSensor.h>
#include <Relay.h>
#include <RA_PWM.h>
#include <Timer.h>
#include <Tide.h>
#include <Memory.h>
#include <InternalEEPROM.h>
#include <RA_Colors.h>
#include <RA_CustomColors.h>
#include <Salinity.h>
#include <RF.h>
#include <IO.h>
#include <ORP.h>
#include <AI.h>
#include <PH.h>
#include <WaterLevel.h>
#include <Humidity.h>
#include <DCPump.h>
#include <PAR.h>
#include <ReefAngel.h>
#define Level 79
#define MinPWM 45
#define OperatingPWM 68
long nummillis=5000;
byte PWMValue=0;
unsigned long lastmillis=millis();
boolean override=false;
static unsigned long levelHigh;
static unsigned long pumpOff;
static boolean pumpBool;
////// Place global variable code below here
////// Place global variable code above here
void setup()
{
// This must be the first line
ReefAngel.Init(); //Initialize controller
ReefAngel.Use2014Screen(); // Let's use 2014 Screen
ReefAngel.DDNS("Damien");
ReefAngel.AddMultiChannelWaterLevelExpansion(); // Multi-Channel Water Level Expanion Module
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port1Bit | Port6Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port2Bit | Port3Bit | Port4Bit | Port6Bit | Port7Bit | Port8Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port5Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port3Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 800 );
InternalMemory.WaterLevelMax_write(1800);
// Feeeding and Water Change mode speed
// Ports that are always on
ReefAngel.Relay.On( Port1 );
ReefAngel.Relay.On( Port6 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.StandardHeater( Port3,780,785 );
ReefAngel.WaterLevelATO(4,Port4,240,28,31);
ReefAngel.Relay.Set(Port8, (now()%(6*SECS_PER_HOUR))<(30*SECS_PER_MIN));
////// Place your custom code below here
PWMValue=OperatingPWM;
if (ReefAngel.WaterLevel.GetLevel(2)<Level-4)
{
override=true;
lastmillis=millis();
PWMValue+=2;
}
if (ReefAngel.WaterLevel.GetLevel(2)>Level+2)
{
override=true;
lastmillis=millis();
PWMValue-=4;
}
if (millis()-lastmillis>nummillis && override)
{
override=false;
}
if (!override) PWMValue=OperatingPWM;
if (ReefAngel.WaterLevel.GetLevel(2)>Level+10) PWMValue=MinPWM;
PWMValue=constrain(PWMValue,MinPWM,100);
ReefAngel.PWM.SetActinic(PWMValue);
if (ReefAngel.WaterLevel.GetLevel(3) < 50) levelHigh=now();
if (now()-levelHigh > 20*SECS_PER_MIN && !pumpBool) {
pumpBool=true;
pumpOff=now();
}
if (now()-pumpOff() < 5*SECS_PER_MIN) {
ReefAngel.Relay.Off(Port1);
} else {
ReefAngel.Relay.On(Port1);
pumpBool=false;
}
if (ReefAngel.WaterLevel.GetLevel(1)<5) //Disable the port until overriden manually
ReefAngel.Relay.Override(Port8,0); //Saltwater Reservoir
if (ReefAngel.WaterLevel.GetLevel(1)>80) // Set port back to auto
ReefAngel.Relay.Override(Port8,2);
if (ReefAngel.WaterLevel.GetLevel(2)>89) //Overflow
ReefAngel.Relay.Off(Port1);
else
ReefAngel.Relay.On(Port1);
if (ReefAngel.WaterLevel.GetLevel(3)>87) //ATO Reservoir
ReefAngel.Relay.Off(Port5);
if (ReefAngel.WaterLevel.GetLevel(3)<1)
ReefAngel.Relay.On(Port5);
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "Ismaclst" );
ReefAngel.ShowInterface();
}
Re: DC return pumps
Sorry, change pumpOff() to pumpOff.
Code: Select all
Sketch uses 60,092 bytes (23%) of program storage space. Maximum is 253,952 bytes.
Global variables use 2,978 bytes (36%) of dynamic memory, leaving 5,214 bytes for local variables. Maximum is 8,192 bytes.
Re: DC return pumps
So I finally installed the code you did for me today. I submersed the stand pipe for my sump level so it would activate. It shows that the sump level is at 82 and it was suppose to turn the return off when it was 50 or higher. I waited past the 16 minutes but nothing happened. Not sure what is going on. Here is my latest code.
Code: Select all
#include <ReefAngel_Features.h>
#include <Globals.h>
#include <RA_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <InternalEEPROM.h>
#include <RA_NokiaLCD.h>
#include <RA_ATO.h>
#include <RA_Joystick.h>
#include <LED.h>
#include <RA_TempSensor.h>
#include <Relay.h>
#include <RA_PWM.h>
#include <Timer.h>
#include <Tide.h>
#include <Memory.h>
#include <InternalEEPROM.h>
#include <RA_Colors.h>
#include <RA_CustomColors.h>
#include <Salinity.h>
#include <RF.h>
#include <IO.h>
#include <ORP.h>
#include <AI.h>
#include <PH.h>
#include <WaterLevel.h>
#include <Humidity.h>
#include <DCPump.h>
#include <PAR.h>
#include <ReefAngel.h>
#define Level 76
#define MinPWM 45
#define OperatingPWM 68
long nummillis=5000;
byte PWMValue=0;
unsigned long lastmillis=millis();
boolean override=false;
static unsigned long levelHigh;
static unsigned long pumpOff;
static boolean pumpBool;
////// Place global variable code below here
////// Place global variable code above here
void setup()
{
// This must be the first line
ReefAngel.Init(); //Initialize controller
ReefAngel.Use2014Screen(); // Let's use 2014 Screen
ReefAngel.DDNS("Damien");
ReefAngel.AddMultiChannelWaterLevelExpansion(); // Multi-Channel Water Level Expanion Module
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port1Bit | Port6Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port2Bit | Port3Bit | Port4Bit | Port6Bit | Port7Bit | Port8Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port5Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port3Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 800 );
InternalMemory.WaterLevelMax_write(1800);
// Feeeding and Water Change mode speed
// Ports that are always on
ReefAngel.Relay.On( Port1 );
ReefAngel.Relay.On( Port6 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.StandardHeater( Port3,780,785 );
ReefAngel.WaterLevelATO(4,Port4,240,28,31);
ReefAngel.Relay.Set(Port8, (now()%(6*SECS_PER_HOUR))<(30*SECS_PER_MIN));
////// Place your custom code below here
PWMValue=OperatingPWM;
if (ReefAngel.WaterLevel.GetLevel(2)<Level-4)
{
override=true;
lastmillis=millis();
PWMValue+=2;
}
if (ReefAngel.WaterLevel.GetLevel(2)>Level+2)
{
override=true;
lastmillis=millis();
PWMValue-=4;
}
if (millis()-lastmillis>nummillis && override)
{
override=false;
}
if (!override) PWMValue=OperatingPWM;
if (ReefAngel.WaterLevel.GetLevel(2)>Level+10) PWMValue=MinPWM;
PWMValue=constrain(PWMValue,MinPWM,100);
ReefAngel.PWM.SetActinic(PWMValue);
if (ReefAngel.WaterLevel.GetLevel(4) < 50) levelHigh=now();
if (now()-levelHigh > 16*SECS_PER_MIN && !pumpBool) {
pumpBool=true;
pumpOff=now();
}
if (now()-pumpOff < 15*SECS_PER_MIN) {
ReefAngel.Relay.Off(Port1);
} else {
ReefAngel.Relay.On(Port1);
pumpBool=false;
}
if (ReefAngel.WaterLevel.GetLevel(1)<5) //Disable the port until overriden manually
ReefAngel.Relay.Override(Port8,0); //Saltwater Reservoir
if (ReefAngel.WaterLevel.GetLevel(1)>80) // Set port back to auto
ReefAngel.Relay.Override(Port8,2);
if (ReefAngel.WaterLevel.GetLevel(2)>89) //Overflow
ReefAngel.Relay.Off(Port1);
else
ReefAngel.Relay.On(Port1);
if (ReefAngel.WaterLevel.GetLevel(3)>87) //ATO Reservoir
ReefAngel.Relay.Off(Port5);
if (ReefAngel.WaterLevel.GetLevel(3)<1)
ReefAngel.Relay.On(Port5);
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "Ismaclst" );
ReefAngel.ShowInterface();
}