1. Trang chủ
  2. » Ngoại Ngữ

Iot - Based automatic monitoring and control system for agriculture

89 3 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề IoT-Based Automatic Monitoring and Control System for Agriculture
Tác giả Dao Duy Tung, Vo Bang Tranh
Người hướng dẫn Do Duy Tan, M.Eng.
Trường học Ho Chi Minh City University of Technology and Education
Chuyên ngành Electronics and communication engineering technology
Thể loại Graduation thesis
Năm xuất bản 2022
Thành phố Ho Chi Minh City
Định dạng
Số trang 89
Dung lượng 5,52 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Cấu trúc

  • Chapter 1: INTRODUCTION (17)
    • 1.1. PROBLEM STATEMENT (17)
    • 1.2. OBJECTIVES (18)
    • 1.3. METHODOLOGY ......................................... Error! Bookmark not defined. 1.4. LIMITATIONS (18)
    • 1.5. RESEARCH CONTENT................................ Error! Bookmark not defined. 1.6. THESIS REPORT OUTLINE ........................ Error! Bookmark not defined (18)
  • Chapter 2: LITERATURE REVIEW (20)
    • 2.1. GREENHOUSE MODEL (20)
    • 2.2. INTERNET OF THINGS (IoT) (21)
    • 2.3. COMMUNICATION PROTOCOLS (22)
      • 2.3.1. UART (22)
      • 2.3.2. I2C (23)
      • 2.3.3. WIFI (25)
  • Chapter 3: METHODOLOGY (28)
    • 3.1. HARDWARE DESIGN (28)
      • 3.1.1. System block diagram design (28)
      • 3.1.2. Circuit design and calculation (30)
      • 3.1.3. Hardware schematic (54)
    • 3.2. SOFTWARE DESIGN (56)
      • 3.2.1. Introduce about BLYNK APP (56)
      • 3.2.2. Design the user interface (57)
      • 3.2.3. Flowchart (60)
  • Chapter 4: EXPERIMENT RESULTS (66)
    • 4.1. MODEL IMPLEMENTATION (66)
      • 4.1.1. Manual mode (69)
      • 4.1.2. Automatic mode (70)
    • 4.2. PLANTING EXPERIMENTS ON THE SYSTEM (71)
  • Chapter 5: CONCLUSION AND RECOMMENDATIONS (0)
    • 5.1. CONCLUSION (78)
    • 5.2. RECOMMENDATIONS (78)

Nội dung

MINISTRY OF EDUCATION AND TRAINING HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY AND EDUCATION FACULTY FOR HIGH QUALITY TRAINING ELECTRONICS AND TELECOMMUNICATION ENGINEERING TECHNOLOGY IO

INTRODUCTION

PROBLEM STATEMENT

By 2050, the global population is projected to reach 9.8 billion, representing a 25% increase from current figures Urbanization is expected to rise significantly, with nearly 70% of the population living in urban areas, up from 49% To sustain this growing metropolitan population, agricultural productivity must double by 2050 Crop production will be crucial not only for food supply but also for essential crops like cotton and rubber, which are vital to the economies of many nations These increasing demands will further strain already limited agricultural resources.

The Internet of Things (IoT) is a transformative force that is reshaping our lives by making everyday objects smarter and more interconnected This extensive network connects devices with IP addresses, such as smartphones, lights, watches, and cars, to the internet, facilitating automation and reducing the need for human intervention However, despite its many advantages, IoT raises significant concerns, including privacy violations and an over-reliance on technology, which can lead to job losses.

The 4.0 industrial revolution offers a new approach to resolve this problem By developing the new green house using IoT, it will show a portrait of traditional agriculture by enhancing plant productivity and minimize wasting crop The goal of this idea is not just revitalizing traditional farming methods but also to provide a solution for family home garden This product help farmers by collecting real-time data, monitoring the sensors and controlling the actuators to take care of the garden Precision plays a key role in agriculture so that we could use the collected data from the sensors for analytics [4]

While IoT technology in agriculture offers numerous benefits, it also presents significant drawbacks A major concern is its reliance on Wi-Fi signals; if the system loses connection, it cannot update the garden's conditions Additionally, individuals may desire personal space, making it challenging to maintain constant connectivity with family and friends while managing various aspects of their lives Furthermore, there is a risk of data misuse, highlighting another downside of IoT technology.

The "Closed Garden System" allows farmers to effectively monitor and manage a limited number of crops by utilizing advanced technology Building on previous monitoring systems, this innovative solution provides real-time data on temperature and humidity while enabling users to control watering through their smartphones Additionally, our team has improved the system to function even without an internet connection, allowing users to set a timer for automatic watering, ensuring optimal care for their gardens.

2 system" project describes a a garden system with a closed garden structure and irrigation based on settings on the web interface.

OBJECTIVES

Research, design and manufacture “Automatic Monitoring and Control System in Agriculture based on IoT with the following fundamental features:

 Research the theoretical basis of designing and constructing the garden

 Research and analyze the planting seeds automation system

 Design the seeding and watering system for each pre-programmed location, and integrated camera to easily monitor the garden remotely via smartphone device

 Developing an automatic system based on temperature, humidity, and soil moisture monitoring

 Designing the interface to monitor and control the devices on smartphones.

METHODOLOGY Error! Bookmark not defined 1.4 LIMITATIONS

The thesis explores various references on garden monitoring and control systems to identify the most suitable option It assesses the latest requirements for automated garden design and focuses on creating an effective design tailored to its intended use The research includes evaluating simulation results, conducting actual modeling, and making final assessments to enhance design outcomes.

The limitations of this project are:

Using an ESP32 as a central microcontroller and camera for photo transmission is not ideal due to slow signal transmission speeds and heavy reliance on internet bandwidth.

 The system is fully controlled via the app

 The system responding depends on the strength of the Wi-Fi signal

 Design a device’s model especially for educational purposes.

RESEARCH CONTENT Error! Bookmark not defined 1.6 THESIS REPORT OUTLINE Error! Bookmark not defined

As a product that has the function of controlling devices remotely via the Internet, for everyone especially for urban family If there is a need to control and monitor their garden

This innovative product automates essential gardening tasks, including seeding, watering, and monitoring environmental variables through a smartphone app Users can easily configure the system to operate independently, eliminating the need for constant manual intervention.

To achieve efficient design, construction, and cost savings, the project has utilized various research methods, including reviewing documentation on microcontroller programming for Arduino IDE and studying fundamental electronics theory for hardware design.

The project’s report is arranged into 5 chapters:

 Chapter 1: Introduction: general introduction about the topic, methodology, research content, some facts relate to the topic in reality and introduce the quick view of content

In addition, the thesis also presents the topic's objectives and limitations

 Chapter 2: Literature review introduce research status, research direction, services and applications being used

 Chapter 3: Methodology: provides a general model of the system as a whole, the blocks of the system, the design and calculation of each block, and the devices used in these blocks

 Chapter 4: Experiment results: presenting the construction results of the system model

 Chapter 5: Conclusion and recommendations: draw conclusions, strengths and weaknesses Present the plan of the topic in the future

LITERATURE REVIEW

GREENHOUSE MODEL

Currently, our country has also applied and deployed many types of vegetable growing system in greenhouses, in which the two main types are prominent:

A closed greenhouse is a structure entirely enveloped in plastic film, including the roof and doors, designed to protect against insects It features either a flat or slanted roof design, supported by concrete columns or welded/screwed iron frames The plastic film used is highly durable, offering resistance to ultraviolet rays, sunlight, and wind This ensures a long-lasting solution for gardening, as illustrated in Fig 2.1.

Fig 2.1 Realistic closed garden model

An opened greenhouse is primarily covered on the roof and partially enclosed to mitigate the adverse effects of rain and wind, facilitating vegetable growth even during the rainy season However, it does not provide insect repellant benefits.

Fig 2.2 Realistic opened garden model

While greenhouse models offer significant benefits, they also present several limitations Closed greenhouses can create environments with elevated temperature and humidity, leading to mold issues if not closely monitored Conversely, open greenhouses are vulnerable to insect infestations due to inadequate coverage Additionally, the installation costs and initial investments for these systems are often substantially higher than traditional farming methods Furthermore, the reliance on manual monitoring and practical experience can pose challenges for individuals lacking farming expertise.

This project aims to leverage the benefits of existing methods while addressing their limitations, particularly by reducing costs Furthermore, it introduces an Internet-based monitoring system, allowing users to easily manage their gardens remotely.

INTERNET OF THINGS (IoT)

The Internet of Things (IoT) is a network of interconnected physical devices, a concept proposed by Kevin Ashton in 1999 at the Massachusetts Institute of Technology This network includes various items such as computers, mobile phones, refrigerators, doors, and cars that communicate and share data over the internet Related technologies include Machine-to-Machine communication, the Web of Everything, ubiquitous computing, and embedded Internet systems For effective connectivity, these physical devices are equipped with microcontrollers and sensors that transmit data to an IoT cloud server, which serves as a central hub for data exchange.

The Internet of Things (IoT) is a transformative technology that facilitates real-time communication and data exchange between people and devices It plays a crucial role in recording, analyzing, and evaluating data, which is essential for informed decision-making and reaching specific objectives.

Fig 2.3 Applications of the Internet of Things

Figure 2.3 illustrates the diverse applications of the Internet of Things (IoT) across various sectors, such as monitoring sunlight, temperature, and humidity for agriculture, controlling home appliances via smart mobile applications, and overseeing water and biogas levels Additionally, IoT enhances safety by activating fire alarms in animal farms and providing flood warnings Its growing compatibility with smartphones, exemplified by user-friendly applications like Blynk, NETPIE, and Line Notify, is contributing to its rising popularity.

COMMUNICATION PROTOCOLS

UART, or Universal Asynchronous Receiver-Transmitter, facilitates asynchronous serial data transmission by converting incoming and outgoing data into a serial binary stream It employs serial to parallel conversion to transform 8-bit serial data from a terminal computer into parallel data, while also converting parallel data from the CPU back into serial form This modulated data is transmitted at a specified baud rate, ensuring efficient communication.

The UART begins communication with a start bit of '0', as illustrated in figure 2.4 This start bit signals the beginning of serial data transfer, while the stop bit marks the end of the data exchange Additionally, a parity bit is included for error checking, with an even parity bit indicated by '0' (representing an even number of 1's) and an odd parity bit denoted by '1' (indicating an odd number of 1's).

A single transmission line, as illustrated in Fig 2.5, is utilized for data transmission (TxD), where '0' represents a blank space and '1' indicates a symbol condition During the transmission process, the Least Significant Bit (LSB) is typically sent first, with the transmitter delivering one bit at a time before proceeding to the next.

Data bits are transmitted to the receiver at a specified baud rate, with each bit sent with a slight delay For instance, transmitting one byte of data at a baud rate of 9600 involves a delay of 108 microseconds for each bit.

The RxD line (Receiver) is responsible for receiving data, as illustrated in Fig 2.6 Upon reading the data frame, the receiving UART counts the number of bits with a value of 1 to determine whether the total is even or odd If the parity bit is 0, indicating even parity, the sum of the 1 bits in the data frame will be even Conversely, if the parity bit is 1, indicating odd parity, the sum of the 1 bits will be odd.

When the parity bit aligns with the data, the UART confirms an error-free transmission Conversely, if the parity bit is 0 with an odd total, or 1 with an even total, the UART detects alterations in the data frame.

The Inter-Integrated Circuit (I2C) Protocol is a protocol expected to permit numerous "peripheral" digital coordinated circuits ("chips") to interface with at least one

I2C, depicted in Fig 2.7, utilizes two wires for communication and operates as an asynchronous serial protocol It supports up to 128 devices and enables a multi-controller configuration, allowing multiple controllers to connect with any peripheral device on the bus.

The I2C bus consists of two key signals: SDA (data) and SCL (clock) The bus controller continuously generates the clock signal, while some peripheral devices have the ability to pull the clock line low, effectively halting the controller from sending more data.

The start and stop sequences are distinct events where the SDA (data line) shifts while the SCL (clock line) remains high, as shown in Fig 2.8 During data transmission, the SDA must remain constant when the SCL is high These sequences signify the initiation and conclusion of communication with the slave system.

Fig 2.8 Start(left) and Stop(right) condition

For every 8 bits transmitted, each 8-bit byte of data necessitates 9 SCL clock pulses for transmission When the receiving device sends a LOW ACK bit, it indicates successful data reception and readiness to accept the subsequent byte, as illustrated in Fig 2.9.

If it responds with a High-level bit, it means it cannot take any more data and the master should stop the transfer by sending a stop sequence

I2C addresses are typically 7 bits in length; however, the master device transmits 8 bits when sending the 7-bit address The additional bit indicates to the slave device whether the master intends to write to or read from it.

In a communication protocol, when the R/W bit is set to 0, the master device transmits data to the slave device, while a setting of 1 indicates that the master is reading data from the slave The 7-bit address of the slave is represented in the upper 7 bits of the byte, with the Read/Write bit occupying the least significant bit.

Fig 2.11 The master sends data to slave bit sequence

Bit R/W is set to LOW so master sends data to slave at 0xC0 which is illustrated in Fig 2.11 above

Fig 2.12 The master reads data from slave bit sequence

Bit R/W is set to HIGH so master reads data to slave at 0xC1 as shown in Fig 2.12

The IEEE (Institute of Electrical and Electronics Engineers) has established a numbering system to classify and standardize various technical protocols Currently, the four prevalent Wi-Fi standards are 802.11a, 802.11b, 802.11g, and 802.11n.

Figure 2.13 provides a comprehensive overview of Wi-Fi standards from 1999 to 2019, detailing the name, release year, frequency, speed, and both indoor and outdoor range for each Wi-Fi type.

Fig 2.13 Summary of Wi-Fi standards

The 802.11 standard, introduced by IEEE in 1997, supports a maximum bandwidth of 2 Mbps and operates on the 2.4 GHz radio frequency However, its limited bandwidth poses challenges for efficient data transmission.

METHODOLOGY

HARDWARE DESIGN

The automatic garden system is highly beneficial for farmers who find frequent trips to the greenhouse unnecessary This innovative solution allows remote farmers to plant, irrigate, and monitor crop quality using a mobile shower head equipped with a camera Additionally, an LCD display provides essential information about the garden's status, including temperature, humidity, and soil moisture This design carefully selects relevant parameters to optimize garden management.

3.1.1 System block diagram design a Block diagram

The system is composed of ten interconnected blocks designed to form a stable operating system, as illustrated in the block diagram of Fig 3.1 The power block supplies energy to the entire system, while the ESP32 CPUs with ESP32 CAM establish an automatic connection to a pre-coded Wi-Fi network This setup enables continuous data reception from sensors, which is then updated to the Blynk app via Wi-Fi Additionally, the ESP32 CAM uploads images at regular intervals to the Blynk app Once connected, the data is displayed simultaneously on the app and an LCD, allowing for remote control of various modules, drivers, fans, lamps, and pumps through the Blynk app.

Fig 3.1 Block diagram of the system b Explain the function of blocks

 Power Supply: This block provide electricity for all blocks include control actuator, camera, sensors, platform, screen and other working blocks

 CPU: Gather data from the device then analyze and control the control actuator, and display on LCD and Blynk app

 Server: Analyze the image getting from the camera and transfer that to platform block

 Camera: Getting images from surrounding environment and transmit signal to modified images block

The Blink app serves as a platform for communication between the analysis block and the camera, evolving from its original role of display and storage to now enabling users to operate and monitor their gardens via Wi-Fi.

 Display: Allow users to monitor environment variables on screen

 Sensor: Gather environment variables to know the latest status of the garden

Actuator: Receiving signals from central control block and control speed and flow of the engine also the status of the device such as lights, fans and water pump

3.1.2 Circuit design and calculation a Supply power block

Table 3.1 summarizes the equipment utilized in this project, detailing the device names, quantities, and the operating voltage and current specified by the manufacturers This information is essential for calculating the power consumption and selecting the appropriate power source for the model.

TABLE 3.1 Parameters about power consumption of components

Name of Part Amount Operating Voltage

From the formula (3.1) and the table The Power Consumption of this System is calculated as below:

Select the source block to ensure the conditions are: Ipower ≥ Imax, Ppower ≥ Pmax Thus, selecting the source is the 220 AC transformer to DC power (12V - 5A) honeycomb with

P = 60 W is enough to provide power for all blocks

Here the group select a 12V - 5A honeycomb set to ensure the continuity of the garden and restricting the use of batteries to lead to expensive cost

The 12V 5A honeycomb power supply, a type of 12-volt DC power supply, efficiently converts 110/220VAC AC voltage to 12V DC, making it ideal for powering various equipment An actual image of the 12V 5A honeycomb power supply is shown in Fig 3.2 below.

The honeycomb power supply offers essential features such as heat dissipation, overload protection, short circuit protection, and overvoltage protection It ensures high efficiency and maintains a stable output voltage within the allowed power limits, preventing voltage drops even under high consumption currents.

The LM2596 is a highly efficient step-down DC voltage converter, commonly referred to as a buck converter It offers stable output voltages of 3.3V, 5V, and 12V, with a compact design that allows it to reduce voltage from 30VDC to 1.5VDC while maintaining an impressive efficiency of 92% This makes the LM2596 ideal for applications in power distribution and low voltage power supply equipment, including cameras and robots.

1 The output voltage can be adjusted by the using the flat head turn the variable resistor

2 The converter could supply up to 3 amps of direct current load current

3 Heating shutoff and current limit are two methods of circuit protection

Fig 3.4 The schematic of LM2596 Buck Converter

The LM2596 is a popular voltage regulator recognized for its impressive 3A current rating It comes in various fixed output voltage options, including 3.3V, 5V, and 12V However, the most well-known variant is the LM2596-ADJ, which features a variable output voltage, as illustrated in Fig 3.4.

Unregulated voltage is supplied to pin 1 (Vin) via a filter capacitor to minimize input noise To activate the IC, the ON/OFF pin (pin 5) must be grounded; setting it high will place the IC in off mode, preventing leakage current and conserving battery power Additionally, the feedback pin plays a crucial role in determining the output voltage by sensing it and adjusting the internal switch's switching frequency accordingly.

17 provide the desired output voltage Finally the output voltage is obtained through pin 2 through an LC filter

 Calculate the output voltage for LM2596

The LM2596-ADJ's output voltage can be adjusted through its feedback pin, which receives feedback voltage from a voltage divider composed of resistors R1 and R2, as illustrated in the circuit diagram.

The value of these R1 and R2 determines the output voltage of the IC The formula for calculating R1 and R2 is given below

Here the value of Vref can be considered as 1.23V hence the formula becomes

R1 should be in range from 1k Ohm to 5k Ohm

R2 is required needing flat-head screwdriver to adjust resistance

For example, if the thesis requires Vout = 5V Follow formula (3.2) the R2 is:

So it is required needing to turn varible resistor and measuring it output voltage that equal to 5V

The LM2596 circuit, detailed in Tab 3.2, operates with an input voltage range of 3V to 30V The output voltage is adjustable via the rotating resistor R2, and the circuit is capable of delivering a power output of 15W.

TABLE 3.2 LM2596 buck converter specifications

Output voltage Adjustable from 1.5V to 30V

Dimension 45*20*14 (mm) b Central processing block

The ESP32 is an advanced, cost-effective microcontroller that features low power consumption, integrated Wi-Fi, and dual-mode Bluetooth It is designed to deliver optimal performance and RF capabilities, ensuring robustness, versatility, and reliability across various applications, including voice encoding, music streaming, and MP3 decoding.

The ESP32 is designed to operate reliably in harsh industrial environments, with a temperature range of -40°C to +125°C It utilizes advanced calibration technology to continuously correct external circuit imperfections and adapt to changes in external conditions.

The ESP32 offers a comprehensive and integrated Wi-Fi network solution, enabling application storage and offloading of Wi-Fi functions from other handlers It boots directly from external flash when storing applications and can connect to other controllers requiring Wi-Fi through interfaces like SPI, I2C, or UART In this setup, the ESP32 serves as the central processor.

Fig 3.5 Pin diagram of ESP32 Module

Tab 3.3 describes the specifications of the pinout configuration of the ESP32 module, including parameters such as pin category, pin name, and more details

TABLE 3.3 The pinout configurations of the ESP32 module

Pin Category Pin Name Details

Micro-USB: The ESP32 may be charged via a USB connector

5V: To power the board, a regulated 5V can be given to this pin, which will then be regulated to 3.3V by the on-board regulator

3.3V: To power the board, a regulated 3.3V can be applied to this pin

GND stands for ground pins

Enable EN The microcontroller is reset using the pin and button

Analog Pins ADC1_0 to ADC1_5 and

12-bit 18 Channel ADC is used to measure analog voltage in the range of 0-3.3V

DAC pins DAC1 and DAC2 Converting from digital to analog

The specifications of the ESP32 module are detailed in Tab 3.4, highlighting key parameters such as the type of microprocessor, maximum operating frequency, operating voltage, and the number of analog input pins It also includes information on digital to analog converter pins, digital input/output pins, direct current on I/O and 3.3V pins, SRAM capacity, and standard communication types, including Wi-Fi and Bluetooth capabilities.

SOFTWARE DESIGN

Blynk is a leading IoT platform that enables users to connect their systems to the cloud, design intuitive user interfaces (UI) and enhance user experiences (UX), analyze data, and efficiently manage deployed products at scale.

Blynk is a powerful platform tailored for the Internet of Things (IoT), enabling remote control of hardware, displaying sensor data, and storing and visualizing information, among other impressive features.

Blynk is a versatile IoT platform compatible with both iOS and Android devices, enabling seamless integration with various microcontrollers, including Node MCU ESP8266, Arduino, Raspberry Pi, and ESP32 The platform comprises three key components, as illustrated in Fig 3.22.

 The Blynk application, which is used to control a device and display data on widgets

 The Blynk server, which is a cloud service responsible for all communications between smartphones and things

Blynk libraries offer a range of widgets, including control buttons, display formats, notifications, and time management tools, allowing devices to efficiently transmit sensor data to a mobile application for easy viewing and management.

Fig 3.22 Blynk App working diagram

Step 1: The Blynk app is the app to build an over-the-air console The user needs to install the Blynk app, which supports both Android and iOS platforms The Fig 3.23 below is the application store of the two platforms on smartphones which can download the Blynk application here

Fig 3.23 The application store of the two platforms on smartphones

Step 2: The next step is to create new account to use the App As demonstrated in Fig 3.24 that create it using an email Moreover, if already have an account, just log in and skip to next step

Fig 3.24 How to create an account on Blynk App

Step 3: Create a project and device

To start a new project, input the project name, select the device type as ESP32, and choose the connection type as Wi-Fi before clicking the Create button Refer to Fig 3.25 for the visual representation of the project creation process.

Fig 3.25 Create a project and device

After clicking the Create button, the system will send an authentication token code to the email address provided during account creation This device authentication token is a unique 32-character code specific to each device The authentication token used for programming in Arduino for server connection is illustrated in Fig 3.26.

Fig 3.26 Enter authentoken, user name and password of Wi-Fi to program

Figure 3.27 illustrates a project featuring a blank canvas, allowing users to add various widgets for information display and control Numerous widget types are available, each serving distinct purposes that can be explored further.

Fig 3.27 Where to add widgets

Step 4: Add the widget to the project by clicking any blank space in the canvas or the icon on the top menu which can be chose the type of widget to add and drag and drop it on the canvas Actual image of add the widget to the project shown in Fig 3.28

Fig 3.28 Add the widget to the project

Each widget features a dedicated Settings screen that can be accessed by clicking on the widget within the canvas The most crucial parameter in this screen is the PIN, which corresponds to the PIN used in the Blynk app and is essential for programming the Blocky Node Wi-Fi in Arduino Figure 3.29 illustrates the configuration process for the widget in the Blynk app.

You can enhance your project by incorporating various types of widgets The control interface allows you to switch between EDIT mode and PLAY mode, enabling interaction with the dashboard via the Play button To modify the canvas design or widget settings, simply click the STOP button.

Fig 3.30 as below shown the information will be displayed when upload the program to the microcontroller and click the play button in the application

Fig 3.30 The information displayed on the App

The system features a 16X2 LCD panel that displays sensor data, real-time images, a temperature chart, and device status to the Blynk App It offers both MANUAL and AUTO operating modes, allowing users full control in MANUAL mode to turn devices on and off at their discretion, regardless of external conditions.

Users can set the environment's settings in AUTO mode, and the devices will function depending on the environment's measurements of those values a Selection mode

Fig 3.31 Flow chart of selection mode

The flowchart in Fig 3.31 demonstrates the process of changing the working mode Upon launching, the program initializes the microprocessors, sensors, and variables on the LCD panel By default, the system starts in AUTO mode, displaying three environmental parameters Users can change the operating mode by selecting the SETTING button, and the system will validate the status from the ESP32 via the App to facilitate hardware updates.

 In MANU mode, it allows users to control devices arbitrarily and be updated to the App

 In AUTO mode, it allows the user to set the limit values of the environment, then automatically turn the device on or off b Manual mode

In MANU mode, users can arbitrarily control six devices, including step motors, servos, pumps, fans, and lights, using buttons on the Blynk App, as illustrated in Fig 3.32.

EXPERIMENT RESULTS

MODEL IMPLEMENTATION

The completed system, as shown in Fig 4.1, measures 50x50 cm and features multiple planting zones Each zone will be carefully monitored, watered, and maintained by a header equipped with a camera.

Fig 4.1 Automatic Monitoring and Control System in Agriculture based on IoT

Figure 4.2 illustrates a thoroughly tested wiring system, featuring multiple inspections of connections, secure zip-wire bundling, and silicone adhesive application to prevent wire breakage during short circuits Additionally, the system is housed in an aesthetically pleasing casing that provides water protection.

Fig 4.2 The system control cabinet

The system features a 16x2 LCD panel that provides real-time updates on essential garden data, including temperature, air humidity, soil moisture, the current operating mode, and network connection status Conveniently mounted on the electrical cabinet, the LCD ensures easy observation and continuously refreshes the garden's environmental information.

Fig 4.3 The system is not connected to the network

The LCD panel displays the temperature at 29 degrees, air humidity at 76 percent, and soil moisture at 22 percent However, the "!" symbol indicates that the device is not connected to a Wi-Fi network To update the system's information in the Blynk app, it is essential to connect the device to a Wi-Fi network.

The LCD screen shows "Ma," signifying that the system is in Manual mode and connected to Wi-Fi for monitoring via the Blynk app If a different letter appears, it indicates that the system has activated the automatic garden cultivation mode, which regulates the garden's conditions based on preset code.

Fig 4.4 The system is connected to the network

Upon opening the app, users receive instant information about their garden, including a temperature chart that allows them to track the garden's status over previous days.

The Blynk app allows users to monitor their garden through a 2MP camera mounted on the header, providing real-time streaming video of the garden's status directly within the app.

Fig 4.5 Camera captures live images

The sow seeds system offers a unique feature that allows users to remotely monitor the planting process through a camera or app In manual mode, users select the area and activate the seeding button for automatic sowing, while in auto mode, the device autonomously moves to pre-programmed positions and seeds when the button is pressed.

The garden seeding head enables efficient seed planting across various garden areas, utilizing both automatic and manual modes for operation, as illustrated in Fig 4.6 Users can conveniently control the seeding process through the Blynk app, allowing for manual seeding in multiple areas.

53 wish in manual mode or the header will consecutively sow the appropriate seed to the amount of garden areas in auto mode

Fig 4.6 The sow seeds system is working

In MANUAL mode, users have full control over their equipment, allowing them to turn devices such as heat lamps, fans, water pumps, and seeds on and off as needed through the Blynk App, regardless of their surroundings.

In this mode, enabled actuators are highlighted in blue against the function background, with the light and fan functions active, while watering and sowing functions remain inactive, as illustrated in Fig 4.7 The term "Manual" on the left indicates that the garden is under manual management Users can also find options to "SET SOIL MOISTURE" and "SET TEMPERATURE" in the upper right corner, which will be visible in Automatic mode Additionally, the "CHOOSE POSITION" feature allows users to input a number to navigate to the desired section and perform necessary functions.

When pressing the "Fan" buttons on the Blynk app, the system will do and turn off/on the device

In automatic mode, sensors monitor garden conditions such as humidity, temperature, and soil moisture to perform essential tasks like watering, activating fans, or heating lights The app's preset parameters are compared with the sensor data, allowing the microcontroller to effectively manage garden care.

Fig 4.8 The garden is in ideal condition

The microcontroller activates and deactivates mechanisms to maintain optimal garden conditions when sensor readings surpass set thresholds For example, if the ambient temperature exceeds the user-defined limit of 28 degrees, the system responds accordingly.

Celsius, the system will automatically activate the fan to dissipate the heat, as depicted The system can also control the temperature and humidity here, as seen in Fig 4.9.

Fig 4.9 Set the temperature and humidity

PLANTING EXPERIMENTS ON THE SYSTEM

The graduation project titled "Automatic Monitoring and Control System in Agriculture based on IoT" has been successfully completed following extensive research and development This project involved experimenting with the cultivation of "Baby Leaf Mustard PN-912" in a 50 square centimeter garden, which was divided into multiple sections (8x8 positions) for monitoring through the system's integrated features.

Fig 4.10 The map of garden

To optimize growth and development, choose organic soil and fast-growing plant varieties suitable for your conditions, as illustrated in Fig 4.11 After experimentation, users can also incorporate these plants into their diet.

In Fig 4.11, the process of selecting plant varieties is demonstrated By utilizing the "Auto" mode and the "Sow seed" button on the Blynk App, users can observe the automatic planting procedure through the app's integrated camera.

Fig 4.12 Select Auto mode and press the sow seed button

When the Sow Seed button is pressed in automatic mode, the system initiates the seeding procedure for all spots shown in Figure 4.10 This process lasts for 2 to 3 seconds, during which seeds are dropped and dispersed by the rotating servo motor, completing in approximately 60 seconds After seeding each pre-programmed position, the device automatically returns to its home position.

The system is configured to maintain a temperature of 27 degrees Celsius; however, with the current ambient temperature at 30 degrees, which exceeds the set value, the fan activated approximately one second after the Auto mode was engaged.

Fig 4.13 Seeding system is working

The seeding system illustrated in Fig 4.13 demonstrates a well-designed layout, ensuring uniform spacing between seeds This consistency provides users with confidence that the plants will not compete for space as they grow.

After sowing seeds, it's essential to water the garden to keep the soil moist and cover the seeds adequately Users can set a specific soil moisture level, allowing the system to automatically water the garden when moisture falls below this threshold The water pump operates in automatic mode, as illustrated in Fig 4.14.

Fig 4.14 Water pump is working

Users have the option to switch to manual mode, allowing them to select specific locations for sowing or watering When the user attempted to water and plant in all locations, the system functioned properly, with a response time ranging from 0.5 to 2 seconds, depending on network speed.

Moreover, it is necessary to check the tolerance between two axes when control a header move from number 1 area to number 4 area

The system operates in Auto mode at a current temperature of 27 degrees Celsius, adjusting to a set temperature of 25 degrees Celsius, ideal for optimal plant growth When the ambient temperature exceeds this set value, the system automatically activates the watering process, with the water pump capable of starting within 60 seconds for all positions Figure 4.21 illustrates the system's configuration and its automatic plant watering functionality.

After over 36 hours of monitoring and care, the system has shown that the tree has grown approximately 2 cm, demonstrating superior growth compared to natural conditions.

Fig 4.15 Image of the garden after 36 hours of sowing

After one week, the experiment concluded with a tree height of 7 cm, which is 3 cm taller than the average for this scenario However, the roots did not show similar growth and seemed to struggle with water supply Furthermore, the plant was situated in an area with inadequate light, as plants typically grow towards sunlight Despite these challenges, there is still potential for further development.

61 Fig 4.16 Image of the garden after 7 days of sowing

CONCLUSION AND RECOMMENDATIONS

Ngày đăng: 04/05/2023, 11:09

TỪ KHÓA LIÊN QUAN

TRÍCH ĐOẠN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

🧩 Sản phẩm bạn có thể quan tâm