Low Water cut off

Do you have a question on how to do something.
Ask in here.
Seagals
Posts: 127
Joined: Wed Aug 01, 2012 7:06 am

Low Water cut off

Post by Seagals »

I made stupid mistake and accidently saved over a low water cut off code that Roberto help with, I was wondering if I can get help with it again.

I wanted my Return Pump on Relay 8 to shut off when the float switch signaled low water and turn back on when the sump filled up again. I have a seperate ATO thats not part of the RA system.

Sorry, really stupid mistake, I went in to the wizard and accidently hit save at the end - :o

Thanks
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Low Water cut off

Post by rimai »

That's fine.
Your code should still be intact. I think we saved with the name of Seagals_1st_Code.
Go to menu File->Sketchbook->Seagals_1st_Code to open it up.
Roberto.
Seagals
Posts: 127
Joined: Wed Aug 01, 2012 7:06 am

Re: Low Water cut off

Post by Seagals »

I tried that i accidently saved over the file Seagals_1st code, We you be able to please create it again for me??

Thank you
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Low Water cut off

Post by rimai »

Sure, we only added one line in your code.
So, add it to your code in between these lines, like this:

Code: Select all

    ////// Place your custom code below here
    
ReefAngel.Relay.Set(Port8,!ReefAngel.LowATO.IsActive());

    ////// Place your custom code above here
Roberto.
Seagals
Posts: 127
Joined: Wed Aug 01, 2012 7:06 am

Re: Low Water cut off

Post by Seagals »

Thanks again, you da man!
Seagals
Posts: 127
Joined: Wed Aug 01, 2012 7:06 am

Re: Low Water cut off

Post by Seagals »

I finally got around to running the 1 float for the low water cut off - question,since i am using it as a low water cutoff does it matter which receptor i plug it into on the head unit?

I see where the ATO receptors are on the head unit; there are 2 receptors, does it matter if i plug it on the right or left side for the low water cutoff??

Thanks in advance
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Low Water cut off

Post by rimai »

You need to use the Low ATO port. Please refer to the user manual.
Roberto.
Seagals
Posts: 127
Joined: Wed Aug 01, 2012 7:06 am

Re: Low Water cut off

Post by Seagals »

The low water cut off works but its not the best situation. When the return pump in the sump cuts out on low water the remaining water in the tank continues to rush down and filling the sump. The water from the DT fills the sump enough to raise the low water float and re activate the sump, this cycle repeats itself continuosly which causes other hazards and problems.

Two questions:
1. Can the low water cutoff code be made like to overheat code? as i understand it the overheat code does not reactivate the effected ports unless manually reset. Can this be done for the low water cutoff? I thought about the delayed restart but it if the sump has low on water it will just continue to cycle.

2. I would like to add ports 1 and 7 to the low water cut off is the following correct?

ReefAngel.Relay.Set(Port1,Port7,Port8,!ReefAngel.LowATO.IsActive());

Thanks in advance for you help.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Low Water cut off

Post by rimai »

We can cut off and leave it off, but how do you plan on manually resetting it?
Are you using custom menu?
Roberto.
Seagals
Posts: 127
Joined: Wed Aug 01, 2012 7:06 am

Re: Low Water cut off

Post by Seagals »

I did some research on custom menu but I dont think I am capable of creating a custom menu, :o , right now I am using the wizard but I dont think there is an option for custom menu.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Low Water cut off

Post by rimai »

To simplify, a quick and dirty way to clear it would be to enter feeding mode and exit.
Would this work around work for you?
Roberto.
Seagals
Posts: 127
Joined: Wed Aug 01, 2012 7:06 am

Re: Low Water cut off

Post by Seagals »

rimai wrote: enter feeding mode and exit.
Would this work around work for you?
If i do this through the 'feeding' mode will effect my ability to use the feeding mode as i currently do?

Currently, when i select the feeding mode my skimmer and pumps stop for 15 mins. can this still occur? if so than after 15 mins when everything turns back on wouldnt it 'clear' the low water signal and turn the main pump on again??

Sorry, i am confused can you clarify?

Thanks
Seagals
Posts: 127
Joined: Wed Aug 01, 2012 7:06 am

Re: Low Water cut off

Post by Seagals »

My buddy is trying to help me out and found a 'custom menus' tutorial version 1.1 in the forum but we have some questions when we go to the 'reef angel features' folder it pulls up the RA Gen and we dont see where to add the #define CUSTOM MENU lines. I see the tab in RA Gen that says cutom menu but the instructions are a little off.
Are we in the right area?

Is their a later version than 1.1 of the manual?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Low Water cut off

Post by rimai »

Yes, the feeding mode would still work as it should, but I think the main pump would be cleared the minute you start the feeding mode and not at the end.
Does that work for you?
If so, use this instead:

Code: Select all

  if (ReefAngel.LowATO.IsActive()) ReefAngel.Relay.RelayMaskOff&=~Port8Bit;
Roberto.
Seagals
Posts: 127
Joined: Wed Aug 01, 2012 7:06 am

Re: Low Water cut off

Post by Seagals »

I hear you but i would rather not trun the main pump off and on each time i toggle the feedingh mode. I have other equipment tied to it and it will be to much.

Since i am not using the ATO feature as intended can we just tie it to the ATO feature? it seems to havethe ATO Clear toggle - can that work?

If not, i have a friend trying to help with custom menu - see my previous post for questions - thanks
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Low Water cut off

Post by rimai »

I don't think ATO would work for you.
You still need to add that code I posted above regardless of which method we use to clear.
For the custom menu define, don't worry about them. They get added automatically now.
This is the same simple menu with your option added to it.
Place it above setup()

Code: Select all

#include <avr/pgmspace.h>
prog_char menu0_label[] PROGMEM = "Feeding";
prog_char menu1_label[] PROGMEM = "Water Change";
prog_char menu2_label[] PROGMEM = "ATO Clear";
prog_char menu3_label[] PROGMEM = "Overheat Clear";
prog_char menu4_label[] PROGMEM = "PH Calibration";
prog_char menu5_label[] PROGMEM = "Version";
prog_char menu6_label[] PROGMEM = "Clear Low Water";
PROGMEM const char *menu_items[] = {
menu0_label, menu1_label, menu2_label, menu3_label, menu4_label, menu5_label, menu6_label  };

void MenuEntry1()
{
ReefAngel.FeedingModeStart();

}
void MenuEntry2()
{
ReefAngel.WaterChangeModeStart();

}
void MenuEntry3()
{
ReefAngel.ATOClear();
ReefAngel.DisplayMenuEntry("Clear ATO Timeout");
}
void MenuEntry4()
{
ReefAngel.OverheatClear();
ReefAngel.DisplayMenuEntry("Clear Overheat");
}
void MenuEntry5()
{
ReefAngel.SetupCalibratePH();
ReefAngel.DisplayedMenu = ALT_SCREEN_MODE;

}
void MenuEntry6()
{
ReefAngel.DisplayVersion();

}
void MenuEntry7()
{
ReefAngel.Relay.RelayMaskOff=0;
}
And you need this inside setup()

Code: Select all

    ReefAngel.InitMenu(pgm_read_word(&(menu_items[0])),SIZE(menu_items));
Roberto.
Seagals
Posts: 127
Joined: Wed Aug 01, 2012 7:06 am

Re: Low Water cut off

Post by Seagals »

Ok - We copied and compiled, seems fine and will test it out - thanks

If we decide to add a high water cutoff can i use the same menu or do i need to add a new menu?

Thanks again
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Low Water cut off

Post by rimai »

You should be able to use the same.
Roberto.
Seagals
Posts: 127
Joined: Wed Aug 01, 2012 7:06 am

Re: Low Water cut off

Post by Seagals »

Good morning,

It kinda worked but I was unable to turn it back on unless i unplugged the controller. For some reason last night the pump trippped on low water (never got around to testing) and stopped working as planned and did not reset as planned. (unforutunetly for me my water level was off and water flowed out of the sump and on the floor, ugh)

Anyway, the 'low water cut off' is in the menu as planned but when i selected it i got a blank screen and nothing happened. I tried plugging the controller into the laptop to reset it, nothing. The only way to clear the code was to unplug the controller.

Can you help fix this?

Here is the posted code

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

////// Place global variable code below here
#include <avr/pgmspace.h>
prog_char menu0_label[] PROGMEM = "Feeding";
prog_char menu1_label[] PROGMEM = "Water Change";
prog_char menu2_label[] PROGMEM = "ATO Clear";
prog_char menu3_label[] PROGMEM = "Overheat Clear";
prog_char menu4_label[] PROGMEM = "PH Calibration";
prog_char menu5_label[] PROGMEM = "Version";
prog_char menu6_label[] PROGMEM = "Clear Low Water";
PROGMEM const char *menu_items[] = {
menu0_label, menu1_label, menu2_label, menu3_label, menu4_label, menu5_label, menu6_label };

void MenuEntry1()
{
ReefAngel.FeedingModeStart();

}
void MenuEntry2()
{
ReefAngel.WaterChangeModeStart();

}
void MenuEntry3()
{
ReefAngel.ATOClear();
ReefAngel.DisplayMenuEntry("Clear ATO Timeout");
}
void MenuEntry4()
{
ReefAngel.OverheatClear();
ReefAngel.DisplayMenuEntry("Clear Overheat");
}
void MenuEntry5()
{
ReefAngel.SetupCalibratePH();
ReefAngel.DisplayedMenu = ALT_SCREEN_MODE;

}
void MenuEntry6()
{
ReefAngel.DisplayVersion();

}
void MenuEntry7()
{
ReefAngel.Relay.RelayMaskOff=0;
}


////// 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 = Port1Bit | Port5Bit | Port6Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port7Bit | Port8Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port3Bit | Port4Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port1Bit | Port3Bit | Port4Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 850 );


// Ports that are always on
ReefAngel.Relay.On( Port1 );
ReefAngel.Relay.On( Port7 );
ReefAngel.Relay.On( Port8 );

////// Place additional initialization code below here
ReefAngel.InitMenu(pgm_read_word(&(menu_items[0])),SIZE(menu_items));


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

void loop()
{
ReefAngel.StandardLights( Port2,9,0,21,0 );
ReefAngel.StandardLights( Port3,9,0,21,30 );
ReefAngel.StandardLights( Port4,11,0,20,25 );
ReefAngel.Wavemaker( Port5,960 );
ReefAngel.Relay.Set( Port6, !ReefAngel.Relay.Status( Port5 ) );
ReefAngel.PWM.SetDaylight( PWMSlope(11,0,20,25,5,42,120,5) );
ReefAngel.PWM.SetActinic( PWMSlope(9,0,21,30,15,60,60,15) );
////// Place your custom code below here
if (ReefAngel.LowATO.IsActive()) ReefAngel.Relay.RelayMaskOff&=~Port8Bit,Port7Bit,Port1Bit;


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

// This should always be the last line
ReefAngel.Portal( "Seagals" );
ReefAngel.ShowInterface();
}
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Low Water cut off

Post by rimai »

Oh, I think I made a mistake :(
I'm so sorry.
You need to replace this:

Code: Select all

ReefAngel.Relay.RelayMaskOff=0;
With this:

Code: Select all

ReefAngel.Relay.RelayMaskOff=255;
Also, the assignment of ports need to be like this:

Code: Select all

if (ReefAngel.LowATO.IsActive()) ReefAngel.Relay.RelayMaskOff&=~(Port8Bit | Port7Bit | Port1Bit);
Roberto.
Seagals
Posts: 127
Joined: Wed Aug 01, 2012 7:06 am

Re: Low Water cut off

Post by Seagals »

Works great - Thank you!
Seagals
Posts: 127
Joined: Wed Aug 01, 2012 7:06 am

Re: Low Water cut off

Post by Seagals »

opps!, maybe not - for some reason she cutout on low water again, this tie i was up and know the float was under 6 inches of water. This time when i plugged the controller into the computer it reset and everything restarted.

Any ideas on why she is cutting out on low water when thier is plenty of water?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Low Water cut off

Post by rimai »

Are the exposed leads touching the water?
Can you try another float switch?
Roberto.
Seagals
Posts: 127
Joined: Wed Aug 01, 2012 7:06 am

Re: Low Water cut off

Post by Seagals »

I replaced the float, we'll see - the existing float looked good, soldered leads out of the way and i had the leads in a tube sealed on each side with silicone and the tube was dry. I hope it was just a faulty switch. I'll keep you posted.
Seagals
Posts: 127
Joined: Wed Aug 01, 2012 7:06 am

Re: Low Water cut off

Post by Seagals »

I am still having issues even with the replacement float. I can try another float whe it comes in but i am not sure their would be 2 bad floats in a row. It is usually sparatic and goes off at different times of the day and night. last night it went off on low water 4 times. the 2nd time i was checking the sump and their was plenty of water in the sump. i also tried changing the location of the float in the sump but it went off 2 more times after that. i finally just unplugged the pin from the controller.

Any thoughts??
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Low Water cut off

Post by rimai »

Let's try this:

Code: Select all

static unsigned long lastATOCheck=millis();
if (!ReefAngel.LowATO.IsActive()) lastATOCheck=millis();
if (ReefAngel.LowATO.IsActive() && (millis()-lastATOCheck>2000)) ReefAngel.Relay.RelayMaskOff&=~(Port8Bit | Port7Bit | Port1Bit);
This code will only do the override if the float is triggered for at least 2 seconds.
Let me know if it works this way.
Roberto.
00Warpig00
Posts: 289
Joined: Wed May 16, 2012 9:52 pm

Re: Low Water cut off

Post by 00Warpig00 »

I have had issues with two floats... Well one really... In my first situation the float switch was flaky. It was under several inches of water and the float apparently didn't like to actually float. I replaced that float switch and all is working fine as of now. The second... Just today I installed another float switch in the bottom of my 44 gallon Saltwater Brute for my water change/ATO. I finished installing the float switch and went to the controller and it was showing an active (closed) state. I figured I must have another flaky float switch... NOPE My ATO/WC Pump was too close to the float switch and the magnets inside the pump were activating the float switch contacts. I moved the pump further away from the float switch and all is well. So you may just want to verify you have nothing with a magnetic field near your float switches. They CAN/WILL cause a false active state. :)

Nick
180G FOWLR
20GH QT#1
29G QT#2

Image
Seagals
Posts: 127
Joined: Wed Aug 01, 2012 7:06 am

Re: Low Water cut off

Post by Seagals »

THnaks, the latest code with 2 sec delay has been working
Seagals
Posts: 127
Joined: Wed Aug 01, 2012 7:06 am

Re: Low Water cut off

Post by Seagals »

My low water cut off has been working fine since 2012 but recently has stopped working. I tried replacing the float as well as connecting the two wires to simulate contact but the RA doesn't seem to be kicking the main pump off. I haven't changed the code since it was entered in 2012 - any thoughts?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Low Water cut off

Post by rimai »

Can you unplug the cable from RA and check if you get the same behavior when you short out the pins in the head unit??
It could be something may have damaged that port. Check for water damage.
Roberto.
Post Reply