You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Martin Kompf 05004cbac0 Avoid error when no data is available 2 years ago
arduino_sketch Simplified low pass filter 3 years ago
www unique filename for cached images 5 years ago
.gitignore Website added 6 years ago
LICENSE README and LICENSE added 6 years ago
README.md README updated 6 years ago
catserial.py Utility to receive raw data values from Arduino and print them to stdout 3 years ago
graph.sh Website added 6 years ago
leakdetect.py Avoid error when no data is available 2 years ago
wairc.py Ensure that trigger mode is set 3 years ago
wairc.service systemd unit file added 3 years ago

README.md

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