1
0
mirror of https://github.com/skaringa/water-counter.git synced 2024-07-25 03:22:30 +02:00
Go to file
2019-09-24 15:06:21 +02:00
arduino_sketch Simplified low pass filter 2019-02-10 17:00:06 +01:00
www unique filename for cached images 2016-05-06 20:24:31 +02:00
.gitignore Website added 2016-04-09 18:06:19 +02:00
catserial.py Utility to receive raw data values from Arduino and print them to stdout 2019-02-15 19:00:13 +01:00
graph.sh Website added 2016-04-09 18:06:19 +02:00
leakdetect.py Avoid error when no data is available 2019-09-24 15:06:21 +02:00
LICENSE README and LICENSE added 2016-04-16 12:25:15 +02:00
README.md README updated 2016-04-16 12:34:12 +02:00
wairc.py Ensure that trigger mode is set 2019-02-15 18:56:48 +01:00
wairc.service systemd unit file added 2019-02-10 16:55:55 +01:00

water-counter

Monitor a water meter with Arduino and infrared light sensor to capture counter value and consumption of water.

Water meter with infrared light barrier

The software consists of two parts:

  • Data acquisition part running on an Arduino Pro Mini. It controls the infrared light barrier, detects trigger levels and communicates with the Raspberry Pi over serial connection.
  • Data recording part running on a the Raspberry Pi. It retrieves the data from the Arduino over serial port and stores counter and consumption values into a round robin database.

There is a blog in german language that explains use case and function: Infrarot Lichtschranke mit Arduino und Raspberry Pi zum Auslesen des Wasserzählers.

Commands from host (RasPi) to Arduino

  • D - retrieve and print raw data
  • T - enter trigger mode and print trigger data (0/1)
  • S low high - Set trigger levels (e.g. 85 90)
  • C - Cancel data acquisition and enter command mode

Arduino is in trigger mode upon start - Send C to enter command mode

Schematics

Schematics

Construction

Construction