I use float switches because they are simple and inexpensive - both things I like. A magnet in a bobber moves over a tube that holds a magnetic switch.
Many people use optical sensors because while both can fail, the optical sensors are less likely to do so.
As mentioned, I have two - the "primary" is mounted about an inch lower than the "secondary" and is at my target return section water level. This switch has a cap off a jug (don't remember the source, it is a little larger than a gallon jug cap) on it's threads, with holes drilled in it. This helps keep things like errant ply-filter, algae, etc from fouling the switch and holding it "down" (or "on")
The secondary switch is a high-level backup. it overrides the primary switch in case it gets fouled or stuck, and also triggers a high-water alarm so I know something's gone pear-shaped.
I do not have any pictures of this setup, but it looks very similar to most of the DIY kits out there (they started life in one of those kits)
Both are connected to the avast Break Out Box - I chose this because it is less expensive than the Apex one and I can solder.
This is the programming I have behind it - still tuning the timing, and your values may differ based on your pump and return chamber volume:
ATO (physical outlet - ignore the # comments)
Fallback OFF # don't default to ON, please
Set OFF # default status
If Sw1 CLOSED Then ON # turn on when switch triggers. I know the logic is "backwards" but I didn't feel like flipping the floats on my switches
Min Time 000:45 Then ON # fill enough that fluctuations due to overflow flushing don't cause short cycle
If Sw1 OPEN Then OFF# water level is good, turn off
Defer 000:30 Then ON # make sure the water is actually low, and not triggered due to overflow flushing)
If Sw2 OPEN Then OFF# water leve is high, and SW1 did not trigger, turn off!
ATO_Runtime (virtual outlet, triggers email alarm if ATO is running >10 minutes - either the pump is broken or reservoir is empty)
Set OFF
Defer 010:00 Then ON
If Output ATO = ON Then ON
Return_HighW (virtual outlet, email alarm if water level triggers backup switch, except during and immediately following feed mode)
Set OFF
If Sw2 OPEN Then ON
If FeedA 006 Then OFF
and for completeness sake, EmailAlm:
Set OFF
If Output ATO_RunTime = ON Then ON
If Output Return_HighW = ON Then ON
Of course, any of this programming can be done with the ATK or just an FMM with a few switches.
In the future I would like to add (again, not specific to my use of float switches for ATO, but all possible in the world of APEX)
1) a low water switch, let me know if the water level is too low in the return section (would mean SW1 was stuck in the "up" or "OPEN" position)
2) low water switch in my topoff container, let me know when it needs refilling.
3) a high water switch in the topoff container, along with a PMUP at my mixing station - when I get an alarm from 2) above i can press a button to trigger the PMUP to fill the ATO container to this level instead of carrying buckets. I feel the human interaction is important here to avoid continually filling the container if something else has gone haywire