Smart Water Controller

by phuoctri in Circuits > Remote Control

2156 Views, 3 Favorites, 0 Comments

Smart Water Controller

IOT.jpg
So Do Nguyen Ly.PNG

Hello, this is my first project on Instructables. Any question or suggestion, comments, please tell me.

I created an IOT node for my cold water tank on the roof. It gave me some information like:

1. Tank water level

2. Temperature, Barometric Pressure and Humidity

3. Motion Sensor

4. Light Lux

Base on Firmware ESP-EASY and hardware ESP8266 Nodemcu.

Because this IOT node need Wifi for working, I'm already re-configuration my Wifi network. Will sharing it with other project.

Necessary Tools

Chi Han.jpg
Dong Ho AN-8009.jpg
Nhua Thong Deo.jpg
Tram Han Hakko 907.jpg
Board Test.jpg
Kem Cat.jpg
Kep Han.jpg

List below are main Necessary Tools for my projects:

1. Welding station

2. Digital Multimeter

3. Welding Tools & Materials

4. etc...

Be careful when using any device that is related to electricity.

Hardware With ESP8266

DS18B20 Waterproof.jpg
ESP8266_DEV.jpg
ESP8266 Dev Board.jpg
DHT22.jpg
HC-SR04.jpg
HC-SR501.jpg
BH1750FVI.jpg
BMP180.jpg

Because my cold water tank in the roof. So, I give some sensors for tracking enviroment (just for fun)

1. ESP8266 : any esp8266 but I recommend the NODEMCU - ESP8266, it is about 3$ - 4$

2. DS18b20 Waterproof : for water temperature

3. HC-SR04 : Ultrasonic Sensor for tank water level

DO NOT DIRECT CONNECT WITH ESP8266 (it is 5v signal and will kill your board)

4. DHT22 or DHT11 : Temperature and Humidity inside box

5. BMP180 : Barometric Pressure/Temperature/Altitude on roof

6. PIR HC-SR501 : Passive Infrared Motion Sensor, to detect someone or animal

7. BH1750FVI : Digital Light Sensor

8. Levelshifter: convert signal 5V from HC-SR04 to 3.3V.

Flash Firmware EspEasy

FlashEspEasy2.PNG
FlashEspEasy1.jpg
FlashEspEasy4.jpg
FlashEspEasy3.jpg

1. Download it on https://github.com/letscontrolit/ESPEasy/releases

2. Using this firmware ESP_Easy_mega-yyyyMMdd_normal_ESP8266_4096.bin

3. Run FlashESP8266.exe for flash (in Windows only :D). Maybe you need flash.py to flash on Linux or Mac (try Google please)

4. First run please folow this guide https://www.letscontrolit.com/wiki/index.php/ESPEa...

Note : AP mode using this password to access : configesp

Wire System and Sensors

DS18B20 List.png
MachIn2.jpg
MachIn1.jpg
MachIn0.jpg
ESP8266_PinOut.png

Please wire ESP8266 with Sensors like this:

- DHT11 => GPIO3

- DS18B20 => GPIO1 : need R4,7k with (+)

- BH1750 => I2C : GPIO4,5

- BMP180 => I2C : GPIO4,5

- PIR => GPIO14

- HC-SR04 : DO NOT DIRECT CONNECT WITH ESP8266 (it is 5v signal and will kill your board)

You need a Levelshifter https://www.letscontrolit.com/wiki/index.php/HC-SR...

=> connect Levelshifter with GPIO12, GPIO13

Config System

EspEasy_Config.png

Config like this photo.

GPIO need match with previous step, you can change it.

But DO NOT use these GPIO:

- IO0, IO2 : need pull-up R

- IO15 : need pull-down R

- IO16 : sleep mode with RST

- IO7, IO8, IO9, IO10 : SD0..3

Using these GPIO will break down your Serial Monitor:

- IO1, IO3 : serial TX RX

Please make sure correct IDX on your Domoticz system.

https://www.letscontrolit.com/wiki/index.php/Tutor...

Control With Domoticz & ThingSpeak

Thingspeak.png
Thingspeak_APIKey.png
Domoticz_Devices.png
Domoticz_Floorplan.PNG
Domoticz_Hardware.PNG

1. Domoticz

Give it new hardware, setup devices and type the IDX on Domoticz in EspEasy

2. Thingspeak:

Get new chanel and give EspEasy the Write API Key

Box & Go-Live

Box5.jpg
Box4.jpg
Box3.jpg
Box2.jpg
Box1.jpg
Box0.jpg
Domoticz_Devices.png
EspEasy_Config.png
Domoticz_Floorplan.PNG
DomoticzMobile2.png
DomoticzMobile1.png

In box and test.

After that, setup with water tank.

Now : relax with beer :D

Note: please do not put it direct with the sun or rain. For inside only.

For mobile:

1. Android app : https://www.domoticz.com/wiki/Android

2. iOS app : https://www.domoticz.com/wiki/IOS

Next Upgrade Version

IOT.jpg

In next version, I will make other node to control pump.

And include this to my Smart Home using Home-assistant (https://www.home-assistant.io/) instead of Domoticz (http://www.domoticz.com/ ).

See you!

Regards.