IOT Based Smart Greenhouse: Using Packet Tracer Software

Abstract

This is an IOT based smart green house that can be implemented in existing farming environments without any changes in the infrastructure or construction in a new farm structure. The garden lets the user control the entire smart garden from his or her computer and other devices and make assignations based on time or sensor readings such as light, temperature or sound from any device in the house. The project is considered successful and ready to be launched in the real system implementation. Configuration and networking of the garden (green house) is well controlled and Optimized using Internet protocol version 4 (IPV4).

Share and Cite:

Osita, K. (2022) IOT Based Smart Greenhouse: Using Packet Tracer Software. Open Access Library Journal, 9, 1-13. doi: 10.4236/oalib.1109535.

1. Introduction

Life is becoming simpler and easier in every way as automation technology advances. Automatic systems are favored over manual systems in today’s society. With the tremendous growth in the number of internet users over the last decade, the internet has become an integral part of daily life, and IoT is the most recent and rising internet technology. The Internet of Things (IoT) is a growing network of common objects, ranging from industrial machines to consumer items that can communicate information and perform tasks while you are occupied with other chores [1]. An automated home is frequently referred to as a smart home, and it is a system that uses computers or mobile devices to operate basic home functions and features automatically through the internet from anywhere in the globe. Its purpose is to conserve both electric and human energy.

Recent advancements in the realm of IoT technology have sparked renewed interest in the development of greenhouse technology systems. Grumblings from a few things, for example, keeping track of the irrigation system procedure and executing it manually, were enjoyable. Furthermore, plants may be harmed by adverse conditions such as temperature and light.

An IOT-based Intelligent Agriculture Greenhouse Environment Monitoring System [2] for Mediterranean countries such as Italy, Turkey, and Greece. Also, the level of mechanical transformation of greenhouse development in Spain may be poor. The task means to boost greenhouse society innovations toward the creation of a coordinated circuit organize for sensors and automation technologies, managed by an ICT (Information and Communication Technologies) approach, for agronomic purposes.

The smart greenhouse is a breakthrough in agriculture, with sensors, actuators, and monitoring and control systems that optimize growth conditions and automate the growing process to produce a self-regulating, plant-friendly microclimate [3].

This paper is about a Smart Green House Monitoring system based on IoT technology that allows for remote monitoring and control of any internet-connected equipment from anywhere in the world. Our lives have been made so much easier thanks to the Internet of Things. In traditional agriculture, farmers must wait for ideal conditions before planting. The greenhouse approach is used to alleviate this drawback. Plants are grown in greenhouses in a controlled atmosphere. Our project’s main goal is to design a smart greenhouse and implemented using Cisco packet tracer. The output is verified with the expected results.

2. Technical Description

For devices to be networked, communicate effectively, and be operated upon remotely, each must be assigned an IP and MAC address. These addresses in networking are IP Address (Internet Protocols Address)―This a software defined uniquenumerical identifier assigned to every device that is connected to a computer network which uses internet protocols for communication [4].

IP Address also has two main functions which are the host or network and location addressing. It has two versions namely―IPV4 and IPV6, but this report is only based on IPV4 which have four numbers with three dots. And it is called dotted numbers IP version 4.

Example is 192.168.1.2. This is a Class C IP address with a Subnet mask of 255.255.255.0. This represents a Classless Inter Domain Routing (CIDR) of /24, which is a method of allocating IP Address and for IP Routing [4].

2.1. Classifications of IP Address

IP Address have 5 Classification; A, B, C, (D, and E are not used),

Class A = First Octet between 0 - 127;

Class B = First Octet between 128 - 191;

Class C = First Octet between 192 - 223;

Class D = First Octet between 224 - 239;

Class E = First Octet between 240 - 255.

Thus, IPV4 have a pool of 32-bits. i.e., 4 octets,

4 o c t e t * 8 b i t s = 3 2 b i t s (1)

Hence IPV4 have (2^32) in size = 4,294,967,296 IP addresses.

Also shown are the number of networks contained in each Class of IP Address.

Class A = 1 Network and 3 Host;

Class B = 2 Network and 2 Host;

Class C = 3 Network and 1 Host.

Media Access Address (MAC) is hardware defined unique identifier assigned to a network interface controller (NIC) as a network address to communicate within a network setting and environment.

MAC Address is tied to NIC. And NIC is essentially a computer circuit card that makes it possible for computers to connect to a network (Wired, Wireless-internal, USB type-External) [4].

MAC is given in Hex-Decimal numbers and it is 48 bit = 6 bytes. Example is 00 23 AF A0 CC 4A.

2.2. Subnet and Subnet Mask

Subnetting is the division of a large network into a multiple small network.

A subnet mask is used to distinguish between a Network Address and a Host Address. Note that in Every Network, First IP Address is reserved as Network ID and the Last as Broadcast ID.

Shown below are the Subnet mask and CIDR of Classes A-C,

Class A is 255.0.0.0/8;

Class B is 255.255.0.0/16;

Class A is 255.255.255.0/24.

2.3. Number of Network, IP Addresses and Host on Each Network

Example (Table 1), we are given an IP Address of 192.168.8.0/26

N u m b e r o f N e t w o r k / S u b n e t = 2 ^ n = 2 2 = 2 ( n i s N u m b e r o f b i t 1 f r o m t h e H o s t ) (2)

Number of Host = 2n = 26 = 64 (n is the number of bits 0 remaining in the Host),

Valid Host = 64 − 2 = 62.

Hence the subnet mask is 255.255.255.64.

MAJOR PURPOSES OF SUBNETTING ARE:

Improving performances;

Security and,

Relieving network Congestion.

Table 1. Number of Network and details on each network.

3. Methodology

The block diagram (Figure 1) below contains temperature monitoring system, humidity monitoring system, fire detection system, CO2 detection system, smart lighting system, moisture monitoring system, solar energy generator system, smart door system. All the devices are connected using the internet. A tablet (smartphone) is used to monitor the devices in the greenhouse. Wireless devices are used to implement the designed system.

IoT COMPONENTS (used in the above block diagram)

1) TEMPERATURE MONITORING SYSTEM

・ Temperature Monitor;

・ Thermostat ;

・ Air cooler;

・ Heating element.

2) HUMIDITY MONITORING SYSTEM

・ Humidifier;

・ Humidity monitor.

3) FIRE SAFETY SYSTEM

・ Fire detector;

・ Fire sprinkler;

・ Microcontroller (MCU-PT);

・ Siren;

・ Fire.

4) CO2 DETECTING SYSTEM

・ Carbon dioxide detector;

・ Blower fan;

・ Old cars;

・ Window.

5) SMART LIGHT SYSTEM

・ Smart light (programmed in Java language).

6) SOIL MOISTURE MONITORING SYSTEM

・ Water level monitor;

・ Lawn sprinkler.

7) SOLAR CELL

・ Solar panel;

Figure 1. Block diagram of the design.

・ Power meter;

・ Microcontroller (MCU-PT);

・ Battery;

・ LED.

8) SMART DOOR SYSTEM

・ Smart door;

・ Bulb;

・ RFID reader;

・ RFID card.

9) SMART SECURITY SYSTEM

・ CCTV camera (programmed in Java language);

・ Display TV.

All IoT components listed from the block diagram can be seen connected in the Figure 2 displayed below.

3.1. Flowchart

The below flowchart procedure is used for all the systems active in this design. First, the sensors sense their respective parameters (according to the pre-set conditions) and the values sensed are converted into the appropriate formats which are then fed to the actuators. The actuators are activated based on the input given following predefined conditions as shown in Figure 3 below.

Figure 2. Connected IoT devices.

Figure 3. General flow chart of the design methodology.

3.2. Connectivity

3.2.1. Home Gateway

The Home gateway is connected to all the devices present in the system through wireless network connectivity. It allows a local Area network to connect with a Wide area network. It is where all devices and Internet of things are connected as highlighted. In this design, one Home Gateway was configured. The IPv4 address is 192.168.25.1 (this usually is the generic IP address for the home gateway) and the subnet mask is 255.255.255.0. The authentication for this is disabled while the SSID is changed to “greenhouse” matching the username for the server as shown in Figure 4 below. All IoT devices are connected to the home gateway using the username and password created in the server.

3.2.2. Pinging Test

This test is carried out to ascertain if connected devices and IOTs are on the same network/internet and prove that they can communicate.

From the above PING Test (Figure 5), all IoTs devices and other network components are communicating effectively.

4. Analysis and Discussion

The Analysis of the smart greenhouse system is shown using CISCO packet tracer. The design is carried out according to the requirement. All the devices are monitored through tablet (tablet-PC). For the soil moisture monitoring system, the sprinklers are turned on when the water level present in the soil is less than 23.0 cm and turned off when the water level is more than 35.0 cm. Similarly, the humidity monitor is turned on when the humidity present in the atmospheres is less than 40% and turned off when the humidity present in the atmosphere is more than 40%. The values present in the water level monitor are more than 35.0 cm, so the sprinklers are off, smart light is off. The humidity monitor records 72.4% since the humidity is more than the mentioned conditions i.e.,

Figure 4. Gateway connectivity.

Figure 5. Ping results.

40% the humidifier is off. A solar panel converts sunlight into electricity by using the appropriate technique. The power produced by the solar panel can be known using the power meter (which measures power across the device to which it is connected). The electricity generated by the solar panel is converted and stored in a battery which is connected to all the devices. This project uses solar cells to supply energy for all the devices which is also eco-friendly. In this system we have connected an electric gadget to battery. When battery saves the energy as much as the set value (30%) then electric gadget will get on. Smart door system contains an RFID (Radio frequency identification) valid card, RFID invalid card, the RFID reader which is used to read the RFID card given to the maintainers. Smart door opens only when RFID reader status is valid (1001). If the RFID reader reads a valid card, then the door will unlock, and siren is off, else if the motion detector is on and the RFID reader reads it invalid then the door will be locked, and the siren will get on. The smart camera is lined with motion detector that always displays any motion. Finally, the Smoke detection system contains a smoke detector connected by a microcontroller to the fire sprinkler and Siren. The smoke detector senses the presence of smoke and as soon as fire is detected a message is delivered to the security panel and the fire alarm is activated. In an extra fire emergency, the sprinkler will be activated. Figure 7 shows the logical view of the model explained.

4.1. Further Analysis (Advantages & Disadvantages)

4.1.1. Advantages of IoT Devices

The advantage and the strength of this report is the ability to control and operate devices and home appliances away from home using mobile phone and laptops. This is Ease of use, Innovation, environmentally friendly.

IOTs are also used in workplace, industries and production line to streamline production, can be used domestically [5]. Figure 6 below shows a predefined condition for the IoT devices in this model.

4.1.2. Disadvantages of IoT Devices

The following are the disadvantages of IOTs that need to be improved:

・ Complexity [6];

・ Security and Data Challenges;

・ Massive Investments;

・ Increased privacy concerns.

Figure 6. Predefined conditions of IoT devices on the design.

Figure 7. Logical view of the design.

4.2. Software Implementation

The programming part for the IoT devices such as Smart Light, Bulb, Smart Camera, IoT7 (running human) was carried out on the Integrated development environment (IDE) of each device. It is easy to write code and upload it to the board, JavaScript and Python were used for programming.

Microcontroller 1 (Fire Monitoring System)

from gpio import *

from time import *

def main():

pinMode(0,INPUT)

pinMode(1,OUT)

print("Fire Alarm System");

while True:

fire = digitalRead(0);

print(fire);

if(fire==1023):

customWrite(1, '1');

else:

customWrite(1, '0');

if __name__=="__main__":

main()

Smart Camera (Security System)

# Helper class to help porting code using JS object notation:

#

# JS: var obj = {type: "unknown"}

# JS: obj.type = "analog"

#

# PY: obj = JsObject({"type" : "unknown"})

# PY: obj.type = "analog"

#

class JsObject(dict):

def __init__(self, d):

for k in d.keys():

setattr(self, k, d[k])

##############################################################

# Map value from one range to another

#

def js_map(x, inMin, inMax, outMin, outMax):

return (x - inMin) * (outMax - outMin) / (inMax - inMin) + outMin

4.3. Further Work

The inclusion of a predictive model to the app that will make predictions based on data collected continuously by the sensors, allowing the owner to make better decisions regarding his or her business.

In addition, this system will be linked to a weather API, which will offer the farmer with weather forecast information.

Figure 8. Physical view of the design.

Table 2. List of all connected IP addresses.

Modifications to make the data more stable can be done in the future to make it more robust and efficient. If inconsistencies in the system are discovered, the system should notify the user by SMS or email.

Figure 8 below is a descriptive (physical) diagram of a Smart greenhouse with all the IoT components assigned and deployed (functioning properly).

Several devices connected on the same network are assigned different IP addresses but in the same class. These devices must use the home gateway IP Address (192.168.25.1) as their Default gateway.

This model is made up of 21 connected devices as shown in Table 2. Each device is corresponding to the following IP addresses listed in the table.

5. Conclusions

Greenhouses are increasingly being used to boost productivity and cultivate plants in a controlled environment. Making it smarter makes the job of the operator easier because it eliminates the need to constantly monitor the environmental conditions.

With the help of a Web server and IOT, the proposed model is implemented for greenhouse monitoring, temperature and soil moisture control, a standard security system, and smoke detection with Cisco Packet Tracer.

Conflicts of Interest

The author declares no conflicts of interest.

References

[1] Lannaci, J. (2018) Internet of Things (IOT); Internet of Everything (IOE); Tactile Internet; 5G—A (not so Evanescent) Unifying Vision Empowered by EH-MEMS (Energy Harvesting MEMS) and RF-MEMS (Radio Frequency MEMS). Sensors and Actuators A: Physical, 272, 187-198. https://doi.org/10.1016/j.sna.2018.01.038
[2] Liu, D., Cao, X., Huang, C.W. and Ji, L.L. (2015) Intelligent Agriculture Greenhouse Environment Monitoring System Based on IOT Technology. International Conference on Intelligent Transportation, Big Data and Smart City, Halong Bay, 487-490. https://doi.org/10.1109/ICITBS.2015.126
[3] Rao, R.N. and Sridhar, B. (2018) IoT Based Smart Crop-Field Monitoring and Automation Irrigation System. 2018 2nd International Conference on Inventive Systems and Control (ICISC), Coimbatore, 19-20 January 2018, 478-483 https://doi.org/10.1109/ICISC.2018.8399118
[4] Wegner, J.D. (2000) IP Addressing and Subnetting including IPv6. Syngress.
[5] Gupta, H., Pareek, V., Mishra, R. and Lavanya, K. (2017) Automated Precision Farming Using Internet of Things. International Research Journal of Advanced Research in Computer Engineering and Technology, 6, 16.
[6] Hopali, E. and Vayvay, Ö. (2018) Internet of Things (IoT) and its Challenges for Usability in Developing Countries. International Journal of Innovation Engineering and Science, 2, 6-9. https://www.ijiesr.com/liebrary/e12/911425940.pdf

Copyright © 2024 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.