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 !