loading

Automatic Irrigation using d1 mini

Hi Everyone,
I reviewed different automatic irrigation system projects here in instructables and other sites as well and i decided to gather parts to do a simple small project myself. One thing that comes hard is the programming part as I don't know any programming language. I'm looking for some help with code merging, explanation and some general guidance. Could you please let me know, point me to right direction and tell me what you think and if requirements are actually achievable?

What I would like to achieve:

Intention of this project is to have manual and auto irrigation system which will:

1. Measure soil moisture and dependently on the value activate the usb pump which will water the plant (preferably analog output that will show the measurements in %)
2. Manual activating the pump via hardware button and via mobile phone with internet connection
3. Distance sensor which should measure how much water is left in the tank
4. Email notification with info when to water the plants and soil sensor data regardless of the automatic process that has already started
5. Email notification with info about the water in the tank when it’s near empty
6. Dashboard preferably inside the network (not using third party like blynk or others) with access from the internet (I have QNAP that I think can be used).
7. If possible – have amazon echo (Alexa) read the sensor data to tell me the values and comment if the plant should or shouldn’t be watered or the tank should be refiled or not as well as ability to ask Alexa to start or stop the irrigation

Hardware:
D1 mini:
https://wiki.wemos.cc/products:d1:d1_mini

Wemos V2 Relay shield:
http://hobbycomponents.com/shields/865-wemos-v2-relay-shield
My relay is slightly modified:
2 small wires soldered to the vcc and ground so that when it receives the signal on d1 pin it opens and current flows to female usb connector supposedly activating the usb water pump. All this can be stacked together even with soldered wires

YL-69 sensor:
http://www.oddwires.com/yl-69-soil-hygrometer-humidity-soil-moisture-detection-sensor/

Ultrasonic Distance Sensor (HC-SR04):
https://thepihut.com/products/ultrasonic-distance-sensor-hcsr04

USB mini water pump:
www.goo.gl/yUABDd

Button x4 if needed:

Board x4 if needed:

sample codes used in other projects:

https://randomnerdtutorials.com/guide-for-soil-moisture-sensor-yl-69-or-hl-69-with-the-arduino/
https://create.arduino.cc/projecthub/nekhbet/using-the-yl-39-yl-69-soil-humidity-sensor-with-arduino-968268
https://community.blynk.cc/t/irrigation-relay-with-timer-esp8266-wip/700

Alexa enabled homemade cat feeder example:
https://www.hackster.io/darian-johnson/alexa-powered-automated-cat-feeder-9416d4

Thank you very much in advance for your help and support.

wube (author) 17 days ago

Here is how the relay shield for d1 mini after modification looks like..

IMG_20170703_214917.jpg