IOT Fertilizer System

by Nextpcb in Circuits > Sensors

13579 Views, 49 Favorites, 0 Comments

IOT Fertilizer System

farm iot.jpg

My country India has been badly affected by climate change due to heavy deforestation. So many campaigns arose planting more trees. However, to reduce my effort in gardening, I made something that water and fertilizing my plants based on an Blynk app.

The plants often get neglected at holiday time and so this watering and feeding system was made and installed so that the plants were irrigated all the time.
The mixing tank is filled with water through the solenoid valve. The peristaltic pumps dose the tank with the required amount of fertilizer and then the mixer pump is turned off. The mixture drains into the growing media under gravity

This project Sponsor by NextPCB

Thank You NextPCB:
This project is successfully completed because of the help and support from NextPCB.

NextPCB is one of the most experienced PCB manufacturers in Global, has specialized in the PCB and assembly industry for over 15 years. Not only could NextPCB provide the most innovative printed circuit boards and assembly technologies in the highest quality standards, the fastest delivery turnaround as fast as 24 hours.

Guys if you have a PCB project, please visit their website and get exciting discounts and coupons

Only 0$ for 5–10pcs PCB Prototypes :- Click Here

Register and get $100 from NextPCB :- Click Here

See more info about PCB Assembly Capabilities: Click Here

In our website DiY Projects Lab having more than 25 detailed projects so you can go through this link (click here) for a more creative and amazing projects and tutorial . That will enhance your creative mind as you grow.

Fertigation

fertigation-by-means-of-fertilizer-driven-forward-osmosis-1024x682.jpeg

Fertigation is a method of fertilizer application in which fertilizer is incorporated within the irrigation water by the drip system. In this system fertilizer solution is distributed evenly in irrigation. The availability of nutrients is very high therefore the efficiency is more. In this method liquid fertilizer as well as water soluble fertilizers are used. By this method, fertilizer use efficiency is increased from 80 to 90 per cent.

Fertigation is defined as the injection of fertilizers, soil amendments and other products typically needed by farmers into soil. With an IoT-enabled fertigation solution, farmers could remotely control how many fertilizers are injected and within what volumes. It would also enable them to monitor fertilizer concentrations and other environmental conditions, such as ph, in the soil using remote sensors and adjust to the required levels if necessary.

What Is Smart Farming?

Smart-farming-IoT-application- in-Agriculture.jpg
image.png

Smart farming or Smart Agriculture system is the term used to describe the adoption of modern information and communications technologies in order to enhance, monitor, automate or improve agricultural operations and processes.

the Sensors are collect all information such as soil moisture, fertilization, weather and transmit that through a gateway over cellular wireless network to a central hub providing farmers real time access to information and analysis on their land, crop, livestock, logistics and machinery.

​List of Parts

inCollage_20210512_142231871.jpg
IMG_20210512_135832.jpg
IMG_20210512_135755.jpg
IMG_20210512_135902.jpg
IMG_20210512_135848.jpg
IMG_20210512_135811.jpg
IMG_20210512_135916.jpg

Node MCU aka ESP8266 Board

BC 547

TP 7805 Transistor

Solenoid valve for flow control

DC voltage Booster

zero PCB

Resistors

Soldering station

The parts for this project can be found on ebay, mostly quite cheaply from Chinese suppliers. All the electronics use 12V components, for safety as much as anything in an outside environment.

Capturing Temperature and Humidity

original.jpg

One of most used sensors for capturing weather data is the DHT22 (or it's brother DHT11), a digital relative humidity and temperature sensor. It uses a capacitive humidity sensor and a thermistor to measure the surrounding air, and spits out a digital signal on the data pin (no analog input pins needed).

The sensor should be powered between 3.3V and 5V and will work from -40oC to +80oC with an accuracy of +/- 0.5oC for temperature and +/-2% for relative Humidity. It is also important to have in mind that the its sensing period is in average 2seconds (minimum time between readings). The site of Adafruit provides a lot of information about both, DHT22 and its brother DHT11. For more details, please visit: DHT22/11 Tutorial page . The DHT22 has 4 pins (facing the sensor, pin 1 is the most left) :

Capturing Soil Moisture Humidity

soil-moisture-sensor.jpg

the YL-69 sensor and LM393 Comparator module soil medium Hygrometer.

The LM393 module has 2 outputs, one digital (D0) that can be set-up using the potentiometer that exist on it and an analog one (A0). This module can be sourced with 3.3V, what is very convenient when working with an NodeMCU. What we will do, is install the LM393 4 pins as bellow:

  • LM393 A0 output to A0 NodeMCU A0 input
  • LM393 VCC to NodeMCU VCC or to NodeMCU GPIO D3*
  • LM393 GND to NodeMCU GND
  • LM393 D0 open

It's important to highlight that the correct is to connect the Sensor VCC to a Digital Pin as output, so the LM393 will be powered only when we need a read. This is important no only to save power, but also to protect the probes from corrosion. With a DYI type os sensor as used on the original ArduFarmBot project, its work fine, but in the case here, the NodeMCU did not worked well the soilMoisterVcc PIN connected. Also I had eventual errors due the power consumption. So, I powered the LM393 direct to VCC (5V), the code does not need to be changed. It is worked fine.

Solenoid Valve

419+2xHkz-L.jpg

How Does a Solenoid Valve Work?

A solenoid is a device that converts electrical energy into mechanical energy. It has a coil wound over a conductive material, this set-up acts as an electromagnet. The advantage of an electromagnet over natural magnet is that it can be turned on or off when required by energizing the coil. Thus when the coil is energized then according to faradays law the current-carrying conductor has a magnetic field around it, since the conductor is a coil the magnetic field is strong enough to magnetize the material and create a linear motion.

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

NodeMCU

ESP8266-NodeMCU.jpg
NodeMCU-ESP8266-Pinout.jpg

NodeMCU is an open-source LUA based firmware developed for the ESP8266 wifi chip. By exploring functionality with the ESP8266 chip, NodeMCU firmware comes with the ESP8266 Development board/kit i.e. NodeMCU Development board.

BLYNK

IMG_20210512_140308.jpg
IMG_20210512_140243.jpg

It is really very easy to built IoT projects using BLYNK. The first you need is to have the BLINK App installed on you phone its Library on the Arduino IDE. If you do not have them yet, please follow the bellow steps:

Download BLYNK app for Apple Iphone or Google Android

Install BLYNK Library for Arduino.

Note that you will download the zip file (There are 5 files there that you must manually install in your Arduino Library).

Once the Arduino IDE is reloaded, you should be OK to start using BLINK on your IoT project.Now, let's open our app at the SmartPhone:
Open Blynk app.Tap on "Create New Project"

screenGive a name for your project (For example "NEXTPCB")

Select the appropriated Hardware Model: " NodeMCU " Take note from Authorization Token (you can e-mail it to you to ease copy&past on your code) Press "OK". A Blank screen with dots will appear.

Tap the Screen to open the "Widget Box" OK, let's take a moment and think about our NEXTPCB Blynk App and define what will be the Widgets to be installed. Revisiting the general specification at introduction, we can summarize that our app we be needed for:

Make Supporting Frame

IMG_20210512_135232.jpg
IMG_20210512_135257.jpg
IMG_20210512_135355.jpg
IMG_20210512_135435.jpg

we use 1ft wood board for supporting frame

Drill hole in MDF board keeping in mind about distance between bottles as show above image

Attach the Bottle With Support Rod

IMG_20210512_135156.jpg
IMG_20210512_135539.jpg
inCollage_20210512_141732924.jpg

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

i use Three plastic bottle as the mixing tank, aluminum won't work for this project so better prefer to use plastic bottle because plastic bottle are visible so i check the inside material

Basic Working Principle of Automated Fertilizer

IMG_20210512_135134.jpg

mechanism of this Project

Circuit Diagram

IMG_20210512_135650.jpg
IMG_20210512_135726.jpg
IMG_20210512_135936.jpg
IMG_20210512_140037.jpg

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

but I highly recommend you to order from NextPCB
NextPCB is one of the famous PCB manufacturer in china

NextPCB offers you get free PCB assembly in 0 Dollars.PCB board manufacturer

Nextpcb.com

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

IMG_20210512_140136.jpg
IMG_20210512_140332.jpg

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

I will be using aquarium pump for water supply

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

Final Output

IMG_20210512_135134.jpg
IMG_20210512_135107.jpg

Three bottles of chemical are used to feed the plants.

A 2 liter bottle was used as the mixing tank. The float switch fills the tank with about 2 liters of water and the submersible pump is used to mix everything. Chemicals are pumped into the tank through the clear tubes.

Introduce Blynk Funcionalities

IMG_20210512_135107.jpg
To run run a Blynk app together with your code, you will need:

nclude the BlynkSimpleEsp8266 library at beginning of your code

During Setup(), initiate Blynk credentials: Blynk.begin(auth, ssid, pass);

Define a timing to send local data to Blynk server: timer.setInterval(5000L, sendUptime);

Call the function Blynk.run();

at loop()Create the function sendUtime();

where you will introduce the sensor data to be sent to Blynk Server:

Blynk.virtualWrite(VirtualPin, sensor data);

<p>char auth[] = "YOUR PROJECT TOKEN"; // Blynk project: "NEXTPCB"<br>char ssid[] = "YOUR LOCAL WIFI NAME";
char pass[] = "YOUR WIFI PASSWORD";
</p>

Final

inCollage_20210512_142426306.jpg
IMG_20210512_140203.jpg
  • You can control your device staying anywhere in the world through the Blynk apk in your phone

As discussed at introduction, our final goal here is to take care of a plantation. With the data provide by sensors, we will know the air and soil temperature, air relative humidity and the most important how "dry" is the soil. With those data in hand, our program should calculate if would be necessary to irrigate the plantation, turning on a water pump or to turn on an electric lamp to provide the appropriate heat to the crop. For that, we will use a small dual 5V Relay Module for Pump and Lamp activation.