Saturday, March 21, 2009

DIY automatic water top-off system for home aquariums

Please see my post about the improved level sensor here.

One of the daily chores of aquarium keepers is adding water to the tank to compensate for evaporation. For reef aquariums with intense lighting, the amount of evaporation can be substantial. In my 5 gallon nano-reef, I add 1-2 cups every day. This task is not only boring and repetitive, it is also stressful for the aquarium. The sudden change in salinity of adding 1-2 cups (or 2-4 cups, if I forgot a day) is bad for the tank inhabitants. The solution is to design an automatic top-off system. Here's how I did it:

I built a non-metallic water level sensor from two plastic fiberoptic cables and some spare plastic parts. The ends of the fiberoptics are directed towards each other at about a 60* total angle. The imaginary point of intersection is a few mm in front of the sensor head. The sensor works by sending light out one fiberoptic and sensing how much light returns via the other. When the water level is within 1cm of the sensor head, the amount of light returned is very high since the surface of the water is a good reflector. As soon as the water rises above the sensor head, the amount of returned light drops to near-zero.

This sensor works very well with only one problem: bubbles. If air bubbles start to collect on the fiberoptic ends, they can reflect enough light to cause a false-positive even when the sensor is underwater. I modfied the sensor after taking this photo by cutting away excess material, and making the fiber ends more flush with the sensor's plastic. So far, these modifications seemed to have worked very well.

The sensor is mounted on the aquarium's rim. The white plastic adjustment screw locks the sensor in place after moving it to the desired water level.

The light sending/receiving is accomplished with an off-the-shelf part. It's a Keyence FS-V11. These are used in factories to sense the status of parts on a conveyor belt, etc. It's a very cool little device, and is adjustable to have a custom light/dark threshold. The Keyence's output drives a solid-state relay, which controls power to the outlet. The outlet supplies power to a small water pump (Aqua-lifter AW20) that draws water out of a store-bought container, and drips it into the aquarium. The pump is slow, which is good, since it will affect the tank's salinity gradually.

Interestingly, the sensor has a sort of built-in hysteresis. The water forms a meniscus with the sensor head, and as the level drops, the meniscus keeps the sensor submerged as the level drops below the sensor head. Finally, the meniscus breaks, and the sensor "sees" the water surface. The pump is activated, and the level rises until it meets the sensor head. This provides a nice on/off cycle action.


  1. Hey could you build me one of these?

  2. Hi, I'm glad that you like the design. Unfortunately, I am pretty busy with work, and I'd have to charge "work prices" instead of "hobby prices" to build one of these. I'd be happy to give you plans, advice, etc, though. Have you built anything like this before?

  3. That would be great if you could give me the plans. And no i have never really built anything like this.

  4. oh hey my email address is

  5. Awesome idea :)

    I would be interested in the build plans too, maybe you can post them online for others too?

    If not, my mailadress is tsjatter at gmail dot com

    best regards,


  6. I've added some more detail here:

    I don't really have formal plans...

  7. Ben,
    That's incredible, I am working w a nano like yourself but w even more limited space. I have a 29 gallon however it sits on my kitchen counter so if I put underneath it would be an eyesore. I would have to put in the cabinet w the rest of my plugs timers etc.
    Not to mention your design is few that would fit in my sump. I understand time is money. Would please give me a price on what you would charge to build this.

    Thanks George

  8. George, I'm glad that you like this design. Unfortunately, I am incredibly busy, and don't have time to build another top-off system. If you decide to build one yourself, I'd be happy to answer your questions. -Ben

  9. Great project Ben, can you maybe advice me on the following?

    I am trying to create the same but without ARDUINO (as I havent tried it and dont want to complicate)
    I have the following
    1) magnetic float (item #281866719818)
    2) optical sensor (item #400934780805 )
    3) Electric Solenoid Valve Normal Closed 12v (item #271754139788)

    I am looking for a CONTROLLER that can hook those 3 together and a 12v power supply

    The use case is simple - When water drops below the level of the 2 sensors, activate the Solenoid valve to open the water flow, once one of the contact points (magnetic float or optical) is wet or shut close the Solenoid valve .

    Where can I find such a controller or an applicable solution?