Repository navigation
Setup Tasmota
MultiPWM -> give each PWM it's own greyscale slider
Needs to be set only once in "Consoles -> Console"
SetOption68 on
This gives every PWM channel it's own greyscale slider.
The default would be that 1 Channel has serveral sliders for iluminance, warm-cold light and color.
Because we want to missuse the sliders for our own purpose, we want each slider to be connected to a separate channel.
Use "Configuration->Configure Module"
-
Set "Relay 1" to the PIN that controls your first pump.
In this example PIN 25 is used with a MOSFET to switch on PUMP 1 -
Set "Relay 2" to the PIN that controls your second pump.
In this example PIN 26 is used with a MOSFET for the second pump If you have only one pump you can skip this step, but you will have to change the Berry code and the numbering of the PWM PIN's. -
Set any free PIN's to be "PWM 3" and "PWM 4"
These PIN's are not really used. They are only there to have sliders to control the pump duration of pump 1 and pump 2. Make sure that these PIN's are not connected to anything. In this example PIN's 3 and 4 are not connected. If you strip the Berry code you can run with one pump only. -
Set any free PIN to be "PWM 5"
This PIN is used to set the threshold for maximum moisture reported by MI Flora sensors. Pumps will only start if the moisture is lower than this threshhold. This is mandatory. -
If you have buttons to start the pump manually, set these PIN's to be "Button 1" and "Button 2"
If your Button is normally "high" and goes low when pressed, use "Button_i" instead of "Button" This is optional. -
If you have DS18 "one Wire" temperature sensors use "DS18x20" for the PIN the OneWire data line is connected to
In this example we have only one DS18 on PIN 5 This is optional. -
If you have an ultrasonic distance sensor (SR04) set "SR04 Tri" and "SR04 Ech" to the occording PIN's
In this example the SR04 is connected to PIN 32 and Pin 33. This is recommended because it can prevent pump damage. -
If you want to meassure the voltage of you battery you will have to use a voltage divider consiting of 2 resistors. Use this PIN to meassure the resulting voltage
In this case the system is connected to a 12V battery. So you need e.g. a 3.3k and a 1.1k resistor to bring down the 12V to 3V that the ESP32 can handle
You should now have 5 Buttons.
- Button 1 and 2 will start the pump
- Button 3-5 are irrelevant and will do nothing. The sliders are important
Go to "Consoles->Console"
WebButton1 Pump 1
WebButton2 Pump 2
WebButton3 Sec1
WebButton4 Sec2
WebButton5 Moisture
This needs to be done only once.
Before you upload the scripts make the following changes to the script irrigation.be:
var flora_pump1 = "Flora892404" var flora_pump2 = "Flora892AF8"
This defines which Flora Sensor is used for Pump 1 and which sensor is for Pump 2
Please add only the last 3 Bytes of the MAC Address of the Flora Sensor to "FloraXXXXXX".
You can find the MAC address of a Flora sensor in the Webinterface:
You can change the text of the Webinterface messages by editng the message variables in the script
If you use the SR04 ultrasonic distance sensor in your water container measure the distance from the SR04 to the buttom of the container (minus some safty margin)
Change the value in "Consoles->Console"
mem1 64
mem1 holds the distance where the water container is empty. If distance is larger that that value the pumps will not start to prevent damage to the pumps.