1
0
mirror of https://github.com/skaringa/water-counter.git synced 2024-11-22 01:14:24 +01:00
water-counter/README.md

32 lines
1.3 KiB
Markdown
Raw Normal View History

2016-04-16 12:34:12 +02:00
# water-counter
Monitor a water meter with Arduino and infrared light sensor to capture counter value and consumption of water.
2016-04-16 12:25:15 +02:00
2016-04-16 12:34:12 +02:00
![Water meter with infrared light barrier](https://www.kompf.de/tech/images/watir.jpg)
2016-04-16 12:25:15 +02:00
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](https://www.kompf.de/tech/watir.html).
## 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](https://www.kompf.de/tech/images/reflsensormini.png)
## Construction
![Construction](https://www.kompf.de/tech/images/watraspi.jpg)