Design and Implementation of a Smart and Cost-effective ...

15
Paper ID #29518 Design and Implementation of a Smart and Cost Effective Indoor Irrigation System (SCEIIS) Dr. Reg Pecen, Sam Houston State University Dr. Reg Pecen is currently a Quanta Endowed Professor of the Department of Engineering Technology at Sam Houston State University in Huntsville, Texas. Dr. Pecen was formerly a professor and program chairs of Electrical Engineering Technology and Graduate (MS and Doctoral) Programs in the Depart- ment of Technology at the University of Northern Iowa (UNI). Dr. Pecen served as 2nd President and Professor at North American University in Houston, TX from July 2012 through December 2016. He also served as a Chair of Energy Conservation and Conversion Division at American Society of Engineering Education (ASEE). Dr. Pecen holds a B.S in EE and an M.S. in Controls and Computer Engineering from the Istanbul Technical University, an M.S. in EE from the University of Colorado at Boulder, and a Ph.D. in Electrical Engineering from the University of Wyoming (UW, 1997). He served as a graduate assistant and faculty at UW, and South Dakota State University. He served on UNI Energy and Environment Coun- cil, College Diversity Committee, University Diversity Advisory Board, and Graduate College Diversity Task Force Committees. His research interests, grants, and more than 50 publications are in the areas of AC/DC Power System Interactions, distributed energy systems, power quality, and grid-connected re- newable energy applications including solar and wind power systems. He is a senior member of IEEE, member of ASEE, Tau Beta Pi National Engineering Honor Society, and ATMAE. Dr. Pecen was recog- nized as an Honored Teacher/Researcher in ”Who’s Who among America’s Teachers” in 2004-2009. Dr. Pecen is a recipient of 2010 Diversity Matters Award at the University of Northern Iowa for his efforts on promoting diversity and international education at UNI. He is also a recipient of 2011 UNI C.A.R.E Sustainability Award for the recognition of applied research and development of renewable energy appli- cations at UNI and Iowa in general. Dr. Pecen established solar electric boat R & D center at UNI where dozens of students were given opportunities to design solar powered boats. UNI solar electric boat team with Dr. Pecen’s supervision won two times a third place overall in World Championship on solar elec- tric boating, an international competition promoting clean transportation technologies in US waters. He was recognized as an Advisor of the Year Award nominee among 8 other UNI faculty members in 2010- 2011 academic year Leadership Award Ceremony. Dr. Pecen received a Milestone Award for outstanding mentoring of graduate students at UNI, and recognition from UNI Graduate College for acknowledging the milestone that has been achieved in successfully chairing ten or more graduate student culminating projects, theses, or dissertations, in 2011 and 2005. He was also nominated for 2004 UNI Book and Supply Outstanding Teaching Award, March 2004, and nominated for 2006, and 2007 Russ Nielson Service Awards, UNI. Dr. Pecen is an Engineering Tech- nology Editor of American Journal of Undergraduate Research (AJUR). He has been serving as a re- viewer on the IEEE Transactions on Electronics Packaging Manufacturing since 2001. Dr. Pecen has served on ASEE Engineering Technology Division (ETD) in Annual ASEE Conferences as a reviewer, session moderator, and co-moderator since 2002. He served as a Chair-Elect on ASEE ECC Division in 2011. He also served as a program chair on ASEE ECCD in 2010. He is also serving on advisory boards of International Sustainable World Project Olympiad (isweep.org) and International Hydrogen Energy Congress. Dr. Pecen received a certificate of appreciation from IEEE Power Electronics Soci- ety in recognition of valuable contributions to the Solar Splash as 2011 and 2012 Event Coordinator. Dr. Pecen was formerly a board member of Iowa Alliance for Wind Innovation and Novel Development (www.iawind.org/board.php) and also represented UNI at Iowa Wind Energy Association (IWEA). Dr. Pecen taught Building Operator Certificate (BOC) classes for the Midwest Energy Efficiency Alliance (MEEA) since 2007 at Iowa, Kansas, Michigan, Illinois, Minnesota, and Missouri as well as the SPEER in Texas and Oklahoma to promote energy efficiency in industrial and commercial environments. Dr. Pecen was recognized by State of Iowa Senate on June 22, 2012 for his excellent service and con- tribution to state of Iowa for development of clean and renewable energy and promoting diversity and international education since 1998. Dr. Faruk Yildiz, Sam Houston State University c American Society for Engineering Education, 2020

Transcript of Design and Implementation of a Smart and Cost-effective ...

Page 1: Design and Implementation of a Smart and Cost-effective ...

Paper ID #29518

Design and Implementation of a Smart and Cost Effective IndoorIrrigation System (SCEIIS)

Dr. Reg Pecen, Sam Houston State University

Dr. Reg Pecen is currently a Quanta Endowed Professor of the Department of Engineering Technologyat Sam Houston State University in Huntsville, Texas. Dr. Pecen was formerly a professor and programchairs of Electrical Engineering Technology and Graduate (MS and Doctoral) Programs in the Depart-ment of Technology at the University of Northern Iowa (UNI). Dr. Pecen served as 2nd President andProfessor at North American University in Houston, TX from July 2012 through December 2016. He alsoserved as a Chair of Energy Conservation and Conversion Division at American Society of EngineeringEducation (ASEE). Dr. Pecen holds a B.S in EE and an M.S. in Controls and Computer Engineering fromthe Istanbul Technical University, an M.S. in EE from the University of Colorado at Boulder, and a Ph.D.in Electrical Engineering from the University of Wyoming (UW, 1997). He served as a graduate assistantand faculty at UW, and South Dakota State University. He served on UNI Energy and Environment Coun-cil, College Diversity Committee, University Diversity Advisory Board, and Graduate College DiversityTask Force Committees. His research interests, grants, and more than 50 publications are in the areasof AC/DC Power System Interactions, distributed energy systems, power quality, and grid-connected re-newable energy applications including solar and wind power systems. He is a senior member of IEEE,member of ASEE, Tau Beta Pi National Engineering Honor Society, and ATMAE. Dr. Pecen was recog-nized as an Honored Teacher/Researcher in ”Who’s Who among America’s Teachers” in 2004-2009. Dr.Pecen is a recipient of 2010 Diversity Matters Award at the University of Northern Iowa for his effortson promoting diversity and international education at UNI. He is also a recipient of 2011 UNI C.A.R.ESustainability Award for the recognition of applied research and development of renewable energy appli-cations at UNI and Iowa in general. Dr. Pecen established solar electric boat R & D center at UNI wheredozens of students were given opportunities to design solar powered boats. UNI solar electric boat teamwith Dr. Pecen’s supervision won two times a third place overall in World Championship on solar elec-tric boating, an international competition promoting clean transportation technologies in US waters. Hewas recognized as an Advisor of the Year Award nominee among 8 other UNI faculty members in 2010-2011 academic year Leadership Award Ceremony. Dr. Pecen received a Milestone Award for outstandingmentoring of graduate students at UNI, and recognition from UNI Graduate College for acknowledgingthe milestone that has been achieved in successfully chairing ten or more graduate student culminatingprojects, theses, or dissertations, in 2011 and 2005.

He was also nominated for 2004 UNI Book and Supply Outstanding Teaching Award, March 2004, andnominated for 2006, and 2007 Russ Nielson Service Awards, UNI. Dr. Pecen is an Engineering Tech-nology Editor of American Journal of Undergraduate Research (AJUR). He has been serving as a re-viewer on the IEEE Transactions on Electronics Packaging Manufacturing since 2001. Dr. Pecen hasserved on ASEE Engineering Technology Division (ETD) in Annual ASEE Conferences as a reviewer,session moderator, and co-moderator since 2002. He served as a Chair-Elect on ASEE ECC Divisionin 2011. He also served as a program chair on ASEE ECCD in 2010. He is also serving on advisoryboards of International Sustainable World Project Olympiad (isweep.org) and International HydrogenEnergy Congress. Dr. Pecen received a certificate of appreciation from IEEE Power Electronics Soci-ety in recognition of valuable contributions to the Solar Splash as 2011 and 2012 Event Coordinator.Dr. Pecen was formerly a board member of Iowa Alliance for Wind Innovation and Novel Development(www.iawind.org/board.php) and also represented UNI at Iowa Wind Energy Association (IWEA). Dr.Pecen taught Building Operator Certificate (BOC) classes for the Midwest Energy Efficiency Alliance(MEEA) since 2007 at Iowa, Kansas, Michigan, Illinois, Minnesota, and Missouri as well as the SPEERin Texas and Oklahoma to promote energy efficiency in industrial and commercial environments.

Dr. Pecen was recognized by State of Iowa Senate on June 22, 2012 for his excellent service and con-tribution to state of Iowa for development of clean and renewable energy and promoting diversity andinternational education since 1998.

Dr. Faruk Yildiz, Sam Houston State University

c©American Society for Engineering Education, 2020

Page 2: Design and Implementation of a Smart and Cost-effective ...

Paper ID #29518

Faruk Yildiz is currently an Associate Professor of Engineering Technology at Sam Houston State Uni-versity. His primary teaching areas are in Electronics, Computer Aided Design (CAD), and AlternativeEnergy Systems. Research interests include: low power energy harvesting systems, renewable energytechnologies and education.

Megan Gibson

c©American Society for Engineering Education, 2020

Page 3: Design and Implementation of a Smart and Cost-effective ...

Design and Implementation of a Smart and Cost-Effective Indoor Irrigation

System (SCEIIS)

Abstract

Many people enjoy having plants in their homes and offices. The plants can help purify the air by

removing toxins and provide a better atmosphere. However, many people may also struggle to provide the

correct amount of water to their plants by either over or lack of water issues. This often leads to dried

leaves and rotting roots, and, eventually, a dead plant. A smart and cost-effective indoor plant irrigation

system may allow users to connect multiple plants to a single automated watering system with improved

plant growth features.

This paper presents a senior design project completed in a B.S. Electronics and Computer Engineering

Technology program to design and construct a smart and cost-effective indoor irrigation system (SCEIIS)

that provides accurate humidity conditions for enhanced and healthy plant growth purposes. The system

provides a user interface to allow the user to input the soil moisture requirement by utilizing its hardware

and software, and to check soil moisture levels against the user input. If the levels are under the set

requirement, the SCEIIS system activates a small pump in the water reservoir and provides the plant

water that will help mitigate issues people may face keeping plants indoors. This unique indoor plant

irrigation system also uses a well-known tool, NI LabVIEWTM, to monitor and display system variables

such as temperature and humidity for enhanced operation and necessary audio and visual warning to

users.

The SCEIIS utilizes two cost effective microcomputers, a Raspberry Pi to run the software, and an

Arduino Uno to support physical components of the system that periodically test moisture levels using

soil moisture sensors and use test the data against the user set values. If the data shows that the moisture

levels are lower than the user set values, then the program sends a signal to the Arduino Uno to activate

the water pump connected to the specific plant that needs water. After a certain amount of time, the water

pumps are deactivated and the program continues to test the levels. With an approximate cost of $275, the

SCEIIS system is expected to assist people in caring for their plants by keeping track of the soil moisture

levels in multiple plants and supply water via a pump located in the shared reservoir. Students in the

Engineering Technology program also used NI LabVIEWTM knowledge and skills to add an

instrumentation and data acquisition feature by a myDAQ module to the SCEIIS system that provided

plant owners to monitor and control plants. The conceptual design, functional block diagram, hardware

and software units, overall system operation and necessary LabVIEW TM Virtual Instruments (VIs) are

provided. This unique senior design project also provides necessary assessment data for both senior

design and Instrumentation and Data acquisition courses in a B.S. in Engineering Technology Program.

Introduction

A number of indoor irrigation systems were developed with multiple objectives such as improved

efficiency, quality, and reduced cost. A wireless plant irrigation robot system constructed based on a well-

known ZigBee system investigated how to overcome the limitations of the fixed sprinkler system and

avoid large space consumption [1]. The authors recommended the use of solar photovoltaic (PV) panels

and rechargeable batteries to enhance the system efficiency, reliability and self-sustainability.

Gunawardena and Steemers explained that much of human habitation in cities occurs within indoor

environments, thereby investigated greater opportunities to enhance building occupant health, wellbeing,

and comfort. The authors reported the necessity for future research to consider and integrate plant science

aspects to provide a sound evidence base for the increased inclusion of indoor living walls in urban built

environments [2]. D. Kolokotsa et al. investigated all the possible environmental parameters that may

Page 4: Design and Implementation of a Smart and Cost-effective ...

2

affect the microclimate of a greenhouse installation and their impact to energy savings. They also reported

a review of analog and digital systems available in greenhouse automation systems [3]. A more

complicated and larger size greenhouse facility was designed and built with an automated, high-

throughput imaging system, and a belt-based plant conveyor [4]. With a conveyor system controlled by

different algorithms, plants were relocated in the greenhouse that enabled uniform growth conditions

because plants spent an equal amount of time in each microclimate under optimum irrigation and

temperature conditions [4-5]. A low cost solar PV soil moisture monitoring station for irrigation

scheduling with different frequency-domain analysis probe structures was developed [6]. Another

experimental study involved in performance analysis of soil temperature and humidity for multiple plants

by custom-made sensors [7].

This smart and cost-effective indoor irrigation system (SCEIIS) that was developed as a senior design

capstone project is a promising tool that can be used to create a simple automated watering system to

plants located at homes and offices. It can be used year-round or during vacations. The goal of the SCEIIS

system is to provide a simple way to assist the user with the upkeep of the connected plants, and to help

prevent the plant from dying due to lack of water. This project aims to build a simply designed system to

provide automated watering to multiple plants. It contains an Arduino Uno microcontroller as the main

component that will allow control of the entire system, and a low cost Raspberry Pi microcomputer

connected to an LCD monitor to provide the user with information regarding their connected plant(s). For

testing purposes, only one moisture sensor and pump pair will be used.

Conceptual Design

One of the objectives of this senior design project was to design and build a cost effective and simple pure

water irrigation system for indoor applications. Figure 1 shows the conceptual design of the proposed

system. The overall design of the system was changed very little from the beginning phase of the project

to the finish. There are three main sections listed as the Brain Box, the water reservoir, and the connected

plant(s). Each of these parts consists of smaller components that allow the system to function properly.

Figure 1. The SCEIIS pure water plants conceptual design

SCEIIS Parts and Specifications

The main section of the Brain Box is the Raspberry Pi microcomputer [8] as shown in Figure 2 (a). It

contains the program that will run the entire system. The Raspberry Pi is a Raspberry Pi 3 B+ and has a

CPU of 1.4 GHz and a Quad core ARM Cortex-A53 [9].

Page 5: Design and Implementation of a Smart and Cost-effective ...

3

Figure 2. (a) Raspberry Pi 3 B+ microcomputer [8-9] and (b) Arduino Uno microprocessor [10]

The Raspberry Pi 3 B+ unit has 1GB of SRAM and an integrated dual-band Wi-Fi, with 2.4GHz and

5GHz options. It also has an ethernet port that will support up to 300Mbps and has Bluetooth capabilities

[8-9]. It supports a micro-SD storage, and has a 40-pin GPIO header to allow additional connections. It

also has an HDMI port, four USB 2.0 Ports, and a 3.5mm audio jack. The Raspberry Pi 3 B+

microcomputer has a dimension of 82mm x 56mm x 19.5mm and it weighs only 50g [9]. It requires a

power source of 5V input and a current of 2.5A.

The secondary portion of the Brain Box is the Arduino Uno microprocessor as seen in Figure 2 (b) [10]. It

uses an Atmega328P microcontroller with an operating voltage of 5V. It has 14 digital I/O pins, six of

which provide Pulse Width Modulation (PWM) output. It also has six analog input pins with 20 mA DC

current capability per I/O pin. It has 32 KB of flash memory, but 0.5 KB is used by the bootloader. It has

2KB of SRAM, 1 KB of EEPROM, and a 16 MHz clock speed. It has a built-in LED at pin 13. The

Arduino Uno microprocessor has a dimension of 68.6mm x 53.4mm, and it weighs 25g [10].

Paired with the Raspberry Pi for user input is a UTRONICS 3.5-inch HDMI TFT LCD Touch Display, as

seen in Figure 3 (a). Its display resolution is 480 x 320 pixels and the dimension is 55.98mm x 86.60mm.

It is connected to the Raspberry Pi using a 40-Pin GPIO header as seen in Figure 3 (b)5 [11].

Figure 3. (a) UTRONICS LCD Display front and (b) back side with PCB components [11-12]

The soil moisture sensors used in this SCEII project are Gikfun Capacitive Soil Moisture Sensors as seen

in Figure 4 (a) [13]. These sensors are corrosion resistant, which will be important considering they are

surrounded by soil with varying degrees of moisture. It has a built-in voltage regulator chip and it

supports 3.3 to 5.5V DC voltage and is compatible with Arduino and Raspberry Pi [13-14].

Other important modules of the SCEIIS system are the water pumps. For this part, Gikfun Micro

Submersible Water Pumps are used as seen in Figure 4 (b). The pumps have a rated voltage of 3 to 4.5V

DC. They are rated for a current of 0.18A [14]. The reservoir as shown in Figure 5, for the water will

consist simply of a six-quart food storage container with a lid. It contains a Maxmoral M16 Water Level

Sensor, as shown in Figure 6, to allow for two notifications of low water levels [14-15]. The sensor is

Page 6: Design and Implementation of a Smart and Cost-effective ...

4

located towards the bottom of the reservoir and will notify the user that water levels have dropped to a

point in which the water pumps may soon be exposed to a possible damage.

Figure 4. (a) Gikfun Capacitive Soil Moisture Sensors, (b) Gikfun Micro Submersible Water Pumps [13]

Figure 5. Water reservoir Figure 6. Water level sensor [15]

The relay as shown in Figure 7, is used with the water pumps to properly provide power to the pumps. It

is a 5V relay with a maximum load of 30V DC or 250V AC. Its trigger current is 5mA. It can be used for

high or low trigger. For this project, a high trigger is used, which means it provides power to the pump

when the relay receives more than 5mA, and removes power to the pump when it receives less than 5mA

[15-16]. The AC Infinity fan, shown in Figure 8, is used to provide cool air to the Brain Box to prevent

overheating due to the amount of heat produced by the Raspberry Pi and the LCD display [16]. It has

three settings, the lowest of which is perfect for providing enough cooling power to the system. It

connects directly to the Raspberry Pi via USB connection. It creates almost no noise at 18dB and provides

up to 52 cubic feet per minute in airflow [14-15].

Figure 7. HiLetgo One Channel Module Relay [16] Figure 8. AC Infinity MULTIFAN S3 [16]

Page 7: Design and Implementation of a Smart and Cost-effective ...

5

Functional Block Diagram

The SCEIIS system uses the Arduino Uno as the main component to drive all other functions, aside from

the Raspberry Pi and other components connected to it. The Arduino Uno gets its power supply from the

Raspberry Pi and communicates with it, as shown in Figure 9. It periodically sends signal through the soil

moisture sensors to retrieve the analog value of the soil moisture content. Depending on the value

received from the soil moisture sensor, the Arduino Uno may or may not activate the pump associated

with the moisture sensor. It may, however, provide feedback to the serial monitor displayed on the LCD

screen connected to the Raspberry Pi, as shown in Figure 9. The feedback given shows the raw, or analog,

data, along with the percentage of moisture content within the soil, and a notification if the plant was

watered. If the plant was watered, the relay connected to the Arduino Uno would have been activated,

which would allow power to flow from the battery source to the pump.

Figure 9. Functional Block Diagram of the proposed SCEIIS project

Figure 9 also shows the water level sensor connected to the Arduino Uno. This is located within the water

reservoir and is used to notify users of low water levels within. If the water level is too low, the level

sensor will “close” and allow power to be fed from the Arduino Uno, through the water level sensor, and

back to the Arduino Uno [17-18]. At this point, the Arduino Uno sends a notification to the serial monitor

that the water levels are low and ask the user to refill the water reservoir as needed.

The Raspberry Pi receives power from a standard 120V AC-to-DC Wall plug. The Raspberry Pi then

sends power to the LCD screen, which allows the user to see any feedback provided by the Arduino Uno.

The Raspberry Pi also provides power to the fan that is used to cool the hardware situated within the

Brain Box.

Program Flow Chart

The SCEIIS program consists of two parts: the soil moisture and pump part, and the water level sensor

part. Both are simple and important parts of the program as seen in Figure 10.

Page 8: Design and Implementation of a Smart and Cost-effective ...

6

Figure 10. Program Flow Chart

Soil Moisture Sensor and Pump Program

The code for the main portion of the program concerns the soil moisture sensor and the pump associated

with it. As shown in Figure 11, there are four int, or integers, definitions, the dryValue, the wetValue, the

friendlyDryValue, and the friendlyWetValue. The first two, the dryValue and the wetValue, are used to

provide calibration to the soil moisture sensor. To calibrate the soil moisture sensor properly, the soil

moisture sensor was placed in a cup of water. Since the sensor is capacitive, it was given enough time,

about 30 minutes, to provide a proper analog value. Once enough time had passed, the moisture sensor

provided a repeat of the same analog value. The same was repeated for a dry scenario. The soil moisture

sensor was dried off completely and left alone on a dry surface. Once the analog readings provided a

repeated value, the soil moisture was ready to be properly calibrated within the code.

Figure 11. Code Definitions

Once we have the two values, 284 for the value when the sensor was dry and 586 when the sensor was

wet, we implemented them into the code. However, the values had to be switched. This is because the

percentage value given would have been “backwards” had the values not been switched. When in water,

the sensor would read 0% and when dry, the sensor would read 100%. This is due to how the soil

moisture sensors are wired internally, and is easily fixed by either switching the wires, the ground wire to

Page 9: Design and Implementation of a Smart and Cost-effective ...

7

the power source and the power supply wire to the ground, or by keeping the wiring the same and

swapping the analog wet and dry values. The swap-in values are shown in Figure 12. The friendly values

are values used to produce the percentage for easier monitoring of moisture content in the soil as seen in

Figure 13.

Figure 12. Soil Moisture Sensor Analog Read, Convert, and Print Code

To have the code obtain the analog reading, it defined the int rawValue and had it read the analog value at

A0, which is the pin the signal input wire from the soil moisture sensor was connected to. The code then

goes on to convert the analog value to a percentage value by defining the int friendlyValue and using the

map reference. The use of the map was to allow the analog range to be converted to a percentage range

[19]. This process works by using the value that will be “mapped,” which in this case was the analog

rawValue obtained from A0, and setting it with the parameters obtained from the calibration process. The

map uses the low end of the current value range, which is 586, and the high end of the current range,

which is 294, and matches them to the range that it’s to be converted to [19-20]. The new low end will be

0 and the new high end will be 100, allowing the code to produce a simple percentage [19-20].

Figure 13. Percentage Printing

The percentage value gained from the mapping is then printed to the serial monitor using the first two

lines of the code shown in Figure 14. The value printed does not come with a percentage symbol, despite

the fact that it is a percentage. The third line remedies this issue by printing a percentage symbol. The

percentage is then used in an if comparison, as shown in Figure 14. The code states that if the

friendlyValue, or the percentage, is less than 60, or 60%, the following code will run. If the percentage is

at 60% or higher, the code in the curly brackets will be skipped and will continue on to the next part.

However, if the percentage is less than 60%, the code within the curly brackets will run. In this case, the

relay, which is hard wired to pin 8, will be turned low, or off. This will trigger the relay to turn “on,” or

allow the current to flow from the battery pack to the pump, turning the pump on.

The reason the code turns the relay pin “off” is because of how the relay was set up in the wiring process,

and could be changed to work the same if the relay pin was turned “on” instead of “off” and is nothing

more than a wiring decision. After 2,500 milliseconds, or two and a half seconds, the relay pin will be

turned back “on,” or switched to high. This will deactivate the pump. Finally, if the code within the curly

brackets runs, the Arduino will print the notification shown on the last line of code in Figure 14.

Page 10: Design and Implementation of a Smart and Cost-effective ...

8

Figure 14. Comparison and Pump Activation Code

Water Level Sensor Program

The code for the water level sensor is very simple. It uses an if-else comparison, which is shown in Figure

15. It reads that if FLOAT_SENSOR, which was defined as pin 12 in Figure 13 equals low, or “off,” then

the code in the first set of curly brackets is run [17]. The first set of curly brackets activates another pin,

which was also defined in Figure 13 and pin 8 and named LED. It switches pin 8 to high, or “on,” which

prints a message in the serial monitor asking the user to add water to the reservoir. If pin 12 is high, then

the else section of the code is set to run and pin 8 is turned low and no message is shown.

Figure 15. Water Level Sensor Code

The code allows for the water level sensor to remain high if the float holds the sensor open, and low if the

float is closed. As with the relay coding in the previous section, the code could have worked the other

way around, but due to the choices made during the wiring process, the code must be written as listed on

the switch tutorial [20-21].

Circuit Diagram

The circuit diagram for the SCEIIS shows the Arduino Uno wiring only as seen in Figure 16. The

Raspberry Pi, the cooling fan, and the LCD monitor are all connected using USB or HDMI connections.

The Arduino Uno connects to the soil moisture sensor using the 3.3 V pin and a ground pin for power.

The moisture sensor sends analog data via pin A0. The relay is connected to the 5 V pin and a separate

ground pin, which is shown as a common ground in Figure 16. It is also connected to pin D8, which tells

the relay to either activate or deactivate the pump. The water pump is connected to the common port and

the normally closed port terminals. The normally closed port means for a component that will normally be

turned off until the relay is triggered otherwise. The water level sensor is connected between pin D12 and

another ground pin, which again is shown as a common ground in Figure 16.

Page 11: Design and Implementation of a Smart and Cost-effective ...

9

Figure 16. Circuit Diagram of Arduino Uno, relay and sensors modules of the SCEIIS system.

LabVIEWTM myDaq-based Instrumentation and Data Acquisition

To measure and monitor the temperature of the SCEIIS plant throughout the day, a surface

temperature sensor was used. To allow for proper monitoring and data acquisition, a

LabVIEWTM Virtual Instrument (VI) was designed to record the temperature of the soil and the

amount of irradiance levels that the plants get by a pyranometer. Figure 17 depicts the block

diagram of the VI used in this project, while Figure 18 shows the front panel of the same VI.

Figure 17. LabVIEWTM VI Block Diagram of the SCEIIS instrumentation and data acquisition system.

Page 12: Design and Implementation of a Smart and Cost-effective ...

10

Figure 18. LabVIEWTM VI Front panel of the SCEIIS instrumentation and data acquisition system.

Timeline

Table 1 shows the timeline for the SCEIIS project. The project team members started to work on project

proposal in the first 5-6 weeks of the Fall semester and immediately followed by project implementation

phase. The project timeline shown in the chart above was followed fairly well, however, build

consolidation, testing, and troubleshooting began earlier than expected, as the hardware and software

implementation finished earlier than scheduled. Testing and troubleshooting phases took more time than

expected, and the entire project was finished by the end of Fall semester including weekend and after hour

work in the senior design laboratory.

Table 1: Gantt Chart

Bill of Materials

The bill of materials is shown in Table 2. This project was student-funded, so there was not a set budget

to adhere to, but the intent was to keep the project pricing down. The initial estimated cost of the project

was between $275-$300 total, and the project total went a little over-budget by $17.59. However, when it

came to materials such as the silicone sealant, the mini water pump, jumper wire, and battery packs, not

all material was used. This bill of materials is meant to show the pricing for a home-build, not a mass

production. In a mass production of a system like the SCEIIS, components like the Raspberry Pi and

Arduino Uno would not be used, and would instead be replaced by a printed circuit board that was

designed specifically for the system, which would bring the overall cost down significantly. Tools such as

wire strippers, heat guns, and calipers may not be required.

Irradiance (W/m2) Temp (°F)

(°F)Irradia

nce

(W/m2)

Time (s) Time (s)

Page 13: Design and Implementation of a Smart and Cost-effective ...

11

Table 2: Bill of Materials

Challenges and Rewards

One of the challenges of this project was learning how some parts were a better choice over others. This

was mainly a concern with whether the Raspberry Pi or Arduino Uno would run the main part of the

program. Originally, the intended purpose was to have the Raspberry Pi run the bulk of the code, while

the Arduino Uno passed the taken readings from the soil moisture sensor to the Raspberry Pi for further

conversions and comparisons. The Raspberry Pi would pass the “on” signals to the Arduino Uno if

necessary. It was decided that that approach would increase the amount of time each reading took and

further complicate the program, so it was changed. Components such as the GPIO cable became

unnecessary as more research was done on the Raspberry Pi.

Another challenge was the software. Learning how to code an Arduino device was a challenge that was

easy to overcome through the help of online resources. In fact, much of the code was found on open-

source sites, allowing it to be pieced together as needed and made to work for the SCEIIS specifically.

The biggest challenge was the issues faced with the hardware and software together. There was a repeated

issue of the soil moisture sensor generating incorrect readings, and not just working “backwards,” but

working in strange ways all together. The problem that caused this was loose wiring. To fix this, wires

were glued together where needed, and taped down to the Arduino Uno case so they would not come

loose again.

Knowledge and experience on selecting and using appropriate sensors for plants development that were

gained in this senior design capstone project led the authors and undergraduate students to be recently

involved in a major USDA grant award titled “Design and Development of a Handheld Infrared

Thermography Device for Nondestructive Rapid Detection of Cyst Nematodes” for safeguarding

uninfected plant roots in nursery production in Texas. A next step of this senior project will rely on the

detection of morphological differences between uninfected and infected host plant roots using

thermography and image recognition technologies. In addition to the student author of this paper, other

qualified undergraduate research students will be hired to work on this applied research grant. Students

will be helping to design a unique probe equipped with an infrared thermo-camera combined with

minirhizotron techniques that are used to observe living roots in soil from season to season that can be

positioned in the vicinity of the host root to capture and develop a thermal image of the host root during

summer 2020 semester.

Page 14: Design and Implementation of a Smart and Cost-effective ...

12

Conclusion

The design and implementation of the SCEIIS system was an exemplary senior design project completed

in one semester using the knowledge and skills learned in Mathematics and science, circuits, computer

programming, microprocessor and microcomputer applications, and LabVIEWTM myDAQ-based

instrumentation and data acquisition courses. Weekly progress meetings with professionally written

reports as well as a midterm and a final technical report helped the project to be completed in a timely

manner. Student satisfaction was very high (4.8/5.0) and students who worked on the project expressed

their strong interest to work in the fields of sensors, automation, instrumentation and data acquisition.

There were not many products available to the everyday consumer that provided the specific type of

watering automation that the SCEIIS has provided. The types of automated irrigation systems available

are the modules that would not work within a home or office, or are very expensive. Many automated

irrigation systems are meant for outdoor usage and are either too large or difficult to modify for indoor

applications. Those that are meant for indoor usage are usually very expensive or are not considered

"smart" systems, as they work to keep the soil at a set moisture level and are not useful for plants that

prefer a dryer or more humid soil.

The timeline kept the project mostly on track and the total cost of the project was kept to a reasonable

amount. The challenges faced created teachable moments for building a physical project, as well as

creating a better understanding the software side of projects. This included senior design students to

investigate and self-learn detailed sensor and image technologies, specific microcontrollers,

microprocessors, and sensor-plant communication issues as well as required programming skills that may

not be offered in a B.S. in engineering technology curriculum. The senior students completed this project

expressed that the knowledge and skills gained from this project will allow better and more complicated

projects to be built in the future as they are very recently involved with a major USDA grant award on

high precision sensor developments for plant roots using thermography and image recognition

technologies.

References

[1] Adeodu, A.O., Bodunde, O.P., Daniyan, I.A., Omitola, O.O, Akinyoola, J.O., Adie, U.C. (2019).

Development of an autonomous mobile plant irrigation robot for semi structured environment,

Journal of Procedia Manufacturing, Vol. 35, pp. 9-15. https://doi.org/10.1016/j.promfg.2019.05.004.

[2] Gunawardena, K., Steemers, K. (2019). Living walls in indoor environments. Journal of Building and

Environment,Vol.148, pp. 478-487, ISSN 0360-1323. https://doi.org/10.1016/j.buildenv.2018.11.014.

[3] Kolokotsa, D., Saridakis, G., Dalamagkidis, K., Dolianitis, S., Kaliakatsos, I. (2010). Development of

an intelligent indoor environment and energy management system for greenhouses. Elsevier Journal of

Energy Conversion and Management, Vol. 51, Issue 1, pp. 155-168, ISSN 0196-8904.

https://doi.org/10.1016/j.enconman.2009.09.007.

[4] Ma, D., Carpenter, N., Amatya, S., Maki, H., Wang, L., Zhang, L., Neeno, S., Tuinstra, M.R., Jin, J.

(2019). Removal of greenhouse microclimate heterogeneity with conveyor system for indoor

phenotyping. Elsevier Journal of Computers and Electronics in Agriculture, Vol. 166, No. 104979,

ISSN 0168-1699. https://doi.org/10.1016/j.compag.2019.104979.

[5] Li, L., Zhang, Q., Huang, D. (2014). “A review of imaging techniques for plant phenotyping”.

Sensors, 14 (11) (2014), pp. 20078-20111, 10.3390/s141120078 .

[6] Ramadan, K.M., Oates, M.J., Molina-Martinez, J.M., and Ruiz-Canales, A. (2018). “Design and

implementation of a low cost photovoltaic soil moisture monitoring station for irrigation scheduling with

different frequency domain analysis probe structures,” Computers and Electronics in Agriculture.

https://www.sciencedirect.com/science/article/pii/S0168169917303393. Accessed: 01-Feb-2020.

Page 15: Design and Implementation of a Smart and Cost-effective ...

13

[7] Shi, W., Zhang, S., Wang, M., and Zheng, W. (2018). “Design and performance analysis of soil

temperature and humidity sensor,” IFAC-PapersOnLine, 12-Sep-2018.

https://www.sciencedirect.com/science/article/pii/S2405896318312527. Accessed: 01-Feb-2020.

[8] “Meet the New Raspberry Pi 3 Model B,” Maker.IO, 03-Apr-2018.

https://www.digikey.com/en/maker/blogs/2018/meet-the-new-raspberry-pi-3-model-b-plus. Accessed: 01-

Oct 2019.

[9] “Raspberry Pi 3B Specs and Benchmarks,” The MagPi Magazine, 14-Nov-2018.

https://www.raspberrypi.org/magpi/raspberry-pi-3bplus-specs-benchmarks/. Accessed: 01-Oct-2019.

[10] Arduino Uno Rev3. https://store.arduino.cc/usa/arduino-uno-rev3. Accessed: 01-Oct-2019.

[11] Amazon, 2010.

https://www.amazon.com/gp/product/B07H3P1NRM/ref=ppx_yo_dt_b_asin_image_o06_s00?ie=UTF8&

psc=1. Accessed: 01-Oct-2019.

[12] Amazon, 2010.

https://www.amazon.com/gp/product/B07BHD6KXS/ref=ppx_yo_dt_b_asin_image_o06_s00?ie=UTF8&

psc=1. Accessed: 01-Oct-2019.

[13] "Capacitive Soil Moisture Sensor", Forum.arduino.cc, 2019.

https://forum.arduino.cc/index.php?topic=603347.0. Accessed: 29- Nov- 2019.

[14] Amazon.

https://www.amazon.com/gp/product/B00G05A2MU/ref=ppx_yo_dt_b_search_asin_image?ie=UTF8&ps

c=1. Accessed: 29-Nov-2019.

[15] "PP Float Switch Tutorial", Instructables.com. https://www.instructables.com/id/PP-Float-Switch-

Tutorial/. Accessed: 29- Nov- 2019.

[16] Amazon.com. https://www.amazon.com/HiLetgo-Channel-optocoupler-Support-

Trigger/dp/B00LW15A4W/ref=sr_1_5?keywords=arduino+relay&qid=1574638311&sr=8-5. Accessed:

29- Nov- 2019.

[17] "Arduino Reference", Arduino.cc.

https://www.arduino.cc/reference/en/language/functions/math/map/. Accessed: 29- Nov- 2019.

[18] "Arduino Reference", Arduino.cc. https://www.arduino.cc/reference/en/language/functions/digital-

io/digitalwrite/. Accessed: 29- Nov- 2019.

[19] "Complete Guide to Use Soil Moisture Sensor w/ Examples", Arduino Project Hub.

https://create.arduino.cc/projecthub/electropeak/complete-guide-to-use-soil-moisture-sensor-w-examples-

756b1f. Accessed: 29- Nov- 2019.

[20] "Tutorial - Using Capacitive Soil Moisture Sensors on the Raspberry Pi -", Switchdoc.com, 2018.

https://www.switchdoc.com/2018/11/tutorial-capacitive-moisture-sensor-grove/. Accessed: 29- Nov-

2019.

[21] Learn RobotGeek 101, “Arduino Pump Tutorial - Aquarium Auto Refill,” Learn.Robot.Geek.com.

https://learn.robotgeek.com/projectsold/69-arduino-pump-tutorial-aquarium-auto-refill.html. Accessed:

29-Nov-2019.