ATO with Multi-Channel Water Level Sensor

Do you have a question on how to do something.
Ask in here.
Post Reply
Paul_Velasco
Posts: 127
Joined: Thu Sep 19, 2013 7:46 am
Location: Saint Cloud, FL

ATO with Multi-Channel Water Level Sensor

Post by Paul_Velasco »

Finally able to start playing with the controller.

I started by programming my ATO based on level measured by Water Level Sensor Channel 4
On at 48% and off at 50%

Code: Select all

if (ReefAngel.WaterLevel.GetLevel(4)<=48) ReefAngel.Relay.On(Box1_Port7);
if (ReefAngel.WaterLevel.GetLevel(4)>=50) ReefAngel.Relay.Off(Box1_Port7);
Code works perfectly!!!

I wanted to add some functionality to the code:
Pump is kind of loud so I only want it to work when no one is in the house or when we are awake
Check to see if the ATO reservoir has water in it and at a level that the Kalkwasser will not suck up the bottom

Code: Select all

     if (ReefAngel.WaterLevel.GetLevel(1)>0) //Check level in ATP Res
    {
      if (hour()>6 && hour()<21) //Only work when no one is at house
      {
        if (ReefAngel.WaterLevel.GetLevel(4)<=48) ReefAngel.Relay.On(Box1_Port7);
        if (ReefAngel.WaterLevel.GetLevel(4)>=50) ReefAngel.Relay.Off(Box1_Port7);
      }
    }
This does not work?? Is the logic flawed?
Image
Paul_Velasco
Posts: 127
Joined: Thu Sep 19, 2013 7:46 am
Location: Saint Cloud, FL

Re: ATO with Multi-Channel Water Level Sensor

Post by Paul_Velasco »

So I had a few cups of coffee and thought about this a bit:

Code: Select all

     if (hour()>6 && hour()<21) //Only work when no one is at house
    {
         if (ReefAngel.WaterLevel.GetLevel(4)<=48 && ReefAngel.WaterLevel.GetLevel(1)>0) ReefAngel.Relay.On(Box1_Port7);
         if (ReefAngel.WaterLevel.GetLevel(4)>=50) ReefAngel.Relay.Off(Box1_Port7);
    }
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: ATO with Multi-Channel Water Level Sensor

Post by rimai »

I think that works :)
Roberto.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: ATO with Multi-Channel Water Level Sensor

Post by rimai »

On another thought, no... :(
Use this:

Code: Select all

     if (hour()>6 && hour()<21) //Only work when no one is at house
    {
         if (ReefAngel.WaterLevel.GetLevel(4)<=48 && ReefAngel.WaterLevel.GetLevel(1)>0) ReefAngel.Relay.On(Box1_Port7);
         if (ReefAngel.WaterLevel.GetLevel(4)>=50) ReefAngel.Relay.Off(Box1_Port7);
    }
    else
    {
        ReefAngel.Relay.Off(Box1_Port7);
    }
Just to ensure that Box1_Port7 will be off when not within those hours.
Roberto.
Paul_Velasco
Posts: 127
Joined: Thu Sep 19, 2013 7:46 am
Location: Saint Cloud, FL

Re: ATO with Multi-Channel Water Level Sensor

Post by Paul_Velasco »

Thank Roberto. I will try to upload tonight
Image
Paul_Velasco
Posts: 127
Joined: Thu Sep 19, 2013 7:46 am
Location: Saint Cloud, FL

Re: ATO with Multi-Channel Water Level Sensor

Post by Paul_Velasco »

Did not work???

Code: Select all

         if (hour()>6 && hour()<21) //Only work when no one is at house
        {
             if (ReefAngel.WaterLevel.GetLevel(4)<=48 && ReefAngel.WaterLevel.GetLevel(1)>0) ReefAngel.Relay.On(Box1_Port7);
             if (ReefAngel.WaterLevel.GetLevel(4)>=50) ReefAngel.Relay.Off(Box1_Port7);
        }
        else
        {
            ReefAngel.Relay.Off(Box1_Port7);
        }
Took out the time condition - Did not work
Took out ReefAngel.WaterLevel.GetLevel(1)>0 - Worked!!!

Tried this also??? Did not work

Code: Select all

         if (hour()>6 && hour()<21) //Only work when no one is at house
        {
             if (ReefAngel.WaterLevel.GetLevel(4)<=48) ReefAngel.Relay.On(Box1_Port7);
             if (ReefAngel.WaterLevel.GetLevel(4)>=50) ReefAngel.Relay.Off(Box1_Port7);
        }
        else
        {
            ReefAngel.Relay.Off(Box1_Port7);
        }
What am I doing wrong? I can post all the code if need be.
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: ATO with Multi-Channel Water Level Sensor

Post by rimai »

Is channel 1 greater than 0%?
Roberto.
Paul_Velasco
Posts: 127
Joined: Thu Sep 19, 2013 7:46 am
Location: Saint Cloud, FL

Re: ATO with Multi-Channel Water Level Sensor

Post by Paul_Velasco »

Portal says:

Channel 1 = 52 (This is my ATO tank)
Channel 4 = 49 (My Sump)
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: ATO with Multi-Channel Water Level Sensor

Post by lnevo »

That would be an OFF condition...
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: ATO with Multi-Channel Water Level Sensor

Post by lnevo »

Also, something to keep in mind, the water level sensors tend to bounce a little bit.. you may not even see it based on the drawing refresh on the screen.. but between 48-50 if the level is 49.. it could be bouncing +1/-1 pretty easily. I would recommend opening up that window a little bit.. maybe 47-51 at least for troubleshooting purposes.
Paul_Velasco
Posts: 127
Joined: Thu Sep 19, 2013 7:46 am
Location: Saint Cloud, FL

Re: ATO with Multi-Channel Water Level Sensor

Post by Paul_Velasco »

lnevo wrote:That would be an OFF condition...
Not if the time is between 6AM and 9PM?

It just will never come on when I have two conditional statements:

Using time based to turn off the ATO = between 9PM and 6AM
And using a second channel = to check if my ATO tank is not empty (Channel 1 is not 0)


If I use the water level sensor (Channel 4) to turn on and off it works perfectly. If I use any other conditions it fails.

I will take your suggestion as the pump does cycle quite a bit with the window at 48-50
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: ATO with Multi-Channel Water Level Sensor

Post by lnevo »

I was just pointing out it was an OFF condition because your water level was at 49. It only turns on when below 48 and turns off when it gets to 50 based on the ruleset.

If you can remove some water and ensure that the water level is well below 48 then I think you might see different results. There's no reason that multiple conditions should not work.
Paul_Velasco
Posts: 127
Joined: Thu Sep 19, 2013 7:46 am
Location: Saint Cloud, FL

Re: ATO with Multi-Channel Water Level Sensor

Post by Paul_Velasco »

This morning, 6:30AM, Channel 4 was at 41 and Channel 1 was >0 and ATO was off. This is why I started to post to ask for help.

I will open the on window on Channel 4 tonight - 47 on and 51 off. Will put back code to check Channel 1 >0
Will then lift Channel 4 and see what happens.

Second will change to time based on/off. I will change the controller time to a few minutes before 6AM. Then I will lift Channel 4 before the time changes to 6.

If both tests work I will include a code to use both conditions??
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: ATO with Multi-Channel Water Level Sensor

Post by lnevo »

Your code says hour()>6

So 6:30 is not enough time :) It won't go on until 7am.

If you want it to actually start at 6am, make it >=6
Paul_Velasco
Posts: 127
Joined: Thu Sep 19, 2013 7:46 am
Location: Saint Cloud, FL

Re: ATO with Multi-Channel Water Level Sensor

Post by Paul_Velasco »

Wow you got it! I will implement tonight.
Image
Paul_Velasco
Posts: 127
Joined: Thu Sep 19, 2013 7:46 am
Location: Saint Cloud, FL

Re: ATO with Multi-Channel Water Level Sensor

Post by Paul_Velasco »

Works with >=
Image
Post Reply