ESP8266 Farm Automation Project


ESP8266 Farm Automation Projects was a little twist that was highly inspired from ESP8266 home Automation Projects!

Hello creators in this article I will show you some of the best iot projects which you shouldn’t miss because you can try this at home

This is one of unique project which was never done by anyone before, so without wasting any time let’s Hop into build process of this automation project


 In 2021, the estimated total population in India amounted to approximately 1.38 billion people. India currently has the second-largest population in the world  and the population rate is increasing day-by-day; then after 30–50 years there will be a serious problem for food’s , so the development of agriculture is necessary.

Today, not only in India, most of the farmers all over the world are facing lack of rain and shortage of water. The main objective of the project is to provide an automated irrigation system and check the quantity of three major macronutrients, nitrogen (N), phosphorus (P), and potassium (K) in the soil, which will save time, money.

The plants often get neglected at holiday time and so this watering and fertilizing system was made and installed so that the plants were irritated all the time. 

Organic vs. Synthetic

Do plants really care where they get their nutrients?

Yes, because organic and synthetic fertilizers provide nutrients in different ways

In general, the nutrients in organic fertilizers are not water-soluble and are released to the plants slowly over a period’s of months or years.

the main this is organic fertilizers are best applied in the fall so the nutrients will be available in the spring.

Three Additional Nutrients That Matter

Plants also need these three nutrients, but in much smaller amounts

Nitrogen :- Nitrogen helps plants make the proteins they need to produce new tissues.

Phosphorus :- Phosphorus stimulates root growth, helps the plant set buds and flowers, improves vitality and increases seed size.

Potassium :-  Potassium  is improves overall vigor of the plant. It helps the plants make carbohydrates and provides disease resistance. It also helps regulate metabolic activities.

ESP8266 Farm Fertilizer Automation Projects requirements

Basic supplies

Three leak proof plastic containers as the mixing tank, aluminum wont work for this project

so better prefer to use PET

 I will use wood board which act as support for entire project Plexiglas is difficult to work with!

 To make stand support I will be piercing 3 support rod structures into our wooden board

 Drill machine, vise and piece of cloth not to make any scratches while work process

 Easiest way to find flexible and leak proof tubes is from drip set aka infusion set

I highly recommend to use new drip set

And few coupling elements to ensure waterproof sealing’s

Electronic supplies required

  1. Node MCU aka ESP8266 Board
  2. BC 547
  3. TP 7805 Transistor
  4. Solenoid valve for flow control
  5. DC Booster
  6. Empty PCB
  7. Resistors
  8. Soldering station


NodeMCU is a development board on the ESP12E which, is probably the most popular module

that integrates the ESP8266 SoC. However, despite the popularity of NodeMCU boards.

we have 3rd versions of the NodeMCU board

“third generation”, version 1.0 V3. Basically the manufacturer Lolin / Wemos decided to

create their own “improved” design with a few minor changes.

The main change is that the V3 mounts a CH340G serial converter instead of the CP2102.

 The manufacturer claims that it makes the USB port more robust. On the other hand, they

reused the two reserved pins of the V2 to get a GND and a VUSB

Solenoid valve

The solenoid valve is a type of electromagnetic actuator that

has a coil inside and a movable core that has one of its ends

connected to the valve housing by means of a spring. 

The mobile core is manipulated through the magnetic field

produced in the valve coil, where an electric current travels

through it and an electromagnetic force will attract the core in order to compress the spring.



Projects with ESP8266 or other microcontroller platforms where it is necessary to activate something through a solenoid.

Building phase – Make supporting frame

Building support structure

Drill hole in wooden board keeping in mind about distance between bottles please refer above image

To make supporting structures to hold bottel with rods

I use 3D printed parts alternatively cardboard or plastic can be use

But to make this project very clean I recommend to use 3d printed parts

I will be adding this bottle to supporting structure from those print parts

Three IV diffusion sets and syringes we will make fertilizing supply mechanism

To do this cut out syringes into half, drill a hole in the rubber bush and inserted IV tube as show picture in below 

I made Mini holders which was also 3D print to support this syringes

For fluid transfer i use three Solenoid valves which works similar to water pumps

Exact same Materials which are used is project might not be available in your area so you can look for alternatives which can be found in and around your home

Basic Working Principle of automated fertilizer

mechanism of ESP8266 Farm Automation Project
mechanism of ESP8266 Farm Automation Project

I Have already made circuit for this project please check out the description of video Here

Circuit Diagram

If you want complete Garber file for this project it is also given on above link

As i like to build every things on my own i made PCB myself!

As you can see, I have made these circuits on PCB by myself, if you do not want to make it on your own, then there is no problem, you can download the gerber file from here that you can order it from any PCB manufacturer.

I highly recommend you to order from NextPCB

NextPCB is PCB manufacturer as NextPCB offers you get free PCB assembly in  Zero Dollars. ( )

If you want same all you might be needing is an Empty PCB, NodeMCU Esp8266 , relay, Few transistors, IC for power amplification along with some resistors for overload protection

Before finishing the final installation to check if everything works fine I made use of multimeter to check different terminals

Final assembly of all components

use your own ideology to connect this tube from plastic bottle to input 12 of DC power pump Motors

I will be using aquarium pump for main supply of fluid throughout the system

Once this is in place connect all the components i.e. soil moisture tester will be use that will go inside your flower pot

For supply of water I will be using this small aquarium for demonstration purpose

If you are planning for large-scale tank will serve your purpose in best way

Now fill each of these 3 containers with nitrogen soluble micro fertilizers , Phosphorus soluble micro fertilizers and potassium soluble micro fertilizers.

Note: These are fertilizer components

I made hole on the cap so that there will be no obstruction in the flow of fluid which might occur in closed cap bottles

Three bottles of chemical are used to feed the plants. A high potassium soluble fertilizer is used in one bottle, nitrogen  in a separate bottle. Phosphoric acid is stored in the third bottle for

How to use ESP8266 Farm Automation Project

Insert soil moisture sensor where we want to automate fertilizing process

switch on supply and connect the system to your phone

As soon as Nodemcu connects to your phone it starts showing real time Stats

well this is an applicable IOT project in which you can control the system from any part of the world using a smartphone or any other device which is connect to internet

Final Visual of this project

Key features of this project

  •  You can control your device staying anywhere in the world using the Blynk apk in your phone 
  •  Programming of microcontroller can be done according to plants nitrogen,potassium and phosphorus requirements
  •  Water flow can be increase or decrease just by rotation of Potentiometer
  •  Ability to what lies 20 to 25 plants at a time from this iot nodemcu projects is possible
  •  Temperature humidity and moisture data will be share with your phone
  •  Water can be supply according to needs of moisture level to the plant
  •  Timer can be set for automatic run of machine for a given schedule
  •  Apart from fertilizer you can also supply fungicide and insecticide

ESP8266 Farm Automation Project working Video

You can check full Video tutorial here

Also consider checking my other interesting projects related to IOT Here

If you are struck anywhere in building phase of this project you can always let me know in comments, Thanks for your time and interest


About Author


  1. Pingback: Best Science project idea - DiY Projects Lab

  2. Pingback: ESP8266 Home Weather Station - DiY Projects Lab

  3. Pingback: Wi-Fi Mood Light using ESP8266 - DiY Projects Lab

Leave A Reply