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
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.
Step 1: Fertigation
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.
Step 2: What Is Smart Farming?
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.
Step 3: List of Parts
Node MCU aka ESP8266 Board
TP 7805 Transistor
Solenoid valve for flow control
DC voltage Booster
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.
Step 4: Capturing Temperature and Humidity
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) :
Step 5: Capturing Soil Moisture Humidity
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.
Step 6: Solenoid Valve
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.
Step 7: NodeMCU
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.
Step 8: BLYNK
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:
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:
Step 9: Make Supporting Frame
we use 1ft wood board for supporting frame
Drill hole in MDF board keeping in mind about distance between bottles as show above image
Step 10: Attach the Bottle With Support Rod
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
Step 11: Basic Working Principle of Automated Fertilizer
mechanism of this Project
Step 12: Circuit Diagram
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
as NextPCB offers you get free PCB assembly in Zero Dollars. Nextpcb.com
Before finishing the final installation to check if everything works fine I made use of multimeter to check different terminals
Step 13: Final Assembly of All Components
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.
Step 14: Final Output
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.
Step 15: Introduce Blynk Funcionalities
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";
Step 16: Final
- 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.