Introduction
The majority of individuals are too sluggish in the summer to regularly water the potted plants in their rooftop gardens. This section explains how to construct a quick and easy automated plant watering system that takes just a few hours. It is an autonomous plant watering system powered by Arduino that measures soil moisture.
displays the prototype
created by the author.
Automatic plant watering system circuit and working.
Fig. 2 depicts the circuit diagram of the
automated plant watering system. The circuit consists of a 12V water pump, a
servo motor, an Arduino UNO board, a soil moisture sensor, and an L293D (IC1)
motor driver IC.
An Arduino board may be powered by a 7V to 12V wall
wart, plug-in converter, or solar panel. The pump motor requires its own 12V
battery, power source, or solar panel.
Soil moisture sensor
There are two different kinds of soil moisture
sensors on the market: contact sensors and non-contact sensors. In order to
detect the electrical conductivity, a contact soil sensor (as seen in Fig. 3)
is employed in this study.
An analogue output from the moisture sensor may be
readily interfaced with Arduino. Two sensors can be attached to the Arduino
board's analogue pins A0 and A1 in this project. Each sensor has four pins
accessible for connecting to the Arduino board: Vcc, Gnd, Ao, and Do. Digital
output pin (Do) isn't utilised in this case. The Arduino board is attached to
digital pins 3 and 9, respectively, to operate the water pump and servo motor.In
other words, pin 9 on the Arduino board is linked to the servo motor signal
control pin.
The program in Arduino reads the humidity value
from the sensor every 20 seconds. If the value reaches the threshold value, the
program does the following three things:
1- This servo drives the motor horn with the water
pipe mounted on it to the potted plant whose moisture level is below the
predetermined/threshold level.
2- It starts the motor pump to supply water to the
plant for a certain period and then turns off the water pump (see Figure 4).
3- This servo drives the motor horn back to its
initial position.
Software program
The programme is written in the Arduino
programming language. The code is clearly written and well commented. Compile
the Autowatering. ino code and upload it to the microcontroller using the
Arduino IDE version 1.
The sensor will automatically calibrate once it is
placed in the soil, and the threshold value will be shown on the serial monitor
in the Arduino. Serial debugging is available in this program. Comment if you
don't want to use a serial monitor.
Construction and testing
An actual-size, single-sided PCB layout of an
automated plant watering system is shown in Figure 5, and its component layout
is shown in Figure 6.
Fig. 6: Component layout of the PCB |
Assemble components on a PCB to minimise errors.
Alternatively, you can assemble them on a breadboard, an Arduino prototyping
shield, or a general-purpose PCB. Upload the code to the Arduino UNO board and
install the sensor in the soil of the plants. Do not submerge the sensor
completely into the soil.
Install the pump in a water container (see picture
7) that can hold a few litres of water. Attach the water pipe to the servo
motor horn as shown in picture 8.
Before turning on the circuit, you need to take
into account the following macro definitions in the code:
1️⃣Changing the angle of rotation of the servo horn
towards the first pot and the second pot. The default values are
70 degrees and 145 degrees.
2️⃣Changing the watering schedule based on the
pot's size. Five and eight seconds are the default settings.
3️⃣Modify the threshold value to suit your needs.
The 600 value is the default.
Place the flower pots where the pipe from the
servo motor horn can easily reach them. When the humidity level drops below
600, the servo horn rotates at a 70 degree angle. That is, after the servo
motor horn moves 70 degrees towards the first pot, the motor pump will be on
for five seconds and then automatically shut off. Then, the servo returns to its
original position. Similarly, if you are using the second sensor, the servo
motor horn will be driven to 145 degrees in the second largest pot, the motor
pump will be on for eight seconds and then automatically shut off. The servo
returns to its original position.
Further application
Using the Arduino UNO board, you can water up to
six different potted plants. By adding a few more lines to the code, you can
water even more plants by using the Arduino Mega 2560 board, which has more
analogue input pins.
You can also add an Ethernet or Wi-Fi shield and
use the Twitter library, which will tweet on behalf of your plants to send
messages like: "I need water," "tank is empty,"
"refill tank," "water," and so on.
A 16x2 LCD can be added to indicate the humidity
level.
You can also enable the circuit to refill the tank
after a few days, depending on the volume of the tank.
0 Comments
If you have any doubts or questions, then comment (don’t any spam).