An arduino based automatic irrigation solution for gardens and farms.
The irrigator system builds on top of the monitor system. To build the irrigator, first follow the instructions for setting up the monitor.
After following those instructions the soil moisture sensor will be installed and should look like this...
Connect the USB cable between the device and the garden computer.
Choose between creating a device (including network functionality) or simply uploading the sketch on its own. You don't need to run both because the "create" script takes care of uploading.
If you want to use the Linear MQTT user interface then you need to create the device on the host computer.
This automated setup script does the following:
Arduino Nano
Use the following commands for an arduino nano compatible microcontroller.
Syntax:
sh create-garden-irrigator-nano.sh [DeviceLabel] [DeviceName] [Port]
Notes:
Example:
sh create-garden-irrigator-nano.sh "Irrigator1" irrigator1 ttyUSB0
The output should look similar to this:
Arduino Uno
Use the following command for an arduino uno compatible microcontroller.
Syntax:
sh create-garden-irrigator-uno.sh [DeviceLabel] [DeviceName] [Port]
Notes:
Example:
sh create-garden-irrigator-uno.sh "Irrigator1" irrigator1 ttyUSB0
The output should look similar to this:
Notes:
Arduino Nano
Use the following command for an arduino nano compatible microcontroller.
Syntax:
sh upload-irrigator-nano-sketch.sh [Port]
Notes:
Example:
sh upload-irrigator-nano-sketch.sh ttyUSB0
The output should look similar to this:
Arduino Uno
Use the following command for an arduino uno compatible microcontroller.
Syntax:
sh upload-irrigator-uno-sketch.sh [Port]
Notes:
Example:
sh upload-irrigator-uno-sketch.sh ttyUSB0
The output should look similar to this:
Once you see data being written to the screen the device is running, and should now respond to commands.
Press CTRL+C to exit back to the terminal prompt.
Disconnect the USB cable so the power is off before continuing with assembly.
The MOSFET module allows high power devices such as the pump to be switched on and off using a microcontroller.
Connect 3 wires to the MOSFET module:
Connect the 3 wires to the arduino nano development board:
The MOSFET module and arduino nano expansion board should now be connected like this:
Connect the USB cable to the device so it powers on.
The LED on the MOSFET module should now be flashing on and off:
If the LED is flashing at on and off then it appears the MOSFET module is wired up correctly.
Disconnect the USB cable to power off the device before continuing.
Connect a female DC jack to the MOSFET module input terminal:
Connect two short wires to the MOSFET output terminal:
Connect the MOSFET module output terminal to the voltage step down (buck) input terminal:
Connect the male ends of a DC jack splitter cable to both the arduino nano expansion board and the MOSFET module input:
Connect a 12v power supply to the power splitter.
The arduino will turn on then the MOSFET module and the voltage step down (buck) regulator should now both flash on and off:
Use a screwdriver to adjust the potentiometer on the voltage step down (buck) regulator if necessary.
Notes:
For many small pumps 3v is a good starting point.
Disconnect the 12v power supply before continuing.
Various pumps or valves can be attached to this system but in this example a small peristaltic pump will be installed.
Connect a male DC jack to the output terminal of the voltage step down (buck) regulator:
Connect the output jack of the voltage step down (buck) regulator to the input jack of the pump:
Connect the 12v power supply to the project.
The device will turn on, then you should hear the pump buzzing on and off.
If the pump is switching on and off then the device appears to be working correctly.
Notes:
Connect the 12v power supply to the device.
Connect the device to the host computer using a USB cable.
Note: This step is optional. It's only required if you want to view the serial data coming from the device.
View the device output:
pio device monitor
Submerge the soil moisture sensor into water, damp soil, or equivalent:
The sensor readings should change and be similar to this:
Notice the R (raw) value decreases and the C (calibrated) value increases. This means it's detecting the water.
The pump should switch off and stay off because it senses the water.
If the pump:
...then it appears the irrigator system is working.
Test again by removing the soil moisture sensor to ensure the pump comes back on after a few seconds.
The soil moisture sensor readings can be tested to ensure that it's working correctly.
The soil moisture sensor power can be tested to ensure that it's working correctly.
The pump output can be tested to ensure that it's working correctly.
The simplest way to calibrate the irrigator is to set up networking and then use a mobile device.