Electronics > Projects, Designs, and Technical Stuff
Water tank monitor using ultrasonic range finder and STM8 MCU
(1/2) > >>
rhodges:
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 BACKSTORY

This 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.html

The MPU (stm8s103), display & keypad (tm1638), and ultrasonic range finder (HC-SR04) are about $4 on ebay.
rhodges:
Here is the 1000 liter water tank in a corner of the garage. I decided to mount the ultrasonic device on top of the tank. I drilled two 5/8 inch holes one inch apart, and then adjusted the holes to hold the sensor firmly. Click on an image for a better view. Very large images are on my personal pages.
rhodges:
Here is my original calibration setup. I started with an LCD, but when I switched to the tm1638 LED display and keypad, I no longer need the LCD. The second picture shows the MPU, display/keypad, and ultrasonic device connected together. The power supply is most any cell phone charger (micro-USB).
soldar:
I have a tank just like that in my garage. The pump is the kind that does not need pressure vessel as it detects flow and starts whenever water is running. The system works very well.  I prefer this type of pump to the kind with pressure vessel that cycles on and off because I do not like the pressure cycling that goes with it.

Don't let me discourage you from overengineering a solution but I think it can be much simpler. What's wrong with a float valve which shuts off the water input once the water reaches a certain level?  Or you can find on ebay really cheap and reliable float switches. Even ultrasonic switches.

I would favor a really simple solution like a basic valve to shut off the water supply when the tank is full and backed up with an alarm in case it would overflow.
beanflying:
Interesting project. Way back in the day I used to play with pumps and controls. A local here has been building a system with 4G boards in his for remote farm tanks.

For Tank filling these were always a better option than a single acting ball valve btw and cut down a lot of the pump cycling.

Navigation
Message Index
Next page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod