Project: Plant watering System (Standalone) in Progress
Posted: 18 May 2023, 14:58
Hello,
I`ve got here good Help and now i want give back some Stuff that someone can Help.
Excuse my english, it`s first time that i write a tutorial and then in english.
I wanted to create a little Watering System for my Plants because i am very forgetful and my Plants die. So i tried my best with the ESPEasy System and a ESP32.
For this Project i used this components:
So lets get started,
at first you can see my schematic (without BMS):
What is connected?
ESP GPIO 23 is connected to Dual Mosfet D4184 (trigger)
ESP GPIO 32 is connected to Water level sensor switch - GND>resistor 10k> GPIO 32 (corrected because wrong PIN)
ESP GPIO 33 is connected to Switch for Debugging ( i used it to deactivate Deepsleep - see code) - 3V3>switch input > switch output > GPIO 33
ESP GPIO 35 is connected to Soil Moisture Analog output
What ESPeasy Version i used?
ESP_Easy_mega_20230505_normal_ESP32_4M316k May 5 2023
You can use older Versions too because i use only the standard functions but its better to be UpToDate
Here are my Settings:
Config Tab:
Nothing special fill in your Network connection and dont change settings on "Sleep awake time or Sleep time"
Controllers:
I didnt have any Controllers running you can set one if you need.
Hardware:
Here i set under Wifi Status LED the setting to GPIO-2 and unchecked the Inversed Box because i unsoldered the Power LED, for better Battery saving.
Under GPIO 33 set to "Input Pulldown"
Under GPIO 32 set to "Input Pulldown"
All other settings on this site you dont have to change.
Devices:
Click here on "Add" in the first Row and set the "Device" to "Analog input -internal", now press Submit.
Give the device a "Name" (i wrote "feucht") you need to know later for the Code in the Rules.
After set Checkbox "Enabled" to Checked, on "Analog Pin" set the function to "ADC1 ch7 / GPIO-35".
"Attenuation" to 11db and "Oversampling" to Oversampling.
Scroll a little bit down you see a point "Two Point Calibration", set the checkbox "Calibration Enabled" to checked.
"Point 1" i set to 1700 = 100.000
"Point 2" i set to 2800 = 0.000
This is the range where my Soil Moisture sensor works i will tell later how to find out the range you need for you.
Now scroll down, you see there "Interval" write in the box 30.
The last setting is under Values, under Name write "igkeit" under Formula nothing, stats should be unchecked and under "Decimals" you can set a "2". Now press the Submit Button.
Tools:
Click on Advanced, a new page is loaded.
Here you have to set:
"Rules" Checked
"Enable Rules Cache" Checked
"Use NTP" Checked
"NTP Hostname: (you can fill it or not, for me i used "1.de.pool.ntp.org" if you not fill it ESP uses always standard setting automaticly "pool.ntp.org" (corrected see Post #5 by Ath)
"DST" Checkbox set to checked
"Timezone Offset (UTC+)" you need to now your UTC mine is "60" (corrected see Post #5 by Ath)
"Latitude" and "Longitude" set there the position of your home we need this for Sunset and Sunrise in the Rules later.
"Use Last Connected AP from RTC" Checked
All other settings should be stock.
Now press Submit
After this reload the site with the "F5" button on your keyboard.
You should see an new tab between Devices and Notifications its called "Rules", press on it.
Rules:
Here comes the Magic, place this code on "Rules Set 1" and if you need correct it with the values you need:
Now press the Save button.
So that´s Part 1 Part 2 follows
I`ve got here good Help and now i want give back some Stuff that someone can Help.
Excuse my english, it`s first time that i write a tutorial and then in english.
I wanted to create a little Watering System for my Plants because i am very forgetful and my Plants die. So i tried my best with the ESPEasy System and a ESP32.
For this Project i used this components:
- ESP32 D1 mini (every device will work)
Capacitive Soil Moisture Sensor (you have to look that you got the right one! more to that later)
An mechanical waterproof endstop
D4184 Dual Mosfet Breakout board
Capacitor 6,3V 470mF
10k resistor
MP1584 DC/DC Step-Down regulator
Battery Pack Li-Ion 18650 3S
Cables, Connectors and a Perfboard
12V Pump
Li-Ion BMS 3S
Switch or Jumper connector (for deactivate Deepsleep if you want Debug)
- Include Solar charger
Voltage measuring for Battery Pack
So lets get started,
at first you can see my schematic (without BMS):
What is connected?
ESP GPIO 23 is connected to Dual Mosfet D4184 (trigger)
ESP GPIO 32 is connected to Water level sensor switch - GND>resistor 10k> GPIO 32 (corrected because wrong PIN)
ESP GPIO 33 is connected to Switch for Debugging ( i used it to deactivate Deepsleep - see code) - 3V3>switch input > switch output > GPIO 33
ESP GPIO 35 is connected to Soil Moisture Analog output
What ESPeasy Version i used?
ESP_Easy_mega_20230505_normal_ESP32_4M316k May 5 2023
You can use older Versions too because i use only the standard functions but its better to be UpToDate
Here are my Settings:
Config Tab:
Nothing special fill in your Network connection and dont change settings on "Sleep awake time or Sleep time"
Controllers:
I didnt have any Controllers running you can set one if you need.
Hardware:
Here i set under Wifi Status LED the setting to GPIO-2 and unchecked the Inversed Box because i unsoldered the Power LED, for better Battery saving.
Under GPIO 33 set to "Input Pulldown"
Under GPIO 32 set to "Input Pulldown"
All other settings on this site you dont have to change.
Devices:
Click here on "Add" in the first Row and set the "Device" to "Analog input -internal", now press Submit.
Give the device a "Name" (i wrote "feucht") you need to know later for the Code in the Rules.
After set Checkbox "Enabled" to Checked, on "Analog Pin" set the function to "ADC1 ch7 / GPIO-35".
"Attenuation" to 11db and "Oversampling" to Oversampling.
Scroll a little bit down you see a point "Two Point Calibration", set the checkbox "Calibration Enabled" to checked.
"Point 1" i set to 1700 = 100.000
"Point 2" i set to 2800 = 0.000
This is the range where my Soil Moisture sensor works i will tell later how to find out the range you need for you.
Now scroll down, you see there "Interval" write in the box 30.
The last setting is under Values, under Name write "igkeit" under Formula nothing, stats should be unchecked and under "Decimals" you can set a "2". Now press the Submit Button.
Tools:
Click on Advanced, a new page is loaded.
Here you have to set:
"Rules" Checked
"Enable Rules Cache" Checked
"Use NTP" Checked
"NTP Hostname: (you can fill it or not, for me i used "1.de.pool.ntp.org" if you not fill it ESP uses always standard setting automaticly "pool.ntp.org" (corrected see Post #5 by Ath)
"DST" Checkbox set to checked
"Timezone Offset (UTC+)" you need to now your UTC mine is "60" (corrected see Post #5 by Ath)
"Latitude" and "Longitude" set there the position of your home we need this for Sunset and Sunrise in the Rules later.
"Use Last Connected AP from RTC" Checked
All other settings should be stock.
Now press Submit
After this reload the site with the "F5" button on your keyboard.
You should see an new tab between Devices and Notifications its called "Rules", press on it.
Rules:
Here comes the Magic, place this code on "Rules Set 1" and if you need correct it with the values you need:
Code: Select all
On feucht#igkeit Do
If [feucht#igkeit] < 95 and %systime%>%sunrise% And %systime%<%sunrise+30m% And [Plugin#GPIO#Pinstate#32]=0
GPIO,23,1
TimerSet,1,10
Elseif [feucht#igkeit] < 95 And %systime%>%sunset% And %systime%<%sunset+30m% And [Plugin#GPIO#Pinstate#32]=0
GPIO,23,1
TimerSet,1,10
Elseif [feucht#igkeit] > 95 And %sunrise+30m%<%systime% And [Plugin#GPIO#Pinstate#33]=0
GPIO,23,0
DeepSleep,120
Elseif [feucht#igkeit] > 95 And %sunset+30m%<%systime% And [Plugin#GPIO#Pinstate#33]=0
GPIO,23,0
DeepSleep,120
Endif
endon
On Rules#Timer=1 do
GPIO,23,0
Endon
So that´s Part 1 Part 2 follows