Apex Float Switch Help

piranhaman00

5000 Club Member
View Badges
Joined
Jun 24, 2019
Messages
5,031
Reaction score
5,007
Rating - 0%
0   0   0
@SuncrestReef or anyone ;)

Please help me figure out my code issue.
I have two redundant float switches in skimmer cup to shut off skimmer in case of overflow.

1. Added float switches to breakout box, renamed float1 and float2
2. Made virtual outlet called Skim_Overflw which turns on if float1 of float2 is open(skimmer full).
3. Made line in skimmer that turns off if skim_overflw is on.

The problem is that when one float switch is activated the skimmer cycles on and off every second or so. When both float switches are open then the outlet turns off fine. I must have coded that virtual outlet Skim_Overflw incorrectly so that it cycles on off when only one float switch is open. Advise?

Note I got around the issue by using the when statement so that when it turns off it is turned off auto to the off position. This works great but I want to understand why it won’t work without that statement. When looking at code disregard the when statements, thanks!


C1F9AC74-5B33-4758-9DBF-FC098D890864.png
9015CE6C-0ACF-475F-9BFC-2025D05B0FCA.png
DC9830A5-0F90-407A-A2C3-6EF90FE3949E.png
 

ariellemermaid

Well-Known Member
View Badges
Joined
Aug 21, 2020
Messages
665
Reaction score
498
Location
North Carolina
Rating - 0%
0   0   0
My guess would be that when the skimmer is on it’s making froth in the cup. When the first sensor activates, the skimmer turns off, the skimmate settles, and the switch deactivates so it turns back on. Rinse and repeat until it’s full enough that one sensor stays activated even when the skimmer is off.

One option would be a Defer command. Defer makes the system wait before turning off (or on). Maybe after 1 sensor activates you could defer for 5-10 minutes. That way a little more will accumulate in the cup such that when the skimmer is off and settled the lower switch will remain activated.

It’ll be interesting to see how this works long term. Skimmate is so dirty I could see the float getting gummed up pretty quickly, but I’m guessing that’s why you went with a higher backup switch.

Defer is always good when working with sensors so that the system doesn’t respond immediately to something transient and to prevent rapid cycles of on/off.
 
OP
OP
piranhaman00

piranhaman00

5000 Club Member
View Badges
Joined
Jun 24, 2019
Messages
5,031
Reaction score
5,007
Rating - 0%
0   0   0
Why the VO?
Could have just the line in the skimmer to turn off if either float is open, then off.
Yes tried that same thing. I added float1 and float2 to the skimmer settings to turn off if either is triggered but if only one float switch is triggered it cycles on and off. If I trigger both float switches it works fine.
My guess would be that when the skimmer is on it’s making froth in the cup. When the first sensor activates, the skimmer turns off, the skimmate settles, and the switch deactivates so it turns back on. Rinse and repeat until it’s full enough that one sensor stays activated even when the skimmer is off.

One option would be a Defer command. Defer makes the system wait before turning off (or on). Maybe after 1 sensor activates you could defer for 5-10 minutes. That way a little more will accumulate in the cup such that when the skimmer is off and settled the lower switch will remain activated.

It’ll be interesting to see how this works long term. Skimmate is so dirty I could see the float getting gummed up pretty quickly, but I’m guessing that’s why you went with a higher backup switch.

Defer is always good when working with sensors so that the system doesn’t respond immediately to something transient and to prevent rapid cycles of on/off.

This is done experimentally, I am manually making the float switch go up it’s not the froth messing with it.

I take the float in my hand and hold it triggered, the outlet cycles on and off. If I hold both floats it works fine.

I definetly do not want defer in this instance, I want to skimmer yo turn off immediately upon float switch activation.
 
Last edited:
OP
OP
piranhaman00

piranhaman00

5000 Club Member
View Badges
Joined
Jun 24, 2019
Messages
5,031
Reaction score
5,007
Rating - 0%
0   0   0
That's what I do: Skmcup is my float switch, Food10 is the feed button and e-stop is just that (shuts off ALL pumps and uv). I use a external skimmate container so ymmv.

Screenshot_20220222-065507.png

Is skmcup the float switch name or VO?
 

Lbrdsoxfan

5000 Club Member
View Badges
Joined
Jun 13, 2021
Messages
5,353
Reaction score
8,492
Location
Long Beach, CA
Rating - 0%
0   0   0
I'm wondering if it has something to do with the 'when on' statement.

I only use the defer statement when starting up the skimmer.

'skmcup' is my float switch name on the bob.

I have a classic APEX, so no VO for me.
 
OP
OP
piranhaman00

piranhaman00

5000 Club Member
View Badges
Joined
Jun 24, 2019
Messages
5,031
Reaction score
5,007
Rating - 0%
0   0   0
I'm wondering if it has something to do with the 'when on' statement.

I only use the defer statement when starting up the skimmer.

'skmcup' is my float switch name on the bob.

I have a classic APEX, so no VO for me.

As I stated in the original post, the when on statement is only to get around the issue, when it is not there the same thing happens. The when on slides from auto to on so it is stuck on, instead of auto.

I wonder if it is issue with way the float switches are wired and they are being read as one float switch?
 

ariellemermaid

Well-Known Member
View Badges
Joined
Aug 21, 2020
Messages
665
Reaction score
498
Location
North Carolina
Rating - 0%
0   0   0
Yes tried that same thing. I added float1 and float2 to the skimmer settings to turn off if either is triggered but if only one float switch is triggered it cycles on and off. If I trigger both float switches it works fine.


This is done experimentally, I am manually making the float switch go up it’s not the froth messing with it.

I definetly do not want defer in this instance, I want to skimmer yo turn off immediately upon float switch activation.
Well your code looks good to me. Only thing I can think of in that case is that sensor 1 is a little “twitchy.” So even when you’re manually activating it the switch might be going on/off just from a little shake in your hands? Rule that out by watching the sensor itself in the GUI while you’re playing with it.

However, if you don’t want to use a Defer then I would strongly recommend sticking with the When, otherwise you’ll always be risking rapid cycling as the sensor activates/deactivates with froth and water turbulence. “When” shuts it off for good and it can’t be turned back on except manually (you know this I think). It sounds like that’s exactly what you want; immediate shut down, no turning back on. So When fits the bill.
 

Lbrdsoxfan

5000 Club Member
View Badges
Joined
Jun 13, 2021
Messages
5,353
Reaction score
8,492
Location
Long Beach, CA
Rating - 0%
0   0   0
As I stated in the original post, the when on statement is only to get around the issue, when it is not there the same thing happens. The when on slides from auto to on so it is stuck on, instead of auto.

I wonder if it is issue with way the float switches are wired and they are being read as one float switch?
Gotcha didn't catch that part.

Did you try to add the float sw code directly to the skimmer outlet code, without the VO.

Edit: agreed with said above, your float switches may be giving you heart burn. I switched from this style of switch:
Screenshot_20220222-071843.png to this style:

Screenshot_20220221-114803.png

For much the same reason. The float sw, was less than totally reliable. The horizontal 90 degree arm float switch changes state in a more reliable manner.
 
Last edited:
OP
OP
piranhaman00

piranhaman00

5000 Club Member
View Badges
Joined
Jun 24, 2019
Messages
5,031
Reaction score
5,007
Rating - 0%
0   0   0
Gotcha didn't catch that part.

Did you try to add the float sw code directly to the skimmer outlet code, without the VO.

Yes, float1 and float2 directly to skimmer, same thing it toggles the skimmer on and off rapidly , nothing to die with float toggling I am holding it on
 
OP
OP
piranhaman00

piranhaman00

5000 Club Member
View Badges
Joined
Jun 24, 2019
Messages
5,031
Reaction score
5,007
Rating - 0%
0   0   0
Gotcha didn't catch that part.

Did you try to add the float sw code directly to the skimmer outlet code, without the VO.

Edit: agreed with said above, your float switches may be giving you heart burn. I switched from this style of switch:
Screenshot_20220222-071843.png to this style:

Screenshot_20220221-114803.png

For much the same reason. The float sw, was less than totally reliable. The horizontal 90 degree arm float switch changes state in a more reliable manner.

Not the issue
 

Lbrdsoxfan

5000 Club Member
View Badges
Joined
Jun 13, 2021
Messages
5,353
Reaction score
8,492
Location
Long Beach, CA
Rating - 0%
0   0   0
Yes, float1 and float2 directly to skimmer, same thing it toggles the skimmer on and off rapidly , nothing to die with float toggling I am holding it on
I just majorly edited my last post. It could be the float switches giving you heartburn. Had a similar problem with states not changing well. In the end all these reed style float switches are somewhat chinesium crap. I switched my type of float switch and haven't had problems since.
 
OP
OP
piranhaman00

piranhaman00

5000 Club Member
View Badges
Joined
Jun 24, 2019
Messages
5,031
Reaction score
5,007
Rating - 0%
0   0   0
Yes but does Apex show the switch is solidly on? Regardless of what the skimmer code is doing.

Yes it does, the apex shows the switch is toggled open but the skimmer cycles on and off

The VO never toggles on however it switches between on and off rapidly as well which is why I started the when statement
 
OP
OP
piranhaman00

piranhaman00

5000 Club Member
View Badges
Joined
Jun 24, 2019
Messages
5,031
Reaction score
5,007
Rating - 0%
0   0   0
Fair enough, I'm not a expert just throwing out ideas from my experiences.

Sorry I was frustrated typing on my phone:)

Very well could be bad float switches that are toggling on and off? But when I hold them open they stay open on apex. They do not toggle.

what I should try is only using one float and see if that resolves
 

Lbrdsoxfan

5000 Club Member
View Badges
Joined
Jun 13, 2021
Messages
5,353
Reaction score
8,492
Location
Long Beach, CA
Rating - 0%
0   0   0
Remember when we are looking at fusion, we may not see them change state since there is a delay, up to 60-90 seconds. BTDT, banged my head, lol.

I didn't figure the switches in my situation until I had nearly a quart of nasty *** skimmate in the stand, when the leak detector finally kicked in.
 

ariellemermaid

Well-Known Member
View Badges
Joined
Aug 21, 2020
Messages
665
Reaction score
498
Location
North Carolina
Rating - 0%
0   0   0
Sorry I was frustrated typing on my phone:)

Very well could be bad float switches that are toggling on and off? But when I hold them open they stay open on apex. They do not toggle
It could be cycling so fast the GUI doesn’t have time to update. Could be the switch or the module but the code here is very simple so it’s not that (I’m pretty sure anyway).

You could make a new virtual outlet switch test. If switch 1 is closed then on. Then set an email alarm for if switch test is on then on. Keep the switch in the open (activated) position when you send the email alarm code.
 

TOP 10 Trending Threads

WHEN CONSIDERING BUYING A NEW FISH, WHAT FACTOR IS THE MOST IMPORTANT TO YOU?

  • Compatibility with other members of the tank.

    Votes: 14 25.9%
  • Compatibility with the environment & size of the tank.

    Votes: 18 33.3%
  • Feasibility of care & nutritional needs.

    Votes: 5 9.3%
  • Temperament & common personality traits.

    Votes: 1 1.9%
  • Common health issues & survival rates.

    Votes: 3 5.6%
  • Roles & benefits offered to the reef.

    Votes: 9 16.7%
  • Appearance & coloration.

    Votes: 3 5.6%
  • Other (please explain).

    Votes: 1 1.9%
Back
Top