Pi Water Usage Using Raspberry Pi 3
Intro
It had been a while, since the last Pi water usage. I redesign the idea, make it simple, down to one purpose of the course. The idea is not just monitor water flow but to frequently update user about their cost and usage continuously.
About
Raspberry Pi 3 more powerful, simple to use with the later package install than it version 1. Still there is quite a couple of things to be done during setup. Best thing is I switch to use 7 inch LCD for raspberry pi 3, which I found is great tool for me as it is small and simple to use with and is a touch screen.
Get one at element 14.
Get one at element 14.
User Interface
Design the user interface make it simple and easy to use. Simple approach in mind. To reflect the amount of water usage and the cost of usage. Using color row to indicate the item as follow:
1) Show current date and time
2) Water Tariff Information ( base on Singapore )
3) Water Usage Information
I'am using python coding and user interface import from tkinter.
1) Show current date and time
2) Water Tariff Information ( base on Singapore )
3) Water Usage Information
I'am using python coding and user interface import from tkinter.
Feature
The application provide simple feature, monitor water flow via a flow sensor, then compute the cost in real time. Every hour Pi Water Usage will make an record and reset the water usage information. With built-in email feature, it will send the water usage records daily, weekly and monthly. The record is send in .csv format. So user able to further analyst and understand about their water usage data.
Sample of Water Usage reports via email
Set Up the program raspberry pi
# UsagePi_v1.1.0
Require user to setup email account, prefer using gmail. If not require to change the smtp_server address.
Due to security reason is good to sent yourself.
line:
94 smtp_server='smtp.gmail.com'
95 sender='[email protected]' # your email
96 receiver='[email protected]' # # your email
97 uPiMail=sender
98 password='YOUR_PASSWORD' # set your passwd email
Goto
https://github.com/keyone78/UsagePi_v1.1.0
# UsagePi_v1.1.0
Require user to setup email account, prefer using gmail. If not require to change the smtp_server address.
Due to security reason is good to sent yourself.
line:
94 smtp_server='smtp.gmail.com'
95 sender='[email protected]' # your email
96 receiver='[email protected]' # # your email
97 uPiMail=sender
98 password='YOUR_PASSWORD' # set your passwd email
Goto
https://github.com/keyone78/UsagePi_v1.1.0
Diagram Show notification
About The Flow Sensor
Pick a flow sensor
there a varies model of flow sensor for water. The cost varies also. for project wise choose the simple form. For consumer usage wise do check the material as some material of flow sensor not suitable at certain temperature or for consumption.
flow sensor can get from:
1) Taobao around S$2.00
2) Aliexpress around S$5.00
3) Element 14 (industrial grade like GEMS SENSORS) few hundreds of dollar.
The size
Flow sensor have different tread size. In Singapore, it use BSP, British Standard Pipe, normally is 1/2 inch, where in China they called it, 4分接口.
https://www.valvesonline.com.au/references/threads/
The voltage
Chose voltage below 5volt is the best, this able to tap from Raspberry pi source. If between 5 to 12volt, will require an volt regulator. If the flow sensor use AC source (industrial purpose) then it require another controller module for it, Will get to that at later stage.
The signal
Go for digital signal pulse, which give a train of pluses in certain time frame. This type of flow sensor is easy for coding purpose.
Install flow sensor
Item:
1)1/2 inch Male Thread Brass Nipple x1 - S$1.00
2) Pipe fitting1/2" female connector x 2 S$1.00/qty
3) flow sensor x 1 - S$2.00
4) Water tap x 1 - S$7.00
5) Sealing tap x 1 - S$0.50
Connect the fitting in order, do not screw all the way till the end, normally half way plus will do. When carry our fitting to the main pipeline and tested there is leakage then tight a few more round.