You are on page 1of 7

BUILD A SOIL MOISTURE DETECTOR FOR AUTOMATIC

WATERING AT THE STRAWBERRY GARDEN

A Darmawan
Teknik Informatika, Universitas Komputer Indonesia, Indonesia

Email: adarmawan117@mahasiswa.unikom.ac.id

Abstract. This research contains the design of a tool to detect the soil moisture, to turn on the
spraying machine which will irrigate the strawberry garden. The approach taken is library research,
which is by analyzing the data and information that has been done by other researchers and
combining it with the data and experience that is owned by the author when managing his strawberry
garden. The results of this research indicate that the use of this tool can represent garden owners
when there are obstacles in garden maintenance, especially when watering plants. Finally,
conclusion, personal recommendations, and future outlooks will be given based on the existing
work.

1. Introduction
Strawberries are plants that grow and evolve first in Chile, America. Strawberries are the
subtropical plants which are good planted in the highlands with a temperature range of 17-20oC. This plant
requires a moisture between 80-90% and sunlight around 8-10 hours per day. Types of strawberries
Fragaria choiloensis L. is a species found in many countries in America, Europe and Asia. Strawberries
that evolve in Indonesia is produced by a cross between North American strawberries (Var Duchesne) and
Chile strawberries (Fragaria Chiloensis L. var Duchesne). From these two types of strawberries produce
Fragaria x annanassa var Duchesne strawberries which are much cultivated in Indonesia.. In addition of
fertilizers and cultivation media, the water has a very large contribution to the evolve of strawberries, both
planted on the ground directly or through cultivation media in polybags. Too many of water will make this
plant decompose and die. While if the soil is too dry, can makes the plants dry at least die. Therefore, the
farmers or owners is very important to irrigate the strawberies garden. In order for irrigation appropriate
with the necessity of strawberry plants, a tool to automate watering is needed and the solution is to use
technological assistance, a microcontroller.

There are so many types of microcontrollers that can be used to detect soil moisture, such as A
wireless application of drip irrigation automation supported by soil moisture sensors[1], A Smart System for
Garden Watering using Wireless Sensor Networks[2], Large-Scale On-Farm Implementation Of Soil
Moisture-Based Irrigation Management Strategies For Increasing Maize Water Productivity[3], Automatic
Plant Watering System via Soil Moisture Sensing by means of Suitable Electronics and its Applications for
Anthropological and Medical Purposes[4], and many more.

With the support of an automatic watering tool, when the soil less of water it can hand proper irrigation.
And than it can be increase the productivity of the strawberry fruit itself. By collecting data from experts'
research and theory, supported with the author's experience in managing strawberry gardens. Hopefullness,
can be a references for a reader when they start a strawberry business.

2. Method
The method who use in this research with literatures review who previously been conducted.

2.1 Literatur Review


2.1.1 Strawberry
Strawberries are one of the fruits with high economic value. Red color plus sweetness is the main
attraction. The United States is the largest strawberry producing country in the world followed by Europe
(Italy and Poland), then Japan from Asia in third place.

the cultivation of strawberries was first in America, exactly in Chile. Strawberry is very good planted
in a place with temperatures between 17-20oC with soil moisture around 80-90%. Strawberry will be very
good under the sunlight between 8-10 hours every day. The strawberries in Indonesia are combine from
Chile's Strawberry (Fragaria Chiloensis L. var Duchesne) with North America's Strawberry (Var
Duchesne). From these two strawberries, produced Fragaria x annanassa var Duchesne. Fragaria x
annanassa var Duchesne is strawberries that cultivated in Indonesia.

In Indonesia, the cultivation of strawberry by farmers is still Traditonal. To cultivate strawberries


more, farmers still depend on stolon / saplings from strawberry breeding. Meanwhile, farmers who have
applied modern methods think more about quality and quantity by bringing in superior seeds from outside
(such as from the United States).

Farmer cultivation techniques it's so various. Some farmers, plant strawberries using beds and using
sacks. But now, using hydroponic technique, its so many farmers using greenhouses for their strawberry
cultivation. Because, beside from being a business, strawberries can be used as an ornamental plants. The
combination of red and green from the leaves, becomes a beautiful sight to decorate the yard of the house.
The price of one strawberry seedling ranges from Rp. 1,500 to Rp. 2,000, depending on the seeds and sellers
of the strawberry itself.

There are many advantage of strawberries. That advantage make us more healthy, such as from
carbohydrates, protein, fat, iron, calcium, phosphate, and many more [5].
2.1.2 Automatic Control System
Automatic control system is a combination of several components that work together to achieve certain
results without involving humans[6]. There are two types of automatic control systems:

1) Open-Loop Control System (Nonfeedback System)


Open-Loop Control System is a control system whose output value does not affect the next
action / process of the system. For example, like a washing machine. Where the system will only
run what was previously programmed.
2) Closed-Loop Control Sytem (Feedback Control System)
Closed-Loop Control System is the opposite of an open control system, where the output
parameters will be compared with the desired parameters to be processed into a return input.

2.1.3 Mikrokontroller
Mikrokontroller is a tools that has many components and can operate independently, and has been
designed to monitor and or regulate work and tasks. There are several components of the microcontroller
[7]
: Processor Core (CPU), Memory, Digital IO, Analog IO, Interupts, Timer, and other components.

2.1.4 AVR Atmega 8


AVR Atmega 8 is an 8-bit CMOS microcontroller that follows the RISC AVR architecture. The
ATmega 8 AVR contains 28 pins with 23 output inputs inside it [8].

2.1.5 Soil Moisture Sensor


This sensor is a sensor to detect soil moisture or water intensity in the soil [9]. In this sensor, there
are two plates from metal and very sensitive to electric charges in the soil. Analog voltage of the sensor is
an electric voltage that ranges from 3.3 to 5 volts which will be converted into digital useful as data
processing by the system.

2.1.6 C Programming (Embeded System)


Embeded System is a combination of hardware and software computer, with the possibility of adding
another device as a support, and is built to be able to perform specific commands[10]. Most of Embeded
Systems use C or C ++, because thats languages are closer to machine language. In addition, to running this
language its easier than other high-level programming languages. The syntax of C language in the
microcontroller is not much different from the C language for desktops, only coding for the microcontroller
is more simpler than for the desktop.

2.2 Design
2.2.1 Design for Hardware
In this hardware scheme, Mikrokontroller is used like a brain (control all of tasks) all of system.
On design Of Soil Moisture Detector For Automatic Watering at The Strawberry Garden, soil moisture is
used for main indicator for determine is the system on or off.

2.2.1.1 Programming at The Mikrokontroller ATmega 8


For designing, writer use CodeVision AVR Application. The following is an explanation of the
source code:

The source code whose used to determine the microcontroller selected:

#include <mega8.h>
#include <stdio.h>
#include <delay.h>
#include <alcd.h>

The source code whose used to configure ADC (Analog Digital Converter):

Sensor[0]=(read_adc(2)/1,54) ;
Sensor[1]=(read_adc(3)/1,54) ;
Sensor[2]=(read_adc(4)/1,54) ;
Sensor[3]=(read_adc(5)/1,54) ;

The source code whose used to configure LCD display:

lcd_gotoxy(0,0);
lcd_putsf("Tugas KWU:");
lcd_gotoxy(0,1);
sprintf(data, "Kelembabannya: %d % %", dataKelembapan);
lcd_puts(data);
dataKelembapan= ((Sensor[0]+Sensor[1]+Sensor[2]+Sensor[3])/4);

The source code whose used to configure button:

void menu_param(){
delay_ms (200);
do{
lcd_gotoxy(0,0);
lcd_putsf("Tentukan Parameter");
lcd_gotoxy(0,1);
sprintf(data,"Bawah: %d", param);
lcd_puts(data);
if(B2 == 0){param++;}
if(B3 == 0){param--;}
if(param <= 0){param = 0;}
if(param >=100){param = 100;}
delay_ms(100);
lcd_clear();
}
}
void menu_param2(){
delay_ms (200);
do{
lcd_gotoxy(0,0);
lcd_putsf("Tentukan Parameter");
lcd_gotoxy(0,1);
sprintf(data,"Atas: %d", param2);
lcd_puts(data);
if(B2 == 0){param2++;}
if(B3 == 0){param2--;}
if(param2 <= 0){param2 = 0;}
if(param2 >=100){param2 = 100;}
delay_ms(100);
lcd_clear();
}while(B1 != 0);
}
2.2.1.2 Design soil moisture sensor
Sensor whose used is four sensor and all of it connected to pin PC2, PC3, PC4, dan PC5. And
whose used to input is port C. This port is used because it has the Analog to Digital Converter (ADC)
feature.

2.2.1.3 Design of Relay


The function of relay is intermediary to switch on or switch off the water pump. In this research
used one water pump and its managed by microcontroller. The relay will switch on or off when the signal
from mikrokontroller give an instructure in the term of logic signal 0 or 1. If the signal is 0, relay will cut
off the electric. Otherwise if the signal is 1, relay will switch on the electric.

The source code whose used to program the relay:

dataKelembapan = ((Sensor[0]+Sensor[1]+Sensor[2]+Sensor[3])/4)+23;
if(dataKelembapan <= param){
PORTB = (0<<5);
lcd_gotoxy(0,1);
sprintf(data, "Kelembaban: %d%%", dataKelembapan);
lcd_puts(data);
delay_ms(300);
lcd_clear();
}else if(dataKelembapan >= param2){
PORTB = (1<<5);
lcd_gotoxy(0,1);
sprintf(data, "Kelembaban: %d%%", dataKelembapan);
lcd_puts(data);
delay_ms(500);
lcd_clear();
}

3. Results and Discussion


From this examination, water use can more be saved. Initially using manual watering of 0.4 - 2.2 liters
for every plant seed everyday, decreasing until 0.1 - 0.7 liters every plant. Other than that, the soil moisture
for each strawberry is maintained well between the lower and upper boundaries.
This is because the water whose used to watering the strawberry plants is really well controlled. The
reason, because this tool will only switch on when the condition of the soil is completely dry or is in a state
of lack of water. Whereas when the soil is damp, the device will standby. So that the water sprayer turns
off and does not drain water. If watering manually, sometimes the soil conditions are still damp and farmers
will continue to water the plants, it's will only waste water.

For the test results can be seen in more detail in Table 2.2-1 Test Results:
Table 2.2-1 Test Result

On Flush Time Up / Down Soil Soil Average of Water Use


Observation Limit Moisture Moisture Soil
Before After Moisture by
Watering Watering Manual
Method
1 07.40 90/80 47% 93% 89,5% 13L
2 08.00 90/80 55% 92% 89,23% 13L
3 07.20 90/80 44% 92% 89,32% 13L
4 08.30 90/80 58% 93% 89,30% 13L
5 08.12 90/80 52% 94% 89,40% 13L
6 08.34 90/80 59% 92% 89,30% 13L

4. Conclusion
After testing and analysis is carried out, the soil moiosture sensor runs well and successfully turned on
the water pump when the soil conditions are dry. The microcontroller whose used in this research uses
ATmega 8, assisted by a soil moisture module as a soil moisture detection sensor. LCD to display the values
obtained from soil moisture. And then a relay to turn off or turn on the water pump. With the help of this
system, the use of water is reduced from 0.4 - 2.2 liters for every plant everyday, to 0.1 - 0.7 liters for every
plant.

5. Acknowledgment
Thank you for everyone who helped and guided me to complete this paper. Especially for my lecturers
at this university.
References
[1] Dursun, M., & Ozden, S. (2011). A wireless application of drip irrigation automation supported by soil
moisture sensors. Scientific Research and Essays, 6(7), 1573-1582.
[2] Angelopoulos, C. M., Nikoletseas, S., & Theofanopoulos, G. C. (2011, October). A smart system for
garden watering using wireless sensor networks. In Proceedings of the 9th ACM international symposium
on Mobility management and wireless access (pp. 167-170). ACM.
[3] Irmak, S., Burgert, M. J., Yang, H. S., Cassman, K. G., Walters, D. T., Rathje, W. R., ... & Eisenhauer,
D. E. (2012). Large-scale on-farm implementation of soil moisture-based irrigation management strategies
for increasing maize water productivity. Transactions of the ASABE, 55(3), 881-894.
[4] Đuzić, N., & Đumić, D. (2017). Automatic Plant Watering System via Soil Moisture Sensing by means
of Suitable Electronics and its Applications for Anthropological and Medical Purposes. Collegium
antropologicum, 41(2), 169-172.
[5] Mu'min N. 2012. Uji Daya Hambat Beberapa Ekstrak Nabati Pada Pertumbuhan Linier Mycosphaerella
Fragariae Penyebab Bercak Daun Pada Tanaman Stroberi (Fragaria sp) [Tesis]. Makassar (ID): Universitas
Hasanuddin
[6] Dorf, R. C., & Bishop, R. H. (2011). Modern control systems. Pearson.
[7] Alley, P. J. (2011). Introductory Microcontroller Programming.
[8] Microchip Technology. (2013). ATmega8/L datasheet.
[9] Aniley, Almaw. (2018). Soil Moisture Sensors In Agriculture And The Possible Application Of
Nanomaterials In Soil Moisture Sensors Fabrication
[10] Lambert, T. (2017). Introduction to Microcontrollers and Embedded Systems. Auburn University
Department of Mechanical Engineering Senior Design.

You might also like