Sei sulla pagina 1di 94

HCMC UNIVERSITY OF TECHNOLOGY &

EDUCATION

Ho Chi Minh City University of Technology and Education

International Education Exchange Center

PROJECT

Design of a smart system for planting and monitoring


Unit code: L/601/0995

BTEC HND PROGRAMME IN ELECTRICAL AND ELECTRONIC


ENGINEERING

(Mechanical Design)

by

Nguyen Thuan Chi

Supervisor: Dr. Nguyen Thanh Hai

Ho Chi Minh City, January 2018


Acknowledgements
Foremost, we would like to express our greatest gratitude to our supervisor,
Dr. Nguyen Thanh Hai, Head, Department of Electronics-Biomedical Engineering, Ho
Chi Minh City University of Technology and Education for his continual direction and
support. With his loving enthusiasm and precious knowledge, PhD. Hai has guided us
throughout this study. Without his instructions and advice, the completion of this
research would have been impossible.

Also, we have special thanks to Dr. Pham Bach Duong and Mr. Nguyen Thoi,
International Education Exchange Center, Ho Chi Minh City University of Technology
and Education, who always care and support us with valuable hardware design and
programming advices.
Worksheet
Table i. Division of main tasks among members

Members Tasks

Nguyen Thuan Chi - Mechanical design (calculation, measurement and


assembly)
- Buying components and cutting mica for the frame
- Writing the report
- Supporting Mr. Huy to test the system

Hoang Xuan Huy - Electronic design


- Making presentation
- Testing the system

Nguyen Minh Duc - Programming the system


- Supporting Mr. Huy to test the system
List of Figures

1. Figure 2.1. Overview of smart gardens


2. Figure 2.2. Edyn Smart Garden System
3. Figure 2.3. Control information via smartphone application of Edyn
4.
Figure 2.4. Sending notifications and suggestions to users’ Smartphones in real-
time
5. Figure 2.5. Garden Space in the real life and its functions
6. Figure 2.6. Smart robotic camera
7. Figure 2.7. Garden Space’s mobile application
8. Figure 2.8. Garden Space water beam to water the plants and ward the pests
9. Figure 2.9. Command center in the mobile application
10. Figure 2.10. Solar power panel
11. Figure 2.11. Design drawings of FarmBot
12. Figure 2.12. FarmBot in real-life
13. Figure 2.13. FarmBot’s web application
14. Figure 2.14. The map for planting in FarmBot’s web appplication
15. Figure 2.15. FarmBot Software High Level Overview
16. Figure 2.16. Types of Aluminum extrusions
17. Figure 2.17. All of plates and brackets used in a FarmBot
18. Figure 2.18. Raspberry Pi 3
19. Figure 2.19. Farmduino board
20. Figure 2.20. Rotary encoder
21. Figure 2.21. Four NEMA 17 motors
22. Figure 2.22. Plastic parts of FarmBot
23. Figure 2.23. Fasteners and Hardware
24. Figure 2.24. Universal tool mount of FarmBot
25. Figure 2.25. Camera of FarmBot
26. Figure 2.26. Seed injection of FarmBot
27. Figure 2.27. Watering tool of FarmBot
28. Figure 2.28. Weed Suppression of FarmBot
29. Figure 2.29. Soil sensor of FarmBot
30. Figure 2.30. Seed bin of FarmBot
31. Figure 2.31. Seed tray of FarmBot
32. Figure 2.32. Internet of Things
33. Figure 2.33. Future of IoT
34. Figure 2.34. HAMK Electronic Laboratory Robotic Arm
35. Figure 2.35. The block diagram of the robot joint control system
36. Figure 2.36. Simulation flow chart for the computation of GA-PID controller
specifications
37. Figure 2.37. Flow-chart for correctioning of PID
38. Figure 2.38. 3-D printer of MakerBot Industries
39. Figure 2.39. Mobile robots avoid obstacles themselves
40. Figure 2.40. Hardware structure of Arduino UNO R3
41. Figure 2.41. Algorithm mapping on Arduino IDE
42. Figure 2.42. Pins connection and Block diagram of ESP8266
43. Figure 2.43. Operating Principle of ESP8266: Firmware communicates with AT
command
44. Figure 2.44. Programming model of ESP8266 in Arduino IDE
45. Figure 3.1. Robotic Arm’s design drawing
46. Figure 3.2. The clamp of the Robotic Arm
47. Figure 3.3. Robotic Arm of the system in real-life
48. Figure 3.4. Overview of the design of this system
49. Figure 4.1. The block diagram of the design
50. Figure 4.2. The flowchart of Robot arm and IoT
51. Figure 4.3. The flowchart of Water Pump and Stepper motor
52. Figure 5.1. The general of smart system for planting and monitoring
53. Figure 5.2. Robot Gripper takes seeds
54. Figure 5.3. Robot Gripper sows seeds
55. Figure 5.4. Robot arm watering seeds
56. Figure 5.5. Robot Gripper spit out the plants
57. Figure 5.6. Motor pulls the robot arm forward (left to right)
58. Figure 5.7. Motor pulls the robot arm reverse (right to left)
59. Figure 5.8. Monitoring Camera
60. Figure 5.9. Monitoring Camera in Mobile Phone via 3G
List of tables

1. Table i. Division of main tasks among members


2. Table 4.1. Applying PID algorithm for controlling positions of the Robotic Arm
3. Table 4.2. Specifications of mechanical part of this smart system
4. Table 4.3. Specifications of Electronic part of this smart system
5. Table 5.1 The results of actual test
6. Table 5.2. The new PID value after having adjusted
7. Table 5.3. The estimate cost for this project’s model
Abbreviations

IoT: Internet of Things

CPU: Central Processing Unit

IDC: International Data Corporation

MQTT: Message Queuing Telemetry Transport

TCP: Transmission Control Protocol

M2M: Machine to Machine

ABS: Acrylonitrin butadien styren

UV: Ultra Violet

UTM: Universal Tool Mount

3D: 3-Dimension

AC: Alternating Current

GFCI: Ground-fault circuit interrupter

GTH: Garden Hose Thread

PUMA: Programmable Universal Machine for Assembly

PID: Proportional Integral Derivative

GA: Genetic Algorithm

AVR: Advanced Virtual Risc

ARM: Advanced RISC Machine

USB: Universal Serial Bus

IDE: Integrated Development Environment

I / O: Inputs / Outputs
PC: Personal Computer

I2C: Inter-Integrated Circuit

TTL: Transistor-Transistor Logic

GNU: GNU's Not Unix

UAV: Unmanned Aerial Vehicle

GPS: Global Positioning System

PWM: Pulse-width modulation

ICSP: In Circuit Serial Programming

DC: Direct current

COM: Communication

SPI: Serial Peripheral Interface

RFID: Radio Frequency Identification

IC: integrated circuit

RC: Radio control

LED: light emitting diode

GND: Ground

SDK: Software Development Kit

ADC: Analog to Digital Converter

MCU: Multipoint Control Unit

UART: Universal Asynchronous receiver-transmitter

DHCP: Dynamic Host Configuration Protocol

WPS: Wi-Fi Protected Setup

DNS: Domain Name System


MDNS: Multicast DNS

TCP: Transmission Control Protocol

UDP: User Datagram Protocol

SSL: Secure Sockets Layer

RTOS: Real-time Operating System

HTTP: Hypertext Transfer Protocol

SSDP: Simple Service Discovery Protocol

OTA: Over-The-Air

SD Card: Secure Digital Card


Table of Contents
Acknowledgements

Worksheet

List of figures

List of tables

Abbreviations

Abstract .............................................................................................................................

I. Introduction ..............................................................................................................

II. Literature Reviews ................................................................................................. :

III. Mechanical Design of the system .............................................................................

IV. Electronic Design of the system ...............................................................................

V. Results and Discussions ...........................................................................................

VI. Conclusion and Future works……………………………………………………….

References .........................................................................................................................

Appendix ...........................................................................................................................
Abstract
It has become increasingly important in today’s society to know where our food comes
from and that it has not been transported over a long distance due to the environmental
aspects that is brings. This combined with the fact that more people tend to move to
bigger cities gives an increased need for smart solutions for growing vegetables and herbs
on limited spaces at home such as balconies or nearby the windows. This project can
meet their demand, an particularly automatic garden system with planting, watering and
harvesting indoor should be developed. It is essential nowadays, so that people can do
self-cultivation of vegetables and take care of them easily.

The idea of this system is generated from the controlling devices such as robot arm,
stepper motor by using Arduino in order to plant, water and harvest automatically with
the high accuracy. Besides, users can observe the system from other places by using
cameras and control the system by using IoT applications via the Internet lines (with
different wifi addresses).

In conclusion, this smart system can meet the requirement of people in terms of time and
place. In particular, it can be implemented in house due to its small size and exceptional
functions compared to other products.

Keywords: Smart system, planting and monitoring, Robotic Arm, IoT applications,
Arduino for IoT.
Chapter I. Introduction
1.1. Demand of users:
Targeted users are the urban families want to grow green and clean vegetables for the
needs of healthy food for the family but they do not have much time to plant and care,
their houses have modest area as well as they do not have many knowledge and
experiences about agriculture. The need for a smart gardening systems which can plant,
water and harvest automatically, take care of vegetables and herbs or allow users to
remote monitoring and controlling the system that is becoming more practical for every
family.

1.2. Background and motivation


a) Internet of Things
Nowadays, Internet of Things - IoT is a new trend, which is strongly developed and went
deep into social life in the world. The number of IoT users, companies, applications,
connecting devices, developers and programmers are growing sharply. In the near future,
according to CISCO, the worldwide leader in networking, connectivity and all things
communication, IoT is going to connect 25 billion devices by 2015, and 50 billion by
2020[1] (Source: www.cisco.com). Furthermore, according to IT research agency,
International Data Corporation (IDC), this escalating global IoT market is going to hit
[2]
$7.1 trillion in 2020 (Source: www.zdnet.com), IoT is predicted to have over 5 billion
connected users, more than 25 million applications, more than 25 billion embedded
systems, intelligent systems and more than 50000 billion gigabytes data.[3]

With the rapid development of IoT, IoT devices are also growing and diversifying. One
device that is considered as popular and accessible today is the Arduino UNO R3. A
flexible, useful microprocessor board. It serves various needs such as: entertainment,
learning, application development. It is easy to connect to computers, with other
arduinos, with other IoT devices, with sensors, etc.
In addition, IoT applications are also numerous, practical and diverse, such as smart
homes, smart wear devices, smart cities, smart electric grids, industrial Internet,
automotive connections, intelligent retail chains, smart farms, etc.

b) Robotic Arm
In the industrial world, automation is one of the most important elements for
development. It helps to reduce the need for humans and increase efficiency and
productivity. The field of automation occupies large areas, mostly in industrial
manufacturing and in addition to this; automation is applied to build a lot of sophisticated
equipment which are used daily such as medical equipment (x-ray machines, radiography
etc.), refrigerators, automobiles etc. Among all of these outcomes, the Robotic Arm is
one of them, which is widely used in industrial proposes.[4]

A Robotic Arm can be compared to a human hand. It has a free rotating joint (rotation)
and a translational joint (displacement) for the movement of the arm. This arm movement
is usually driven by an electric driver (motor) or a pneumatic and a hydraulic system
(pistons). These actuators are controlled by a microcontroller (CPU), usually
programmable and made to perform a set of sequential tasks. Most of these robotic arms
are designed to be used in industrial purposes for fast and reliable performance, helping
for mass productions.[5]

In this project, the control system refers to the development of a system which controls
the automatic movements and accurate positioning of the robotic arm. And this also
includes the designing of a gripper as an end effector. During this designing process, we
are supposed to use our engineering knowledge. This thesis includes various aspects of
Mechanical Engineering; automations (control system), concepts of electronic drives,
general engineering subjects, parts design (strength of materials) and mathematics etc.
The result is that this thesis helps to develop the skills of practical knowledge about the
subject matter in real life.

Capture the explosion of Internet of Things trends, advantages of robotic arm and based
on practical needs, our team chose the topic "Design of a smart system for planting
and monitoring". And to realize the knowledge we have learned about Arduino, our
team will build a smart garden to address the needs of clean vegetables in daily meals,
energy saving, time to care and environmental protection.

1.3. Objectives of the project


My group wishes to be able to form ideas from the real needs of the society, using the
knowledge learned from the school to create a product of high application value to meet
the needs of the community.

The "Smart system for planting and monitoring" will contribute to the process of
industrialization, modernization, technology transfering to every family, improve the
quality of life. Also, this is a solution suitable for the development of modern science and
technology. The system will help guiding us to produce clean food for the family from
the preparation step until the collection of finished products. From anywhere, with an
Internet connection, users can monitor, control and take care of their familes’ small
garden in the most efficient way possible.

1.4. Methods
In this project, some methods are proposed as follows:

a) Smart system using robot arms and IoT system can plant, harvest and take care of
plants automatically. The image of system will be displayed on the website
through camera, so users can easily to manage and follow the status of seeds.
b) To make users feel easier, smart system using robot arms and IoT system can
handle almost of the job. It can sow seeds, water, take care of plants and harvest
plants automatically. It has camera sensor that monitors the health of plants and
send information to users by receiving messages from website, smartphone, and
PC. The automatic robot arm in the system will work in a set up time which can be
adjusted by users.
1.5. Main features of this smart system
 Automatic planting, harvesting and caring: The system automatically plants,
waters and harvests vegetables via set-up time.
 Monitoring: user can monitor the state of the garden (humidity, temperature, light,
rain, planting time, current development stage, actual image and video) via
software on the smartphone or laptop or website (Thingspeak.com).
 Remote controlling: The user can easily control the devices in the garden as
desired via smartphone, laptop or website from anywhere via the Internet.
 Notification: The system will notify users whenever there is a problem related to
the garden quickly, fully and promptly.
1.6. Advantages of this system:
 Simple, easy to use, full of knowledge to help everyone grow their own
vegetables.
 Automated, smart, time-saving.
 Maximum cost savings for users.
 Meet basic needs for home vegetable production for families.

This smart system uses smart devices and automation technology to help people save
time and effort in planting clean vegetables. The system helps the users enjoy the comfort
of life and easily manage their small garden. Only with a smartphone or a web browser,
they can control, monitor and take care of their beloved garden anywhere.

1.7. Outline of this thesis


 Chapter I: Introduction of the thesis. We discuss on users’ demand, the
background of the project, objectives, methods, main features, advantages of the
system and also the thesis outline.
 Chapter II: Focuses on literature reviews of this project based on journals and
other references.
 Chapter III: Mainly discuss on the design of mechanical structure of the system.
Details on the progress of the project are explained in this chapter.
 Chapter IV: Mainly discuss on the design of electronic circuits of the system.
Details on the progress of the project are explained in this chapter.
 Chapter V: Presents the results of the project. The discussion focused on the result
based on the experiment.
 Chapter VI: Overall conclusion of the project. Future recommendations and
commercialization are also discussed in this chapter.

Chapter II. Literature Reviews


2.1. Smart garden system models
2.1.1. Learning about smart gardens
A smart garden is a type of garden that is equipped with electrical or electronic
equipment that is fully automated or semi-automated, replacing humans with one or more
management actions, controlling. This electronic system communicates with the user via
an in-house electronic board, mobile software, tablet or web interface.

In smart gardens, electronic devices can connect to the Internet and mobile phones,
allowing owners to remote controlling widgets or schedule devices to automatically
perform tasks. In addition, electronic devices can understand each other's language and
interact with each other.

Figure 2.1. Overview of smart gardens[6]


Smart garden systems help people see information about plants: how to plant, nutrition of
plants, harvest time, etc; help people in the care: automatic watering, fertilizer in phases;
help informing the condition of the plants to the users to handle bad situations; help
looking up information related to pests, seasonal, etc.

2.1.2. Available smart garden system


In the world, there are many smart garden projects put into practical use such as Edyn
Smart Garden, FarmBot, Garden Space, GreenIQ Smart Garden, Click and Grow, Plantui
Smart Garden, etc. In Vietnam, it also has a lot of businesses that invest in smart garden
systems such as Smart Garden, DTU's Smart Vegetable Garden from Duy Tan
University, Hachi Vietnam's Smart Agriculture, Automatic Irrigation System, etc.

a) Edyn Smart Garden System


Edyn has launched a smart garden system has components that can be connected together
and connected to users, allowing users to create, interact and take care of their garden. It
is also equipped a light sensor to monitor sunlight, humidity, nutrient content and other
environmental factors, all of which greatly affect plant health. And then send real-time
information to users’ smartphones. The inventor of this idea was a land scientist, Jason
Aramburu, who together with designer Yves Behar worked together to create this
product. Edyn’s smart garden system is a product that has been studied for years in the
farmer community in Panama and Kenya. "Edyn was created with the belief that it would
help us understand the environment more and more to preserve it," Aramburu shared.
"This product represents our promise to help gardeners of all levels achieve the highest
success not only in growing plants but also in creating fruitful gardens. We use
equipment and data to provide concrete actions to help these gardeners achieve their
goals”.[7]
Figure 2.2. Edyn Smart Garden System[7]
By measuring and quantifying the environmental data, Edyn system allows users to
effectively manage precious natural resources such as water, soil and organic fertilizers.
The sensor of the garden constantly monitors the environment and knows exactly what
users’ plants need. Edyn is perfectly suited for vegetables, fruits, herbs and plants for
decoration or medicine. These water valves provide enough water for users’ plants
without waste. Along with these are tools that help users to improve their gardens as well
as their growing environment. "Plug in the ground like a shovel or a stake", Behar said.
"The sensory design of the Edinburgh gardens, literally and figuratively, creates a bridge
between nature and technology."[7]
Figure 2.3. Control information via smartphone application of Edyn[7]
Plug the garden sensor into the ground so that it reads information on nutrient content,
humidity, light intensity and external factors that can affect the health of users’ plants.
The Edyn’s application displays this information in real-time about their gardens and
gives users suggestions on how best to grow plants.

Edyn includes a database of thousands of plant varieties and soil conditions. It uses
algorithms to directly analyze the data transmitted to the sensor. Both water valves are
also equipped with sunlight sensors. One of the weaknesses of this smart garden system
is the use of lithium-polymer batteries, which is difficult to operate for a long time.
Figure 2.4. Sending notifications and suggestions to users’ Smartphones in real-time[7]
b) Garden Space

Figure 2.5. Garden Space in the real life and its functions[8]
This system is for people who tried and failed at growing their very own vegetables at
home. So the Garden Space Group decided to create a system which has a robotic smart
camera that helps people grow food at home. This smart camera monitors, waters and
protects users’ garden for the three pronged approach to food growing great allowing
asporing and experienced growers like themselves to enjoy the full payoff and benefit of
growing.
Figure 2.6. Smart robotic camera[8]
First, there’s the monitoring Garden Space has a unique 360° camera that keeps watching
on their plants 24/7 and monitors information on plant health and growth rates, so users
know exactly what’s happening in their gardens. And because it’s done by a camera, it
can look over the entire garden no matter its shape or layer. All users have to do is follow
a planting guide on their mobile application or simply tell Garden Space what they’ve
planted.

Figure 2.7. Garden Space’s mobile application[8]


The second thing Garden Space takes care of is watering. Garden Space knows what
users are growing as well as the weather and using a thermal sensor the water stress of
their plants, so it knows exactly how much water each plant needs and then automatically
waters them for users. No more worrying about if they’re under or over watering.

The third thing Garden Space does is protect users’ gardens. Sensing when uninvited
guests sneak into their garden for a midnight snack. Garden Space got a faces sensor
which targets the pests with water to ward them away keeping users’ plants safe in a
harm freeway. No one but users will get to enjoy their homegrown food.

Figure 2.8. Garden Space water beam to water the plants and ward the pests[8]
Garden place arms users with tools to get the most out of their growing no matter they’re
new or experienced. And just in case they do need help, Garden Space’s mobile
application is available to guide them. Getting started with Garden Space is simple. Just
place the unit in the garden, connect it to water supply and their home wifi, plug in their
standard garden hose and they’re ready to grow. The handy app is their garden command
center.
Figure 2.9. Command center in the mobile application[8]
Plus, thanks to its solar power, so there’s no batteries to replace and saving money for
electric cost. And, it’s also great for the environment.

Figure 2.10. Solar power panel[8]


c) FarmBot
Figure 2.11. Design drawings of FarmBot [9]

Figure 2.12. FarmBot in real-life [9]


FarmBot Cloud Services

FarmBot allows people farm from anywhere. Users control and configure FarmBot using
the free FarmBot web application at my.FarmBot.io. FarmBot company expects to
indefinitely offer free service adequate for home growing needs, though they may charge
for commercial or industrial FarmBot usage, for FarmBots larger than 3m x 6m in area,
and/or for FarmBots growing large numbers of plants concurrently. Users can always
host the software on their own server if they do not want to use company’s service.

Figure 2.13. FarmBot’s web application [9]


 Drag & Drop Farming

Graphically design your farm by dragging and dropping plants into the map. The game-
like interface is learned in just a few minutes so you’ll have the whole growing season
planned in no time.

The web app allows users to easily configure and control their FarmBot from a web
browser on your laptop, tablet, or smartphone. The application features real-time manual
controls and logging, a sequence builder for creating custom routines for FarmBot to
execute, and a drag-and-drop farm designer so they can graphically design and manage
their farms.
Figure 2.14. The map for planting in FarmBot’s web appplication[9]

 Growing Regimens

Build regimens for taking care of a plant throughout its entire life by scheduling
sequences to run when the plant is a certain age. Regimens can be reused, making
replanting a breeze.

 Sequence Building

Quickly create custom sequences to take full advantage of your hardware – no coding is
required. Simply drag and drop basic operations together, adjust the specifications, and
save.

 Real-Time Control

Move FarmBot and operate its tools in real-time with the manual controls. Scare birds
away from work or next time friends are over, pull out your phone for a quick and
impressive demo.

 MQTT Gateway
Message Queuing Telemetry Transport (MQTT) is a publish / subscribe protocol used for
Internet of Things devices with low bandwidth, high reliability and the ability to be used
in unstable networks.

Because this protocol uses low bandwidth in a high latency environment, it is an ideal
protocol for M2M applications. MQTT has a client / server model, where each sensor is a
client and connects to a server, which can be understood as a broker, through the TCP
(Transmission Control Protocol). MQTT is a message-oriented protocol. Each message is
a fragment of the signal and the broker can not see.[10]

Each message is published an address, can be understood as a channel. Client subscribes


to several channels to receive / send data, called subscribe. Client can subscribe to
multiple channels. Each client will receive data when any other station sends data to the
registered channel. When a client sends a message to a channel, it is called publish.

The MQTT Gateway is a cloud application that acts as an intermediary for all messages
between the FarmBot web app and FarmBot devices. It handles socket connections,
device identification, and authentication.[10]

Device Software
 FarmBot Raspberry Pi Controller

FarmBot's Raspberry Pi uses this software to maintain a connection and synchronize with
the web application via FarmBot Mesh. This allows FarmBot to download and execute
scheduled events, be controlled in real-time, and upload logs and sensor data. The
controller communicates with the Arduino over USB to send G and F code commands
and also receive collected data.

 Farmbot Arduino Firmware

This software is flashed onto FarmBot's Arduino MEGA 2560 microcontroller and is
responsible for physically operating FarmBot's hardware, tools, sensors, and other
electronics. It receives G and F codes from FarmBot Raspberry Pi Controller via the USB
serial connection, and then moves the motors and reads and writes pins accordingly. It
also sends collected data from the rotary encoders and pin reads back to the Raspberry Pi.

 WiFi Configurator

FarmBot OS has a WiFi Configurator utility built in allowing you to easily enter WiFi
and web app credentials from a WiFi enabled device (such as a laptop or smartphone).
This is useful for initial setup in order to get your FarmBot connected to your home WiFi.

External Resources

OpenFarm.cc: OpenFarm is a free and open database for farming and gardening
knowledge. This service provides crop and growing information to the web app for a
streamlined user experienced.

There are many software systems contributing to FarmBot's functionality. The diagram
below shows the different components and how data flows between them.
Figure 2.15. FarmBot Software High Level Overview[9]

Hardware design

 Aluminum Extrusions

These black anodized beams serve as both the primary structural element of FarmBot and
its linear guide system, allowing precise movements in the X, Y, and Z directions.
Figure 2.16. Types of Aluminum extrusions[9]
 Plates and Brackets
Plates and brackets are stamped and machined out of high grade aluminum alloys. Then
they are tumble polished to remove burrs, sandblasted to remove surface defects, and
anodized to achieve a premium quality aesthetic and feel. Please note that some non-
structural components may be made of plastic in future kits.

Figure 2.17. All of plates and brackets used in a FarmBot[9]


 Motors, Electronics, and Wiring
They use custom Farmduino board and four NEMA 17 stepper motors with rotary
encoders power FarmBot’s movements, while the Raspberry Pi 3 serves as the web-
connected brain.
Figure 2.18. Raspberry Pi 3[9]

Figure 2.19. Farmduino board[9]


Figure 2.20. Rotary encoder[9]

Figure 2.21. Four NEMA 17 motors[9]

 Plastic parts
The plastic components have been injection molded with ABS or precision machined
from Delrin. They are both tough and able to withstand UV rays.
Figure 2.22. Plastic parts of FarmBot[9]
 Fasteners and Hardware
All fasteners are made of stainless steel, allowing them to stand up to the outdoor
environment without rusting or corroding.

Figure 2.23. Fasteners and Hardware[9]


Interchangeable Tooling
 Universal Tool Mount
Featuring 12 electrical connections, three liquid/gas lines, and magnetic coupling, the
UTM can support any tool you can imagine.

Figure 2.24. Universal tool mount of FarmBot[9]


 Camera
FarmBot’s camera takes photos of your plants and soil in order to detect weeds, track
plant growth, and one day identify pests and disease.

Figure 2.25. Camera of FarmBot[9]


 Seed Injection
Powered by a 12 volt vacuum pump, the seed injector can precisely position seeds in the
ground with millimeter accuracy. Interchangeable luer lock needles allow you to work
with both small and large seeds.

Figure 2.26. Seed injection of FarmBot[9]


 Watering
Coupled with a 12 volt solenoid valve, this tool allows you to precision water your plants
with a gentle shower. The two-piece design allows you to customize the spray pattern
with by 3D printing your own alternative.

Figure 2.27. Watering tool of FarmBot[9]


 Weed Suppression
Stomp out weeds before they become a problem with this customizable weed suppression
tool. The blades and spikes come standard, though you could add corkscrews and other
shapes depending on your environment.

Figure 2.28. Weed Suppression of FarmBot[9]


 Soil Sensor
By measuring the moisture content of the soil, FarmBot can be configured to take care of
your crops in more water-efficient ways. For example: it can avoid watering after a rain.
Figure 2.29. Soil sensor of FarmBot[9]
 Seed Bins
Seed bins are for holding large amounts of one type of seed. They are best used when
planting many plants of the same crop, for example: when growing microgreens.

Figure 2.30. Seed bin of FarmBot[9]


 Seed Trays
The seed trays have 16 small area for holding seeds. They are best used when planting
many different crops, and when the number of seeds per hole needs to be strictly
controlled.
Figure 2.31. Seed tray of FarmBot[9]
What users need to provide
 Planter Bed – FarmBot Genesis is designed to attach to a raised bed or similar
infrastructure. Materials for this are not included because every installation will be
different.
 Electricity – The power supply needs to be plugged into a 110 or 220V AC GFCI
outlet. FarmBot ships with a 30cm (1ft) power cord with a standard US 3-prong
plug. You must connect this to your own extension cord of appropriate length.
Alternatively you can power FarmBot with solar.
 Water – The solenoid valve that controls FarmBot’s watering has a 3/4″ female
Garden Hose Thread (GHT) connection, meaning you can take a standard US
garden hose and screw it into your FarmBot. You will need to provide a hose of
the appropriate length.
 Internet – FarmBot can only be programmed and controlled using the web
application, meaning an active Internet connection is required to send and receive
data. The Raspberry Pi has built-in WiFi, though you may need to reposition your
WiFi router, install a WiFi repeater, or use an ethernet cable to ensure a reliable
connection. Alternatively you can run FarmBot on your local network with a local
installation of the FarmBot web app.
2.2. Overview of IoT
2.2.1. What is Internet of Things?
Internet of Things - IoT is a network of connected devices through the Internet. IoT is a
scenario of the world, where each object, human being is provided with a unique
identifier, and all of them are capable of transmitting and exchanging information and
data over a single network without direct interaction between people and people, or
people with computers. IoT has evolved from the convergence of wireless technology,
microelectronics and the Internet.

Figure 2.32. Internet of Things[11]


IoT is a collection of interconnected devices, with the Internet and with the outside world
to do a certain job. Connectivity is possible via Wi-Fi, broadband telecommunication
networks (3G, 4G), Bluetooth, ZigBee, etc. Devices can be smart phones, coffeemakers,
washing machines, ear-phone, bulbs, and more.

2.2.2. Application of Internet of Things


IoT applications in real-life are very broad, possibly in the following areas:

- Waste management

- Urban management and planning

- Environmental management

- Feedback in emergency situations

- Smart shopping
- Management of personal devices

- Intelligent gauges

- Home automation

The impact of IoT is very diverse, in the areas of infrastructure management, health,
construction and automation, transportation, etc. Specifically in the medical field, IoT
devices can be used to remote monitoring health and emergency notification systems.
Health monitoring devices can range from blood pressure and pulse rate to advanced
instruments capable of monitoring special implants, such as pacemakers or advanced
hearing aids. In the area of infrastructure management, IoT monitors and controls the
activities of urban and rural infrastructure such as bridges, railways and farms as an
important application of IoT. The IoT infrastructure can be used to track any events or
changes in structural conditions that may be within the safety threshold.

2.2.3. IoT in the future


Cisco, the leading provider of networked solutions and devices, forecasts Internet of
Things by 2020:

Figure 2.33. Future of IoT[3]


- 4 billion connected people

- $4 trillion in revenue opportunity

- Over 25 million applications

- More than 25 billion embedded systems and intelligent systems


- 50 trillion gigabytes of data.

2.3. Introduction of Robotic Arm


2.3.1 Basics of Robotic Arm
When people think of robots, an image of a mechanical, stiff, talking, moving, human-
like machine might come to mind. Robots are, in fact, computerized machines that are
ultimately utilized to simplify larger scale tasks. They include control machines,
computer controllers, or microprocessor based automated systems just to name a few.
The ultimate goal of industrial engineering is to expedite processes; therefore, with such
developed and modern technology, the manufacturing process is more efficient, cost
effective, and there is almost no human error. With all its benefits the automation and
robotics movement has made way for new fetes and greater prospects in economic terms
for large-scale firms. [5]

The robot is a mechanical manipulator whose motions are controlled by programming


techniques very similar to those used in numerical control. Cyril Walter Kenward and
George C. Devol are two names in robotic history that deserve recognition; both renound
scientists built robotic devices as early as the 1950’s and had their devices patented in
1957 and 1952 respectfully. Their brilliant ideas were later driven forward, and one man
in particular, Joseph F. Engelberger, was the “catalyst” to Devol’s idea when they
crossed paths in 1965, when discussion of the Unimate began. By 1962, they came
together once again to start the Unimation Company. Ford Motor Company put their
robotic technological fetes into action in their assembly lines, which generated the use of
Unimation products around the United States, Europe and Japan. The PUMA
(Programmable Universal Machine for Assembly) is an industrial robot arm that was
developed by Victor Scheinman at Unimation in 1970. It was electric motor powered and
had six joints so for the first time; motions were no longer limited to linear transfers from
one point to another. [4]

A robotic arm is a type of mechanical arm, usually programmable, with similar functions
to a human arm; the arm may be the sum total of the mechanism or may be part of a more
complex robot. The links of such a manipulator are connected by joints allowing either
rotational motion (such as in an articulated robot) or translational (linear) displacement.
The links of the manipulator can be considered to form a kinematic chain. The terminus
of the kinematic chain of the manipulator is called the end effector and it is analogous to
the human hand.[5]

The end effector, or robotic hand, can be designed to perform any desired task such as
welding, gripping, spinning etc., depending on the application. For example, robot arms
in automotive assembly lines perform a variety of tasks such as welding and parts
rotation and placement during assembly. In some circumstances, close emulation of the
human hand is desired, as in robots designed to conduct bomb disarmament and disposal.

In the industrial world, automation is one of the most important elements for
development. It helps to reduce the need for humans and increase efficiency and
productivity. Robotic Arm is one of them, which is widely used in industrial proposes. A
Robotic Arm can be compared to a human hand. It has a free rotating joint (rotation) and
a translational joint (displacement) for the movement of the arm. and to construct a
gripper which used for pick and place any material as well as to draw any alphabet on the
board that draws by user in the paint. It also used for drilling, cutting and painting
purpose. The following thinks are involved in this: Designing a layout for a Robot and
other components together, Wiring Design and wiring installation, Designing the gripper
& Programming. On the other hand, in case of mass-produced goods, customized control
systems are economic due to the lower cost of the components, which can be optimally
chosen instead of a "generic" solution, and where the non-recurring engineering charges
are spread over thousands or millions of units.This robotic arm useful in large scale
industries for pick and place purpose, paint on any car and machine, etc. These robotic
arms are designed to be used in industrial purposes for fast and reliable performance,
helping for mass productions.

2.3.2. Pre-existing Robotic Arm

The Robotic Arm shown in figure 2.34 is from the HAMK laboratory which was

designed and constructed by Nicolas Mustaka (an exchange student from Greece, 2009).
This robot has six axes which are driven by DC motors (24Vdc) and it is made to be

controlled manually by using sets of two potentiometers for each joint. To control a
single joint, two potentiometers are used connected to each other in a feedback amplifier

circuit. The comparator circuit compares the voltage between the axis potentiometer and

the driver potentiometer, and it drives the motor in two directions depending on the

voltage between these two potentiometers. [4]

Figure 2.34. HAMK Electronic Laboratory Robotic Arm[4]

The output voltage for driving the motor depends upon the two potentiometers voltage

value: the driving potentiometer and the axis potentiometer. Two potentiometers are

integrated into the feedback amplifier circuit. The driving potentiometer voltage works

like an input voltage and it can be set by the user whereas the axis potentiometer works

like feedback voltage, altering the output. The axis potentiometer voltage depends upon

the position of the axis and its changes due to the rotation of the axis. When the input
voltage and feedback voltage are in the same phase, then the output becomes positive

and it drives the motors in a positive direction until the input voltage(driving

potentiometer) and the feedback voltage (axis potentiometer) have the same voltage

value. When the input voltage and feedback voltage are in the inverse phase, then the

output becomes negative and it drives the motors in a negative direction until these

voltages are the same. In every case, the direction of the motor is set in such a way that

it rotates to change the voltage of the axis potentiometer the same as the driving

potentiometer voltage and then the motor stops.

2.3.3. Introduction of PID algorithm


It is known that PID controller is used in many facets of industrial automation. The
application of PID controller span from small industry to high technology industry. The
aim of this smart system is to design a position controller of a robot arm by selection of a
PID specifications using genetic algorithm. The model of a robot arm is considered a
third order system. And this system compares two kinds of tuning methods of parameter
for PID controller. One is the controller design by the genetic algorithm, second is the
controller design by the Ziegler and Nichols method. The proposed method could be
applied to the higher order system also.[12]

a) Genetic algorithm method

In general, the arm of a robot has a number of joints .The current approach to the design
of control system for robot joints is to treat each joint of the arm as a simple joint
servomechanism, ignoring the effect of the movements of all other joints. In industrial
robots, hydraulic or pneumatic actuators may be used rather than dc servomotors. Due to
it's excellent speed and position control characteristic ,the dc servomotors has been
widely used in industry ,therefore the actuator is assumed to be an armature-control dc
motor[13]. In addition it is assumed that the robot arm is connected to the motor through
gears. PID controllers have been widely used for speed and position control of robot arm.
This paper endeavors to design a system using Genetic Algorithm (GA). GA is a
stochastic algorithm based on principles of natural selection and genetics. GAs are a
stochastic global search method that mimics the process of natural evolution. Using
genetic algorithms to perform the tuning of the controller will result in the optimum
controller being evaluated for the system every time. The objective of this paper is to
show that by using the GA method of tuning a system , an optimization can be achieved.
This can be seen by comparing the result of the GA optimized system against the
classically tuned system.[14]

𝐾𝑖
𝐾𝑝 + + 𝐾𝐷 𝑆
𝑆

Figure 2.35. The block diagram of the robot joint control system[15]
 Tuning of PID controller using genetic algorithm approach
GA is a stochastic global adaptive search optimization technique based on the
mechanisms of natural selection. Recently, GA has been recognized as an effective and
efficient technique to solve optimization problem. Compared with other optimization
techniques. GA starts with an initial population containing a number of chromosomes
where each one represents a solution of the problem which performance is evaluated by a
fitness function. Basically, GA consists of three main stages: Selection, Crossover and
Mutation. The application of these three basic operations allows the creation of new
individuals which may be better than their parents[13]. This algorithm is repeated for many
generations and finally stops when reaching individuals that represent the optimum
solution to the problem. The GA architecture is shown in Figure 2.36.
 Genetic Algorithm For PID Tuning
The implementation of the tuning procedure through genetic algorithms starts with the
definition of the chromosome representation. The chromosome is formed by three values
that correspond to the three gains to be adjusted in order to achieve a satisfactory
behavior. The gains Kp , Ki and Kd are real numbers and characterize the individual to
be evaluated. The objective function is the calculation of its associated fitness. The
fitness function is the measure of the quality of chromosome and can be defined as.[15]

Figure 2.36. Simulation flow chart for the computation of GA-PID controller
specifications[15]
b) Ziegler -Nichols Rule For Tuning PID Controller
The control system performs poor in characteristics and even it becomes unstable, if
improper values of the controller tuning constants are used. So it becomes necessary to
tune the controller specifications to achieve good control performance with the proper
choice of tuning constants. Controller tuning involves the selection of the values of Kp,
Ki and Kd. By setting Ki =0 and Kd=0, we obtain the closed- loop transfer function. The
value of Kp that makes the system marginally stable so that sustained oscillation occurs
can be obtained by use of Routh's stability criterion.[16]

When using PID technology in the robot, the results show that the robot is not working as
expectations. The theological reason is that the values of Kp, Ki and Kd are not
satisfactory. Each robot has a different physical characteristics, so the coefficients must
also change accordingly. The proposed method below can determine the values of Kp, Ki
and Kd using a flow-chart.[16]

In conclusion, The step responses under PID controller tuned by GA for three fitness
functions are faster than that response under PID controller tuned by Zigler –Nichols.
However, the Zigler –Nichols method is good for giving the designer the initial guess for
the PID tuning. The step response under PID controller tuned by GA is better in terms of
minimizing the max overshoot, the rise time and the settling time .Finally the mean
square error associated with GA-PID controller is less than the error associated with
conventional approach.
Figure 2.37. Flow-chart for correcting of PID[16]

2.4. Introduction of IoT using Arduino


2.4.1. Introduction of Arduino
Arduino is a microprocessor-based board designed to build applications that interact with
each other or with the environment. The hardware includes an open-source circuit board
designed on an 8-bit AVR microarchitecture platform, or 32-bit ARM Atmel. The current
models are equipped with a USB interface, six analog input pins, and 14 digital I / O pins
that are compatible with a variety of expansion boards.

Introduced in 2005, Arduino designers try to provide an easy, inexpensive way for lovers,
students and professionals to create devices that interact with the environment through
sensors and actuators. Common examples for beginner lovers include simple robots,
temperature controls, and motion detection. Comes with it is an integrated development
environment (IDE) running on common PCs and allows users to write programs for
Aduino in C or C ++.

The price of Arduino boards fluctuate around 150,000 vnd - 600,000 vnd. It is estimated
that by mid-2011 more than 300,000 Arduino artefacts have been commercially
produced, and that by the year 2013, about 700,000 official circuits have been shipped to
consumers.

2.4.2. Hardware design of Arduino

An Arduino circuit consists of an AVR microcontroller with additional components that


are easy to program and extendable to other circuits. An important aspect of the Arduino
is its standard connectivity, which allows users to connect to the CPU of the board with
additional modules that can be easily converted, known as shields. Some shields
communicate with the Arduino board directly through the pins, but multiple shields are
addressed via the I²C serial bus - multiple shields can be stacked and used in parallel.
Arduino officially uses megaAVR chips, especially ATmega8, ATmega168,
ATmega328, ATmega1280, and ATmega2560. Most circuits consist of a 5V linear
regulator and a quartz quartz oscillator (or ceramic resonator in several variants),
although some designs such as LilyPad run at 8 MHz and bypass the regulator. Voltage
regulation onboard due to limitations on device size. An Arduino microcontroller can
also be programmed with a boot loader that allows you to simply upload programs to on-
chip flash memory, as compared to other devices that typically require an external loader.
This makes the use of Arduino more direct by allowing the use of a root computer as a
program loader.
In principle, when using the Arduino software stack, all boards are programmed via an
RS-232 connection, but the way to do it depends on the hardware life. The Arduino serial
board contains a switching circuit between RS-232 and TTL. The current Arduino board
is programmed via USB, implemented via USB-to-serial converter chip as FTDI FT232.
Some variants, such as the Arduino Mini and Boarduino are unofficial, using a removable
board, USB-to-serial adapter, Bluetooth or other methods.

The Arduino Board will put most of the I / O pins of the microcontroller to use for those
external circuits. Diecimila, Duemilanove, and now Uno offer 14 digital I / O pins, 6 of
which can generate pulses PWM (pulse width modulation) and 6 analog input pins,
which can be used as 6 I / O pins. These pins are designed above the board surface,
through the 0.10-inch (2.5 mm) header. Many shield application plug-ins are also
commercially available. Arduino Nano boards, and Arduino-compatible Bare Bones
Boards and Boarduinos can provide male header pins on the board's upper side for
plugging into breadboards.

Many extensions to Arduino are implemented by adding output drivers. Some variants
use different processors, with varying degrees of compatibility.

2.4.3. Development Software

Arduino's integrated development environment (IDE) is a cross-platform application


written in Java, and from this IDE will be used for programming and project development
language. It is designed for beginners familiar with the field of software development. It
includes a code editor with functions like syntax highlighting, auto-brace matching, and
auto-alignment, as well as compile and load programs on the board with just one click. A
program or code written for Arduino is called a sketch.

Arduino programs are written in C or C ++. The Arduino IDE comes with a software
library called "Wiring", from the original Wiring project, which can make input / output
operations easier.

The Arduino IDE uses the GNU toolchain and AVR Libc to compile the program, and
uses avrdude to upload the program to the board. Since the Arduino platform is the Atmel
microcontroller, the development environment of Atmel, AVR Studio or newer Atmel
Studio versions can also be used to make software development for Arduino.

2.4.4. Arduino’s applications

Arduino is chosen as the processing brain of many devices from simple to complex.
Among them, there are several applications that really demonstrate the superiority of the
Arduino because of their ability to perform many complex tasks. The following is a list
of some of Arduino's outstanding applications:

 3D Printer: Another revolution is being silently shaped by the Arduino, which is


the development of the open source 3D printer Reprap. 3D Printer is a tool to
create real objects directly from 3D CAD files. This technology promises many
interesting applications that revolutionize personal production.

Figure 2.38. 3-D printer of MakerBot Industries


 Robots: Due to its compact size and powerful processing capabilities, the Arduino
is chosen as the central processor of many types of robots, especially mobile
robots.
Figure 2.39. Mobile robots avoid obstacles themselves
2.4.5. Arduino UNO R3 board

Arduino Uno R3 is a 3rd generation Arduino Uno, the most popular Arduino family in
the current Arduino line. It has a very powerful application from simple to complex:
flashing strobe control, remote signal processing, temperature gauge, robot, etc.

a) Structure of Arduino Uno R3

Kit Arduino Uno is a microcontroller board based on the AVR ATmega328 chip. Thus,
the board has 14 digital inputs / outputs (6 pins can be used as PWM pulse width
modulation pins), 6 pins acting as analog inputs. Analog Inputs, 16MHz quartz oscillator,
USB connection, separate power supply with AC-DC adapter, RESET button and ICSP
connectors.

1. IC Atmega 16U2: This IC is programmed as a USB-to-Serial converter used to


communicate with the computer via Serial (COM port).

2. USB Port: The USB port on the Arduino board connects to the USB cable

3. Reset button: The reset button is used to reset the running program. Sometimes the
program runs error, the user can reset the program.

4. ICSP of ATmega 16U2: ICSP is the abbreviation of In-Circuit Serial Programming.


These are the SPI pins of the Atmega 16U2 chip. These legs are rarely used in Arduino
projects.
Figure 2.40. Hardware structure of Arduino UNO R3

5. Signal output: There are all 14 output pins in the Arduino Uno, the pins marked with ~
are pins that can be pulsed (PWM), which can control the motor speed or brightness.
lights. Figure 2.40 shows very clearly the pins to this pulse.

6. IC ATmega 328: IC Atmega 328 is the soul of the Arduino Uno motherboard, which is
used in data acquisition from sensor, data processing, output signal, etc.

7. ICSP pins of ATmega 328: ICSP pins of ATmega 328 are used for SPI (Serial
Peripheral Interface) interfaces, some Arduino applications use this pins, such as using
RFID module RC522 with Arduino. or Ethernet Shield with Arduino.

8. Analog Signal Pin: These pins take the analog signal from the sensor to the IC Atmega
328 processor. There are 6 pins for Analog signal, from A0 to A5.

9. Power supply for sensors: These pins are used to power external devices such as
sensors, RC servos, etc. On this area there are available GND pins (ground pins, negative
pins) 5V pin, 3.3V pin as shown in Figure 2.40. Thanks to these pins, the user does not
need the power transformer when supplying the sensor, role, servo rc ... Also in this area
there are Vin foot and foot reset, IOREF foot. However, these pins are not commonly
used so please do not go into it.

10. External Power Source: The external power outlet uses external power sources such
as batteries, batteries, or Arduino adapters. The power supply to this port is DC power
from 6V to 20V, but the best voltage that the manufacturer recommends is from 7 to
12V.

11. In addition, the Arduino Uno has a number of other noteworthy components. There
are four LEDs on the board, including one led on the source, two led Tx and Rx, and one
led L. The Tx and Rx leds will blink when data is transmitted. from board to computer or
vice versa via USB. L is connected to pin number 13. This led is referred to as led on
board, which allows the user to practice simple tasks without using external leds. In the
14 pins of the pin also has two pins 0 and 1 can transmit data serial TTL. There are some
applications that need this feature, such as the Arduino Uno control application on the
phone using the HC05 bluetooth. In addition, pin 2 and pin 3 are also used for
interrupting programs, while some other pins can be used for other functions, as shown in
Figure 2.40.

b) The software programs the Arduino

Algorithm mapping

 Arduino IDE programs typically revolve around two setup functions - void setup
() and loop () - void loop ().
 The void setup () function is used to declare the initial settings and only once, such
as setting which pins are input, output pins, or baud rate settings for serial
communication.
 The void loop () function repeats the operation or task that the user has
programmed.
Figure 2.41. Algorithm mapping on Arduino IDE
2.5. Introduction of module Wifi ESP8266
2.5.1. Inroduction of Wifi ESP8266
The ESP8266 is a cheap, inexpensive, 2.4 Ghz programmable integrated Wi-Fi chip
manufactured by a Chinese semiconductor company, Espressif Systems.

Originally released in August 2014, the package is marketed as the Model ESP-01
Module, produced by 3rd party: AI-Thinker. Ability to connect to the Internet over Wi-Fi
network quickly and use very little components. The price is very cheap compared to the
features and capabilities ESP8266 can do.

ESP8266 has a huge developer community around the world, offering a variety of open
source programming modules that enable people to access and build applications very
quickly. All ESP8266 chips on the market today carry the ESP8266EX, which is an
upgraded version of the ESP8266.
Figure 2.42. Pins connection and Block diagram of ESP8266

2.5.2. Programmable models with ESP8266


 Use the available firmware interfaces AT command

In this model, we will load an available firmware provided by Espressif so that the
ESP8266 acts as a standalone Wifi module. Our task is to program an external MCU that
communicates with the ESP8266 to configure the Wifi connection and transmit / receive
data from the Wifi network.

The operating principle of this model can be shown in the figure below:
Figure 2.43. Operating Principle of ESP8266: Firmware communicates with AT
command

Here we communicate with the ESP8266 through the UART standard so just connect two
TXD / RXD signals and two power cables to the ESP8266 module to be able to
communicate. External MCU can be a board microcontroller such as Arduino board or
PC.

This is the simplest and fastest programming model. We are going to use the ESP8266 as
a wifi module and just configure the Wifi network, passwords, and connect and transmit
data on the UART interface.

To communicate, we will pass commands in a format defined by Espressif and called AT


commands. Currently AT command commands can be divided into 3 groups:

 Chip configuration commands: Allows you to check the operating status, reset
chip, read firmware version information, or configure UART, Sleep mode etc.
 Wifi network configuration commands: Supports commands such as operation
mode (Station, AP, AP + station), read list of wireless networks around, configure
Wifi network information to connect, or configure DHCP, WPS, MDNS, smart
config, ... Most Wifi related configurations are fully supported for normal to
advanced needs.
 TCP / IP configuration scripts that allow configuration of TCP, UDP, SSL, ping
commands, timeout configuration for data transfer, DNS, etc. This section mainly
supports data transmission.
 Direct programming on the ESP8266 chip

In this model, we will program a firmware for ESP8266 using the SDK library provided
by Espressif. We will follow this model for applications that want to use the ES8266 to
control the device directly without an external MCU driver; Or we need features that the
standard firmware does not offer.

The SDK library of the ESP8266 includes the following components:

 The library code files provide an HAL driver, which defines the address of the
control register, as well as software modules such as RTOS, Memory Managment,
etc.
 Compilers and linkers to compile source code and generate * .bin firmware files
for ESP8266
 Software to transfer * .bin files to ESP8266 via UART (we need to change the
value of some GPIO pins to ESP8266 into firmware load mode from UART)

Espressif does not currently support an IDE program like IAR, Keil to program ESP8266.
So we will use a basic text editor (Java, Visual Studio, or even Notepad, ...) to write the
application code for ESP8266, then use the compiler to compile the code with the SDK.
support for binary files. Finally, we use the download tool to load the firmware into the
device.

 Programming for ESP8266 using Arduino IDE

No need to talk much about the Adruino programming language, it is so famous and you
just search Adruino on google it will come out a lot of documentation in both English and
Vietnamese. This is a relatively accessible language for amateurs who still love to
discover new things to create a product.
Currently in the developing community a project called ArduinoESP8266 provides the
Arduino core library to compile the ESP8266 firmware while still using the familiar
Arduino commands. Home of this project in https://github.com/esp8266/Arduino

The programming model is described as follows in Figure 2.44.

As depicted in the figure, we can use the familiar command in the Adruino IDE. When
compiled in the Arduino IDE, the ESP8266 library converts arduino commands into
ESP8266 code using Non-OS SDK APIs.

Figure 2.44. Programming model of ESP8266 in Arduino IDE

We can understand the principle of this model is ArduinoESP8266 library to generate


lines of code ESP8266 from the familiar command on the Arduino IDE. Therefore, the
programmer can still use Arduino language that is familiar and easy to program for
ESP8266. In addition, the ArduinoESP8266 also supports integration of the compiler into
the Arduino IDE to create the firmware file and is loaded onto the ESP8266 module
through the UART.

With direct programming support for Esp8266 on this platform, people familiar with
Adruino programming can programmatically communicate with the ESP8266 board in an
easy, time-saving way. Currently, the latest library of the ESP8266 on Adruino is based
on Non-OS SDK version 1.5.3 fully supports the necessary functions of a wifi module
such as: TCP, UDP, HTTP settings, MDNS, SSDP, DNS servers, OTA, etc. It also
supports interfaces such as flash memory, SD cards, servos, SPI, I2C. As depicted in the
figure, we can use the familiar command in the Adruino IDE. When compiled in the
Arduino IDE, the ESP8266 library converts arduino commands into ESP8266 code using
Non-OS SDK APIs.

2.5.3. Functions of ESP8266

ESP8266 plays the connection between arduino and server. ESP8266 connects to
Arduino via UART. The ESP8266 sends signals to the server via the Message Queuing
Telemetry Transport (MQTT) protocol. Arduino sends information about the state of the
sensor, the engine on the processor. Server sends control parameters to the Arduino.
Chapter III. Mechanical design of the system
1.1. Robotic Arm
This project will consists of three main parts. The first part is the construction of the
robotic arm, its electronics and its controller. This will be the most time consuming
portion of the project, and possibly the most difficult to accomplish in under 10 weeks.

Clamp / Gripper / Holder


Wrist
Elbow
Shoulder

Base
460 mm

Servo motors

180°
355 mm

Figure 3.1. Robotic Arm’s design drawing


Some specifications of our designed Robotic Arm:

- Rotation angle of 180 degrees


- Radius of gyration: 355 mm
- Height: 460 mm (holder closed)
Figure 3.2. The clamp of the Robotic Arm

- Clamp Max open is 54 mm


- Widest distance of the holder: 94 mm
- The Kit without servo motors (In this clamp claw kit, users better use MG996R
servo motors for the joint bears larger force, while MG995 servo motors for joints
bears relatively smaller force).

Thanks to all of above specifications in Figure 3.1 and 3.2, the design of Robotic Arm is
very suitable for this system. First, it can rotate 180 degrees, so this system can sow
seeds to the soil tray, water and take care of plants then harvest plants and put them in the
opposite direction easily. Second, due to the maximum height and radius of gyration ( the
length of the Robotic Arm when it’s working and when it backs to the original position),
working area is suitable for the small system ( the width of the soil tray is about 20 to 30
cm). Third, the clamp is quite good for holding seeds and plants, it just needs to be
programmed to not break or crush the things it is carrying.

This Robotic Arm has 5 parts: Base, Shoulder, Elbow, Wrist and Gripper. All of them are
executed by servo motors’ operations and controlled by PID algorithm ( they will be
discussed in Chapter IV).

Wrist
Gripper

Servo motors

Elbow

Base
Shoulder

Figure 3.3. Robotic Arm of the system in real-life

1.2. Overview design drawing of the system

The second part is the frame. It includes a soil tray, a rail for Robotic Arm run on, a
stepper motor, a transmission system, a water pump, a water tray, and a board to put
seeds in. And the last part is the supervise camera, makes the users feel more easier in
watching the developing of the plants. All the specifications and brief discriptions of
them will be discussed later in Chapter IV.

An overview of the opearation of this system: When users supply power to the system,
the Robotic Arm will takes seeds in the seeds tray then sow them to the ground in the soil
tray. The Robotic Arm needs a short delay for the pump to pump water from water tray
and irrigate the seeds. Now, the stepper motor will pushes the Robotic Arm via the
transmission system with wheels on the rail, and continue the loop for planting and
watering. When it goes to the end of the journey, it will touches the limit switch, and then
the stepper motor will pulls the Robotic Arm to the original position and finish the
process. When the plants is grown enough, users can harvest them by using this system,
now the operation principle is similar to the planting process, but the execution of the
Robotic Arm is completely opposite, it will takes the plants from the soil tray first, then
put them aside. All of above processes will be monitored by a camera and pictures or
videos will be sending to the Internet so users can control the camera to manage their
system easily.
15 cm
Soil tray
Stepper
motor 70 cm
Camera

18 cm 20 cm

Water tray

Water pump
15 cm

Seeds box
20 cm

Seeds board Wheel Rail


Limit switch
Transmission 7 cm 1.6 cm
system

Figure 3.4. Overview of the design of this system


Chapter IV. Electronic design of the system
4.1. Hardware design

 Power supply:

The requirement of the power supply of CPU Module is 5V – 12 V, Step-motor is 24V


and water pump is 12V. Adapter and Switch Power Supply are recommended to use. In
this project, it is very difficult to use the adaptor to operate the equipment. Because when
the system is operating. The electricity is rising dramatically. If the adapter is too low
current, it will lead to voltage drop. Then the voltage will decrease. In fact, the adapter
only works at a stable voltage. If the current in the circuit is larger than the current in the
adapter, it will quickly destroy adapter. This is a reason to damage the adapter

When lots of equipment connect to the adaptor so that the current of adaptor is not good
enough to keep the equipment working properly.

To overcome the problem mentioned above. Switching Power Supply is one of the
perfect solutions. It ensures stable output voltage and current in the process of work. In
addition, it makes easier to manage different input streams and is easy to identify when
encountering problems

 Microcontroller Module (CPU Module)

There are many different types of microprocessors currently sold in the market from 8 -
bit microcontroller such as PIC10F320, ATMega328, ATMega2560 to 32 - bit
microcontroller as AT32UC3A0512. Based on the specs and requirements of the design,
the 8-bit microcontroller is the most affordable option as well as the most technically
responsive

Atmega328 and ATMega2560 of Atmel, PIC10F320 of Microchip Technology is one of


the 8-bit chips that meet the requirements of this project with an appropriate price,
specifications in accordance with the design requirements of the product.

PIC10F320 has the advantage of compact size, large memory capacity. In fact,
ATMega2560 and ATMega328 is the best choice for this project. The ATMega 2560 has
a large memory capacity and the large number of input and output ports that make it
suitable for robot control. ATMega328 is a multi-function processor that can operate
stably so it is well suited for controlling stepper motor and water pump and receiving the
input signal of soil moisture sensor. ATmega2560 and atmega328 are affordable, fast
processor, can combine many different devices and very suitable for the requirements of
the whole system.

In real projects, to ensure continuity of equipment during operation. The link between
ATMega328 and ATMega2560 is set up to ensure synchronization between devices.

 Water pump:
After had done the placement of seeds right place. To ensure that the plants do not die
due to lack of water. A pump is one of the necessary components. There are various types
of pumps with AC or DC input in different sizes and capacities.

With AC motors, the output waterpower will be very large which makes plants to die. So
selecting DC Motor with enough waterpower is the most reasonable option. In this
project, water pump with output power 60W -12V is a reasonable choice of price as well
as demand.

 Robot arm (Servo motors):

Controlling the robot arm requires the servo motors to operate at the right angles. There
are several types of RC Servo Motor currently available on the market such as MG996R
Servo Motor Digital High Torque, RC Servo Digital RC FR1501 and RC Servo MG90S.

RC FR1501 is one of the best servos. It has stall torque up to 17kg / cm and speed: 0.16s
/ 60 degree However the price is quite high. MG90S has lower torque than FR1501 at
1.8kg / cm to 2.2kg / cm at 0.1s / 60 degree. The advantage is cheap. The MG996R can
reach traction of 3.5kg / cm to 5.5kg / cm with rotational speed from 0.13s - 0.17s / 60
degrees. From the above specifications, MG996R is the best choice in terms of both
stability, demand as well as price of the product.

Table 4.1. Applying PID algorithm for controlling positions of the Robotic Arm
Servo motor name Times Kp Ki Kd Angle
1 2 6 3 177.6
2 2.2 4.5 2.3 178.7
Base
3 2.7 3.4 3.4 179.2
4 2.9 3.2 3.6 179.9
1 3 2 4 86.3
2 3.2 1.6 3.8 88.7
Shoulder
3 3.3 1.8 3.5 89.4
4 3.5 1.7 3.3 89.8
1 2.5 3 1 74.5
2 2.3 2.6 1.2 76.8
Elbow
3 2.2 2.3 1.6 78.9
4 2.2 2.1 1.9 79.7
1 1.8 3 2 52.2
2 1.6 3.2 2.1 53.7
Wrist
3 1.4 2.6 2 54.4
4 1.5 2.4 2.2 54.8
1 4 2 3 8.2
2 4.1 2.4 2.8 8.4
Gripper
3 4.3 2.2 2.6 8.5
4 4.2 2.1 2.5 8.8

 Stepper motor driver:

Stepping motors are synchronous motors used to convert control signals in the form of
successive discrete pulses into rotational angular motion or rotor motion that is capable of
fixing the rotor to the required positions

In terms of structure, the stepper motor can be considered as a combination of two types
of engines: non-contact DC motor and small-speed synchronous motor.

The A4988 stepper motor driver carrier is a breakout board for Allegro’s easy-to-use
A4988 micro stepping bipolar stepper motor driver. The driver features adjustable current
limiting, overcurrent protection, and five different micro step resolutions. It operates
from 8 – 35 V and can deliver up to 2 A per coil.

The specifications of A4988 stepper motor driver carrier is very suitable for the proposed
project and reasonable price
Specifications

Table 4.2. Specifications of mechanical part of this smart system

Mechanical Part
Water P385 water  Voltage: 12V
pump pump  Power output: 60W –
5A
 Pressure: 8kg (0.8
Mpa)
 Flow rate: 5L/min
 Weight: 0.6 Kg
 Diameter tube input:
12 mm
 Maximum allowable
line length: 90
meters.
 Automatic pressure
switch off when the
water lock.

Stepper Nema 17  Maximum supply


Motor speed gear voltage: 24VDC
ration  Maximum current
57/11 consumption: 1.7A
 Step resolution: 1.8
degrees.
 Gearbox: Metal
 Gearbox length:
28.5mm
 Dimensions: 42 x 42
x 97 mm
 Stall torque:
30kgf.cm

Servo MG996R  Weight: 55 g


Motor High  Dimension: 40.7x
Torque - 19.7 x 42.9 mm
Metal Gear approx.
Dual Ball  Stall torque: 9.4
Bearing kgf·cm (4.8 V),
Servo  11 kgf·cm (6 V)
 Operating speed: 0.17
s/60º(4.8 V), 0.14
s/60º (6 V)
 Operating voltage:
4.8 V a 7.2 V
 Running Current 500
mA – 900mA (6V)
 Stall Current 2.5 A
(6V)
 Dead band width: 5
µs
 Stable and shock
proof double ball
bearing design
 Temperature range: 0
ºC – 55 ºC

Table 4.3. Specifications of Electronic part of this smart system


Electrical Part

Power Switching AC 110 – 240V to


supply Power  DC 5V – 4A
Supply  DC12V - 2A
(S-50W-  DC 24V- 2A
24V2A or  Shell material:

S-24W- Metal case

12V2A or  Input voltage


frequency: 50/60 Hz
S-20W-
 Adjustable Rating:
5V4A)
+/-15% output
voltage
 Working
Temperature: 0 ~ 40
centigrade degrees

Soil Soil  Input voltage: 5v


moisture moisture  Output voltage: 0-5v
sensor sensor  Output: Analog.
Interfacing  Sensitivity
Module adjustable.
 Threshold level can
be configured.
 Module triple output
mode, digital,
analog, serial
outputs.
Electrical Part

Stepper A4988  Minimum operation


Motor Stepper voltage: 8V
Driver Motor  Maximum operation
Driver voltage: 35V
 Continuous current
per phase: 1.2A
 Maximum current
per phase: 2A
 Minimum logic
voltage: 3V
 Maximum logic
voltage: 5.5V
 Micro step
resolutions: full, 1/2,
1/4, 1/8 and 1/16
 Reverse voltage
protection?: N
 Bulk packaged: N
 Header pins
soldered: N
Electrical Part

Wifi ESP 8266  32-bit RISC CPU:


module Tensilica Xtensa
LX106 running at
80 MHz
 Supports external
Flash from 512KiB
to 4MiB
 64 KBytes RAM
executable
command
 96 KBytes of RAM
data
 64 KBytes boot
ROM
 Standard EEE
802.11 b / g / n wifi,
2.4 GHz Wi-Fi
Integrated TR
switch, balun, LNA,
power amplifier and
matching network
WEP, WPA / WPA2
support, Open
network
 Integrated TCP / IP
protocol
 Supports many types
Electrical Part

of antennas
 16 GPIO pins
 Supports SDIO 2.0,
UART, SPI, I²C,
PWM, I²S with
DMA
 1 10 bit ADC
 Wide operating
temperature range: -
40C ~ 125C

CPU Arduino  Microcontroller:


Module Mega 2560 ATMega2560
 Operating voltage:
5V
 Input voltage
(recommended): 7V
- 12V
 Digital I/O pins: 54
(of which 15
provide PWM
output)
 Analog input pins:
16
 DC Current per I/O
pin: 40mA
Electrical Part

 Flash Memory:
256KB of which
8KB used by
bootloader
 SRAM: 8KB
 EEPROM: 4KB
 Clock Speed:
16MHz

Arduino  Microcontroller:
UNO R3 ATMega328
 Operating voltage:
5V
 Input voltage
(recommended): 7V
- 12V
 Input Voltage
(limits): 6 – 20V
 Digital I/O pins: 14
(of which 6 provide
PWM output)
 Analog input pins: 6
 DC Current per I/O
pin: 40mA
 DC Current for 3.3V
Pin: 50mA
 Flash Memory:
32KB of which
Electrical Part

0.5KB used by
bootloader
 SRAM: 2KB
 EEPROM: 1KB
 Clock Speed:
16MHz

Camera Camera IP  Dimensions (D x R


Yoosee x C): 99.5 x 99 x
HD720 125mm
 Image Resolution:
720P (1280 * 720) /
640 * 360/320 * 180
 Available
temperatures: -10 ~
50 ° C
 Minimum light
intensity: 0.1Lux
 Input / output port:
RJ45, Wifi
 Frequency of light:
50Hz, 60Hz
 Frame Rate: 1 ~ 25
fps
 Video resolution:
720P (1280 * 720)
 Customize images:
Brightness,
Electrical Part

Contrast, Saturation,
Chromaticity
 Input power: DC
5V/2.0A
 Color Balance: Can
be adjusted
automatically or
manually
 Infrared night view:
20m
 Support IP address:
static IP, dynamic
IP, Ubiquitous Wifi

 Power supply: The power supply module will supply the power for operation the
all the system and modules. It is also provide the power to operation camera
 CPU Module: This module will receive the input signal from soil moisture sensor
and mobile phone. In addition, it will send the control signal to robot arm, water
pump, and stepper motor. Arduino Mega 2560 and Arduino UNO R3 are used in
the project.
 Human interface module: The input signal to operate the process. Besides this
module also indicates the status of system.
 Robot arm: receiving the signal from CPU module, moving to the specified
position, and send backing the signal to CPU module. MG996R is selected by its
specs.
 Water pump: Operated according to instructions of CPU Module
 Camera: Send and receive signals from Mobile phone.
 Wi-Fi module: Send the data to Server. ESP8266 is useful for the project.
 Stepper Motor driver: Control the stepper motors. It can forward or reverse as
desired. A4988 is used to control one stepper motor.

All above are blocks in the block diagram in Figure 4.1.

Power Supply

CPU Module Wi-Fi Module

Mobile phone

Camera

Robot Arm Water pump Stepper motor


(Servo Motors)
driver

Stepper motor

Figure 4.1. The block diagram of the design


4.2. Software design

In addition to the role of hardware, the software also plays a very important role and
knows as the “backbone” of the whole system. The software that mentioned below
controls the robot arm and sends the signal to the designed server.

Start

Read pin 1, 2, 3, 4, 5 ,7, 11

Write pin to
beginning angle

Send the status of


system to server

False
Pin = 1

True
Servo motors
move to x angle

End

Figure 4.2. The flowchart of Robot arm and IoT


As can be seen in Figure 4.2, at first, when the power supply supplied the voltage (5V) to
the device, the microprocessor read the pin of servo motors. The code part was already
set the beginning angle of servo motors, whenever the microprocessor reset, the servo
motors move to beginning angle. The system was combination with IoT, the system sent
the signal to the internet to let the user know the status of the system.

The servo motor in robot arm includes 5 parts: base, shoulder, elbow, wrist, gripper move
to an angle which was already set up by user in sequence after the microprocessor read
pin of servo motors. If the microprocessor got unwanted signal, by using PID algorithm
the system will reset automatically, it means that the servo motors will move to the
beginning angle. On the other hand, PID algorithm can make servo motors move in
stable, and the speed of servo motors can be changed easily.

In order to move the robot arm to the right position, motor and water pump are used. Two
devices are controlled through the flowchart in Figure 4.3.

When the system starts, it will reset the three preset values P, L, M. P is the number of
times the pump is activated, M is the number of forward motor times and L is the number
of reverse motor times.

To locate the last point of the cycle. Limit Switch was used. In case the limit switch is not
activated, the program will perform a comparison of the number of forward motor times.
If the number of times the pump activation is less than two, the value will be adding one
and turn on a water pump in 2 seconds. Else, if it is greater than two, the water pump will
not be turned on.

After the P value comparison has been made, the program will continue to compare the
number of forward motor times. If this value is less than three, the program will execute
the job, the value will be adding one and active the forward motor. If this value is greater
than three, the program will proceed to check the value of the limit switch.

If the limit switch value has changed. The program will continue to check the number of
reverse motor times. If this value is less than one then the value will be adding one and
the reverse motor will be activated and the whole process will be finished.
Start

P = 0; L = 0; M = 0

Reading Limit Switch value

True
Limit Switch
=1
False
L<1
P<2
False
True
Active Water Active Reverse
Pump Motor
Disable Water
L = L+1
Pump

P = P+1
End

M<3

True
False Active Forward
Motor
M = M+1

Figure 4.3. The flowchart of Water Pump and Stepper motor


Chapter V: Results and Discussions
5.1. Results

The actual image of the system below including the overall image and image when it
works:

Figure 5.1. The general of smart system for planting and monitoring

The actual picture in Figure 5.1 shows overall system, which includes:

 A Robotic Arm includes 6 servo motors


 Almost the frame was made of mica plastic.
 Power supplies: 5V, 12V, 24V
 One stepper motor for pulling robot arm to right position of planting.
 A water pump
 A camera
Figure 5.2. Robot Gripper takes seeds

In figure above, after push the start button, robot arm went to sow seeds from backside

Figure 5.3. Robot Gripper sows seeds


In Figure 5.3, after push the start button, robot arm went to sow seeds from backside

Figure 5.4. Robot arm watering seeds

After release seed, robot arm water amount of water, which can be set up by user to the
seed (Figure 5.4)

Figure 5.5. Robot Gripper spit out the trees

When the seeds grow up enough for us to harvest, robot arm will automatic harvest and
leave it in one place (Figure 5.5)
Figure 5.6. Motor pulls the robot arm forward (left to right)

The step motor will pull to another side, the process keep repeat until robot arm reach the
end of the line show in Figure 5.6.

Figure 5.7. Motor pulls the robot arm reverse (right to left)

In the Figure 5.7, when robot arm reach the end of the line, step motor will pull it back to
original location.
Figure 5.8. Monitoring Camera

The camera is used to monitor the planting the seeds and spit out the trees in Figure 5.8.

Figure 5.9. Monitoring Camera in Mobile Phone via 3G


In Figure 5.9, the mobile phone which can easy to monitor all processes by using
application which provided by third part. No needed to stay at home, the data would be
sent the Internet. Monitoring is more easier through 3G.

5.2. Discussions

After testing the system several times, a list of criteria is set up to evaluate the product
quickly and accurately. It is presented in Table 5.1.

Table 5.1 The results of actual test

Times Taking seeds Sowing Watering Spitting Moving


seeds trees

1 PASS FAIL PASS FAIL PASS

2 PASS PASS PASS PASS PASS

3 FAIL PASS PASS FAIL PASS

4 PASS FAIL PASS PASS FAIL

5 PASS PASS FAIL PASS PASS

6 FAIL PASS PASS FAIL PASS

7 PASS PASS FAIL FAIL PASS

8 PASS FAIL PASS PASS PASS

9 PASS PASS PASS PASS PASS

10 PASS PASS PASS PASS FAIL

Successful
80% 70% 80% 60% 80%
rate

The data of Table 5.1 shows the success or failure of each process, the success rate is
quite high on all sides. The rate is 80% for taking seeds, watering, moving. It is relatively
low about 60% for spiting trees. It can be seen that important system processes work
quite well. However, in order for the system to achieve a 100% success rate, it will require the
hand gripper need to upgrade.

User manual

 Step 1: Connecting your system to power supply and waiting for system start
 Step 2: Press the start button.

At this time, the robot arm will execute taking the seeds and then rotation 180 degrees to
perform sowing the seeds.

It takes 20 seconds to complete this process. While that time, the pump is activated to
water the seeds. The robot arm will perform two sowing. During the robot arm takes new
seeds, forward motor is activated and the robot arm is moved to a new position.

After sowing and watering have completed, the robot arm will spit out the tress in the box
and bring it out. This process will be repeated twice. After completing the whole process,
the reverse motor is activated to pull the motor to its original position.

Note: During the operation, if encounter any problems, please press the RESET button to
reboot the system to fix the problem.

Difficulties and Solutions

In the real circuit test, the system is worked perfectly. The servos of robot arm move to
the desired location. Perform well programming requirements. Meet the requirements.
The water pump and motor system work wells on pre-installed time. However, the robot
is disturbed over long periods of operation, which results in it no longer working properly
initially. In addition, the use of time to delay the start of motor and water pump
sometimes leads to some big errors.

To solve this problem, the PID algorithm has been adjusted some values to help the arm
operate stably and accurately. It has adjusted and presented in Table 5.2 below:
Table 5.2. The new PID value after having adjusted

Servo
motor Base Shoulder Elbow Wrist Gripper
name
Old New Old New Old New Old New Old New
Kp 2.9 2.95 3.5 3.6 2.2 2.3 1.5 1.6 4.2 4.5
Ki 3.2 3.15 1.7 2 2.1 1.8 2.4 2.7 2.1 2
Kd 3.6 3.52 3.3 3.4 1.9 1.6 2.2 2.4 2.5 2.1
Angle 179.9 179.96 89.8 89.95 79.7 79.85 54.8 54.92 8.8 8.92

From the above table, some values have been adjust to allow the motors move to the
exactly corner. With the new values of PID algorithm, the servos of robot arm work
more stability and not disturbed over a long time.

For motors and pumps, using the synchronization method among many processors is the
most optimized. This method minimizes latency, increases accuracy, and exploits the full
functionality of the device. Helping to save operation and repair time.

And if we want to sell this system, we have an estimated cost for it is shown in the table
5.3 below

Table 5.3. The estimate cost for this project’s model

No. Item Quantity Price ( VND )

1. Robot arm 1 2,100,000

2. Mica frame 1 500,000

3. Servo motor 8 500,000

4. DC motor 2 300,000

5. Wheel 8 80,000

6. Camera 1 200,000

7. Control motor module 2 160,000


8. CPU 1 1,100,000

9. Light sensor 1 20,000

10. Soil sensor 1 40,000

11. Soil 450,000

12. Seeds 50,000

Total 5,500,000
Chapter VI: Conclusion and Future works
6.1. Conclusion

In this thesis, a smart system for planting and monitoring plants at home has been
developed. The system uses a Robotic Arm to plant seeds and harvest plants, a stepper
motor and a transmission system to make the Robotic Arm cover the whole system. It
also has a watering system to take care of the plants and a monitoring camera to make
users feel easier to control and take care of their systems.

Nonetheless, the system also has some drawbacks in terms of hardware and software:

Hardware: the whole system is made by mica so it is not stabilized.

Software: because of using 2 Arduino, so it is not synchronized and it makes too many
difficulties in the logic programming between the Robotic Arm, the motor and the water
pump, so it is still not working as well as we expect and the delay is quite long.

6.2. Future works

Besides the results, due to time limiation, some potetial ideas cannot implemented in this
project. These mentioned drawbacks above could lead to further works that may carry out
in the future:

 Adding lighting system


 Improving performance, accuracy, speed and stable in system.
 Adding image processing
 Inserting more gripper part, it makes robot arm can plant all kind of seeds
 Adding pest control system
 Adding cooling system
References
[1] “Overview of Internet of Things and its solutions.”

Available link: https://www.cisco.com/c/vi_vn/solutions/internet-of things/overview.html

[2] “Topic about Internet of Things.”

Available link: http://www.zdnet.com/topic/internet-of-things/

[3] “Let’s Have a Close Look of IoT – The Future Internet”, written by Poornima
Prakash, November 13, 2015.

Avaiblable link: https://appstimes.in/iot-the-future-internet/

[4] “Controlling a Robotic Arm Manipulator with a PLC”, HAMK University of Applied
Sciences, written by Bhim Bahadur Lama, 2012.

Available link: https://www.theseus.fi/bitstream/handle/10024/43915/FinalThesis.pdf

[5] “Control of a robotic arm: Application to on-surface 3D-printing”, written by M. R.


de Gier.

Available link: https://repository.tudelft.nl/islandora/object/uuid:a674a3fa-2534-44c4-


b251-1e49a5194079/datastream/OBJ

[6] “Green IQ Smart garden hub wifi irrigation controller”, Vesternet – Smart home
simplified.

Available link: http://www.vesternet.com/greeniq-smart-garden-hub-wifi-irrigation-


controller

[7] “Edyn Smart system garden.”

Available link: https://edyn.com/

[8] “Garden Space - A robot for growing your own food at home.”

Available link: https://www.kickstarter.com/projects/334652696/gardenspace-smart-


camera-smart-watering-smart-gard
[9] “FarmBot Genesis XL.”

Available link: https://farm.bot/

[10] “All about MQTT.”

Available link: http://mqtt.org/

[11] “The Internet of Things: Unlocking the language potential”, CAPITA – Translation
and interpreting

Available link: https://www.capitatranslationinterpreting.com/the-internet-of-things/

[12] “Position Control Of Robot Arm Using Genetic Algorithm Based On PID
Controller”, written by Majed D. Youns, Salih M. Attya and Abdulla I. Abdulla, College
of Electronics Engineering / University of Mosul /Mosul, Iraq, 2012.

Available link: https://www.iasj.net/iasj?func=fulltext&aId=82374

[13]Neenu Thomas,Dr.P.Poongodi "Position Control of DC Motor Using Genetic


Algorithm Based PID Controller" Proceedings of the World Congress on Engineering
2009 Vol II WCE 2009, July 1 - 3, 2009, London, U.K.

[14] L.phillips and D.Harbar, "Feedback Controller System ",3rd edition , Prentice Hall,
1996

[15]A. Varsek, T. Urbacic and B. Filipic, "Genetic Algorithms in Controller Design and
Tuning", IEEE Trans. Sys.Man and Cyber, Vol. 23, No. 5, pp1330-1339, 1993.

[16] K Ogata, "Modern Control Systems", University of Minnesota, Prentice Hall, 2003
Appendix

Potrebbero piacerti anche