New ATO pressure switch-setup with Wizard?
Re: New ATO pressure switch-setup with Wizard?
happy to test after next weekend when I return to SD
I have to figure out the wifi issues I've been having, but I'll open that discussion after I get back.
I have to figure out the wifi issues I've been having, but I'll open that discussion after I get back.
Re: New ATO pressure switch-setup with Wizard?
I can give this a try in the next few days. I see where the files get overwritten, but where does the code go?
rimai wrote:I pushed the libraries changes to branch issue54.
We just need to test
Anyone interested?
The function works like this:ATO pump on Port1Code: Select all
ReefAngel.WaterLevelATO(Port1,30,61,63);
Timeout is 30 seconds
Low Level is 61
High Level is 63
You will need the attached files:
Overwrite the existing ones:
ReefAngel.cpp - Documents\Arduino\libraries\ReefAngel
ReefAngel.h - Documents\Arduino\libraries\ReefAngel
feature.txt - Documents\Arduino\update
Re: New ATO pressure switch-setup with Wizard?
in the loop section.
Make sure you get rid of whatever other function you are using on the same port.
Make sure you get rid of whatever other function you are using on the same port.
Roberto.
Re: New ATO pressure switch-setup with Wizard?
Like this?
#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 <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 = Port1Bit | Port5Bit | Port6Bit | Port8Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port7Bit | Port8Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port2Bit | Port3Bit | Port4Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = 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( 790 );
// Ports that are always on
ReefAngel.Relay.On( Port6 );
ReefAngel.Relay.On( Port8 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.StandardLights( Port2,6,0,23,0 );
ReefAngel.StandardLights( Port3,13,30,22,0 );
ReefAngel.StandardLights( Port4,14,0,18,0 );
ReefAngel.WavemakerRandom( Port5,5,7 );
ReefAngel.StandardHeater( Port7,768,771 );
ReefAngel.WaterLevelATO(Port1,50,42,45);
////// Place your custom code below here
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "barbianj" );
ReefAngel.ShowInterface();
}
void DrawCustomMain()
{
int x,y;
char text[10];
// Parameters
#if defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor( 15, 20, ReefAngel.Params,
ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue() );
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor( 15, 20, ReefAngel.Params );
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
pingSerial();
// Water Level
ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,75,66, "WL:" );
ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,99,66, ReefAngel.WaterLevel.GetLevel() );
pingSerial();
// Main Relay Box
byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawOutletBox( 12, 92, TempRelay );
pingSerial();
// Date and Time
ReefAngel.LCD.DrawDate( 6, 122 );
pingSerial();
}
void DrawCustomGraph()
{
}
Re: New ATO pressure switch-setup with Wizard?
Ran the new code and everything seems to function fine. The pump cycled correctly without the rapid on-off clicking.
I used these settings:
ReefAngel.WaterLevelATO(Port1,60,43,45);
I tightened up the level from 42 to 43, giving a 2% total range. On the 100 gallon stock tank sump, that required the ATO pump to run for approximately 45 seconds, pumping about 1 gallon of water.
When I removed enough water to lower the sump level to 43, the ATO pump turned on, filled to 45, then turned off as expected.
Then, I removed enough water to lower the sump level to 40. The ATO turned on, then shut off after 60 seconds and the red status light on the controller lit up. After pressing ATO clear, the pump turned back on.
So far, so good.
I used these settings:
ReefAngel.WaterLevelATO(Port1,60,43,45);
I tightened up the level from 42 to 43, giving a 2% total range. On the 100 gallon stock tank sump, that required the ATO pump to run for approximately 45 seconds, pumping about 1 gallon of water.
When I removed enough water to lower the sump level to 43, the ATO pump turned on, filled to 45, then turned off as expected.
Then, I removed enough water to lower the sump level to 40. The ATO turned on, then shut off after 60 seconds and the red status light on the controller lit up. After pressing ATO clear, the pump turned back on.
So far, so good.
Re: New ATO pressure switch-setup with Wizard?
The ATO is still working without issue.
Re: New ATO pressure switch-setup with Wizard?
For clarification when you do the 100% part of the calibration how much of the tube should be submerged?
The reason for asking is that on my RSM250 the sump is built into the back section of the tank. To get the skimmer to function well I need to have a constant water level in the sump section. When I calibrated the tube I set the the bottom of the top section cap to the desired water level.
Using the code given I removed water until the ATO pump started. This was around the 61% level, then refilled to about 63% as expected. This was no help to me. So I changed the settings in the code to 97 & 100.
This works but the pump flutters on and off a lot. Am I calibrating the tube correctly, any comments welcome.
The reason for asking is that on my RSM250 the sump is built into the back section of the tank. To get the skimmer to function well I need to have a constant water level in the sump section. When I calibrated the tube I set the the bottom of the top section cap to the desired water level.
Using the code given I removed water until the ATO pump started. This was around the 61% level, then refilled to about 63% as expected. This was no help to me. So I changed the settings in the code to 97 & 100.
This works but the pump flutters on and off a lot. Am I calibrating the tube correctly, any comments welcome.
Re: New ATO pressure switch-setup with Wizard?
It sounds like you did the calibration correctly. After I did the calibration, I filled the sump to the level that i wanted to maintain, then zip tied the tube in the sump so that the water level was roughly in the middle of the tube. This gave a reading of 45. As long as the tube is in the same position, 45 will always be the max level.
You should fill your skimmer section to the desired level, then fasten the tube so that its halfway in the water, then whatever reading you get would be max fill, then go from there.
You should fill your skimmer section to the desired level, then fasten the tube so that its halfway in the water, then whatever reading you get would be max fill, then go from there.
Re: New ATO pressure switch-setup with Wizard?
The problem being that the RSM250 is an all in one system. The sump part on the back is covered by the hood. I cannot raise the tube enough to have the desired water level in the centre of the tube. That is why I changed the values to 97, 99.It sounds like you did the calibration correctly. After I did the calibration, I filled the sump to the level that i wanted to maintain, then zip tied the tube in the sump so that the water level was roughly in the middle of the tube. This gave a reading of 45. As long as the tube is in the same position, 45 will always be the max level.
At the moment I cannot see a way around this. My best guess would be that mid range is the most stable area to have the sensor working in, not at the top end as is my situation.
Re: New ATO pressure switch-setup with Wizard?
Hi just to let you know, I also updated the files Roberto provided and tried this and it works a treat!!
Re: New ATO pressure switch-setup with Wizard?
Awesome!!!
I'll include the changes to the next update of the libraries
I'll include the changes to the next update of the libraries
Roberto.
Re: New ATO pressure switch-setup with Wizard?
Hi Roberto,
It seems my WL sensor "bounces" around quite a bit, and I cannot see why? The chamber of my sump I am using it in, is very still so I cannot see why it bounces around so much.
My tube is def air tight also!!
Just to give you an indication, if I take 1 litre of water out, that causes the WL to drop by about 5%.
Any ideas?
It seems my WL sensor "bounces" around quite a bit, and I cannot see why? The chamber of my sump I am using it in, is very still so I cannot see why it bounces around so much.
My tube is def air tight also!!
Just to give you an indication, if I take 1 litre of water out, that causes the WL to drop by about 5%.
Any ideas?
Re: New ATO pressure switch-setup with Wizard?
Are you sure you calibrated it correctly?
Does it measure 1% when the water is just barely at the end of the pvc pipe and 100% when it is at the top of the pvc pipe?
Does it measure 1% when the water is just barely at the end of the pvc pipe and 100% when it is at the top of the pvc pipe?
Roberto.
Re: New ATO pressure switch-setup with Wizard?
Yep, I have just recalibrated and will see what happens.rimai wrote:Are you sure you calibrated it correctly?
Does it measure 1% when the water is just barely at the end of the pvc pipe and 100% when it is at the top of the pvc pipe?
Re: New ATO pressure switch-setup with Wizard?
Very strange, just by redoing the calibration, it seems it is much more stable.
I will let it log for a few hours and post up the graph!
I will let it log for a few hours and post up the graph!
Re: New ATO pressure switch-setup with Wizard?
Definitely, more stable for some reason?
This first pic you can see the improvement just by recalibrating:
The next a zoom in post calibration - much more stable - but no idea why!!??
This first pic you can see the improvement just by recalibrating:
The next a zoom in post calibration - much more stable - but no idea why!!??
Re: New ATO pressure switch-setup with Wizard?
Well, it now seems that it is drifting - you can see by the pic after the cal, nice and stable and over time drifting, latest being a 5% swing.
Any ideas Roberto?
I am going to re route the sensor in case it is picking up some interference.
Any ideas Roberto?
I am going to re route the sensor in case it is picking up some interference.
Re: New ATO pressure switch-setup with Wizard?
I think the first calibration could've been flaky.
Roberto.
Re: New ATO pressure switch-setup with Wizard?
I tested the code today and it worked perfectly.
Re: New ATO pressure switch-setup with Wizard?
Hi Roberto
Also have a happy holiday
Just wondering when the libraries will be updated to contain the files you listed in the posting above so that they do not need re-installing after running RA Installer?I pushed the libraries changes to branch issue54.
Also have a happy holiday
Re: New ATO pressure switch-setup with Wizard?
It's in the queue, but no target date yet.
I'm thinking sometime in Jan.
Happy holidays!!
I'm thinking sometime in Jan.
Happy holidays!!
Roberto.
Re: New ATO pressure switch-setup with Wizard?
Still working flawlessly. The accuracy is amazing. Everyone should have this.
Re: New ATO pressure switch-setup with Wizard?
I have noticed this too, but not all of the time.
My RA head unit is in the base cabinet and I use remote monitoring via IPad or Cliant suite. My cut off setting is 90% because of how my RSM 250 is constructed with a back section. The reading on the head has shown 900 and 90% on the iPad.
For me it is not a major issue, but if it is a glitch in the display library it needs to be checked out at some time
My RA head unit is in the base cabinet and I use remote monitoring via IPad or Cliant suite. My cut off setting is 90% because of how my RSM 250 is constructed with a back section. The reading on the head has shown 900 and 90% on the iPad.
For me it is not a major issue, but if it is a glitch in the display library it needs to be checked out at some time
Re: New ATO pressure switch-setup with Wizard?
It's a problem in your custom screen... It needs to erase the 3rd digit.
Easy to do.... Can you post the line that draws the WL in your custom screen?
Easy to do.... Can you post the line that draws the WL in your custom screen?
Roberto.
Re: New ATO pressure switch-setup with Wizard?
Roberto
Here is the section from my INO.
Here is the section from my INO.
void DrawCustomMain()
{
int x,y;
char text[10];
// Parameters
#if defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor( 15, 20, ReefAngel.Params,
ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue() );
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor( 15, 20, ReefAngel.Params );
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
pingSerial();
// Water Level
ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,75,66, "WL:" );
ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,99,66, ReefAngel.WaterLevel.GetLevel() );
pingSerial();
// Main Relay Box
byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawOutletBox( 12, 92, TempRelay );
pingSerial();
// Date and Time
ReefAngel.LCD.DrawDate( 6, 122 );
pingSerial();
}
void DrawCustomGraph()
Re: New ATO pressure switch-setup with Wizard?
Try this:
Code: Select all
ConvertNumToString(text, ReefAngel.WaterLevel.GetLevel() , 1);
strcat(text," ");
ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,99,66, text );
Roberto.
Re: New ATO pressure switch-setup with Wizard?
Thanks Roberto.
I have updated the code and will monitor display. It makes sense to turn the value into text and then display the text.
I have updated the code and will monitor display. It makes sense to turn the value into text and then display the text.
Re: New ATO pressure switch-setup with Wizard?
Hi Roberto, has this been added to the libraries?rimai wrote:It's in the queue, but no target date yet.
I'm thinking sometime in Jan.
Happy holidays!!
I can see there is a library update, but don't want to update if at the moment if this is overwritten.
Also, where can we see what has been added/changed in the libraries?
Re: New ATO pressure switch-setup with Wizard?
Yes, the WaterLevelATO() function has been added to the libs.
Check the change log here:
http://forum.reefangel.com/viewtopic.php?f=7&t=1473
Check the change log here:
http://forum.reefangel.com/viewtopic.php?f=7&t=1473
Roberto.