Page 1 of 1

Float switch and pump

Posted: Wed Oct 08, 2014 11:54 am
by sfortin
Can Iget help with a code? I have a float switch right now in my aqua on the first floor and my sump is in the basement. when water rise in my aqua because a snail went in my pipe going down. the float switch stop my pump until i'm back and start it again manualy. Right it is the black box you see in the pic doing the job but every time i feed i have to go hit the reset button to re-start the pump
Box with relays to stop pump with reset button
Box with relays to stop pump with reset button
20141008_144347_resized.jpg (122.19 KiB) Viewed 9626 times
, so i cant use the feed mode!! Now how can i do that with RA?

Re: Float switch and pump

Posted: Wed Oct 08, 2014 2:11 pm
by rimai
Try this:

Code: Select all

if (ReefAngel.LowATO.IsActive()) ReefAngel.Relay.Override(Port8,0);
This assumes you are using the LowATO port for your float switch and Port8 for your return pump.
If the float switch is triggered, it will override Port8 to Off and you can clear the override with the Portal or smartphone app after you inspect and know what is wrong.

Re: Float switch and pump

Posted: Wed Oct 08, 2014 2:19 pm
by sfortin
And we insert the code between wich line?

Re: Float switch and pump

Posted: Wed Oct 08, 2014 2:20 pm
by rimai
in the custom section of loop()

Re: Float switch and pump

Posted: Wed Oct 08, 2014 2:30 pm
by sfortin
Thanks so so much

Re: Float switch and pump

Posted: Wed Oct 08, 2014 3:25 pm
by sfortin
doesnt seem to work.

#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 <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 <ReefAngel.h>

////// Place global variable code below here


////// Place global variable code above here


void setup()
{
// This must be the first line
ReefAngel.Init(); //Initialize controller
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port8Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port3Bit | Port6Bit | Port7Bit | Port8Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = 0;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port5Bit | Port7Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 820 );


// Ports that are always on
ReefAngel.Relay.On( Port1 );
ReefAngel.Relay.On( Port2 );
ReefAngel.Relay.On( Port3 );
ReefAngel.Relay.On( Port4 );
ReefAngel.Relay.On( Port6 );
ReefAngel.Relay.On( Port8 );

////// Place additional initialization code below here



////// Place additional initialization code above here
}

void loop()
{
ReefAngel.StandardLights( Port5,21,0,7,0 );
ReefAngel.StandardHeater( Port7,755,765 );
////// Place your custom code below here

if (ReefAngel.LowATO.IsActive()) ReefAngel.Relay.Override(Port8,0);


////// Place your custom code above here

// This should always be the last line
ReefAngel.Portal( "sfortin" );
ReefAngel.ShowInterface();
}

Re: Float switch and pump

Posted: Wed Oct 08, 2014 3:35 pm
by sfortin
oupsss it is working but the pump try to start back when i push the activate on my phone but for about half of a second and stop. it's just like trigering. :?

Re: Float switch and pump

Posted: Wed Oct 08, 2014 3:47 pm
by sfortin
Jump to fast on conclusion. It is working super fine my float was defect....

Super service Roberto i'm going to talk of you on my french Québec forum because a lot of my friends are scare to buy because of service (open source) and because of language difference....

Re: Float switch and pump

Posted: Wed Oct 08, 2014 4:10 pm
by rimai
Awesome!! :)

Re: Float switch and pump

Posted: Thu Jan 01, 2015 3:15 pm
by sfortin
Now i have another problem..everything was working super fine and now my pump keep stoping for no reason. Sometime it works for one minute and stop. i start it back and work for 10 minutes or 20 or 5 alway different. Took it from port 8 to port 7 and work for about 24 hours and now doing the same thing it was on port 7?????

Re: Float switch and pump

Posted: Thu Jan 01, 2015 3:28 pm
by rimai
When the pump stops, does that port show red in the screen display?

Re: Float switch and pump

Posted: Thu Jan 01, 2015 3:33 pm
by sfortin
No it is black

Re: Float switch and pump

Posted: Thu Jan 01, 2015 3:38 pm
by rimai
Black?
It is supposed to be green or red.
I'm talking about the port 7 that you have your pump connected to.

Re: Float switch and pump

Posted: Thu Jan 01, 2015 3:39 pm
by sfortin
Yes green

Re: Float switch and pump

Posted: Thu Jan 01, 2015 3:40 pm
by rimai
Was it showing green when the pump was off?

Re: Float switch and pump

Posted: Thu Jan 01, 2015 3:46 pm
by sfortin
Yes it was

Re: Float switch and pump

Posted: Thu Jan 01, 2015 3:50 pm
by rimai
Try placing a lamp in there.
Does it do the same thing?
Could it be the pump itself?

Re: Float switch and pump

Posted: Thu Jan 01, 2015 3:51 pm
by sfortin
I'll try but if i unplug the pump i hear the relay flikering

Re: Float switch and pump

Posted: Thu Jan 01, 2015 3:54 pm
by rimai
Did you check for any water damage in the head unit, svga cable or relay box?

Re: Float switch and pump

Posted: Thu Jan 01, 2015 3:56 pm
by sfortin
No water went there at all it is on my basement wall

Re: Float switch and pump

Posted: Thu Jan 01, 2015 4:17 pm
by sfortin
Just ordered a new module with disp.....