Want to share with the comunity a project I have done to irrigate my trees which are in pots.
The ideia is simple, keep my trees wateres using solenoids and humidity sensors.
Given the costs where I live, I decided to just use a ESP32 Devkit, a board of 4 relays, 4 solenoids of 110v 3/4 and 3 humidity sensors.
The sensors I brought from aliexpress, the solenoids in my country for a price good enough to not import, the rest I had from other projects.
For the water, just used a garden hose I had here, because, the project was already way too much costy, and at the end I managed to connect everything using quick connectors for easy remotion for manutention.
The wiring was well isolated using 3 layers of isolation, one using common isolation tape, another using autofusing isolation tape and finally a layer of silicon.
For the humidity sensor, used the lan cables, for they are easy to connect into the prototype cables, they are cheap, resist well in the weather, and I had it here. Same thing, soldering, isolation, silicon for good measure. And take it to the box where everything is.
For energy, used a box with two plugs, one for the ESP32, another one for the solenoids
A couple of images of the project.
Here is the config file for ESP32:
esp32:
board: esp32dev
framework:
type: arduino
# Enable Home Assistant API
api:
ota:
wifi:
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
# captive_portal:
sensor:
- platform: adc
pin: 34
name: "Humidade do Solo da Amoreira" #1
update_interval: 5s
unit_of_measurement: "%"
attenuation: auto
filters:
- median:
window_size: 7
send_every: 4
send_first_at: 1
- calibrate_linear:
- 1.1 -> 100
- 2.5 -> 0
- lambda: if (x < 1) return 0; else return (x);
# accuracy_decimals: 0
- platform: adc
pin: 35
name: "Humidade do Solo da Lichia" #2
update_interval: 5s
unit_of_measurement: "%"
attenuation: auto
filters:
- median:
window_size: 7
send_every: 4
send_first_at: 1
- calibrate_linear:
- 1.1 -> 100
- 2.5 -> 0
- lambda: if (x < 1) return 0; else return (x);
# accuracy_decimals: 0
- platform: adc
pin: 32
name: "Humidade do Solo do Limoeiro" #3
update_interval: 5s
unit_of_measurement: "%"
attenuation: auto
filters:
- median:
window_size: 7
send_every: 4
send_first_at: 1
- calibrate_linear:
- 1.1 -> 100
- 2.5 -> 0
- lambda: if (x < 1) return 0; else return (x);
# accuracy_decimals: 0
# g33 g25 g26 g27
switch:
- platform: gpio
pin: 33
name: Solenoide da Bomba
id: solenoide_bomba
# internal: True
inverted: True
restore_mode: ALWAYS_OFF
- platform: gpio
pin: 25
name: Solenoide do Limoeiro
id: solenoide_limoeiro
# internal: True
inverted: True
restore_mode: ALWAYS_OFF
- platform: gpio
pin: 26
name: Solenoide da Lichia
id: solenoide_lichia
# internal: True
inverted: True
restore_mode: ALWAYS_OFF
- platform: gpio
pin: 27
name: Solenoide da Amoreira
id: solenoide_amoreira
# internal: True
inverted: True
restore_mode: ALWAYS_OFF
What do you ppl thinks? Feedback is well received