Sherpa Pasang
Sherpa Pasang
Prototype System
Bachelor’s thesis
Information And Communication Technology, Bioeconomy
Autumn Semester of 2022
Pasang Sherpa
Information And Communication Technology, Bioeconomy Abstract
Author Pasang Kaji Sherpa Year 2022
Subject Automatic plant watering system
Supervisors Ari Heitila
The thesis work aims to develop an automatic plant watering system. The prototype created
in the thesis project could be utilized for various client applications. Designing and
safeguarding flowers and plants in a home are just a few examples. Even when people are
away from home, an automatic watering system will play a critical role in preserving flowers
and plants. It continues to water the plant as the soil moisture level completely dries out.
The primary goal of this thesis is to develop an autonomous plant watering system that can
provide enough water to a plant without requiring the presence of a human in an indoor
space within a reasonable amount of time. The method used to design this automatic water
plant system is qualitative research by meetings and interviewing the client. The design
thinking process is used for developing the prototype. This automatic plant watering
prototype gadget provides the necessary water for growth. It sends an alert when the water
tank is nearly empty. The prototype assembling process is made via online stimulation using
Tinkercad. Further assembling devices, connecting to microcontrollers, and setting up the
IoT platform service to monitor data were critical to the project's usefulness and simplicity.
The final prototype is constructed and tested, fulfilling the arrangement between the
sensors and microcontroller via the online platform Tinkercad. Furthermore, the prototype
developed for this thesis topic might serve as the foundation for future autonomous
hydroponic and aeroponics systems as override access connections.
1 Introduction ................................................................................................................1
1.1 Aim ................................................................................................................... 1
1.2 Background ...................................................................................................... 2
1.3 Problem statement .......................................................................................... 3
2 Theoretical and technical background .......................................................................4
2.1 Basics of electricity ........................................................................................... 4
2.1.1 Power, voltage, and current relationship ............................................ 4
2.2 Characteristics of successful product and criteria ........................................... 4
2.3 Prerequisite planning of the product and criteria ........................................... 5
2.4 Sensor and Components Background .............................................................. 7
2.4.1 Arduino uno.......................................................................................... 7
2.4.2 DC motor .............................................................................................. 7
2.4.3 Soil moisture sensor module................................................................ 8
2.4.4 TMP36 .................................................................................................. 9
2.4.5 Ultrasonic sensor ................................................................................ 11
2.4.6 One-channel relay module ................................................................. 12
3 Methodology ............................................................................................................13
4 Implementation and implementation plan ..............................................................17
4.1 The sensor and component configuration and assembly. ............................. 17
4.1.1 Relay SPDT, NPN Transistor (BJT), DC-motor (water pump), and
Arduino configuration ........................................................................ 18
4.1.2 Soil moisture configuration with Arduino Uno rev ............................ 19
4.1.3 Ultrasonic sensor configuration ......................................................... 21
4.2 Description of the coding part ....................................................................... 22
4.3 Components overall wiring, assembling process & cost ............................... 23
4.4 Prototype testing ........................................................................................... 25
5 Conclusion reflection and further future prototype ................................................27
References .......................................................................................................................29
Appendices ......................................................................................................................37
Appendices
List of Figures
Figure 4. Final figure. The connection of Arduino esp8266, relay, and soil moisture sensor,
.........................................................................................................................................24
1 Introduction
An automatic watering plant system prototype is a basic automated prototype that allows
the user to leave their house freely without worrying about dying the plant while away
according to the plant’s needs. The primary focus is automatically watering the plant when
the soil is too dry. It also provides soil moisture value and room temperature and returns the
tank’s water level. This project consists of sensors and components listed below.
Arduino Uno rev two as a microcontroller and other required details device sensor for the
automatic watering planting system are introduced in more detail below in section 2.4.1.
1.1 Aim
The prototype of a watering plant created in this thesis project is for a client based in Nepal.
It investigates the finding and description of the component used for the watering plant. This
project prototype is for people who use only small plants or home pots. However, it can be
scalable by using more relays and switches-water pumping systems used in many fields, such
as aqua farming, fish farming, and aquariums. The list of opportunities goes on from the
future of automatic smart agriculture. Nepal is a developing agricultural nation. Nearly 66%
of Nepal’s population works in farming ("Nepal at a glance|Food and Agricultrue
Organization of the United Nation, n.d."). They do not know about the electronics; they
traditionally use what they have been operating (Ghimire, 2020).
This thesis aims to design a simple automatic watering system using IoT, sensors, and
microcontrollers for a local farmer in Nepal. This thesis is done for only a single plant. The
project develops a prototype of an automatic watering system and its associated cost of
implementing the automated watering system. This project will inspect equipment set-up
cost, as well as attempts to find an easy way to make a low-cost / inexpensive and more
effective prototype of an automatic watering system.
1.2 Background
Nevertheless, automation also results in employment loss. Mainly, earnings and work
chances would experience significant negative consequences, and technological
unemployment based on automation still raises concerns. Although automation has
advanced, manual involvement is still recommended even when the tool can perform most
repetitive tasks.
On the other hand, there will be new skills and work opportunities. During processing, a few
flaws could appear. There is a significant demand for automation specialists to develop,
implement, and monitor such technology (Techopeida, 2021-b)
A different name for agricultural automation is smart farming. Farmer yield output is
increasing to meet the demands of our growing population. More companies have created
cutting-edge technologies and automated cultivating crops or livestock. Agrobots for
strawberry harvesting and the first commercial robotic apple harvest are some of the two
examples. Smart agriculture can use robots and drones for remote monitoring of agricultural
conditions. All this may result in reduced labor expenses and fewer workers needed in the
farming industry. Despite these advantages, there are also some disadvantages, including
high setup costs, challenges using it technically, and time. Software, system, and output
advancements in farm automation technologies gear (Ku, 2022)
Throughout the history of automation, new ideas and innovations have shaped the role of
automation. From the beginning, people seek a better way to improve efficiency in the day-
to-day task. The greater impact of evolution was in the 17th to 18th - centuries, that is
Industrial revolution. It was a significant turning point in industrial automation. During this
era, the steam engine was invented. At the beginning of the nineties, the industry was
processed by electricity. Such as, the motor was more productive and efficient than the
stem. During the 20th century, computers and robots have rapidly changed automation
(2022, Bong). The automation could raise global productivity growth by 0.8 to 1.4 percent
annually (McKinsey, 2019). The global population has been increasing rapidly; in 2021, the
current total world population is 7.837 billion (Population 2021, 2021). As the population
increases, the food demand is also overgrowing and facing a labor shortage (Richard.wolter,
2021). Thus, automation and robotics technologies would able to do tasks more efficiently
and sustainably (Today, 2021)
The majority of houseplant plants may survive for a few days without any suffering;
however, staying longer than a week requires special care to ensure the proper amount of
moisture in the soil to sustain the plant (Houseplants: Holiday Care / RHS Gardening, n.d.).
The client was addressing the problem of plants dying when the client was on vacation.
Taking care of only a few plants in the room or house is costly and time-consuming. The
client’s concern is seeing the plants yellowing and eventually dying because of a lack of
water and caring while out of home for a long time. The client is interested in getting an
automatic watering prototype. Thus, this project will present an automated watering
system using Arduino Uno rev, a relay, a water pump, and other sensor devices.
2 Theoretical and technical background
The basics of electricity include current, voltage, and power. Firstly, a current is the rate of
flow of electrical charge. The international unit for measuring current is an ampere (A),
sometimes called an amp. Secondly, a voltage is known as the energy per unit charge.
Voltage is equal to pressure, measured in volts (V). Lastly, power is the product of the
voltage and current flow in a current. The quantity of energy moved or converted per unit of
time is known as power in physics. The watt, or one joule per second, is the unit of power in
the International System of Units. Ancient writings also refer to power as activity. A scalar
quantity is power and power is calculated by multiplying Current by Voltage (Power
(Physics), 2022).
The power, voltage, and current relationship is known as the Watts law. This law was
formulated by James Watt, a Scottish engineer and chemist, who provided information on
how to comprehend how electrical circuits and parts function and explains how power
voltage and current are related.
According to Watt's formula, Power (w) = Voltage (v) * Current (A). As a result, the
relationship between power, voltage, and current is straightforward. If the right- or left-hand
equation increases, the effect will grow on both sides.
The basic completion of this project must be able to measure the soil moisture level. When
the soil is dry, it automatically puts the water in; after it has enough water, it automatically
turns off. The prototype must send an alert about the soil moisture condition and the water
tank’s level as a message on the screen.
A few other brief characteristics of this prototype can determine if there is no water, then it
automatically dispenses water to the plant; if there is an extreme concentration of water, it
automatically turns off the water pump and does not dispenses water to the plant. The data
collected by the sensors are displayed on the LCD or the serial monitor. The prototype can
send an alert message when specific parameters are met, either too dry or too much water
concentration. And update the information on the water tank level by the ultrasonic sensor.
The final testing prototype should be able to extract soil moisture data and function
automatically. If the project delivers an automatic watering system then it is approved.
An essential component of the automatic watering system is listed below as its purpose.
Potentiometer 1 250 kΩ
potentiometer
The safe ECC608 crypto chip accelerator found in the Arduino UNO Rev ("ABX00021 Arduino
UNO WIFI Rev2 (ATMEGA4809, ECC608 Crypto Chip Accelerator), n.d.") enables the Arduino
UNO Rev to connect to a Wi-Fi network. Inertial Measurement Unis (IMU) is an 8-bit
Microchip processor built into an Arduino board. The Wi-Fi Module is self-contained with an
integrated TCP/IP protocol stack that can act as an access point or a wireless network
connector (George, 2016). The Arduino Uno Wi-Fi’s digital I/O pins, or six of them, can be
used as PWM outputs. Additionally, it contains a reset button, six Analog inputs, a USB port,
a power nine connector, and an ICSP header. Every component required to support the
microcontroller is included. By connecting the Arduino to a computer USP port or a power
supply via an AC adapter or battery ("ABX00021 - Arduino Uno Wi-Fi REV2 | Arduino | Varia-
Store, n.d.")
2.4.2 DC motor
DC motor is an electrical pump with low voltage. It is cheaper than an AC motor and is
mostly used for automotive, household, and water well. It is well suited for this project
because of small, easily work with a one-volt battery, and is easily available in the market. It
is also one of the most typical kinds of motor, a DC motor or direct current motor. Typically,
DC motors only have two leads: a positive lead and a negative lead. The motor will turn if
you connect these two lines to a battery. If the leads are switched, the motor will turn in the
opposite direction (Rajsawkare13, 2022).
2.4.3 Soil moisture sensor module
The primary function of the soil moisture sensor in this project is to gauge the moisture
content, which is the quantity of water in the soil. It is only possible to obtain information
about the moisture content in the soil with a soil moisture sensor. As a result, the soil
moisture sensor aids in gathering data on capacitance variations brought by changes in the
dielectric. Soil and water combine to create the dielectric. The sensor cannot directly
measure the amount of water in the soil. However, the soil moisture sensor monitors the
ions dispersed in the wetness (Interface Capacitive Soil Moisture Sensor V1.2 with Arduino,
LCD, and OLED, 2022).
The Tcliclaz firm has produced a high-quality soil moisture sensor package at 10 euros for the
soil moisture sensor module. The package from the same production company includes a
detailed description of the technical datasheet, product specifications, and essential
information. The following paragraphs interpret the brief background of the soil moisture
sensor.
The soil moisture sensor is a sensor that gauges the soil’s moisture content. The soil
moisture has the probe’s module and fork-shaped form. The way the moisture in the soil
functions is simple. The two exposed wires on the fork-shaped investigation serve as a
variable resistor (much like a potentiometer) whose resistance changes in response to the
amount of water in the soil. Inversely correlated with soil moisture is the resistance in the
soil moisture sensor. In other words, the conductivity will be higher if more water is in the
soil. When the resistance is lower, if there is less water in the soil, the conductivity will be
poorer, and the resistance will be higher. The sensor generates an output voltage depending
on the resistance. It helps to determine the moisture level by reading the value generated by
the sensor. (Last Minute Engineers, 2019). The surface of the soil sensor is nickel-plated. It
can make conductivity better as well. A fork-shaped probe with two exposed conductors
part of the sensor is inserted into the soil or another location where the water content is to
be determined. As previously stated, it functions as a variable resistor whose resistance
changes depending on the moisture content of the soil.
The electronic module that connects the probe to the Arduino is also a part of the solid
moisture sensor. The module is made available at an Analog Output (AO) pin and generates
an output voltage following the probe’s resistance. A digital output (DO) pin is available after
the same signal has passed to a device that compares two outputs, voltages, or currents of a
digital signal indicating the data (Wikipedia Contributors, 2019). The device is the LM393,
whose high-accuracy comparator is used for digitization. In addition, the module includes a
built-in potentiometer for configuring the digital (DO) output’s sensitivity. Using a
potentiometer can define a threshold that will cause the module to output LOW instead of
HIGH depending on whether the moisture level is above or below the threshold value. This
configuration is beneficial when someone wants to start an action when a certain threshold
is met. For instance, anyone may activate a relay to start the water pump when the soil
moisture level reaches a certain level. The module also has two LEDs. When the module is
powered on, the Power LED will turn on. Likewise, the status LED will turn on when the
digital output is LOW.
The soil moisture sensor requires three pins to connect and is extremely simple. However,
the connection and configuration are explained in the implementation content. The soil
moisture sensor can be used for both Analog and digital output. However, the Analog output
reading for this project is performed from the soil moisture sensor. The description of soil
moisture pins is described below.
- The Analog Output (AO) pin, attached to one of the Analog inputs on the Arduino Uno
board pin, provides an Analog signal to the Arduino from the soil moisture sensor.
- The VCC pin powers the sensor. It is advised to supply the sensor with 3.3V to 5V of
electricity, as the Analog output will change depending on the voltage applied to the
sensor.
2.4.4 TMP36
The TMP36 is a low-voltage, precision centigrade temperature sensor for Arduino. The
typical use of the TMP36 and its other module is based on the environmental control
system, fire alarms, power system monitors and CPU thermal management, thermal
protection, etc. For this project, the TMP36 is used for getting data and information on the
surrounding temperature. It helps to understand the room temperature of the plant
surrounding when people are away from the plant. The proper markings are included with
this sensor, simplifying the setup. Despite being whole numbers, the readings are pretty
accurate because the digit immediately after the decimal point is always zero. It is an
affordable TMP36 centigrade temperature sensor module. Since this sensor is pre-calibrated
and does not require additional components, anyone can start measuring relative humidity
and temperature immediately. The TMP36 can have typical accuracies of +1°C at +25°C and
+2°C over the -40°C to + 125°C temperature range.
The TMP36 is described by -40°C to +125°C, delivers a 750-mV output at 25°C, and works
with a single 2.7 V supply up to 125°C. The TMP36 module may be connected without much
difficulty. There are only three pins in total. They are +V, Vout, and Ground. The +V is the
sensor’s power supplies, which can be between 2.7V and 5.5V. Vout Pin produces an Analog
voltage directly proportional to the temperature. It should be connected to an Analog (ADC)
input. GND is a ground pin.
The configuration of the TMP36 is straightforward. Only three pins need to be connected to
the Arduino Uno board. They are two for the power unit and the last for reading the sensor
value, also known as the data pin. The sensor is powered by 3v or 5v output. The +V is
attached to the power supply of 5v in this simulation prototype, and the middle pin Vout is
the Analog signal output from the sensor. It is connected to the A4 Analog input of an
Arduino Uno rev. V out or the Data pin to the Analog pin A4, and GND pin to the ground.
Below is the table of the hook-up for the three TMP36 pins with Arduino (Low Voltage
Temperature Sensors PIN CONFIGURATIONS 1 2 3 5 4 TOP VIEW (Not to Scale) NC = NO
CONNECT v out SHUTDOWN GND NC +v S Figure 2. RJ-5 (SOT-23), n.d.).
+V or power pin 5v
The project aims to create a prototype that can alert the user to the parameter being met,
simplifying sending notifications of the water tank level. This ultrasonic sensor will help in
understanding the status of the water tank.
It is a distance sensor. This low-cost sensor has non-contact measuring capabilities spanning
from 2cm to 400cm with a range accuracy of up to 3mm. An ultrasonic transmitter, a
receiver, and a control circuit are all included in each HC-SR04 module.
On the HC-SR04, the four pins need to be considered: VCC (Power), Trig (Trigger), Echo
(Receive), and GND (Ground). These four pins are shown in figure.1. This sensor is
straightforward to set up and utilize for any next range-finding project.
2.4.6 One-channel relay module
The primary objective of the relay for this project is to switch the water pump. Relays are
employed when a separate or a single signal must control multiple circuits.
For DIY projects that need small quantities of AC or DC power to turn on and off, these
affordable, simply connected modules are ideal. The sole downside is that these devices are
electro-mechanical, which increases their vulnerability to wear and tear over time.
The relay controls the switch of the water pump. Thus, it is essential to understand the
operation of the relay. An electromagnet resides at the center of a relay (a wire coil that
becomes a temporary magnet when electricity is passed through it. Imagine the relay to an
electric lever; when a person turns it on, it turns on another device with a considerably
larger current than someone would typically use. For instance, two short circuits: one has an
electromagnet and a sensor or switch, while the other has a magnetic control and an electric
motor. Both circuits are initially open and have no current flowing through them. The
electromagnet is energized and surrounded by a magnetic field when a modest current
passes through the first circuit. The second circuit's contact is drawn to the energized
magnetic, shutting the switch and enabling a sizable current to pass. The connection moves
back to its initial position when the current in the first circuit stops flowing, closing the
second circuit. A relay typically has five pins, and three high-voltage terminals (NC, COM, and
NO) that connect to the controlled device.
Alternatively, the relay is a single-pole, double-throw switch (SPDT). Relay SPDT is used for
this simulation since it was difficult to find the single-channel relay module in the Tinkercad.
The device offers a broad range of soil humidity management. The associated threshold may
be adjusted and monitored using the potentiometer. The relay activates when the humidity
drops below the predetermined threshold. The relay is disconnected if the value rises above
the specified value; the module set product has a delay feature of 3-5 seconds. The user
must wait 5-8 seconds after each humidity adjustment before detecting a change in the
relay because it includes a delay feature. The relay will not often flicker when the humidity is
sensed at a critical level. When the criteria are satisfied, the green LED light is changed
appropriately. A high-quality Songle relay that can withstand a 1500-watt load is used in the
relay device (In-Depth: Interface One Channel Relay Module with Arduino, 2019). It will meet
most people's requirements at 3 euros which is a very reasonable price. It has a power
indicator light and a relay pull-in indication.
3 Methodology
Quantitative research is a very popular method in academic settings, but there may be times
when qualitative methods are more appropriate. For this prototype project, the qualitative
research involves using what, how, and why questions and focus groups to explore a topic in
depth (M, n.d.). There are also some questions that come up during the research process.
For example, what is a relay, and how is it used? The design of this prototype can be
described as a qualitative prototype project.
QA qualitative prototype project is a research method that uses the design and testing of
prototypes as an approach to understanding end-user needs and behavior (Hunter & Stone,
2017).
A prototype is a preliminary model or representation of something that can be used as a
basis for further development or testing. It can be used to understand user needs and gather
feedback that can then be incorporated into the design of a final product. While not all
prototypes are developed into final products, they can provide a useful way to generate
ideas and identify problems early in the design process. Similarly, this prototype also gives
ideas and concepts to automate the watering system and show the water tank level.
For this project, various sensors and their datasheet tables are used for the implementation
phase. Additionally, to develop a coherent phase of a product design development process
model is used. The product development process is divided into three distinct phases;
Understand, Define, and test. The Understand phase involves conducting research to
understand the needs of the customers and the market. In the Define phase, the product
requirements are translated into a solution, and the development gets together to create a
prototype of the product in the test phase. The product development process requires a lot
of research and planning before implementing the project. Various tools and methods
available in the market can be used to develop the product successfully. For this prototype
project design thinking model is used. It is used for better user experience, customer
satisfaction, and technology acceptance. It improves the system's quality, improving
development efficiency. Design thinking is essential as, according to Tom Brown, it is “a
discipline that uses the designer’s sensibility and methods to match people’s needs with
what is technologically feasible and what a viable business strategy can convert into
customer value and market opportunity” (Brown 2008, p. 86). Design thinking helps to make
a prototype that can be scaled up numerously. For example, this one automatic watering
system can be used in different plant varieties with different values required by the plant.
Design thinking can provide fresh ways of thinking, solutions, and ideas that have not been
pulled up before (Brown, 2008). The process of design thinking involves the application of
human-centered approach to the design process to create innovative products that meet the
customer requirements. The model consists of three steps: empathize, define, and ideate.
Empathizing involves understanding the user’s needs and requirements by interacting with
them. Define involves translating the requirements into solutions and evaluating the
feasibility of the solution. Ideate involves brainstorming innovative ideas to develop a
product that meets the customer's requirements. The idea is developed and created
innovative product. Later the product is tested. The design thinking process consists of five
phases, as presented in the figure: empathize, define, Ideate, Prototype, and test.
Stage 1. Empathize
Stage 2. Define
The second stage: Defining the wants and issues of the client. As understood from the
empathy phase, the client needs a prototype model for the automatic watering plant. The
knowledge acquired during the first phase is then utilized to define and identify the
problems. The problem was that the client wanted freedom from taking care of plants while
on vacation.
Stage 3. Ideate
Knowing and understanding the material from the first two phases can help in thinking
creatively, considering other perspectives on the issue, and discovering original solutions to
the problem. Since there is a specific challenge, i.e., making a prototype automatic watering
system.
Stage 4. Prototype
Now is the time to start testing out ideas. The prototype aims to identify the best answer for
each issue encountered. A low-cost, scaled-down product should be produced as a
prototype to test the concepts generated during the ideation stage.
Stage 5. Testing
The final testing phase concludes the design thinking process. The prototype will be tested
during this stage. Every product component must function well for the operation and
concept design to be successful. The assessor will use the test findings to assess the
outcomes of the overall design project. The main achievement of this stage is the most
significant understanding of the consumer and their ideal product/solution. The testing
phase is conducted during the final assembly process.
This model effectively develops new products that meet the customers’ requirements in the
market. It also helps to reduce the development cost and time of the products by providing
practical solutions to the problems faced by the users. The most important benefit of this
model is that it promotes innovation and creativity amongst the developers, which helps
them to develop innovative and unique products. However, this model has some limitations
including a lack of documentation and poor implementation procedure. Thus, it is advised
that this model should be used in combination with other models for the best results in the
development of the products. (Lucy E, n.d)
4 Implementation and implementation plan
1- For this prototype project implementation plan, the researcher defined goals,
conducted research, mapped out the risks, and scheduled milestones and actions.
2- Defining goals: the goal is to make an automatic watering plant system for a plant in
a pot. Defining the goals helps to understand the need to keep the plant alive while
clients are away from home.
3- Conduct research: the research is conducted on determing the product components,
which one to use, and which makes it more inexpensive for the prototype. For
instance, there are many products to choose from the market. Since the secondary
goal is to keep the cost low, the most affordable product options were chosen.
4- The most significant risk was in ordering and delivering the products. During all these
covid, the Russia-Urkina war broke out in February 2022, and some products are
harder to show. The project time is minimal, which hinders the project’s completion
since the delivery time is very long. Its mitigation plan is to order new parts within a
reasonable timeframe and wait for them to arrive. If something else happens, it is
better to do a simulation on the computer-based software, such as fritzing or
working on workable components. Secondly, another significant risk is incorrectly
assembled parts. Thus, its mitigation plan is to have backup components, create an
assembly plan, and consult with an expert. Thirdly, part incompatibility, which is a
technical risk type. Its mitigation plan is researching the parts' compatibility before
ordering.
As understanding the problem and demand of the client, the solution is more focused on
making an automatic watering plant system. Since some of the components only arrived on
time, unfortunately, the Arduino NodeMcu did not arrive. Thus, the prototype is processed
in Tinkercad online stimulation. It is known that using the Arduino Uno rev makes it possible
to make a simple automatic watering system in Tinkercad (How to Make an Automatic
Irrigation System Using Tinkercad, 2021). After finding all the required components in the
Tinkercad online platform for the solution, the circuit and wiring design and planning are
made by learning from Arduino tutorials and videos. The following is the connection and
assembly of the components.
4.1.1 Relay SPDT, NPN Transistor (BJT), DC-motor (water pump), and Arduino
configuration
In this prototype setup, the Arduino ground pin is connected to the ground pin (emitter pin)
of the NPN Transistor (BJT), and the NPN Transistor (BJT) collector pin is connected to coil
one or the GND pin of the relay SPDT. The Arduino 5v is connected to the VCC of the relay
module, and the GND pin should be connected to the ground to start the wiring procedure.
The relay SPDT normally opens the (NO) terminal and is connected to the DC motor’s
cathode terminal (+ve). Next, connect the IN-input pin, which is the base pin of the NPN
Transistor (BJT), to digital pin #2 of the Arduino Uno rev two. The illustration that follows
displays the wire connection in the final figure 4.
Table 3. The configuration of the Relay SPDT with the motor and transistor, power supply
GND GND
Coil 2 / VCC 5v
Anode pin (-ve) Anode pin (-ve)
Table 3 demonstrates that each row is connected to the respective connection point in each
row to the different components. The NPN Transistor (BJT) and relay make simple relays.
However, finding simple single-channel relays was hard to find quickly in the Tinkercad,
which took a long time and work. Thus, the NPN transistor connection needs to be prepared
for the prototype. The more explicit visual connection and representation are shown in
figure number 4.
Relay SPDT with the motor and the transistor power supply.
Some precautions need to be considered when connecting. The NPN Transistor (BJT) is
connected correctly first. The final layout indicates that, the NPN Transistor (BJT) 's base pin
should connect to Arduino digital pin two. The collector pin to the Relay SPDT's ground pin
and the NPN Transistor (BJT) 's emitter pin to the ground pin of the Arduino Uno Rev. The
transistor's flat side should be facing toward the relay. Similarly, as shown in the final layout
figure number 4, the NPN Transistor (BJT) 's terminals should be facing away from the relay.
Following the configuration indicated in the final image should connect the striped end of
the motor cathode pin (+) to the Normally Open pin of the relay SDPT, and the Relay SDPT
common terminal tow should connect the positive terminal of the battery. The motor's
diode should be connected to the negative side of the battery, as shown in the final image
figure number four.
The soil moisture sensor’s wire connection is simple. Firstly, it must provide power to the soil
moisture sensor. For this, the VCC pin of the soil moisture module is linked to the Arduino’s
5-3 voltage source. However, a well-known drawback of these sensors is that they only last a
short time in damp environments. Constantly applying power to the probe increasingly
accelerates corrosion. It is advised that the sensor is only powered when taking the readings
to prolong the life of the soil moisture sensor. The module can be powered off an Analog pin
of an Arduino because it draws around eight mA when both LEDs are illuminated. Thus, the
connection configuration is the module’s VCC pin to an Arduino’s power pin 5v, and the GND
pin of Arduino is connected to the ground pin of the soil moisture. Finally, attach the soil
moisture module’s signal or output pin to the Arduino Uno’s Analog pin 1 (A1). The wiring is
depicted in the following table, and its full implementation is in the final layout of the
prototype figure 4.
5v VCC
Calibration: to calibrate the soil moisture sensor for the specific soil type, it needs to be
monitored to acquire reliable results.
Depending on the type of soil utilized, the sensor may be sensitive because different soil
types might impact it. It is crucial to check the sensor value before saving data or setting off
activities. More is needed to understand the importance of the sensor outputs when the soil
is as dry as feasible versus when it is entirely saturated with moisture. For some trial and
error, this test is performed. This is how the data were read. So, this information will help
and use them as a threshold for triggering an action (Last Minute Engineers, 2019).
Based on the calibration values, the program defines the following ranges to determine the
status of the soil:
The ultrasonic sensor uses ultrasound to determine the distance level of the water level in
this project. The HC-SR04 sensor comes with four pins on it. They are signal pins (i.e., trigger
pins and echo pins) and power pins (i.e., the power input (VCC) and GND). These pins are
amazingly simple to connect with the Arduino Uno board. The following table depicts the
connection with Arduino.
5v VCC
D6 Echo pin
D5 Trig pin
Ground GND
4.2 Description of the coding part
All coding is attached in the appendixes and can be easily used in the Tinkercad online
platform. However, there is logic in considering the max and minimum levels of soil moisture
to trigger the pump. Similarly, the ultrasonic sensor values need to calculate and prepare the
preset-up condition to flow and send messages during different conditions. To make the
automatic water system successful, using the ultrasonic sensor and the soil moisture logic
has to be made as an algorithm, flow chart or in an understanding way.
Ultrasonic sensor:
The first step is to define the trigger pin, which is connected to Digital PIN nine, the echo pin,
which is connected to D10, and the led pin, which is connected to D7. They are a type of
integer variable. The pin mode was stated in the setup method. The led light is output, the
output is trigPin, and the input is echo Pin. The trig is high (on) in the loop function, then
trigPin is low (off) for a second, then echoPin is high (on), and it detects data, such as the
time it takes to deliver the sound wave and until it returns to the sensor. The function will
return the pulse length in microseconds at the end. As discussed in the equation and
calculation, the duration is multiplied by 0.034 and divided by 2 to get the distance. Finally,
on the Serial Monitor, the distance value is printed. If the distance value is equal to the
container and ultra-sonic sensor value, it will print that the water level is very low. The lower
the distance value, the more water is contained in the tank; the higher the distance value,
the lower the water level (Jabbar, 2019).
The water tank is 15cm in length or height of the tank, and the sensor is kept 2cm above the
tank. And the less than 2cm distance considered the distance value from the ultrasonic
sensor is invalid. If false, it moves to the next or another condition check.
Considering the maximum dryness is the value of the 500. And the logic only checks if the
soil is too dry or not in this prototype.
In the first case, if the soil moisture value is higher or equal to the maxdryness ie:500, which
is written like in the given bracket condition (Soil moisture value >= maxdryness). If true, it
prints dry soil, turns on the water pump, and starts watering and turning on the motor for 8
seconds. When the case is not, the second case condition check checks if the sensor-Value is
less than the maxdryness value. Which can be written as "SensorValue < maxdryness”. If the
second condition is true, it prints "soil is good, the motor is off. Similarly, vice-versa case first
and case second have an interval of 2 seconds of timer.
Since the projecting wire has been deconstructed into its component bits, as written above,
the sensor and component configuration and assembly have made the hardware assembly
quicker and simpler. The hardware as a whole and the wiring are combined more simply:
- Set up the soil moisture sensor. The soil moisture module is connected following the
previous illustration.
- The ultrasonic setup is easily connected with Arduino, as described in the section.
- Set up the LCD screen is getting data from the Arduino pins to the LCD screen pins.
The LCD monitor or screen displays the alert message and the data of temperature
and soil moisture value.
- Additional devices (NPN Transistor (BJT), 220 Ω – 1kΩ Resistor, Relay SPDT,
potentiometer, and battery) and elements have been incorporated where they are
connected to the overall picture.
A motor serves as a pump and acts as this prototype’s load, including the six pins on a single-
channel relay module. The connection’s specifics are discussed in the earlier relay section of
the sensor and component configuration and assembly in the 4.1.1 section. Overall, the
following diagram depicts all the devices connected with Arduino.
Figure 4. Final figure. The connection of Arduino esp8266, relay, and soil moisture sensor,
4.4 Prototype testing
The GND pin of the relay is connected to the ground pin of the Arduino, and a common
collector voltage (VCC) is connected to the 5V pin of the Arduino. Given that the IN is linked
to the Arduino’s ground node (GND), the relay jumped and will recover when the IN is
floating. The relay "kick" sound can be heard repeatedly, which indicates that it is
functioning correctly. As illustrated above, connect the fork probe and transmitter module
using the double-point cables. When the transmitter’s VCC is connected to 5v of Arduino and
the GND to the ground pin, the red power light turns on as soon as it is powered on. The one
flash of green and blue lights indicates confirmation of operation after charging. The blue
and green indicator light will turn on once after the fork probe is directly dipped into the
water. To make the water pump function in this prototype, connect the VCC wire to the
relay SPDT and the black wire to the negative connection of the battery.
Energy from the power source is used to power the relay. The relay operates like a switch
between the appliance and the power source. This is done with the battery in the wiring
image for this prototype. The normal (no), common (co), and normally closed (NC) terminals
of the relay are utilized to connect the cable. It is possible to identify which one is which
using a multi-meter with a continuous mode. The connection is complete if the multi-meter
beeps when the terminal end of the two ends is touched.
For instance, if the multimeter does not beep while conducting the test, the terminal is
typically open; conversely, if it beeps when you touch the terminal, the terminal is expected
to open. As a result, to open and active terminal is frequently connected to the black wires.
Table number three shows three control pins with the labels VCC, GND, and IN. The ground
wires are connected to the ground pin, the five volts terminal is connected to the VCC, and
the final pins are connected to PIN2 using the NPN transistor (BJT) for this Simulation.
Three signal pins are present on the soil moisture sensor. The first two are Ground and VCC,
which can accept supply voltages ranging from 3 to 12 volts. The nine-voltage battery is
required for this project.
TMP36 testing.:
The sensor can be left on an ice cube to determine the temperature of the ice. The output of
the TMP36 is connected to one of the analog inputs A4 pin of the Arduino. All three pins are
connected, as indicated in the final figure number four. The analogRead () function is used to
read the value of this analog input.
In reality, the sensor's output voltage is not returned by the analogRead () function. As an
alternative, it converts the input voltage, which ranges from zero to the ADC reference
voltage (technically, it is the operational voltage, i.e., 5V or 3.3V unless modified), to 10-bit
integer values between 0 and 1023. Use this formula to return this value to the sensor's
output voltage:
"This formula converts the number 0-1023 from the ADC into 0-5V" (In-Depth: Interfacing
TMP36 Temperature Sensor with Arduino, 2021). Using a 3.3V Arduino, this formula can be
used: Vout = (reading from ADC) * (3.3 / 1024). This formula converts the number 0-1023
from the ADC into 0-3.3V. Then, to convert volts into temperature, this formula is used:
Temperature (°C) = (Vout – 0.5) * 100” (In-Depth: Interfacing TMP36 Temperature Sensor
with Arduino, 2021).
Ultrasonic sensor:
The trigger pin must be set to a high state to generate ultrasound. It will send off a cycle
sonic burst at the speed of sound, which the echo pin will receive.
Relay SPDT with the motor and the transistor, power supply:
Some precautions need to be considered when connecting. The NPN Transistor (BJT) is
connected correctly first. As indicated in the final layout. I.e., the NPN Transistor (BJT)’s base
pin to Arduino digital pin no 2, the collector pin to the Relay SPDT’s ground pin, and the NPN
Transistor (BJT)’s emitter pin to the ground pin of the Arduino Uno Rev and the transistor's
flat side should be facing towards the relay. Similarly, the NPN Transistor (BJT)’s terminals
should be facing away from the relay, as shown in the final figure 4.
5 Conclusion reflection and further future prototype
After working on it for almost four months, this prototype is finally finished as the criteria,
instructions, and description of making an automatic watering system for the client is
successful. It has met all the requirements for the project.
Unfortunately, the esp8266 module did not arrive on time, as the given time frame is two
months. Thus, the decision to work on online simulation was made. Therefore, this
prototype ended up using the Arduino Uno rev, which could not perform the remote-control
access for the project. Primarily, the Node-MCU works with the Blynk IoT application. The
Blynk IoT application offers remote-control access and control features. Unfortunately, due
to the time limitation, the use of Blynk and Thingsboard was not possible to make the user
interaction completely remote-controlled. However, Tinkercad online simulation prototype
also works as planned. It sends an alert message to the user, but it cannot make the system
override function on simulation.
From the cost point of view, this prototype set-up cost is inexpensive, which is 13.17€
overall. However, the simulation and the brought components differ. Thus, the purchased
parts were not effective in this prototype. This prototype is the basic automatic watering
system. In addition, the goal was to develop a prototype for the client. The prototype is set
on the simulation. Therefore, detailed information on the connection and the component
are more focused on this prototype because the client is relatively new to this technology.
Thus, all the materials, such as coding and the circuit design, are made publicly available in
the appendices section. However, the theoretical process and planning are straightforward
to understand. It is clear to assemble, and it is a DYI project. Developing the working and
fully functioning during that time and finding the right equipment was also quite time-
consuming.
This simple prototype can be taken to the most advanced level using various sensors and
technologies. To further advance, the Ese8266 module can be implemented to get the
completely remote override system and more accuracy of all the sensor components by
polishing the coding and implementing the more reliable sensors. By using Esp8266, it allows
us to use the Blynk application and Thingsborad etc. The Blynk application requires the Blynk
library on a compatible device. They are all in the documentation, which is searchable on
Google. Blynk application includes a variety of widgets. They are UI components designed to
monitor or manage gadgets. Data streams are required for data transmission between the
device and gadgets—Blynk’s DataStream configuration. It also offers a template for a gadget.
A template contains Widgets, DataStream, and other customizations.
The modes are two development modes, and the user mode is the first two. Application and
device configuration are possible in developer mode. Another is user mode, which enables
monitoring and control of the devices but prevents configuration changes. Thingsboard is an
open-source IoT platform. It allows for the rapid development, management, and scaling of
IoT applications. Thingsboard can offer an out-of-the-box IoT cloud or on-premises solution
to enable server-side infrastructure for your IoT applications. Utilizing Thingsboard makes it
possible to do the following things such as: establish relationships between customers,
assets, and gadgets; gather and display data from aids and devices; utilize complicated event
processing to examine incoming telemetry and set off alarms, remote procedure calls to
manage your gadgets. To create workflows depending on events in the device life cycle,
events from the REST API, RPC requests, etc. Create dynamic and flexible dashboards to
show your customers the data and insights from their devices or assets. It has many further
futures in smart design and big data (thingsboard, n.d.).
Overall, the author achieved satisfaction from the commissioner, and the criteria of this
thesis project are met and will attain further implementation, expansion, and modification in
the future. The project can serve as a self-watering system. The author believes that this
porotype product can be used to water plants automatically according to the soil moisture
level data.
References
ABX00021 Arduino UNO WIFI Rev2 (ATMEGA4809, ECC608 crypto chip accelerator). (n.d.).
RLX COMPONENTS S.r.o. Electronic Components Distributor. Retrieved October 23, 2022,
from https://rlx.sk/en/original-arduino-boards/6689-abx00021-arduino-uno-wifi-rev2-
atmega4809-ecc608-crypto-chip-accelerator.html
Ashely, E. (2021, June 24). What is Arduino UNO? A Getting Started Guide. Www.rs-
Online.com. https://www.rs-online.com/designspark/what-is-arduino-uno-a-getting-
started-guide#:~:text=Arduino%20UNO%20is%20a%20low
Ghimire, P. (2020, July 25). Traditional Farming in Nepal - World report - Our Actions - Tunza
Eco Generation. Tunza.eco-Generation.org. https://tunza.eco-
generation.org/worldReportView.jsp?viewID=51735#:~:text=In%20Nepal%2Cmajority%2
0of%20the
Houseplants: holiday care / RHS Gardening. (n.d.). Www.rhs.org.uk. Retrieved December 19,
2022, from https://www.rhs.org.uk/plants/types/houseplants/holiday-care
how to make a automatic irrigation system using tinkercad. (2021, July). Www.youtube.com.
https://www.youtube.com/watch?v=ZxQf2L-UWEA
In-Depth: Interface One Channel Relay Module with Arduino. (2019, November 7). Last
Minute Engineers. https://lastminuteengineers.com/one-channel-relay-module-arduino-
tutorial/
In-Depth: Interfacing TMP36 Temperature Sensor with Arduino. (2021, August 24). Last
Minute Engineers. https://lastminuteengineers.com/tmp36-temperature-sensor-arduino-
tutorial/
Interface Capacitive Soil moisture sensor v1.2 with Arduino, LCD and OLED. (2022, July 11).
Circuit Schools. https://www.circuitschools.com/interface-capacitive-soil-moisture-
sensor-v1-2-with-arduino-lcd-and-
oled/#:~:text=A%20capacitive%20moisture%20sensor%20works
Jabbaar, A. A. (2019, September 17). Ultrasonic Sensor HC-SR04 with Arduino Tutorial.
Arduino Project Hub. https://create.arduino.cc/projecthub/abdularbi17/ultrasonic-
sensor-hc-sr04-with-arduino-tutorial-327ff6
Ku, L. (2022, September 27). How Automation is Transforming the Farming Industry. Plug
and Play Tech Center. https://www.plugandplaytechcenter.com/resources/how-
automation-transforming-farming-
industry/#:~:text=What%20is%20farm%20automation%3F
Last Minute Engineers. (2019, November 29). How Soil Moisture Sensor Works and Interface
it with Arduino. Last Minute Engineers; Last Minute Engineers.
https://lastminuteengineers.com/soil-moisture-sensor-arduino-tutorial/
Low Voltage Temperature Sensors PIN CONFIGURATIONS 1 2 3 5 4 TOP VIEW (Not to Scale)
NC = NO CONNECT V OUT SHUTDOWN GND NC +V S Figure 2. RJ-5 (SOT-23). (n.d.).
https://www.analog.com/media/en/technical-documentation/data-
sheets/TMP35_36_37.pdf
rajsawkare13. (2022, April 25). DC Water Pump - Ultimate Guide For Beginners. Vayuyaan.
https://vayuyaan.com/blog/dc-water-pump-ultimate-guide-for-beginners/
S, K. (2022, April 20). Insights - The Design Thinking Process - How does it work? MAQE.
https://www.maqe.com/insight/the-design-thinking-process-how-does-it-work/
Today, I. (2021, June 7). How Robotics Can Help Address the Global Food Crisis. Innovation &
Tech Today. https://innotechtoday.com/how-robotics-can-help-address-the-global-food-
crisis/
What is Design Thinking? (n.d.). The Interaction Design Foundation.
https://www.interaction-design.org/literature/topics/design-
thinking#:~:text=Design%20thinking%20is%20a%20non
Appendices