Most of us have a small garden, farmland or a plantation area. Our busy schedule, however, doesn’t allow us to maintain it well. But with the use of technology, we can easily achieve it.Â
So, today we are going to make an IoT-based smart agriculture system that can monitor soil moisture. Through this device, we will be able to automatically irrigate a piece of land and wirelessly spray fertilizers and pesticides using our phone while we are busy with other work.
So, let’s first gather the components for the project.
Bill Of Materials
Coding
After that, we create a loop function where we create several ‘if’ conditions. Then, we have to create a ‘for’ function that will read the soil sensor data upto 160 times. Out of that, an average reading will be obtained which we can map (i.e. convert) in the range of 100 to get the moisture level output of soil in the range from 0 to 100 per cent.
The earlier created ‘if’ condition will check the moisture percentages. In case that percentage is very low, then irrigation will automatically take place as per needed. (Refer fig 3,4,5)
Now, let’s create the appÂ
App Building
First, we create a layout of the app. This app uses an extension plugin that visualises the soil data in the form of a circular ring.Â
You can download the .aia file attached here that includes all the pre-made features for that. Now, import it to your Kodular creator. In this app, we have added the following components using which, we have created a Smart Agriculture System app layout (Refer fig 6,7)
Components
- Circular bar extension
- Bluetooth Client
- List pickerÂ
- 4 ButtonsÂ
- 2 Text View
Now, join the app code blocks and define the function as in fig 8.
Connection
Now connect the components together as described in the table below.
Connect the +ve wire of the 24 volt DC adaptor to the COM pin of the relay and -ve wire of the adaptor to the -ve wire of the valve.   Â
Arduino to Soil sensor connection
Arduino | Soil Sensor |
5V | VCC |
GND | GND |
A1 Pin | Analogue OUTÂ |
Arduino to Relay
Arduino | Relay |
5V | VCC |
GND | GND |
PIn 6 | Relay In 1Â |
PIn 7 | Relay In 2Â |
Relay to solenoid valve
Note: Supply power to the relay module with a separate 5V DC and not with Arduino pin and also check the relay type.Arduino to Bluetooth HC 05 connection
TestingAfter connecting the electronic components, cross-check that all of them are connected to the correct power source. Then put the soil sensor and pipe of the solenoid valve into the soil.Now install the app that we have made and then tap on the connect button (Refer fig 10). You will see a list of Bluetooth devices for connection. Select HC05. (Refer fig 11).After a successful connection, the Smart Agriculture System app will display the live soil sensor data as in Fig 12. If the soil moisture is below 50 per cent, then it means that the soil is dry and needs water, which will be automatically provided to it. After getting a sufficient amount, the supply will turn off. You can also spray fertilizers or pesticides using the app by tapping the spray on/off button. For that, you need to make an additional setup with the pipe to spray pesticides and fertilizers.
TroubleshootingYou might come across some errors while using the app (due to version or Bluetooth connectivity) as shown in Fig 13, 14. To get rid of them, simply go back or tap anywhere outside the error message box.
Relay | Solenoid valve |
Relay NO1 | Solenoid valve1 VCC |
Relay NO2 | Solenoid valve2 VCC(if using fertilizer spray system) |
Arduino | Bluetooth HC 05Â |
5V | VCC |
GND | GND |
RX | TX |
TX | RX |
If you found this IoT project useful then you may also like Top 30+ IoT Projects | IoT Project Ideas for Enthusiasts.
is the app is available on playstore or not? if it is available plz give the app name. it is very usefull to me
No it is not available in play store . You can download it from our website.
how can we download there is no link to it?
You can get the source code and .apk, .aia in the zip folder. it can be downloaded from the download written at end of the article
Mam pls help me for making the app for this project pls mail me on the mail. Id [email protected]
What help do you need, can you elobarte
What help do you need, can you elaborate
You can get the source code and .apk, .aia in the zip folder. it can be downloaded from the download written at end of the article
please give the app link
how can I get the BOM for this project..is there a way i can order it online?
how do i purchase the BOM for this IoT project. Please help me with this.
You can get it from Kits n Spare
Hi Ashwini
Need your support for project details & report, if you have prepared. please email me on [email protected].
This is a very interesting project..As well I saw the bill of quantities 1180 rupees ..what is this amount in USD?
I am from Zimbabwe and am looking at implementing similar smart projects considering our good weather and soil for agriculture..
+263772312243 ( phone/whatsapp)
The total bill comes around 15.37 USD.
Good project, where can I get the whole project, please provide the link
Hi vedant, this is a full project.
Can I get all the components, from where I can order
can we add this;
Detection of disease in the plant.
yes using Raspberry pi
Hi, is there a step by step video on how to build this project?.
Thanks as you respond.
We can add noise production with respect to motion to act as a scarecrow
Wonderfull idea
Hi. If you have other project ideas in agriculture could you please share
Sure, Will share
Need tensiometer iot fully automatic irrigation system
Hi please can you provide the link from where I can download the apps and buy the devices.
please any one suggest me for purchase this all components
You can get the device and components from kits n spares https://www.kitsnspares.com/
Hi please can you provide the link from where I can download the apps and buy the devices.
Hey Hello Thanks for sharing these kinds of projects.
May I get the pdf or synopsis for this project??please
Circuit Diagram is attached with article in the connection section. What Block diagram do you need
Hello @Ashwini Sinha Mam I don’t need block diagram I just want the abstract of this project. If possible proposed system of this project also.
Kindly elaborate on what kind of block diagram you need, I have already attached the circuit diagram in the project.
I don’t want block diagram mam. See I am doing these project in my college and I want the description of this project. i want the authors of this project. The reference of this project. So i can present this in front of my college.
The author of this project is Ashwini Kumar Sinha, You can give reference to EFY and the description need in detail let me know . The project is open to all and you use it even without referencing the Author.
Okay Thank You mam.
Could you please give me description in detail please to show in pdf .You said that so
MAM I NEED CODE OF THIS PROJECT
code is attached at end of the article
kodular site is not working what should i do? please help me out
You can use MIT ap Inventor.
how can i check my solenoid valve is working or not? everything is working fine but when i click on “water on” solenoid valve is not responding. please solve this
Directly plug the solenoid valve to 24v DC power supply you get the “TIK” sound from the valve of its open and close.
“TIK” sound is coming but water is not flowing from solenoid valve.
After getting “TIK” sound, water is not going in or coming from solenoid valve.
connect the pipe to solenoid try to blow air from the mouth in the valve will it pass then connect it to power after getting tik sound did the air passing chek. Let me know water should also flow in this way through the valve based on need
can you share me your gmail id? i will share video or block diagram of project how i connected .
You can contact me on whats app on 7061350809 if more help needed
I tried but couldn’t solve issue.
Hi…. Is there any way other than Bluetooth which we can use to connect our device to mobile Bluetooth since range is limited to max 400 meters.
Yes you can make it clod based to global reach and range or make it with WIFI or change the Bluetooth module with HC12 1km range
Can We Add other sensors like temperature sensor, water level sensor to it as well…
yes you can add TDS, Soil Ph level, Water level, temp and many more but you need to make change in code
App is not detecting the hc05 module what to do? Please help…
Hc05 is visible to other devices but not in the app
can i make this project using ardino uno?
Yes , of course
can you send me a video about this project step by step
009234562167271
thanks
can you give me the report of this project of atleast 30-40 pages