Professional Documents
Culture Documents
831 Syahirahbintimuda2014 PDF
831 Syahirahbintimuda2014 PDF
831 Syahirahbintimuda2014 PDF
1/071
UNIVERSITI TEKNOLOGI MALAYSIA
D a t e of Birth : 03-11-1991
Title : SMART I N D O O R G A R D E N I N G
A c a d e m i c Session : 2013/2014
2. The Library of Universiti Teknologi Malaysia has the right to m a k e copies for the
Certified by:
Z 3
SIGNATURE SIGNATURE fo¥i
O f SUPERVISOR
911103-11-5044
DR. M O H D AZHAR ABDUL RAZAK
(NEW I C NO/PASSPORT) NAME OF SUPERVISOR
NOTES: If the thesis is CONFIDENTAL or RESTRICTED, please a t t a c h with the letter from
the organization with period a n d reasons for confidentiality or restriction.
" I hereby declare that I have read this thesis and in my opinion this thesis is
sufficient in terms of scope and quality for the award of the degree of
Signature
Name of Supervisor
Date
iv
JUNE 2014
ii
I declare that this project entitled "Smart Indoor Gardening" is the result of my own
research except as cited in the references. The report has not been accepted for any
degree and is not concurrently submitted in candidature of any other degree.
Signature : .
Name : SYAHIRAH BINTI MUDA
Date : 22 JUNE 2014
ND
iii
To my beloved
parents
siblings,
ACKNOWLEDGEMENT
A special thanks to my supervisor, Dr. Mohd Azhar Bin Abdul Razak, who
had continuously for the guidance and enthusiasm given throughout the progress of
this project.. It would be difficult to finish this project without his understanding and
tolerance.
Last but not least I would like to thank my friends especially to my classmate,
Farah and Amir. Millions of thanks to all who include to give encourage, support and
help me in completing this project successfully.
v
ABSTRACT
ABSTRAK
TABLE OF CONTENTS
DECLARATION OF THESIS ii
DEDICATION iii
ACKNOWLEDGEMENT iv
ABSTRACT v
ABSTRAK vi
TABLE OF CONTENT vii
LIST OF TABLES xi
LIST OF FIGURES xii
LIST OF SYMBOLS AND ABBREVIATIONS xiv
LIST OF APPENDICES xv
1 INTRODUCTION
1.1 Background 1
1.2 Problem Statement 2
1.3 Objectives 2
1.4 Scope of Project 3
1.5 Thesis Outline 3
2 LITERATURE REVIEW
2.1 Introduction 5
2.2 Indoor Gardening 5
2.3 Requirement of Plant Growth 6
7
viii
2.3.1 Water 7
2.3.2 Light 9
2.3.3 Temperature 9
2.3.4 Space 10
2.3.5 Oxygen
2.4 Sensor 10
2.5 Light Spectrum 11
2.6 LED Bulb 14
2.7 Microcontroller 15
2.8 Effect of Indoor Gardening
2.8.1 Effect on Indoor Gardening to Older 17
People at Nursing Homes
2.8.2 Effect on Indoor Gardening to 18
Dementia Patients
2.9 Soil Moisture and Irrigation System 18
3 METHODOLOGY
3.1 Introduction 20
3.2 Project Planning 20
3.3 Project Overview 22
3.4 Hardware Development
3.4.1 Arduino Uno
3.4.1.1 Features of Arduino board 24
3.4.1.2 Power to Arduino 25
3.4.2 Liquid Crystal Display 29
3.4.3 Type of Sensor 31
3.4.3.1 Soil Moisture Sensor 31
3.4.3.2 Humidity and 32
Temperature Sensor
3.4.3.3 Light Sensor 33
3.4.4 Real Time Clock (RTC DS1307) 36
3.4.5 Relay 37
3.4.6 Water Pump 39
3.4.7 LED Bulb 40
ix
6 PROJECT MANAGEMENT
6.1 Introduction 57
6.2 Project Schedule 57
6.3 Cost Estimation 59
REFERENCES 61
APPENDICES 63
x
LIST OF TABLES
LIST OF FIGURES
o
C - Degree Celsius
Ω - Ohm
R - Resistor (ohm)
V - Voltage (volt)
Vs - Voltage source
LIST OF APPENDICES
CHAPTER 1
INTRODUCTION
This chapter will discuss about the background of the project, problem
statement, objective, scope of the project, and thesis outline.
this people to solve this problem. In terms of human effect, this project also can help
the people to reduce their loneliness in life and promoting activities of daily living
life satisfaction
In the urban area, the people are living in a house like apartment,
condominium and flat as the land property is very expensive and the house land
space is limited. To grow healthy plants is difficult due to limited house space and
sunlight source problem. Therefore, a smart gardening system is proposed to grow
healthy plants within the enclosed building. The system will be developed by
integrating sensors, LEDs bulb and water pumps controlled by Arduino board. The
system will control the temperature, watering and lighting system, in a limited
building space to produce high quality agricultural products. As the advantages, the
vegetables produced are safe plants with less energy.
i. The system is a low –cost and automated control for enclosed building.
ii. Arduino Uno board was used as brain of the system to monitor lighting and
watering system on the plants that assists by Arduino software to trigger any
faulty.
3
In the effort to achieve the main objectives of this project, there are several
scopes need as follows. The project needs to accomplish the right way to achieve its
intended objectives.
i. The soil moisture sensor is used to measure the volumetric water in soil and
turning on LED bulb in approciate condition helping by RTC module,
temperature and light sensor.
ii. The ATmega328 micro-controller was used in software development and the
programming is done in C language.
iii. Lastly, implementation process between hardware and software design to
create a prototype of indoor gardening system.
This thesis split into five chapters. In chapter 1 discussed the introduction of
smart indoor gardening (SIG) system along with the objective, scope of the project,
synopsis of the project and the application of the project are presented.
Chapter 2 discusses on the literature review and what other research have
been done in the related project to automated indoor gardening, the requirement of
the plants and the components that was used.
design of the system. Fourth is to verify the validity of the design via testing to
ensure the system meets the required specification.
Chapter 4 presents the results obtained from the designed system. All results
and explanation regarding the system will be discussed. The server and client
interface will be provided.
CHAPTER 2
LITERATURE REVIEW
2.1 Introduction
This chapter explains the review of past project that relate of this project. The
information based on thesis, reference books, journals and articles from internet and
library.
to protect as long as using right equipment and tools beside follow the right criteria
that the plants needed to grow up. The main requirements should be taken such as
water, light, space, temperature and mineral. All the requirement will be discusses in
next section.
There are lots of advantages of the garden but there are even more advantages
and benefits associated with indoor gardening. Some plants were growth up in a
garden then it can change the atmosphere according to the requirements of those
particular types of plant that would be growing within the indoor garden. Besides
that, indoor gardening can prove helpful to the person who has some physical
disability but loves gardening. They can easily take care of the garden from the
comforts of their wheel chairs and enjoy all the funs which are associated with
outdoor gardening. Moreover, for the new starter in gardening the indoor garden is
the best option to start. It is recommended by professional gardeners that a beginner
must start off with indoor gardening and on a limited scale as well. With the passage
of time you would learn many different aspects of gardening and that will surely help
when beginner will go to next step which is outdoor gardening or gardening on a
larger scale that would need more knowledge, experience about gardening that will
surely help a lot in the long run.
In order to produce health and quality of the plants, some factors affecting
plant growth such as water, light, temperature, humidity, space and minerals.
7
2.3.1 Water
Watering frequency will depend on the conditions under the plants are
growing [2]. Water will give to the plant when they were thirsty. But when the plants
given excessive water caused they receive excessive alkalinity or salt content
affected on a nutrient imbalance and poor plant growth. Softened water may contain
harmful amounts of sodium. Water that tests high in total salts should not be used.
2.3.2 Light
Beside natural light, artificial light like incandescent and fluorescent also can
be used as light source depend on the amount of natural light it normally receives by
the plants. For flowers buds, basically the plants need to exposure to 14 or more
hours in per day of light. Incandescent light have between 100 until 150 watt bulb
and for medium plants the distance light at least 4feet and above from the plants
while for tall flower the distance lamp and flower between 8 until 10 feet
8
Another type of artificial light is fluorescent light which is has 2 and half time
much light per watt than incandescent bulb [4]. It produces heat output, but large
area in spread out of light. There are two types of fluorescent light, cool and daylight
tube types. The distance light from the plants commonly in range 6 until 7 inches
and at least 12 hours in requirement of light each day. Lately, the latest technology
by using LED bulb is easier, low cost and better quality. LED bulb and its spectrum
will be discusses in next section.
2.3.3 Temperature
Temperature is one of the most import requirement that needed by the plant.
Like the mankind, plant also have ideal temperature for their own survival,
temperatures that are too high or too low will give dangerous and unhealthy in
growing of the plant. In fact, temperature and light can be thought as ‘yin and yang’
of the plant life [6]. They are linked through the processes of photosynthesis and
respiration. Photosynthesis is the process to produce sugars and starch and then
broken down it by respiration process in order to develop new tissues and
maintenance of existing ones[5].
So, for indoor gardening , the normal temperature in that required by the
plants in between 20’C until 28’C and at night in range 15 until 20’C
2.3.4 Space
The plant needs adequate space to ensure that each plant receives sufficient
light in photosynthesis process. Most of plant needs their own spacing to ensure their
growth in respectively as recommended for a garden. An example tomato plants
should be allowed 4 square feet per plant [5].
10
2.3.5 Oxygen
Plants require oxygen for respiration to carry out their functions of water and
nutrient uptake. In soil adequate oxygen is usually available, but plant roots growing
in water will quickly exhaust the supply of dissolved oxygen and can be damaged or
killed unless additional air is provided. A common method of supplying oxygen is to
bubble air through the solution[5].
2.4 Sensor
The output of the sensor can be analog or digital. For an analog sensor signal
to be converted to a digital signal, need using an analog to digital converter. Variety
of sensors nowadays such as temperature, light force, pressure and so on. These
properties act as the stimulus to the sensor, and the sensor output is conditioned and
processed to provide the corresponding measurement of the physical property.
"Ultraviolet" light spectrum. The light sensor is a passive devices that convert this
"light energy" whether visible or in the infrared parts of the spectrum into an
electrical signal output.
When the sunlight is passed through a prism it will reflect into a spectrum of
colour. Figure2.4 shows light intensity of the solar spectru
12
For artificial light, there are different of the light intensity spectrum between
incandescent and fluorescent bulb. Light spectrum of incandescent bulb as shown in
Figure2.5 more to left because it has a low relative temperature compared to the sun.
It emit much of their energy in the invisible infrared part of the spectrum as heat.
Although have inefficient source of light but it cheaper and easy to produce.
Fluorescent light are much more efficient and quite different shape at
producing light compared to incandescent light. When the light emitted from hot
object, the coating to glow (fluorescent) producing a bright whitish coloured light
[4]. Figure 2.6 shows the light intensity of fluorescent bulb.
13
Led or light emitting diodes is one of the artificial light they give a lot of
advantages to the plants growth. LED light is low energy, high energy efficiency in
producing the light and long life longer. There are many type and colour of this bulb
type with different colour, different shape and sizes as shown in Figure2.8. To emit
white light from LEDs requires mixtures light using a phosphor to convert its colour.
Figure 2.9 and 2.10 shows light spectrum of LED bulb.
Figure 2.8 The LEDs Bulb with Different Colour, Shape and Size.
15
2.7 Microcontroller
This study is about the indoor gardening for older people who live in nursing
homes toward their activities of daily living and psychological well-being. Besides
that, check whether it can reduce loneliness and promoting activities of daily living
or not in enhancing socialization and life satisfaction. Actually, life in nursing homes
is very limited in doing social activity physical activities. So that it leads to further
decline in function for many older people.
In this experiment, old people from nursing homes was divided by two group,
first group were involved in doing indoor gardening in e eight week programs, while
another group were treated as the mastery group. They received regular care without
the eight week indoor gardening program. Demographic data, including age, gender,
educational level and financial situation were collected. In addition another
characteristic that was taken is life satisfaction, loneliness, physical activity and
social network situation, before and after experiment period. The details of
experimental group subjects’ experience of the indoor gardening program were
elicited using open-ended questions.
In the result of this experiment, there are some improvements toward old
people in eight week indoor gardening in life satisfaction and social network and a
substantial reduction in perception of loneliness compared to another mastery group.
Plus, the actions of everyday living were unchanged in both groups after the plan[8].
18
The paper studies the effect of indoor gardening on sleep, agitation and
cognition of dementia patients. This experiment running in five week study protocol
of one week of baseline and fourth weeks of treatment to 23 of dementia patients
who had sleep disturbance and/or agitation For the first and fifth week of the study
period, sleep patterns, agitation, and cognition were evaluated using a sleep diary,
Modified Cohen-Mansfield Agitation, Inventory and revised Hasegawa Dementia
Scale respectively. In the result, there are improvements in time of wake up without
changing total time sleep after indoor gardening. In conclusion indoor gardening was
found to be effective for sleep, agitation, and cognition of dementia patients [9].
The soil moisture sensor consists of two probes (Galvanized Iron rods) is
placed at a fixed distance by some insulating material as shown in Figure 2.12.
Galvanized Iron was chosen compared than Copper because of corrosive type. The
current is passed through the probes. The current flows through the circuit only if
the soil is wet. The resistance of the soil varies with the soil state. This variation in
the resistance is taken [10].
19
CHAPTER 3
METHODOLOGY
3.1 Introduction
This chapter discusses about the methodology approach to solve the problem
and the system design has been implemented in this project. This process flow of the
project, electronics and system design, software development and testing will
explained in detail in this chapter.
Literature Review
Understanding Project
Hardware Design
Software Design
Testing
Product Demonstration
There are step in this project towards to ensure the project done in
systematically. It started from literature review, do some revision on previous
research, making the design of the project, electronics design, software development
testing and finally, the presentation of final product prototype.
Literature review is needed to see others work so that we can learn from their
success and error with how far technologies available in this time. In advantage,
making this research can cut the costs when we do some testing and experimenting
with the component use in this project. While, project understanding is needed for
the success and mastering in choosing the right components to use for the hardware
design. Software design needs to be studied to ensure it has good communication
with hardware design. After completing hardware and software design, the system
needs to be test and making troubleshoot to ensure that the system can function
successfully due to active the output. Then, the overall steps are complete.
22
Figure 3.2 shown that 3sensors, DHT11 sensor, light sensor and soil moisture
sensor is used in this system as the input. The soil moisture sensor is used to measure
23
the volumetric water content the soil. The DHT11 sensor will read temperature and
humidity depends on the surroundings while, light sensor is used to check light
intensity of surroundings.
Then, the data will be sent to the microcontroller and it start to read value of
the sensors. The microcontroller of Arduino Uno board which is ATmega328 has
been programmed as to process the data. The range of the soil moisture sensor has
been divided into three ranges which are dry, moisture and soggy condition.
The output devices such as water pump for watering system and LEDs Bulb
for lighting system. Red, blue and yellow LED as the LED indications for the case of
dry, moisture and soggy. In addition, buzzer as alarm alert when dry condition. In
order to display the output, LCD screen were used. Safety casing is used for safety
precaution of the user and protection to the electronics components from damage.
The Arduino UNO board in Figure 3.3 has 14 digital input/output pins which 6
can be used as PWM outputs, 6 analog inputs, a 16MHz crystal oscillator, a USB
connection, a power jack and a reset button. To make it operate, USB cable, AC to
DC adapter or battery (5V) is required and attach to the board.
Operating Voltage : 5V
Input Voltage (recommended) : 7-12V
Input Voltage (limits : 6-20V
Digital I/O Pins : 14 (6 pin for PWM output)
Analog Input Pins : 40 mA
DC Current for 3.3V Pin : 50 mA
25
The USB connection is used to ON the Arduino Uno with an external power
supply. The power pins are as follows:
VIN : The input voltage to the Arduino board when it's using an
2. external power source.
5V : This 5V pin from the regulator on the board. The board can be
supplied with power either from the DC power jack (7 - 12V),
the USB connector (5V), or the VIN pin of the board (7-12V).
3.3V : A 3.3 volt supply generated by the on-board regulator.
Maximum current draw is 50mA.
GND.: Ground pins.
14 digital pins (pins 0 to 13) on the Uno can be used as an input or output,
using pinMode(), digitalWrite(), and digitalRead() functions. They operate at 5 volts.
Each pin can provide or receive a maximum of 40 mA and has an internal pull-up
resistor (disconnected by default) of 20-50 kΩ.
Serial: 0 (RX) and 1 (TX). (RX) and transmit (TX) TTL serial data is used
to receive.
SPI: 10 (SS), 11 (MOSI), 12 The pins support SPI communication using the
(MISO), 13 (SCK). SPI library.
There a 6 Analog Input Pin with labeled A0 through A5, each of which
provide 10 bits of resolution (i.e. 1024 different values). The programs written for
Arduino are called sketches. There are two hardware related to Arduino Uno, there
settings need to make in the Arduino IDE which is Board and Serial Port.
setup()
The setup() function is called once when your program starts. It used to
initialize pin modes, or begin serial. It need be included in a program even if there
are no statements to run.
void setup()
{
27
loop()
After calling the setup() function, the loop() function does precisely what its name
suggests, and loops consecutively, allowing the program to change respond, and
control the Arduino board.
void loop()
{
digitalWrite(pin, HIGH); // turns 'pin' on
delay(1000); // pauses for one second
digitalWrite(pin, LOW); // turns 'pin' off
delay(1000); // pauses for one second
}
pinMode(pin, mode)
Used in void setup() to configure a specified pin to behave either as a INPUT or an
OUTPUT.
digitalRead(pin)
Reads the value from a specified digital pin with the result either HIGH or LOW.
The pin can be specified as either a variable or constant (0-13).
value = digitalRead(Pin); // sets 'value' equal to
// the input pin
digitalWrite(pin, value)
Outputs either logic level HIGH or LOW at (turns on or off) a specified digital pin.
The pin can be specified as either a variable or constant (0-13).
digitalWrite(pin, HIGH); // sets 'pin' to high
28
analogRead(pin)
Reads the value from a specified analog pin with a 10-bit resolution. This function
onlyworks on the analog in pins (0-5). The resulting integer values range from 0 to
1023.
value = analogRead(pin); // sets 'value' equal to 'pin'
analogWrite(pin, value)
Writes a pseudo-analog value using hardware enabled pulse width modulation
(PWM) to an output pin marked PWM. On Uno, this function works on pins 3, 5, 6,
9, 10, and 11.
The value can be specified as a variable or constant with a value from 0-255.
analogWrite(pin, value); // writes 'value' to analog 'pin'
0 volts for 0 values and 5 volts for 255 values at specified pin. In the range 0
and 255, the pin rapidly alternates between 0 and 5 volts, the higher the value, the
more often the pin is HIGH (5 volts). Because this is a hardware function, the pin
will generate a steady wave after a call to analogWrite in the background until the
next call to analogWrite (or a call to digitalRead or digitalWrite on the same pin).
29
The LCD used to inform the user the status of the condition of the system. In
this project, LCD and a 16 column by 2 rows characters used as a LCD is able to
display condition of the sensors.
30
Figure 3.5 shows LCD pin connection to the Arduino Uno Board. 10 pin of
Arduino Uno Board is used which is digital pin2, pin3, pin4, pin5,pin11 and pin 12.
The Soil Moisture Sensor is used to measure the volumetric water content
based on the dielectric constant of soil. The sensor is inserted in the soil to sense the
existence of water. An electric current can easily pass through if there is moisture
and due to the fact that the level of moisture is hard to determine and to make sure
that the moisture sensor is very accurate and efficient.
32
Figure 3.6 shows Soil Moisture Sensor YL-69. In this project, this
component is connected at pin analog A3 of Arduino Uno. One the characteristics of
soil moisture sensor YL-69, it has blue digital potentiometer adjustment as sensitivity
adjustable. Then it can operate at 3.3V-5V which red means power indicator green
for and digital switching output indicator. It also come very stable comparators
LM393 chip on mall board PCB size: 3cm * 1.6cm
The Light sensor module was shown in Figure3.9 comes with the basic
components for light detection. The light sensor module is used to detect the light
brightness in the environment. It comes with 2 outputs, digital and analog. The
threshold (sensitivity) of digital output may be adjusted by tuning the on board
variable resistor (potentiometer). On board it provides a LDR, high sensitivity and
34
commonly being employed for light sensing. The module comes with power LED
and status LED as an indicator.
In this project, light sensor module is used to read light intensity for the
surroundings of the smart indoor gardening system. The data from sensor is sent to
microcontroller to process and thus give signal to LED bulb whether to ON or OFF
according suitable range of light intensity needed by the plant. The way it works is
that as the resistance of the photocell decreases, the total resistance of the photocell
and the pulldown resistor decreases. Table 3.2 shows approximate analog voltage
based of the light/resistance w/a 5V supply and 10K ohm pulldown resistor.
The DS1307 Real Time Clock used as time clock in this system. Real Time
Clock module that keeps perfect time and has a battery backup so it would not reset
if the Arduino loses power. So in SIG system, RTC 1307 used to setting time of
lighting system of LED Bulbs. SDA of the RTC to analog4 pin while SCL to analog
5 pin of the Arduino UNO board. Figure 11 and Figure 3.12 shows the RTC Ds1307
module and pin connection to Arduino UNO board respectively.
3.4.5 Relay
The relay is one of the switch types which are electrically controlled. The
components in relay are inductor coil, a spring (not shown in figure), swing terminal,
and two high power contacts named as normally closed (NC) and normally open
(NO). Relay uses an electromagnet to move swing terminal between two contacts
(NO and NC). When there is no power applied to the inductor coil (Relay is OFF),
the spring holds the swing terminal is attached to NC contact.
In this project, two relay type SRD -05vdc-sl-c module was used to control
high voltage the LED Bulb and water pump while keeping them isolated from the
microcontroller. It was chosen because easy to use, with simple three line structure
while can be connected directly to the input/output port of microcontroller.
Figure3.13 is show the 5V relay module using relay SRD-05vdc-sl-c type.
38
Figure 3.14 is show the schematic of the 5V relay module. In this project,
relay module is used for control LED bulb is connect to digital pin 6 while for water
pump at digital pin 13. One of the advantage used the relay module is cheap prices .
39
The water pump in Figure 3.15 that used is emperor mini submersible power
head and pump where recycled from fish aquarium. It used for irrigation system to
generate water from reservoir or water tank to the plant through irrigation tubing.
The water pump is interfaced with the microcontroller through a relay since the
microcontroller output ports does not provide enough power to drive the pump.
Led bulb is the most essential item in lighting part of SIG system, where it
provided supplemental light to the plant. In this project, 3 Watt 38-Led E14 (Non
Standard) Base Bulb was used. This is because beside it is frugal, LED bulb can
develop the plant to grow better with the good amount of lighting. Figure 3.16 show
the LED bulb used.
This topic will discuss on software development and debugging of the circuit
and developing an embedded system. In this project, the software has been
developed using Arduino Software by using C programming language.
41
The Arduino IDE comes with a software library called "Wiring" from the
original Wiring project, which makes many common input/output operations much
easier. Users only need define two functions to make a runnable cyclic executive
program:
The Arduino IDE uses the GNU toolchain and AVR Libc to compile
programs, and uses avrdude to upload programs to the board. As the Arduino
platform uses Atmel microcontrollers, Atmel's development environment, AVR
42
Studio or the newer Atmel Studio, may also be used to develop software for the
Arduino.
In order to display the condition of the sensors using LED indications and
display on LCD screen, the DHT11 temperature, light and soil moisture sensor is
connected to Arduino UNO board as shown in Table3.2. The ATmega328
microcontroller was programmed in C to check and measure the sensors as Figure
3.18.
As the mention in Figure 3.18 that light intensity and temperature should be
lower than 900n.m wavelengths and 32 oC respectively. This is because it can give
damage on the growth of the plant.
43
3.6 Testing
The first impression the user will look the product presentation is the safety
of the system. For this project, it still in the prototype mode and the product
presentation would not be as suitable for commercialization. The circuit in this
project will be protected by the plastic box as shown in Figure 3.19.The front of the
box contains LCD screen, LED indications and Buzzer for alarm beep.
CHAPTER 4
4.1 Introduction
Chapter 4 will explain about the result obtained from this project. It includes
how the programming works on reading t from the Arduino board to display on LCD
screen. Testing has been done and all the results had come out with the discussion.
4.2 Hardware
The Arduino Board can connect directly to DC/AD adaptor power supply so
that SIG system can start function. When the brain of the system, Arduino board
start function, the input such as temperature, soil moisture and light sensor with
RTC module, relay start working their job. The relay will start ‘ON’ the LED Bulb
according setting time. While the soil moisture sensor will start reading and the data
obtain will be sent to the system in voltage value. Since the microcontroller has the
capability of 10-bit analog to digital converter, it will convert and manipulate the
46
data obtained to get the actual condition of humidity. After that, the conditions of the
system are displayed on the LCD screen. The microcontroller instruct the relay on
the water pump when ‘DRY’ condition. Figure 4.1 and figure 4.2 shows main
controller and circuit design of this system.
Figure 4.3 shows the entire schematic of the circuit diagram for the smart
indoor gardening system consists of light, DHT11 and soil moisture sensor as main
input. Then, two relay is used to active LED bulb and water pump.
4.3 Software
Figure 4.4, 4.5, and 4.6 shows the software to generate the output on the LED
indicator. While the below Figure 4.7 shows that the programming was compiled and
successful uploaded in Arduino.
50
4.4 Result
Figure 4.9 overall system smart indoor gardening. Means when the sensor
start working their job and pass to, the microcontroller, the microcontroller will
process the data received. For the soil state, LEDs will change the colour according
to the soil moisture condition. Then, the microcontroller will again manipulate the
information and decide whether the pump will start operating or not. When the value
obtained from the sensor is below the moisture level needed by the plant, the plant
will start operating and the water will be supplied by those that is connected from the
outlet of the pump to the plant. The water source for the tank is can be from rain or
from the main pipeline. The floater inside the tank will control the level of water
inside the tank. The systems keep running the process continuously until the user cut
the power source.
51
Figure 4.9, 4.10 and 4.11 is shows result of the spectral of the T5 fluorescent
and white and yellow LED bulb by using spectrometer. This experiment was running
in room temperature and same distance between a device and the bulb. After making
decision, we choose to use LED bulb as supplemental light to replace sunlight as
light source due it more similar with sunlight spectrum.
4.5 Discussion
First, when the user on the power supply, the system will be working. The
microcontroller on the Arduino Uno interpreted the data sending by the sensor used
which in this case Atmega138 was used. The microcontroller in Arduino Uno was
already been programmed according to the desire output and it can communicate
with the hardware.
There will be three range of soil state which represents three condition that
are dry, moist and soggy. If the LCD display the output is dry in the range of more
than 800>1023, then the LED will turn to red colour. This meaning red alert and
water pump need to start ‘ON’ Second condition is moist. The range of resistance is
between 401-800. Once this range was detected, the LED will change to green colour
while the LCD will display moist with its range of soil state. Its means, in this
condition the soil enough water.
The last condition that will be discussed is soggy. The soil state during soggy
is in the range below than 400. If the data transmit is in this range, the output colour
will turn to the yellow. On the hand, the LCD will display the output soggy. While, it
means, the relay give direction to water pump from pumping the water from the tank.
For the lighting system, LED Bulb will be ON in 15 Hours and OFF in
9hours according time the plant outside needed. From the previous research, The
system will turns on the LED bulb to make sure the plants receive the right amount
of light (15 hours daily). The light sensor plus Arduino measure how much natural
sunlight is received and turn on the supplemental lights to make up any difference.
Temperature sensor used to take precaution and to make sure the plant is in the
normal condition not too high and not too low.
55
CHAPTER 5
5.1 Introduction
5.2 Conclusion
The first chapter stated that the two objective need to be accomplished. First
objective is to design and develop the system is a low cost and automated control for
enclosed building. Secondly, Arduino Uno board is used as brain of the system to
monitor lighting and watering system on the plants that assists by Arduino software
to trigger any faulty.
56
For the software design, Arduino has successfully developed as to read the soil
state. The colour will change according to the three range of soil state which is dry,
moist and soggy. If the soil is dry, then the red LED will on together with a buzzer. This
means red alert. Then, when the soil is in moist, green LED will turn on, the soil in good
condition. The last condition of soil state is soggy mean water pump needed to stop
pumping the water from water tank.
5.3 Recommendations
Although this project was a success, but there are some recommendations for
future employment in parliamentary procedure to make this more perfect system
CHAPTER 6
PROJECT MANAGEMENT
6.1 Introduction
Table 6.1 and Table 6.2 shows project Gantt chart for semester one and
semester two respectively. Compare to Gantt chart semester one, Gantt chart in
second semester is progressing in planned.
58
Table 6.3 shows the cost estimation of Smart Indoor Gardening system. The
most expensive components in this board are Arduino Uno Module. On the other,
RTC module also in range of expensive price of component.
Subtotal RM281.40
60
Table 6.6 shows total cost estimation of smart indoor gardening system. As a
complete system consists of electronics item, cost of plant and others item, the total
cost of this project is about RM374.90. The project still in budget and lower than
others out there.
61
REFERENCES
[12] Dilrukshi Hashini Galhena*, Russell Freed and Karim M Maredia, (2013),
“Home gardens: a promising approach to enhance household food security
and wellbeing” Galhena et al,BioMed Central Ltd.
[17] Dr. Leonard Perry, (2010), “Indoor lighting for plants”, Extension Professor,
University of Vermont
[18] A. Raja Gopal, D. Imthiyaz Ur Rahman, P.Nischal Reddy, Y. Siva Sai Krisha
Kumar Reddy,(2013) “Mobile Signal Jammer Using Arduino”, GOKARAJU
RANGARAJU INSTITUTE OF ENGINEERING AND TECHNOLOGY,
Elect. & Electronics Eng Dept.
[19] "Mandi B, Shaney E, Robin S, .(2011) “What Makes Plants Grow?”
University of Florida IFAS Extension
[20] Gepffrey Morrison , (2013), “LED vs CFL Bulbs: Colour Temperature,
Light spectrum and more”
[21] R. J. Bula, D.J. Tennessen, R.C. Morrow, and T.W. Tibbitts. , “International
Lighting in Controlled Environments Workshop”.W.Tibbitts (editor) 1994
NASA-CP-95-3
63
APPENDIX A
Arduino Programing for Smart Indoor Gardening
// libraries definition
#include <LiquidCrystal.h>
#include <Wire.h>
#include "RTClib.h"
RTC_DS1307 RTC;
#include <dht.h>
dht DHT;
// pins definition
int DHTPin = A1;
int LightSensorPin = A2;
int SoilMoisturePin = A0;
int soggyLEDPin = 10;
int moistsoilLEDPin = 9;
int drysoilLEDPin = 8;
int BuzzerPin = 7;
64
int LEDBulbPin = 6 ;
int WaterPumpPin = 13 ;
//Variables
int moistureSensorValue;
int INT;
// objects definition
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup () {
// serial initialization
Serial.begin(9600);
// LCD initialization
lcd.begin(16, 2);
lcd.clear();
// Wire initialization
Wire.begin();
RTC.begin();
RTC.adjust(DateTime(__DATE__, __TIME__));
if (! RTC.isrunning()) {
// date and time adjust as the PC computer date and time
Serial.println("RTC is NOT running!");
}
65
pinMode(SoilMoisturePin, INPUT);
pinMode(soggyLEDPin, OUTPUT);
pinMode(moistsoilLEDPin,OUTPUT);
pinMode(drysoilLEDPin,OUTPUT);
pinMode(BuzzerPin, OUTPUT);
//light sensor
pinMode(LightSensorPin, INPUT);
pinMode(LEDBulbPin,OUTPUT);
//waterpump
pinMode(WaterPumpPin,OUTPUT);
// pinMode(pumpLEDPin,OUTPUT);
}
void soil_state(){
moistureSensorValue = analogRead(SoilMoisturePin);
// check the moisture range
if (moistureSensorValue <=400){
lcd.setCursor(0,1); //2nd line
//if the soil is soggy
lcd.print("S:Soggy");
digitalWrite(drysoilLEDPin,LOW);
digitalWrite(moistsoilLEDPin,LOW);
digitalWrite(soggyLEDPin,HIGH);
digitalWrite(WaterPumpPin,LOW);
}
66
void light_decision(){
INT = analogRead (LightSensorPin);
if (INT>=680){
DHT.read11(DHTPin);
if (DHTPin<=32){
digitalWrite (LEDBulbPin,HIGH);
}
else{
digitalWrite (LEDBulbPin,LOW);
}
}
else{
digitalWrite (LEDBulbPin,LOW);
}
}
lcd.setCursor(0,0);
lcd.print(now.day(), DEC);
68
lcd.print('/');
lcd.setCursor(3,0);
lcd.print(now.month(), DEC);
lcd.print('/');
lcd.setCursor(5,0);
lcd.print(now.year(), DEC);
lcd.print('/');
lcd.setCursor(10,0);
lcd.print(now.hour(), DEC);
lcd.print(':');
lcd.setCursor(13,0);
lcd.print(now.minute(), DEC);
lcd.setCursor(16,1);
lcd.print("H:");
lcd.print(DHT.humidity);
lcd.print("%");
lcd.setCursor(26,1);
lcd.print("T:");
lcd.print(DHT.temperature);
lcd.print("C ");
delay(1000);
soil_state();
// digitalWrite (LEDBulbPin,HIGH);
// }
// else{
// digitalWrite (LEDBulbPin,LOW);
// // delay(2000);
// }
}
else{
digitalWrite (LEDBulbPin,LOW);
// delay(2000);
}