Multi Channel Water Level Expansion as an ATO

Expansion modules and attachments
Post Reply
jetskiman98
Posts: 4
Joined: Sat Mar 18, 2017 4:17 pm
Location: Hamilton, New Jersey

Multi Channel Water Level Expansion as an ATO

Post by jetskiman98 »

I’ve searched all over and can’t find a solid answer. Is it possible to use the Multi-Chanel unit to control the ATO function? I currently have it set up as:

Code: Select all

ReefAngel.WaterLevelATO(Port1,180,95,100);
When I reset my controller the ATO runs until the timeout. My water level screen shows 5 sensors, 0-4. I only have the multi-channel so channel 1 is my tank (which is like to use to control the ATO) and it displays correctly. Channel 0 doesn’t exist and always reads 0. Is there a way to set the function to read a different sensor? I’ve read somewhere else about trying:

Code: Select all

ReefAngel.WaterLevelATO(1,Port1,180,95,100);
but that still gave the same result. Just for the hell of it I tried:

Code: Select all

ReefAngel.WaterLevelATO(99,Port1,180,95,100);
It compiled with no errors, and ran just the same as 1.

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

Re: Multi Channel Water Level Expansion as an ATO

Post by rimai »

This should be the correct one.

Code: Select all

ReefAngel.WaterLevelATO(1,Port1,180,95,100);
Roberto.
jetskiman98
Posts: 4
Joined: Sat Mar 18, 2017 4:17 pm
Location: Hamilton, New Jersey

Re: Multi Channel Water Level Expansion as an ATO

Post by jetskiman98 »

Roberto, thanks for the reply. I'm still getting the same result. The ATO runs immediately after restarting the controller, then times out. It doesn't matter the level of sensor 1. Below is all of my code. Is it in the right place, inside the loop? I put it where the original one.

Code: Select all

// Updated 1/16/2018


#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 <PAR.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
  ReefAngel.Use2014Screen();  // Let's use 2014 Screen 
  ReefAngel.AddMultiChannelWaterLevelExpansion();  // Multi-Channel Water Level Expanion Module
  // Ports toggled in Feeding Mode
  ReefAngel.FeedingModePorts = Port1Bit | Port3Bit | Port8Bit;
  // Ports toggled in Water Change Mode
  ReefAngel.WaterChangePorts = Port1Bit | Port3Bit | Port4Bit | Port5Bit | Port8Bit;
  // Ports toggled when Lights On / Off menu entry selected
  ReefAngel.LightsOnPorts = 0;
  // Ports turned off when Overheat temperature exceeded
  ReefAngel.OverheatShutoffPorts = Port2Bit;
  // 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 );
  

  // Custom Labels
  ReefAngel.CustomLabels[0]="ATO";  
  ReefAngel.CustomLabels[1]="Heater";  
  ReefAngel.CustomLabels[2]="Skimmer";  
  ReefAngel.CustomLabels[3]="Wave Maker";  
  ReefAngel.CustomLabels[4]="Fan";  
  ReefAngel.CustomLabels[5]="Fuge Light";  
  ReefAngel.CustomLabels[6]="N/A";  
  ReefAngel.CustomLabels[7]="Return Pump"; 

  // Feeeding and Water Change mode speed
  ReefAngel.DCPump.FeedingSpeed=0;
  ReefAngel.DCPump.WaterChangeSpeed=0;

  // Ports that are always on
  ReefAngel.Relay.On( Port4 );
  ReefAngel.Relay.On( Port5 );
  ReefAngel.Relay.On( Port8 );

  ////// Place additional initialization code below here
  ReefAngel.DCPump.Threshold=30;


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

void loop()
{
  // ReefAngel.SingleATO( true,Port1,180,2 );
  ReefAngel.WaterLevelATO(1,Port1,180,95,100);
  ReefAngel.StandardHeater( Port2 );
  ReefAngel.StandardFan( Port5,770,850 );
  ReefAngel.StandardLights( Port6,21,0,6,0 ); // Refugium Light
  ReefAngel.Relay.DelayedOn( Port3 );
  ReefAngel.DCPump.DaylightChannel = AntiSync;
  ReefAngel.DCPump.ActinicChannel = Sync;
 
 
 
  ////// Place your custom code below here


  if (hour()>=9 && hour()<11) // From 9am - 11am run a sine wave
  {
    ReefAngel.DCPump.UseMemory = false;
    ReefAngel.DCPump.SetMode(Sine,50,75,5);
  }
  else if (hour()>=14 && (hour()<=16 && minute()>=30) ) // From 2pm-4:30pm run NutrientTransport
  {
    ReefAngel.DCPump.UseMemory = false;
    ReefAngel.DCPump.SetMode(NutrientTransport,50,80,34);
  } 
  else if (hour()>=19 || hour()<9) // From 7pm to 9am run Lagoon
  {
    ReefAngel.DCPump.UseMemory = false;
    ReefAngel.DCPump.SetMode(Lagoon,45,10);
  } 
  else // Otherwise use what's in the memory 
  {
    ReefAngel.DCPump.UseMemory = true;
  }

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

    // This should always be the last line
  ReefAngel.Portal( "jetskiman98" );
  ReefAngel.DDNS( "173.61.18.251" ); // Your DDNS is --------
  ReefAngel.ShowInterface();
}




Also, I guess its been a while since I updated the libraries. I noticed there is no ATO Clear button in the menu now.
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Multi Channel Water Level Expansion as an ATO

Post by rimai »

Does it raise the level above 100% before the timeout?
Roberto.
jetskiman98
Posts: 4
Joined: Sat Mar 18, 2017 4:17 pm
Location: Hamilton, New Jersey

Re: Multi Channel Water Level Expansion as an ATO

Post by jetskiman98 »

rimai wrote:Does it raise the level above 100% before the timeout?
Every time I've loaded the code and restarted the level has been above the minimum. In this case 95%. If I'm understanding correctly, the relay shouldn't open until the level hits 95% or lower. The last time I did it, the level was at 97% and instantly the ATO turned on.
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Multi Channel Water Level Expansion as an ATO

Post by rimai »

At boot, the controller doesn't know the status of level, so it may try to fill it until 100% so it knows it has to turn off and wait until it reaches lower than 95%.
Roberto.
jetskiman98
Posts: 4
Joined: Sat Mar 18, 2017 4:17 pm
Location: Hamilton, New Jersey

Re: Multi Channel Water Level Expansion as an ATO

Post by jetskiman98 »

So I gave it a few tries hoping that not having the water level at 100% at boot was the issue. The first time I tried it seemed to work just fine. I manually topped off the tank and calibrated the water level making it show 100%. I then reuploaded the code and voila no ATO on boot. It wasn't until a few days later I checked only to see the water level at 89% and found that the ATO relay switch was manually turned off instead of auto. I must have done that previously while trying other methods. So I switch it on, and it times out of course. There was way more water to top off than normal. So again I manually topped off to 100% and reset the timeout. I switched the ATO port to auto and immediately (180 seconds later) got a timeout. It still tries to run no matter what the level of sensor 1 is. I've tried using the other 3 sensors will all the same results. I'm not sure what else there is to look at.
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Multi Channel Water Level Expansion as an ATO

Post by rimai »

Did it turn the port on even at 100% and timed out?
Or it timed out with the port being off?
Roberto.
Post Reply