ATO Float Switch Guide

Related to the development libraries, released by Curt Binder
User avatar
Posts: 2753
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
PostPosted: Sat Aug 27, 2011 11:15 am
There are 2 builtin ways to utilize the ATO code: StandardATO and SingleATO

StandardATO utilizes both float switches to monitor the water level.
SingleATO utilizes one float switch to monitor the water level. So you can have 2 float switches if you like.

Both ways have a timeout that prevents the relays from running too long in case of a problem.

This post will cover how the functions work and also what some of the terminology inside the code means.

Inside the ATO class in the code, there is a function that is called IsActive.
IsActive - Means the float is not touching the end with both wires coming out of it. So when the code says "ato->IsActive()" that means that the float is not touching the end with the wires. See the picture for a visual.
ATO Float Switch
R0519242-01.jpg (2.85 KiB) Viewed 9930 times

Standard ATO
Here is the way the StandardATO function works:
  • High switch mounted with wires at the bottom
  • Low switch mounted with the wires at the top
  • When water level lowers all the way to cause the low switch to be active (float is touching the end opposite from 2 wires coming out of it), the ATO pump/specified relay is turned on.
  • The ATO pump runs until the water level raises the low switch up from making contact, continues to raise the water level until the high switch is active (float is touching the end opposite of the 2 wires coming out of it). The ATO pump shuts off when the high switch is active OR if the ATO Timeout value is exceeded. The timeout prevents the pump from running too long in case the reservoir runs dry or something else happens.
  • Water then evaporates out of the tank and lowers until the low switch is active.
  • Repeat process

StandardATO Mounting Example:
Standard ATO Mounting
standardato.jpg (37.28 KiB) Viewed 9930 times

With the StandardATO function, the way the function is called is straight forward. Here is a sample usage:
Code: Select all
ReefAngel.StandardATO(1, 120);

This statement says:
  • Use both ATO ports
  • When the low switch is active, turn on port 1
  • Run the port until the high switch is active or the 120 second timeout occurs
  • If the 120 second timeout occurs, signal an error with the ATO flag, turn on the red light and shut off port 1
This example uses the hard coded values. If you were wanting to use the InternalMemory for this function (which just means that you can change the timeout value via the portal or smart phone apps), you would utilize this function instead:
Code: Select all

The only difference is the timeout value is omitted. This causes the controller to read the value from memory.
That's it. There's not much more to it.

The SingleATO function works with an individual switch only. So there is no failsafe built in. The only failsafe is the timeout value. There are two functions calls: SingleATOLow or SingleATOHigh. Depending on which ATO switch you are using, depends on which function you call. Regardless, both functions work like this:
  • Switch mounted with 2 wires at top.
  • Water level with the float at the top is the starting point.
  • When the water level drops, the float drops to the bottom which causes the switch to be active (float is touching the end opposite from the 2 wires). The ATO pump / relay is turned on.
  • It pumps in water until the float is not active (touching the top end which has the 2 wires) OR until the timeout value has exceeded. Then the pump shuts off.
  • The hour interval just means that the ATO pump can only be activated once every X (specified) hours. This is to prevent it from activating too many times. You don't have to specify this if you don't want to. You can safely put in 0 and the ATO pump will activate as often as it needs.
  • Repeat process

SingleATO Mounting Example:
Single ATO Mounting
singleato.jpg (54.64 KiB) Viewed 9930 times

There are a couple functions that you can use for the SingleATO code. Here's an example usage:
Code: Select all
ReefAngel.SingleATOLow(1, 60, 1);

This statement would be to:
  • Use the LOW switch
  • Activate Port 1
  • Use a 60 second timeout where if it runs for more than 60 seconds, the timeout will signal an error with the ATO flag, turn on the red light and shut off port 1
  • Can only top off 1 time no more than 1 hour apart. This means that no matter when the ATO triggers, once it runs it cannot run again for at least 1 hour. This is based off of the last time it ran, so this can fluctuate throughout the day. NOTE: If you place a 0 here instead, the function will activate the ATO port as often as needed.
Here is the same code using the HIGH switch:
Code: Select all
ReefAngel.SingleATOHigh(1, 60, 1);

These examples use the hard coded values. If you were wanting to use the InternalMemory for these functions, you would utilize these functions instead:
Code: Select all
// LOW Switch
// HIGH Switch

The differences are the same with the StandardATO, the timeout and hour interval are omitted. You just specify the relay to use. The controller reads the timeout value and hour interval from the InternalMemory. Both High and Low ports utilize the same memory locations.

Internal Memory Locations
The timeout value is stored in the ATOExtendedTimeout location. It is an integer value which means it can be from 0 to 32767. The value stored is referenced in seconds. So the maximum value to use is 32767 seconds (which is approximately 546 minutes or approximately 9 hours). This location is 276 using libraries 1.0 and later (or 876 using pre 1.0 libraries).
The hour interval is stored in the ATOHourInterval location. It is a byte value. It can contain 0 to 24 hours. The location is 240 using libraries 1.0 and later (or 840 using pre 1.0 libraries).

As of, the SingleATO code functions like explained above. For all dev libraries prior to, the float switch was mounted the opposite way (2 wires at the bottom).

The StandardATO function has operated the same on all versions of the dev libraries and all versions of the standard libraries.

Hopefully this will clarify all confusions that may exist with the ATO functionality.


Posts: 41
Joined: Sat Oct 08, 2011 9:21 am
PostPosted: Tue Oct 25, 2011 4:13 pm
Since both switches used in the standard mode will be submerged in (salt water) at some time, are they properly sealed to last a long time?

Posts: 12459
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Tue Oct 25, 2011 5:21 pm
Yes, they are potted and sealed
User avatar
Posts: 5416
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Wed Mar 11, 2015 3:28 pm
Would be good to document here the status of the float switches for each condition.

Water Level Good =
Water Level Low =
Water Level High =

I always forget which is which.

Return to Development Libraries

Who is online

Users browsing this forum: No registered users and 1 guest