Introduction: IoT Automatic Plant Watering System

Picture of  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.

Step 1: Materials and Tools

Picture of Materials and Tools

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.

Step 2: Prepare Your Smartphone and Computer

Picture of Prepare Your Smartphone and Computer

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!!!

Step 3: Create IoT Automatic Plant Watering System App

Picture of Create IoT Automatic Plant Watering System App
  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.

Step 4: Make Watering Tube

Picture of Make Watering Tube
  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.

Step 5: Prepare Linear Slide Part

Picture of Prepare Linear Slide Part

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!!!

Step 6: Assembly Frame

Picture of Assembly Frame
  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.

Step 7: Assembly 3D Printed Parts

Picture of Assembly 3D Printed Parts
  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.

Step 8: Add the Belt

Picture of Add the Belt

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.

Step 9: Insert Rubber Tube

Picture of Insert Rubber Tube

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

Step 10: Limit Switch

Picture of Limit Switch
  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.

Step 11: Extend Motor Wires

Picture of Extend Motor Wires

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.

Step 12: Solder Wires to Pump Motor

Picture of Solder Wires to Pump Motor

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.

Step 13: Group Electronic Modules

Picture of Group Electronic Modules
  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.

Step 14: Wiring

Picture of Wiring

Details in pictures

Notes: Don't forget 10K ohm resister.

Step 15: Install Limit Switch

Picture of Install Limit Switch

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

Step 16: Neaten

Picture of Neaten
  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.

Step 17: Make Circuit Enclosure

Picture of Make Circuit Enclosure

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.

Step 18: Set Up Water Pump

Picture of Set Up Water Pump
  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.

Step 19: Done ... But Not Finished

Picture of Done ... But Not Finished

Close the enclosure and arrange and neaten wires.

Step 20: Set and Upload Your Sketch

Picture of Set and Upload Your Sketch

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!!!

Step 21: Prepare Your Machine

Picture of Prepare Your Machine
  1. Place your machine where you want.
  2. Place your plant.
  3. Fill the water tank.
  4. Plug in the machine.

Step 22: Prepare Your App

Picture of Prepare Your App
  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.

Step 23: One More Thing ...

Picture of One More Thing ...
  • 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.


Comments

EyubR (author)2017-10-06

hi i want to construct your project as a graduation project but i want to include moisture (soil ) and temperature sensor and make the watering according to these sensors can you help me and also i saw that there is know arduino in your model so to add the soil sensor and to make the system watering using it do i have to use arduino or not is the nodemcu work as arduino thanks

Orion Maker (author)EyubR2017-10-08

Yes! you can add sensor as you wish but you need to modify my program.

If you want to connect your project to internet, I suggest you use nodemcu, but if not, you can use Arduino instead.

If you have any questions, feel free to contact me : )

EyubR (author)Orion Maker2017-10-15

well thanks , i want to add a moisture sensor and show the moisture level on the blynk app m so should i design your same app or it should be a whole different thing , and about the coding should i modify , i am new to coding so any usefull thinks that you can help me modify the codes , thanks

if its possible write me your email or your facebook account so i can ask you thanks alot

Orion Maker (author)EyubR2017-11-05

You can add moisture level on Blynk App by adding Value Display or

Labeled Value. But I suggest Value Display because it consumes only 200

energy that limit how many buttons and displays you can

have. For my program, there are just 400 energy left. You can find more

imformation about how to use it in Blynk website

(http://docs.blynk.cc/) I think it is quite a nice manual. Since you said

you are new to coding, I suggest you see another simple moisture level for learing projects to learn how to write code for moisture sensor, then try to create Blynk app just to show moisture level, and

combine your program and mine togather.

PS. Sorry for very delay reply.

If you have any questions, feel free to contact me : )

TrungT43 (author)2017-10-08

how can i add moisture sensor in ur project??? it 's good btw ;)

Orion Maker (author)TrungT432017-10-08

Yes, you can. But you have to modify my preogram.

If you have any questions, feel free to contact me : )

TrungT43 (author)Orion Maker2017-10-09

thank you ...

i need the true size of 3D printing parts... do u have it?? it's really meaning to me <3

Orion Maker (author)TrungT432017-10-10

For 3D printing parts, you can use this website https://www.3dhubs.com/ to find and print your parts in local 3d printing services. And for modifying program, I'm not sure. It depends on what you want to do with moisture sensor. Do you want your machine to be IoT with moisture sensor or just watering depending on moisture sensor?

TrungT43 (author)Orion Maker2017-10-11

i want to upgrade more :) auto watering if the moisture is low?? can it be possible? <3

Orion Maker (author)TrungT432017-10-13

Sure!!! Original program will watering in two conditions, by timer or pressing instant watering button. So you just add another condition that depends on data from moisture sensor.

Henri.Lacoste (author)2017-10-10

This is brilliant, what a great design. I would really love to have a go at building this. Nice work!

Thank you. I'm glad to hear that. If you make this one, don't forget to share it. : )

TrungT43 (author)2017-10-09

if i add moisture sensor.. will it be change much?? <3 want to hearing form you Orion Maker

JeffM15 (author)2017-09-13

Nice.

Orion Maker (author)JeffM152017-10-08

Thanks : )

msameer39 (author)2017-07-14

Awesome Project and congratulations for winning the contest.

Orion Maker (author)msameer392017-07-18

Thank you : ) Your project is awesome too.

Rashmitha Yadav (author)2017-07-12

Hai Orion,great project but I'm messed up with the connections of the components. If u don't mind could u send me the detailed connection sketch please

Hi, I have only drawing connection sketch that I uploaded in step14. But now I add more tags in step 14. I hope that will help you. But if you still have connection problems, feel free to contact me : )

Tnqs a lot....

jrbums (author)2017-07-03

Really nice instructable. The rail and motor designs with PVC are useful for other projects too, so thanks for uploading STL files!

Orion Maker (author)jrbums2017-07-12

Thank you. I'm glad to hear that. I hope my rail and motor design will be parts of your wonderful projects : )

Lettuceismygame (author)2017-07-02

Hi Orion, I get this error on upload

" 'stopmotor' was not declared in this scope "

Hi, I had tried to check and re-upload my program, but didn't get any error. So I'm not sure what happens to your program. I use Arduino IDE 1.8.3 to upload the program. Different version might cause this problem. Thus if you didn't use the same version as mine, give 1.8.3 Version a try. Or you can replace all stopMotor -a function for stop stepper motor- with

digitalWrite(step1, LOW);

digitalWrite(step2, LOW);

digitalWrite(step3, LOW);

digitalWrite(step4, LOW);

instead.

If you have other problems or still have this problem, feel free to contact me : )

PS. If your machine is done don't forget to show me : )

Hi, I downloaded the IDE 1.8.3, changed the upload speed to 921600 and it now works great. I can now move forward with this build.

Congratulation!!! : )

JohnsonY2 (author)2017-06-30

Looks very good, really want to try it out :)

Orion Maker (author)JohnsonY22017-07-01

Thank you. If you make this one, don't forget to share it. : )

Absolutelyautomation (author)2017-06-20

Very clever sliding mechanism!

Thank you. I'm glad to hear that : )

About This Instructable

10,207views

163favorites

License:

Bio: Beginner maker who loves stargazing.
More by Orion Maker:Portable Ventilation Fan From Its Box!!!My Dad & I MacGyverEmergency Solar Eclipse Viewer
Add instructable to: