After a bad water damage (our cellar basically filled up whilst we were away for several days), I decided to monitor our water usage for anomalies. Enters Arduino...

The idea of this project is to use an arduino to count every drop of water that goes through the water company meter. Said arduino needs to be connected to my LAN so that I can query it on a regular basis, it also needs to be aware of (real) time so it can timestamp the water consumption.

For this project you will need:
- an arduino
- an ethernet shield + sd card (based on the W5100 chip)
- a proto shield
- a realtime clock (http://www.ebay.com/sch/i.html?_nkw=DS1307+Based+Real+Time+Clock)
- a shmitt trigger (e.g. 74C14N)
- a capacity (1 microF)
- some resitors (20kohm and about 100Kohm)
- a reed switch
- a reed switch-enabled water meter (Gioanola, about 75 euros http://www.gioanola.it/download/downen/08_eloutput_EN_HI.pdf)

- a set of passive POE cables (http://www.ebay.com/sch/i.html?_nkw=Passive+Power+over+Ethernet)


I asked a professional to mount a basic water meter right behind the Water Company one (which by law, I cannot touch). Said basic meter has a little magnet on one of its internal wheels and is shipped with a reed switch. So, in practice, everytime a liter goes through it, the switch is closed momentarily. Of course this switch needs to be de-bounced. This could be done by sotfware but we'll come back to that...

The arduino will serve basic http requests so that it can be queried over the LAN and will also log its activity onto a SD card. So this arduino will be a very busy one... at times. Hence the necessity for the reed switch signals to be conveyed through interrupts so that we never miss a signal. This basically rules out debouncing the switch through software as interrupts and timer do not cohabitate nicely.

Hardware debouncer it is, then !

Step 1: RC Debouncer

So, the reed switch bounces... We are going to transform the spikes produced by said switch into a nice square wave.

Extensive documentation can be found on the net on this topic (and I found this one particularly useful: http://www.ganssle.com/debouncing-pt2.htm).

In a nutshell, R x C = the time during which you want to smooth out your signal. In my case, I chose 20ms which translates into 1 microF for the capacity and 20kohm for the R2 (well all I had available was 2x 10k), R1 needs to be 'bigger' than R2, 100k is good (33k+68k in my case).

A Schmitt trigger later and I have a clean square signal ready to trigger an arduino interrupt.

I tested the setup on a bread board (as you should !) before commiting it to a proper shield.
How muc was the install?
<p>Hi! Try site narodmon.ru to send info and get graph and alarm settings.</p><p>Im use it. </p><p>Look for example here <a href="http://narodmon.ru/8779" rel="nofollow">http://narodmon.ru/8779</a></p><p>and radiation monitor <a href="http://narodmon.ru/1547" rel="nofollow">http://narodmon.ru/1547</a></p>
Would it be difficult to add a notification feature to either email or audible alarm. I had a leaking toilet dump hundreds of $$ of water into the drain and didn't notice the usage until the bill. I'd like to add some analytics to the resulting data to tell without looking daily when something goes wrong
Hi warlock40, this is the point of watermeter.sh. This script retrieves the Aquameter log file and performs a bunch of actions based on the water consumption.<br>It does send an alarm email (which caught a couple of toilet leaks for me !).<br>Take care,<br>N.
Very nice project. Im am thinking of doing the exact same thing, in order to curb the ever rising cost of water, and possibly be able to detect water leaks. I have put together the following Fritzing sketch as I am not a electronics bofin at all. Would you be so kind as to check and let me know if this is correct.
Sorry the image
What you need now is an electrovalve, so that you can remotely cut off water in case of suspicious readouts :)
Another thing that this project made me think of, is if you have a pool that you put up the water company charges you water usage and sewage usage, they assume that the water is being processed in there sewer system, and in some states this can be more expensive then the water usage an the return delivery fee, setting one of these up, could save you alot, especially if you happen to have a pump with a reed switch. I really like your idea, even the case is nice good job all around my friend! Its just one of those that make you think. <br>HANKENSTIEN
Thank you for your comment. This meter has proven handy to monitor my sprinkler system too... only to realize that most of our water usage goes into watering the lawn ! This will probably convince me to recycle rain water somehow. <br> <br>Let me know what you end up building yourself. <br> <br>Take care, <br>N.
MAN, that looks like a disastrous, hope you didnt lose too much in the flooding, good invention though. <br>Good day

About This Instructable




More by nicoo:Hacked roomba + arduino snowballs into a Eurobot 2013 entry... Flashing bootloader into Arduino UNO R3 Arduino Sprinkler System + Web control 
Add instructable to: