I have created a device that does just that, although it isn't powered yet. I installed this 1/2" flow meter (
https://www.adafruit.com/product/828) just outside of my fresh water tank when I did the plumbing, and wrote some code on an Arduino that displays all the relevant information. Here's how it works:
- I inserted a liquid level sensor in the vent of the freshwater tank, so that when I'm filling it up, a blue LED will light up at the inlet telling me that the tank is full (so I don't have to fill until it overflows out the vent). My tanks have 40 gallons of capacity, so when the light turns on, I know I have 40 gallons and the Arduino changes the water level to 40 gallons (it'll be more than 40 gallons actually, but I have to ops test it to include all the water in the plumbing lines too).
- The Arduino is attached to the water pump circuit, so that if the water pump is on, so is the Arduino--and when it pumps water through, the flow meter registers how much water is flowing out of the tank. It's a simple calculation to subtract this water flow from the 40 gallon full level, giving me exactly how many gallons are remaining in my tank
- The 7 segment display automatically displays water flow when it starts pumping, so that we can see how many gallons per minute we're using as we run the sink or the shower. There's a large arcade style button that will cycle through the different fields, though, so I can see how much water we're using at the moment, the remaining water, how much water we're using per day, how many days we have left until we need to refill (at current usage), and I think that's it (I had to install a battery powered clock for this feature, but in hindsight I should've just used a GPS module for better accuracy and less batteries)
- It writes these values to its internal memory so that when we leave the bus and turn the pump off, it still knows how much water we have, and when we come back later and turn it back on, it'll still work
Unfortunately I don't have electrics in the bus yet, so I haven't calibrated or installed it, but I've built the Arduino device and ops tested it using a glass of water to simulate a full tank and everything works as advertised. Once I actually put it in, I'll have to calibrate it with a full tank of water, but that'll probably be a month or two away. I'll post the update with the code here or on my build thread when I do it.