So, one of the few flaws with small aquarium tanks, as I quickly discovered shortly after buying an 'aquascape' setup with some tropical critters, is that the small amount of water evaporates very quickly. Ergo, you need to add room-temperature spring water every so often, and I became too lazy for that. What did I do? I made the AQUA-REPLENISHER! It simply adds water when the water level in the tank gets too low. The system uses:
- An ultrasonic rangefinder
- A small water pump w/ driver circuit
- BS2e microcontroller
- Simple solar power circuit w/ solar cell & lead-acid battery
- RGB LED as a status indicator (for debugging)
The picture doesn't look like much? This is my kitchen, so you're not supposed to know it's there! Look at the next few steps to see the components involved.
Step 1: Do You Need It...?
This is only needed for small tanks; probably less than 5 gallons, or even fish bowls (for goldfish, tetras, etc.). It is not necessary for larger tanks because by the time the water level falls a couple inches in, say, a fresh water 80 gallon tank, you will need to clean it anyways. So with that in mind, we will continue...
Step 2: The Stuff
- Small pump
- Microcontroller (For this project I used my BASIC Stamp II)
- Ultrasonic rangefinder w/ a 3-wire sensor cable
- 6.5V lead-acid battery
- 9V solar panel
- Blank PCB
- Water bottle or some sort of container to use as a reservoir
- Air pump tubing (clear tubing used for aquarium air pumps)
- Tin or container to hide all the electronics
- Banana jacks/screw-down terminals (a total of 2 pairs)
- 220 ohm resistor
- 500 ohm to 1k ohm resistor
- TIP 120 Darlington Transistor
- RGB LED (common anode)
- High-capacity capacitors (you probably want a total of ~8,000uf worth; I used about 7,800uf of caps)
Now, you've probably been wondering about the pump. A pump like this is not hard to get. Where? One day, I saw a swiffer 'wet-jet' mop sitting in our good neighbors' garbage can, and I knew some day the pump inside would come in handy. This is the day! It's not the strongest pump, but it gets the job done. I had to add some tubing, and I glued it with 'Loctite Marine Glue'; That's the grey goup on the pump assembly. If you use this pump, BE CAREFUL because it has a really really sharp needle-like barb that it uses to connect to the soap reservoir in the swiffer mop (I learned the hard way).
Step 3: Details - the Battery, Motor Driver Circuit, and Indicator LED
The motor driver is very simple; all you need is a TIP120 Darlington Transistor, a diode, and a 500-1k ohm resistor.
As for the indicator LED, it is a 'common anode' RGB LED. You need to connect the 220 ohm resistor to the longest lead (+) of the LED before connecting that to VCC (+). The three remaining leads (red, green, and blue) all go to the microcontroller, and are turned on by bringing them LOW in the software.
Step 4: Power - the Solar Panel
I put together a little circuit that consists of some capacitors (in series) and a diode. The capacitors are to aid in charging of the battery, and the diode is to protect power from going from the battery into the solar panel at night, which could damage it. The total capacitance of this circuit is about 8,000uf.
**IMPORTANT** UPDATE: For some odd reason, I overlooked the tiny, green SMD (surface-mount) LED on the carrier board for the BS2. Well, it turns out it uses like 30ma, which, with the solar panel I'm using, drains the battery in a few days. Be sure to have NOTHING running when the BS2 is in sleep mode, or that little bit of drain will make using the solar panel useless!! I'll have to put it all on a breadboard...
Step 5: Bring the Pieces Together
For the water reservoir, I used the biggest water bottle I could find (it's a poland springs water bottle; the squirt kind). Using a larger one would obviously mean less fill-ups. I didn't need to secure the pump to the water bottle because the hose somehow held it in place.
Step 6: Add the Sensor and Hide It
*IMPORTANT: You will have to adjust the threshold value for your specific tank water level.
I would love to have an enclosure to protect the sensor from splashes; I'm currently working on what to use for that. If anyone has some ideas, let me know. I also need some way of clipping/mounting it to the tank so it can be removed when cleaning the tank, because it can't be glued on over and over again.
Finally, hide the wires and shove the end of the pump hose into the tank, and secure it at the top. There was a small notch on my tank which, I think, is meant specifically for these tubes, so i squeezed it in there.
Step 7: Program It, Use It
Every 12 hours, it checks the water level using the ultrasonic sensor. If it is fine, it will flash a green light and go to 'sleep' for 12 more hours. If not, it will add water, reading the sensor as it goes, and when it is at the desired level, it shuts off and goes back to sleep. If a long time goes by and it senses that the water level has not risen, it will flash an orange light indicating an error, sleep for 5 minutes, and repeat the process all over again until you notice and solve the problem. It could be that:
1) The reservoir is empty
2) Something is wrong with the motor/circuit
3) The tank is completely empty for some bizarre reason
This feature will protect the pump from filling the tank until it overflows (if the reservoir is big enough/has enough water in it to do so).
Lastly, and definitely not least, put the solar panel in a good location. If you were wondering about the image comment in step 5, I have a sun roof in that room, which is ideal for my solar panel. You can't see it in any of the pictures, but it sits on top of my fridge to gather the light to charge the battery (very very slowly, but surely). The solar panel and batter should keep the setup self-sufficient (except for the reservoir refills)....
Here's a video of it in testing: