IoT Automatic Plant Watering System

by Orion Maker in Circuits > Wireless

68541 Views, 278 Favorites, 0 Comments

IoT Automatic Plant Watering System

IOT no  Logo-03997.jpg
Intro || IoT Automatic Plant Watering System

Greetings, everyone. Now I am back with new project!!!

This project inspiration came from my guinea pigs. Since I am too lazy to water their beloved wheat grass every day, I decided to make IoT automatic plant watering system which can be controlled through smartphone.

For those who are tired of watering their plants by themselves, congratulations!!!

I recommend this project for people who have just started learning about Internet of Things.

Materials and Tools

IOT Logo-03263.jpg
IOT Logo-03261.jpg
IOT Logo-03265.jpg
IOT Logo-03302.jpg
IOT Logo-03305.jpg
IOT Logo-03928.jpg
DIY JACK.jpg
IOT Logo-03930.jpg
IOT Logo-03301.jpg
IOT Logo-03275.jpg
IOT Logo-03946.jpg

Materials

  1. 8x 3-Way Corner Elbow PVC Fitting Connector (for 1/2")
  2. 4x 245 mm long of 1/2" PVC pipes
  3. 4x 163 mm long of 1/2" PVC pipes
  4. 4x 320 mm long of 1/2" PVC pipes
  5. 1x 200 mm long of 3/8" PVC pipes
  6. 3D Printing parts
  7. GT2 6mm wide belt approximate 1 meter
  8. 1x GT2 20T pulley
  9. 1x GT2 Idler pulley bore 5 mm
  10. 1x M5 x 30mm screw with nut and 2 washers
  11. M3 x 10mm screws
  12. Nylon cable tie
  13. 1x 28BYJ - 48 12V stepper motor
  14. 1x ULN2003 stepper motor driver board
  15. 1x Priming Diaphragm Pump Spray Motor 12V
  16. 1x L298N Dual H Bridge motor driver board
  17. 1x LM2596 step down power module
  18. 1x NodeMCU
  19. 1x 10K ohm resistor
  20. 1x MX1382-02 micro switch
  21. 2x Breadboard 170 holes
  22. Electrical wire
  23. Dupont wire
  24. Heat shrink tubing
  25. 1x DC Jack 5.5x2.1mm DC power female jack connector (I didn't use this part. I use my DIY jack connector)
  26. 12V power adapter
  27. 5/16" Silicone rubber tube approximate 2 meter
  28. 2x 60mm x 60mm 3mm thick acrylic sheets
  29. 1x 80mm x 140mm Coroplast sheet

Tools

Basic tools such as screwdrivers, pliers, utility knife, etc. Soldering tools

This project use 3 kind of glues, hot glue, epoxy glue, and epoxy putty.

Prepare Your Smartphone and Computer

IOT Logo-.jpg
IOT Logo--2.jpg
IOT Logo--3.jpg

This is the basic setting up before you can use NodeMCU and Blynk App.

  1. Install Arduino IDE. You can download it from Arduino website
  2. Install Arduino core for ESP8266 WiFi chip. For more information and download, see this GitHub
  3. Install Blynk library for Arduino IDE and download Blynk App for your smartphone. You can find all information on Blynk website

Now, you can enjoy NodeMUC and Blynk!!!

Create IoT Automatic Plant Watering System App

IOT Logo-232710.jpg
IOT Logo-232750.jpg
IOT Logo-043126.jpg
IOT Logo-233030.jpg
IOT Logo-233039.jpg
IOT Logo-233104.jpg
IOT Logo-233117.jpg
IOT Logo-233131.jpg
IOT Logo-233139.jpg
IOT Logo-233150.jpg
IOT Logo-233158.jpg
IOT Logo-233207.jpg
IOT Logo-233218.jpg
IOT Logo-233228.jpg
  1. Open Blynk App and create a Blynk account if you haven't got one.
  2. Create new project and give it a name ("IoT Plant Watering" for me) then select the hardware to NodeMCU.
  3. Press the "Create" button then you will get Auth Token send to your E-mail. This Auth Token will be use in NodeMCU code.
  4. Add widgets to your project and set up them all (See more details in pictures.)

Now you have an App for controlling your Automatic Plant Watering System!!!

Notes: For more details and information you can check it on Blynk Docs Page. There are really good instructions.

Make Watering Tube

IOT Logo-03267.jpg
IOT Logo-03268.jpg
IOT Logo-03269.jpg
IOT Logo-03271.jpg
IOT Logo-03272.jpg
IOT Logo-03273.jpg
IOT Logo-03276.jpg
IOT Logo-03277.jpg
  1. Drill 1 mm holes, 20 mm apart from others in 3/8" 200 mm long pipe leaving 40 mm at each end; these holes are water vent.
  2. Drill a 5/16" hole in the middle on the other side of the pipe; the water from the rubber band will pass this hole.
  3. Seal two ends of the pipe with epoxy putty.

Prepare Linear Slide Part

IOT Logo-03265.jpg
IOT Logo-03278.jpg
IOT Logo-03281.jpg
IOT Logo-03282.jpg
IOT Logo-03283.jpg

Attach the tube to the 3D printed linear slide part with epoxy glue. (see how to attach them together in the pictures)

Other side will be attached in next step.

NOTES: ONLY ONE SIDE!!!

Assembly Frame

IOT Logo-03285.jpg
IOT Logo-03286.jpg
IOT Logo-03287.jpg
IOT Logo-03288.jpg
IOT Logo-03289.jpg
IOT Logo-03290.jpg
IOT Logo-03291.jpg
IOT Logo-03296.jpg
IOT Logo-03293.jpg
IOT Logo-03298.jpg
IOT Logo-03292.jpg
IOT Logo-03292 edit.jpg
IOT Logo-03280.jpg
IOT Logo-03299.jpg
IOT Logo-03300.jpg
  1. Make the base: Attach two 163 mm long tubes and two 320 mm long tubes to four 3-way corner elbows, putting 10 mm of the end of each tube into the 3-way corner elbow. (more details in the pictures)
  2. Make the top part: Attach one 163 mm long and two 320 long tubes to two 3-way corner elbows. (more details in the pictures)
  3. Insert the linear slide part:
    1. Attach the other end of the watering tube to the 3D printed linear slide part WITHOUT GLUE!!!
    2. Insert it into the top part
  4. Finish the top part:
    1. Attach two 3-way corner elbows to one 163 mm long tube.
    2. Attach it to the top part.
  5. Adjust the linear slide part:
    1. Move the linear slide part.
    2. Adjust the frame until the linear slide part moves smoothly.
  6. Secure every joint with hot glue.
  7. Attach the acrylic plates: Attach the acrylic plates to two corners of the top part - the side with the glued linear slide part - with hot glue then secure them with epoxy glue.

Assembly 3D Printed Parts

IOT Logo-03302.jpg
IOT Logo-03306.jpg
IOT Logo-03308.jpg
IOT Logo-03310.jpg
IOT Logo-03307.jpg
IOT Logo-03311.jpg
IOT Logo-03312.jpg
IOT Logo-03303.jpg
IOT Logo-03304.jpg
IOT Logo-03902.jpg
IOT Logo-03906.jpg
IOT Logo-03911.jpg
IOT Logo-03912.jpg
IOT Logo-03916.jpg
  1. Assembly the GT2 Idler pulley bore holder part: Assembly the GT2 Idler pulley bore holder with GT2 Idler pulley bore 5 mm, GT2 20T pulley, 1x M5 screw, nut, and 2 washers.
  2. Assembly the stepper motor holder part: Attach the stepper motor with GT2 20T pulley, then insert it into the stepper motor holder and secure it with M3 screws.
  3. Attach the belt holder part onto the 3D linear slide part: Attach the belt holder part onto the 3D linear slide part (the glued one) and secure it with epoxy glue.
  4. Attach the GT2 idler pulley bore 5 mm holder to the right platform: Use the belt to make the GT2 idler pulley bore 5 mm holder be in the same line as the belt holder on the right platform, then secure it with hot glue.
  5. Attach the stepper motor holder to the left platform: Use the belt to make the motor holder be in the same line as the belt holder on the left platform, then secure it with hot glue.

See pictures for more details.

Add the Belt

IOT Logo-03917.jpg
IOT Logo-03918.jpg
IOT Logo-03919.jpg
IOT Logo-03920.jpg
IOT Logo-03921.jpg
IOT Logo-03922.jpg
IOT Logo-03923.jpg
IOT Logo-03926.jpg

Add the belt: Put one side of the belt through the motor and the other side through the pulley. Secure each end on the belt holder with nylon cable ties.

Insert Rubber Tube

IOT Logo-03927.jpg

Insert rubber tube into watering tube, then secure it with epoxy putty.

Limit Switch

IOT Logo-03942.jpg
IOT Logo-03941.jpg
IOT Logo-03948.jpg
  1. Cut Dupont wire M-M in the middle.
  2. Solder each wire end with one wire.
  3. Solder one wire end with COM pin and the other with NO pin.

Extend Motor Wires

IOT Logo-03944.jpg
IOT Logo-03947.jpg

Since the original motor every wire is not long enough, I decide to add more 60cm extra wire to each wire. In order to do that, you need to cut the original wires in the middle and add extra wires, then solder them together and finish the job with heat string tubings.

Solder Wires to Pump Motor

IOT Logo-03949.jpg
IOT Logo-03950.jpg
IOT Logo-03951.jpg
IOT Logo-03952.jpg

Solder two 45 cm long wires to the pump motor.

I used the red wire for the positive anode and the black one for the negative anode.

Group Electronic Modules

IOT Logo-03931.jpg
IOT Logo-03932.jpg
IOT Logo-03933.jpg
IOT Logo-03934.jpg
  1. Cut 80mm x 140mm Coroplast sheet.
  2. My NodeCMU is too big to attach to one breadboard. So, I attach it to two small breadboard instead.
  3. Attach all modules (breadboards with NodeCMU, ULN2003 module, L298N module, and LM2596 module) to coroplast sheet.

Wiring

IOT Logo--4.jpg
PINOUT-NodeMCU_1.0-V2-y-V3.png
IOT Logo-03936.jpg
IOT Logo-03938.jpg
IOT Logo-03953.jpg
IOT Logo-03954.jpg
IOT Logo-03955.jpg
IOT Logo-03956.jpg
IOT Logo-03958.jpg
IOT Logo-03959.jpg
IOT Logo-03961.jpg
IOT Logo-03960.jpg
IOT Logo-03933 edit.jpg

Details in pictures

Notes: Don't forget 10K ohm resister.

Install Limit Switch

IOT Logo-03962.jpg
IOT Logo-03963.jpg
IOT Logo-03964.jpg

Attach the limit switch under the motor platform with hot glue. Before sticking it, make sure that the moving part hits the limit switch before the motor platform

Neaten

IOT Logo-03965.jpg
IOT Logo-03966.jpg
IOT Logo-03967.jpg
IOT Logo-03968.jpg
IOT Logo-03970.jpg
IOT Logo-03969.jpg
IOT Logo-03971.jpg
  1. Use nylon cable ties to tie wires with the frame. (See how to arrange each wire in pictures)
  2. Make sure that the rubber tube is long enough to move to further end, then use nylon cable ties to tie it with the frame.

TIPS: You can use the nylon cable ties to neaten wires.

Make Circuit Enclosure

IOT Logo-03975.jpg
IOT Logo-03978.jpg
IOT Logo-03980.jpg

I used my lunch (yakisoba) container for the enclosure lol

You can choose your enclosure as you want.

Make holes for I/O ports and put the circuit board in the enclosure.

Set Up Water Pump

IOT Logo-03981.jpg
IOT Logo-03982.jpg
IOT Logo-03983.jpg
IOT Logo-03984.jpg
  1. Make holes on the cover of the enclosure to attach the motor on it by nylon cable ties.
  2. Insert 2 rubber tubes to the motor. One for the water to get in, and the other for the water to go to the watering tube.

Done ... But Not Finished

IOT Logo-03985.jpg
IOT Logo-03986.jpg
IOT Logo-03987.jpg
IOT Logo-03988.jpg
IOT Logo-03989.jpg

Close the enclosure and arrange and neaten wires.

Set and Upload Your Sketch

Edit sketch.png
IOT Logo--5.jpg

Before you can upload your sketch to a NodeMCU, you have to set your own parameters.

  1. Open "IoT_Watering_System.ino" using Arduino IDE or another Text Editor. I suggest ATOM. It is a nice text editor for programming and it's Free!!! If you want to write your own sketch, you will love this program.
  2. Enter your Auth Token that you get when you create your IoT Plant Watering project in Blynk App.
  3. Enter a network name that you want to connect and its password.
  4. Save it.
  5. Connect your NodeMCU using the USB cable.
  6. Open your sketch that you have already edited using Arduino IDE.
  7. Select board and port in Tools menu (more setting details in picture)
  8. Click the Upload button.

Now your IoT Automatic Plant Watering Sysem is ready to work!!!

Prepare Your Machine

IOT  Logo-03990.jpg
IOT  Logo-03991.jpg
IOT  Logo-03994.jpg
IOT  Logo-03996.jpg
IOT  Logo-03998.jpg
  1. Place your machine where you want.
  2. Place your plant.
  3. Fill the water tank.
  4. Plug in the machine.

Prepare Your App

IOT Logo-233030.jpg
IOT Logo-001929.jpg
IOT Logo-001937.jpg
  1. Press the play button to run program.
  2. Press the on timer button. Move the pump power and distance button in order to activate them.
  3. Adjust the pump power and distance until you are satisfied.
  4. Enjoy your more free time you have from not having to water your plant by yourself anymore.

NOTES:

  • You need to redo the second process every time that you restart the program.
  • The first time you set up the machine, you need to press "Test" button with 0 cm distance to move the watering tube to the starting point.

One More Thing ...

IOT  Logo-04002.jpg
  • Thank you to my sister who helped me writing these instructions in English.
  • Thank you in advance, to everyone who shares important information about this project to help improve it.
  • Thank you for visitting.

If you like this project, please vote me : ) and follow my Youtube channel.