Page 1 of 1

RobertoFlow Drain Pipe

Posted: Fri Aug 29, 2014 9:58 am
by rimai
Our community members decided to give this a name :)
http://forum.reefangel.com/viewtopic.php?p=42105#p42105
So, I decided to create a tutorial page, so we can find it easy for future reference :ugeek:

The problem:
I've tried all different versions of stand pipe and they all have something in common... You must inject air into the drain pipe to avoid full siphon. I doesn't matter which one you use. You will always end up with cascading noise, even if it is minimal and a lot of bubbles in your sump.
I only have one drain pipe, so I can't really use those full siphon version with 3 pipes.
The solution:
Use a Reef Angel coupled with a water level expansion and a Speedwave pump to control the flow of your drain based on the overflow water level, so you have a dead silent drain pipe :)

Don't mind the mess... Here is a video:
[youtube]http://www.youtube.com/watch?v=r15TTX-KHZw[/youtube]

And here is the code I was using:

Code: Select all

#include <Salinity.h>
#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 <Memory.h>
#include <InternalEEPROM.h>
#include <RA_Colors.h>
#include <RA_CustomColors.h>
#include <RF.h>
#include <IO.h>
#include <ORP.h>
#include <AI.h>
#include <PH.h>
#include <WaterLevel.h>
#include <ReefAngel.h>

#define Level         50
#define MinPWM        50
#define OperatingPWM  66
long nummillis=5000;

byte PWMValue=0;
unsigned long lastmillis=millis();
boolean override=false;

void setup()
{
  ReefAngel.Init();  //Initialize controller
  InternalMemory.WaterLevelMax_write(1800);
}

void loop()
{
  PWMValue=OperatingPWM;
  if (ReefAngel.WaterLevel.GetLevel()<Level-2)
  {
    override=true;
    lastmillis=millis();
    PWMValue+=2;
  }
  if (ReefAngel.WaterLevel.GetLevel()>Level+2)
  {
    override=true;
    lastmillis=millis();
    PWMValue-=2;
  }
  if (millis()-lastmillis>nummillis && override)
  {
    override=false;
  }
  if (!override) PWMValue=OperatingPWM;
  if (ReefAngel.WaterLevel.GetLevel()>Level+10) PWMValue=MinPWM;
  PWMValue=constrain(PWMValue,MinPWM,100);
  ReefAngel.PWM.SetActinic(PWMValue);
  ReefAngel.ShowInterface();
}

void DrawCustomMain()
{
  // the graph is drawn/updated when we exit the main menu &
  // when the parameters are saved
  ReefAngel.LCD.DrawDate(6, 122);
  pingSerial();
#if defined DisplayLEDPWM && ! defined RemoveAllLights
  ReefAngel.LCD.DrawMonitor(15, 60, ReefAngel.Params,
  ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue());
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
  ReefAngel.LCD.DrawMonitor(15, 60, ReefAngel.Params);
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
  pingSerial();
  char text[10];
  ConvertNumToString(text, ReefAngel.WaterLevel.GetLevel(), 1);
  strcat(text,"  ");
  ReefAngel.LCD.DrawText(DefaultFGColor,DefaultBGColor,15,93,"Water Level:");
  ReefAngel.LCD.DrawText(DefaultFGColor,DefaultBGColor,88,93,text);
  pingSerial();
  byte TempRelay = ReefAngel.Relay.RelayData;
  TempRelay &= ReefAngel.Relay.RelayMaskOff;
  TempRelay |= ReefAngel.Relay.RelayMaskOn;
  ReefAngel.LCD.DrawOutletBox(12, 103, TempRelay);
}

void DrawCustomGraph()
{
  ReefAngel.LCD.DrawGraph(5, 5);
}

Re: RobertoFlow Drain Pipe

Posted: Fri Aug 29, 2014 10:09 am
by lnevo
So does this give you the benefit of a full siphon drain without the need for a 3 pipe setup? Should I be ditching my durso? Would this allow for more flow capability than a traditional durso?

Since you don't have an emergency drain, if the water level rises what is your failsafe. In your actual code do you have any triggers to shutdown the system or go below the minimum, or is that the minimum the speedwave's can do?

Re: RobertoFlow Drain Pipe

Posted: Fri Aug 29, 2014 10:20 am
by dapg8gt
Fwiw this can be used perfectly with a herbie and save the $40 cost of a good Tru Union gate valve..

Imo there isn't much difference risk wise with this vs the durso if you only have a single drain pipe, it's a risk either way so better to have a silent one at least.. and you will Def have more flow with a siphon

Glad my post brought this idea of Roberto's back into the light.. I have been thinking about this randomly since the day I saw it and I have a feeling it's going to take off now with this dc pump craze that's here to stay.

Re: RobertoFlow Drain Pipe

Posted: Fri Aug 29, 2014 10:30 am
by rimai
Yes, I've been running full siphon with just one pipe for more than a year now :)
Here is how I made the failsafe.
I'm using a float switch in series with the dimming signal.
So, if the water goes above my limit, it will open the float switch and interrupt the dimming signal to the pump, causing it to shutdown.

Re: RobertoFlow Drain Pipe

Posted: Fri Aug 29, 2014 10:34 am
by lnevo
Nice, that's a physical method, but you can easily back that up with the water level too :) How about restarts, does it take any time to purge the air, anything remarkable on starting up/shutting down? maybe another vid? :D

Re: RobertoFlow Drain Pipe

Posted: Fri Aug 29, 2014 1:51 pm
by rimai
It takes about 30 seconds for the pump to start spinning enough to overcome the head I have. Then, about 5 seconds later, I already have a full siphon.

Re: RobertoFlow Drain Pipe

Posted: Thu Aug 13, 2015 5:41 pm
by Sacohen
I'm going to set this up when I get my 90 gallon going.
Can someone explain what is going on with this code so I understand what things need to be changed?

It looks like Roberto hardcoded the water level. Can it be done with a percentage, like an ATO setup?

Also if I don't want the Graph I just don't use anything after ReefAngel.Show.Interface (); and end it at ReefAngel.PWM.SetActinic (PWMValue);}

Re: RobertoFlow Drain Pipe

Posted: Thu Aug 13, 2015 9:40 pm
by rimai
Just use what's inside the loop().
The basic idea is to vary the % up or down a couple points depending of the value of the overflow level.
If overflow goes up, decrease the speed. If it goes down, increase the speed.
Also, as safety, if value goes too high, drop % to a very low speed. It means something is not right.
You will start hearing it gurgle at this point as air is going to be entering the drain pipe.

Re: RobertoFlow Drain Pipe

Posted: Fri Aug 14, 2015 3:39 am
by Sacohen
Thanks Roberto.

Re: RobertoFlow Drain Pipe

Posted: Fri Aug 14, 2015 4:08 am
by Sacohen
I just looked at that portion of the code again. Where do you set the level you want it to be at?

Is that the operating PWM in the define section?

Re: RobertoFlow Drain Pipe

Posted: Fri Aug 14, 2015 9:06 am
by rimai
Yeah. Eventually, when I integrated the code into my controller, I made it so it is a memory location.
Since I was using the channel 0 of the dimming expansion, I used the slope end for channel 0 memory location:

Code: Select all

InternalMemory.PWMSlopeEnd0_read();