mirror of
https://github.com/skaringa/water-counter.git
synced 2024-12-30 16:41:39 +01:00
water-counter
Monitor a water meter with Arduino and infrared light sensor to capture counter value and consumption of water.
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
Construction
Languages
Python
31.2%
C++
27.5%
Perl
25.1%
HTML
13.5%
Shell
2.7%