BACK STORY (skip if not interested)About one year ago, I started having water problems. The flow was really low. We have a well, so I was concerned. What is going on? Is our well running out of water? Pump problem?
So I made a device (STM8S103) to monitor and record the pump on/off cycles. Okay, the pump cycles for about two minutes at a time, several times a day. That's seems quite normal. Good. I finally found out that our water filters were PLUGGED UP. We were getting a huge amount of sediment. I ended up replacing the filters about once a week. For months, this was a "stable" situation. Not good, but stable. After about half a year, the sediment problem went away. Good.
Then this summer, I noticed that the pump was cycling on for a very short time (like 10 to 20 seconds) and very often. The pressure tank probably failed. I bought a new tank and waited. The tank is in a concrete chamber in the ground. It was going to be a real pain in the ass to replace the old one and connect the new one. For some time, the water pump would not be usable. One day? Several days? Don't know.
To keep the water flowing, I set up a 1000 liter (265 gallon) International Bulk Container ("tote") as a water tank by the house, with pumps and plumbing, I made that a secondary water source for the house. We tested it for a day, and it worked fine. Then I made it the primary water source so I could work on the pressure tank. It was a pain in the ass. Two days.
It freezes hard here, so an outdoor tank is not a year-round option. It would be nice to have an emergency or secondary tank in the garage. But to refill it would mean going about 200 feet down the driveway and spending a half hour or more watching the water level. It would be nice to refill the tank using valves in the house, and using a monitor to report the current water level.
END BACKSTORYThis project is a water level monitor for a water tank. Mine is 1000 liters (264 gallons) and will provide water to the house for two days of normal use, or longer if we try to conserve. It can easily be modified for other tanks. At the end of the code is a calibration table. Just push the button for ping microseconds and record the numbers every 100 liters. After compiling in the calibration values, the display can show water level in liters, gallons, or percentage of full.
Here is a link to the source code and libraries:
http://www.hodges.org/rh/stm8/tank_mon/tank_mon.tgz.
Here is a link to my project page:
http://www.hodges.org/rh/stm8/tank_mon/index.htmlThe MPU (stm8s103), display & keypad (tm1638), and ultrasonic range finder (HC-SR04) are about $4 on ebay.