Automatic Irrigation System (Arduino) With Usb Type DC Submersible Water Pump

8,189

186

24

Introduction: Automatic Irrigation System (Arduino) With Usb Type DC Submersible Water Pump

About: sharing to learn 🎞

This mini project is involved to use Arduino to control submersible watre pump when soil reach below or above predefined moisture level.

How it works ❓

1. Soil moisture sensor is reading analog signal which transmit to Arduino.

2. Arduino control submersible water pump ON or OFF. Water pump operates when moisture level reach predefined value. Also, the water pump shall be stopped when reach predefined value.

3. Ultrasonic sensor is used to monitor predefined value of low water level. Warning sound is provided by buzzer when low water level detected. User is required to refill water to water tank manually.

4. The submersible water pump cannot be operated when low water level even if moisture level reach below or above predefined moisture value.

Step 1: Hardware/PCB List

Hardware

-> Arduino UNO x 1 no.

-> 5V soil moisture sensor c/w digital and analog output x 1 no.

-> 5V Ultrasonic sensor (HC-SR04) x 1 no.

-> 5V USB type submersible water pump x 1 no.

-> 5V buzzer x 1 no.

-> bunch of rainbow wire with connector (male - male, male - female)

-> 9V battery x 1 no.

-> 1.2V NiMh AA rechargeable battery x 8 nos. (8 x 1.2V = 9.6V)

-> 5000mAh portable battery charger x 1 no.

-> 280mm (L) x 280mm (W) x 130mm (H) weatherproof type enclosure x 1 no.

PCB

-> 5V voltage regulator circuit x 1 no.

-> USB interfacing circuit x 1 no.

Step 2: Functions of Hardware/PCB

1-> Arduino UNO

It used to keep reading analog signal from soil moisture sensor. In addition, It controls submersible water pump ON/OFF when reach predefined moisture level. Also, it monitors low water level.

2-> 5V soil moisture sensor

This sensor can provide digital signal or analog signal to Arduino.

3-> 5V Ultrasonic sensor

This sensor keep monitoring water level. Signal shall be sent to Arduino when reach predefined value.

4-> 5V USB type submersible water pump

It is controlled by Arduino which can turn ON/OFF submersible water pump automatically.

5-> 5V buzzer x 1 no.

Sound to warn low water level occur.

6-> Bunch of rainbow wire with connector

Interfacing necessary component and circuits

7-> 9V battery

Independent power supply for 5V regulator.

8-> 1.2V NiMh AA rechargeable battery

Independent power supply for Arduino.

9-> 5000mAh portable battery charger

Independent power supply for 5V submersible water pump.

10-> Weatherproof type enclosure

For arrangement all necessary component and provide weatherproof feature.

11-> 5V voltage regulator circuit (PCB)

Power supply of soil moisture sensor is provided by this voltage regulator.

12-> USB interfacing circuit (PCB)

Provide interfacing to 5000mAh portable battery charger, 5V submersible water pump and signal from Arduino.

Step 3: Automatic Irrigation System Control Logic

Firstly, Arduino read signal from ultrasonic sensor to check whether water level greater than 20cm or not. Buzzer will sound for warning low water level in water tank. The submersible water pump is not allow to operate due to programming.

Secondly, Arduino check whether moisture value greater or equal to 700 when low water level smaller than 20cm. If so, Arduino will transmit signal to USB interfacing circuit to turn the submersible water pump ON. Otherwise, it checks moisture valve whether smaller than 500. The USB interfacing circuit receive signal from Arduino to turn the water pump OFF.

According to supplier recommendation, the water pump become malfunction/burn out when it operates without water. Hence, water level monitor is implemented to prevent pump operate even if moisture value reach below or above predefined moisture value.

Step 4: Schematic Diagram of 5V Voltage Regulator Circuit

This 5V voltage regulator circuit is power from 9V battery and output 5V for soil moisture sensor. Necessary component show as below

-> 7805 x 1 no.

-> 2 ports power connector x 2 nos. (1 for INPUT & 1 for OUTPUT)

-> 330nF ceramic capacitor x 1 no.

-> 110nF ceramic capacitor x 1 no.

-> 5mm LED x 1 no. (visual inform user output is available)

-> 470 Ohm resistor x 1 no.

The schematic drawn by EasyEDA. In addition, this program can generate PCB base on schematic. It provides autoroute feature for you. However, you can route the track manually too.

Step 5: Schematic Diagram for USB Interfacing Circuit

This USB interfacing circuit is used for provide connection for USB and 2 ports power connectors. Necessary component show as below

-> TIP120 transistor x 1 no.

-> 2 ports power connector x 1 no.

-> 10k resistor x 1 no.

-> 5mm LED x 1 no. (visual inform user signal is ON or OFF status)

-> 1N4007 diode x 1 no.

-> 90 degree USB type A x 1 no.

-> 90 degree USB type B x 1 no.

5000mAh portable battery charger connect to USB type B. 5V DC submersible water pump connect to USB Type A . 2 ports power connector connect to Arduino PIN to check signal from Arduino. Arduino generate HIGH signal if dry soil detected. On the contrary, LOW signal shall be generated if moisture reach predefined valve. Transistor shall act as ON/OFF switch of this circuit. HIGH signal turn the water pump ON but the water pump will be stopped when LOW signal from Arduino.

As i mentioned above schematic, this schematic is drawn by EasyEDA too.

Step 6: Wiring Diagram

This wiring diagram shows connection for this automatic irrigation system. Power supplies are provided independently because Arduino 5V output supply provide insufficient power to operate ultrasonic sensor and soil moisture sensor at the same time. On the other hand, the water pump is connected to separate power supply too. Referring to nameplate of water pump, 1.5W power consumption is required for this water pump.

P=I x V

1.5W = I x 5V

I = 0.3A or 300mA

According to Arduino specification, maximum dc current per I/O pin is 40mA. Hence, it is good to use external power supply rather than Arduino 5V output for supplying voltage to equipment such as fan, water pump and so on.

Step 7: Programming and Upload to Arduino

Arduino IDE 1.8.13 is used for programming. You can download this IDE from Arduino webpage. C language is adopted to program Arduino board. Program can be complied once program is ready. Please be informed that program cannot be uploaded if any errors found during comply. Once errors are clear, you can upload program to Arduino.👍

Step 8: Conclusion

The system is working properly during testing and commissioning. I satisfied with the result because it worked as intended. However, i was wondering to apply ac or DC for power supply. DC power supply chosen finally because most of my AC socket outlets are occupied by other electrical appliances. On the other hand, i do not want water near AC socket outlet. Hence, rechargeable battery is adopted for this system. In addition, the system become mobility due to battery type power supplies are used.

Finally, please feel free to leave a comment if you have any inquires and suggestions.

Thank you

Be the First to Share

    Recommendations

    • Microcontroller Contest

      Microcontroller Contest
    • Automation Contest

      Automation Contest
    • Make it Glow Contest

      Make it Glow Contest

    24 Comments

    0
    jhussain7262
    jhussain7262

    8 days ago

    Good project.

    I think your equation for p=ixv is not right. 5w/5v will give 1A, 0.3A.

    0
    hoe4
    hoe4

    Reply 4 days ago

    Thank you for comment. There is a typo. The water pump is 1.5W. Let me edit the post.

    0
    jhussain7262
    jhussain7262

    Reply 8 days ago

    I mean not 0.3A. It should be 1A.

    0
    ambro666
    ambro666

    Question 5 weeks ago on Step 8

    Where did you get the pump? maybe post a list of suppliers for the components used?

    0
    hoe4
    hoe4

    Answer 4 weeks ago

    In addition to Arduino, all component purchased from China. Suppliers show as below for reference.

    Arduino

    https://www.arduino.cc/

    5V USB submersible water pump

    https://item.taobao.com/item.htm?spm=a1z09.2.0.0.3...

    Soil moisture sensor

    https://item.taobao.com/item.htm?spm=a1z09.2.0.0.3...

    electronic component (resistor, diode, LED, power connector, 7805 IC, buzzer, capacitor, rainbow cable, ultrasonic sensor)

    https://dzyj.world.taobao.com/shop/view_shop.htm?s...

    Transistor TIP120, USB connector (Type A)

    https://yishengdz888.world.taobao.com/shop/view_sh...

    USB connector (Type B)

    https://detail.tmall.com/item.htm?id=618057011157&...

    i hope above links will help




    0
    ambro666
    ambro666

    Reply 4 weeks ago

    Thank you I have been looking for a system and a small pump to make a system for my indoor plants.

    0
    hoe4
    hoe4

    Reply 4 weeks ago

    i hope this will help

    0
    cuixiaoqquan
    cuixiaoqquan

    Question 4 weeks ago

    加个微信咋样哈哈哈

    0
    hoe4
    hoe4

    Answer 4 weeks ago

    I do not have wechat 😅. I will create an account later.

    0
    GrigoriyP
    GrigoriyP

    5 weeks ago

    Good project and well documented. The complexity grows when it comes to irrigate dozen of flowers and each or group of flowers are different in sizes and water demand. The only solution (cheap and simple) I used was separate pump lines (4-5 flowers per tube) with adjustable drips. But that was a headache to setup each dripper. ))
    You also may use ESP8266/ESP32 + Blynk to see the graphs and manually control the pump.

    0
    hoe4
    hoe4

    Reply 4 weeks ago

    Thank you. i might take ages to build a similar system 😓. I agreed that ESP8266/ESP32 is very powerful board to build different projects.

    0
    dlf.myyta
    dlf.myyta

    5 weeks ago

    How did you decide on the motor on/off values to use for the "soil is too dry, water now" threshold?

    0
    hoe4
    hoe4

    Reply 4 weeks ago

    Thank you for your comment. Actually, i tested the sensor and record on a table but i did not upload to this community due to busy on work. You can notice that there are few little holes on the moisture sensor. i designated from 1 to 7 and read it from bottom to top

    | | |
    ---------------------------
    7 | o | | o |
    6 | o | | o |
    5 | o | | o |
    4 | o | | o |
    3 | o | | o |
    2 | o | | o |
    1 | o | | o |

    A0 = Arduino pin A0 which set as INPUT

    When moisture sensor in air
    analog reading from A0 is around 1023

    moisture reach 1 at above diagram
    A0 reading around 774 - 785

    moisture reach 1, 2 at above diagram
    A0 reading around 752-767

    moisture reach 1,2 and 3 at above diagram
    A0 reading around 658-661

    moisture reach 1,2,3 and 4 at above diagram
    A0 reading around 630-640

    moisture reach 1,2,3,4 and 5 at above diagram
    A0 reading around 586-592

    moisture reach 1,2,3,4,5 and 6 at above diagram
    A0 reading around 510-537

    moisture reach 1,2,3,4,5,6 and 7 at above diagram
    A0 reading around 480-494

    According to about data, you can set the predefined valve base on your preference to control the water pump on and off. I hope my explanation can clarify inquiry. 👍

    0
    dlf.myyta
    dlf.myyta

    Reply 4 weeks ago

    Got it. Thanks for the extra explanation. You've motivated me to go put together something like this for a plant I have that never gets properly watered...

    0
    hoe4
    hoe4

    Reply 4 weeks ago

    You welcome. You could give it a try 💪🏼

    0
    WFD2
    WFD2

    Question 5 weeks ago on Step 1

    What is the make, model number and supplier of the 5V USB submersible water pump ?
    That information (and prices) is not included in your list of components.

    0
    MarkB587
    MarkB587

    5 weeks ago on Step 8

    Clever and very useful. Perhaps for version 2 you could make it more compact, cleaner and more robust with bundled wires.

    0
    hoe4
    hoe4

    Reply 4 weeks ago

    Thank you for your comment. i would try to make one

    0
    Skibek
    Skibek

    5 weeks ago

    This soil moisture sensor will corrode in 2 weeks.
    Use a capacitive soil moisture sensor.