Introduction: Esp8266 Smart Shower Head
This is a Smart Shower Head, that is able to measure amount of water consumption during shower, based on Esp8266 wifi module and Arduino libraries,
It enjoys simple hardaware implementation even by old and previously-used stuffs,like old cell phone battery ,and used toothpick box.
Step 1: Hardware Implementation
For hardware implementation You'll need:
1- Esp8266 -01 wifi module
2- YF-S201 Flowmeter module + 1/2" Water Pipe Coupling
3- An old 3.7v Li cell-phone battery
4- A Li battery charger Module
5-One simple On/Off Switch
6- A campact box (Toothpick or Hearpick box)
7- A 1/2 shower head
-You need to connect the (+) pin of battery to Vcc pin of esp8266 module and Vcc pin of YF-S201 Flowmeter Through an On/Off Switch.And (-) pin of battery to GND pin of mentioned modules.
-Also you need to connect Output pin of YF-S201 flowmeter to GPIO-0 of esp8266.
-It's better to connect YF-S201 flowmeter via a 3-pin detachable extesion cable and, also plug it after you turned on the Wifi module via switch.(due to stability of working supply)
- The output pins ofLi battery charger module should be disconnected during wifi module's operation, By using a 2-state switch.
Step 3: Software Implementation
For Software Implementation, you need Arduino IDE that installed necessary libraries for ESp8266 module,
Here's the following arduino code,that you have to change SSID and Password of your own Wifi router plus static IP info, and change admin panel user & and pass (default is admin:admin).
Note that Interrupt pin is GPIO0 of esp8266 module, that is connected to Output pin of YF-s201 flowmeter.
After you passed the login page via 192.168.1.10 (default IP), you can see the main html page, that contains Switch On ans Switch Off buttons.Indeed,you can Reset the Litre of Consumption water by these two buttons.
For starting measurement you have to push Switch On button,And Switch Off button is for resetting and turning off the measurement.