You are on page 1of 53

lOMoARcPSD|22106981

ASM1-IOT-Mang NB - Internet of Things

Internet of Things (Trường Đại học FPT)

Studocu is not sponsored or endorsed by any college or university


Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)
lOMoARcPSD|22106981

ASSIGNMENT 1 FRONT SHEET

Qualification TEC Level 5 HND Diploma in Computing

Unit number and title Unit 43: Internet of Things

Submission date 21-06-2021 Date Received 1st submission

Re-submission Date Date Received 2nd submission

Student Name NGUYEN BA MANG Student ID BHAF190168

Class BH-AF1911-2.2 Assessor name

Student declaration

I certify that the assignment submission is entirely my own work and I fully understand the consequences of plagiarism. I understand
that making a false declaration is a form of malpractice.

Student’s signature MANG

Grading grid

P1 P2 P3 P4 M1 M2 M3 M4 D1 D2

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

❒ Summative Feedback: ❒ Resubmission Feedback:

Grade: Assessor Signature: Date:

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

Internal Verifier’s Comments:

Signature & Date:

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

Table of Contents
I. Introduction............................................................................................................................................... 7
II. Analyse what aspects of IoT are necessary and appropriate when designing software applications.... 7
1. Explore various forms of IoT functionality(P1).................................................................................................... 7
a. What is IOT ? ...................................................................................................................................................................7
b. History of IOT...................................................................................................................................................................8
c. Characteristics of IOT .......................................................................................................................................................8
d. Why is it important ..........................................................................................................................................................9
e. Applications.....................................................................................................................................................................9

2. Review standard architecture, frameworks, tools, hardware and APIs available for use in IoT development(P2)
a. Architecture...................................................................................................................................................................15
b. Framework ....................................................................................................................................................................16
c. Tools..............................................................................................................................................................................18
d. Hardwares .....................................................................................................................................................................21
e. APIS...............................................................................................................................................................................25

III. Outline a plan for an appropriate IoT application using common architecture, frameworks, tools,
hardware and APIs.................................................................................................................................... 26
1. Investigate architecture, frameworks, tools, hardware and API techniques available to develop IoT
applications(P3).................................................................................................................................................... 26
a. Architecture .......................................................................................................................................................................... 26
b. Framwork (Ewings Framework)............................................................................................................................................. 27
c. Tools ...................................................................................................................................................................................... 28
d. Hardware .............................................................................................................................................................................. 32

2. Determine a specific problem to solve using IoT(P4) ...................................................................................... 33


a. Problem definition ................................................................................................................................................................ 33
b. Purpose of the project........................................................................................................................................................... 33
c. Functions of the project ................................................................................................................................................................ 33

3. Apply your selected techniques to create an IoT application development plan (M4) .......................................34
a. Scope..................................................................................................................................................................................... 34
b. Resources .............................................................................................................................................................................. 35
c. Risk ........................................................................................................................................................................................ 37
d. Comunication ........................................................................................................................................................................ 37
e. Project chapter .............................................................................................................................................................................. 38
f. Schedule......................................................................................................................................................................................... 42

IV. Conclusion ...................................................................................................................................... 42


V. Slide ......................................................................................................................................................... 42
VI. References...................................................................................................................................... 52

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

List of Figures
Figure 1 IOT illustrative example ............................................................................................................................................. 8
Figure 2 Smart home aplications ........................................................................................................................................... 10
Figure 3 Smart city aplications............................................................................................................................................... 11
Figure 4 Wearable aplications ............................................................................................................................................... 12
Figure 5 Aplications of IOT in health care .............................................................................................................................. 14
Figure 6 IOT architecture ....................................................................................................................................................... 16
Figure 7 Eclipse framework ................................................................................................................................................... 17
Figure 8 Calvin framework .................................................................................................................................................... 18
Figure 9 Eclipse ...................................................................................................................................................................... 19
Figure 10 Arduino IDE............................................................................................................................................................ 19
Figure 11 ThingsBoard platform ............................................................................................................................................ 20
Figure 12 Blynk platform ....................................................................................................................................................... 21
Figure 13 Tinkercad simulator ............................................................................................................................................... 21
Figure 14 Arduino Uno R3 ..................................................................................................................................................... 22
Figure 15 Wifi esp8266 NodeMcu ......................................................................................................................................... 23
Figure 16 The sensors ............................................................................................................................................................ 23
Figure 17 Wearable electronics ................................................................................................................................................... 24
Figure 18 Architecture ........................................................................................................................................................... 27
Figure 19 Ewings Esp8266 Stack ............................................................................................................................................ 27
Figure 20 Arduino IDE............................................................................................................................................................ 28
Figure 21 Arduino Libraly ...................................................................................................................................................... 29
Figure 22 Blynk app ............................................................................................................................................................... 29
Figure 23 Blynk platform ....................................................................................................................................................... 30
Figure 24 IFTTT web service .................................................................................................................................................. 31
Figure 25 Google assistant app.............................................................................................................................................. 31
Figure 26 Esp8266 NodeMcu................................................................................................................................................. 32
Figure 27 Pinout of Esp8266.................................................................................................................................................. 32
Figure 28 Grant chart for project........................................................................................................................................... 42

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

List of Tables
Table 1 Deliverales ................................................................................................................................................................ 34
Table 2 Stackholders.............................................................................................................................................................. 35
Table 3 Human ...................................................................................................................................................................... 35
Table 4 Hardware cost.................................................................................................................................................................. 37
Table 5 Risk............................................................................................................................................................................ 37
Table 6 Comunicatios ............................................................................................................................................................ 38

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

I. Introduction
As we all know today, technology contributes a lot to people's lives in fields such as industry,
agriculture, transportation, ... IOT or the internet of things is also contributing a lot to it. Here I
am in this assignment I will give the basics of internet of things and explore various forms of IoT
functionality. Then I'll go over the standard architecture, frameworks, tools, hardware and APIs
available for use in IoT development. Next I will pick out the things needed to develop IoT
applications. Finally I eetermine a specific problem to solve using IoT and give a blueprint for that
project.

II. Analyse what aspects of IoT are necessary and


appropriate when designing software
applications
1. Explore various forms of IoT functionality(P1)
a. What is IOT ?
 IoT means Internet of Things. A system of interrelated computing devices, mechanical
and digital machines or humans and the ability to transmit data over a network
without requiring human-computer interaction.
 Internet of Things (IoT) refers to the process of connecting everyday physical objects
to the internet — from common household objects like light bulbs; to healthcare
assets such as medical equipment; to wearables, smart devices and even smart cities.
 For example
Light bulbs can be turned on using a smartphone app, as can motion sensors or smart
thermostats in your office, or connected street lights

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

Figure 1 IOT illustrative example

b. History of IOT
 1968: The Internet of Things in manufacturing began to build in 1968, when engineer
Dick Morley built one of the most important breakthroughs in manufacturing history:
the Programmable Logic Controller (PLC). . Until now, this device is still an
irreplaceable part of automation lines and industrial robots in factories.
 1999: This is an important milestone in the development of IoT. Kevin Ashton, Director
of the Automated Identification Laboratory at the University of Massachusetts - USA
introduced the concept of Internet of things (IoT) in his lecture to describe the next
generation of innovation in RFID tracking technology. (The set of radio object
recognition equipment is often used in supermarkets to prevent theft).
 2016: The concept of IIoT – IoT in production appeared. As the concept of IoT is used
more in manufacturing, another related concept is also born – Industry Internet of
Things (IIoT) – Industrial Internet of Things.

c. Characteristics of IOT
The IoT system will include the following features:

 Heterogeneous: Devices in IoT are often heterogeneous because they possess


different hardware and systems and can interact with each other thanks to the
interconnection of systems.
 Interconnection: For IoT systems, various items and devices can be connected to each
other through an information network and overall communication infrastructure.
8

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

 Services related to <Things=: The IoT system is capable of providing <Things= related
services such as privacy protection and consistency between physical devices and
software.
 Large scale: A very large number of devices and machines will be managed and
communicated with each other on a much larger scale than the number of computers
connected to the Internet today. The amount of information transmitted by devices
will be much larger than it is done by humans.
 Flexible changeable: The states of electronic devices and machines can automatically
change such as turning off and on, connecting or disconnecting, retrieving location, …

d. Why is it important
 IoT helps people live and work smarter, can control their time in the best way.
 IoT gives businesses a view of how long their systems are actually up and running,
providing insights into everything from machine performance to supply chain and
logistics.
 IoT helps companies automate processes and reduce labor costs. Help reduce waste
and improve service, make production and delivery less expensive, and provide
transparency in customer transactions.

e. Applications
 Smart home
A smart home is a house in which electrical and electronic equipment is installed that
can be controlled or automated or semi-automatically. Replace humans in performing
one or several management and control operations. This electronic system
communicates with the user through an indoor electronic board, a mobile phone app,
a tablet or a web interface.

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

Figure 2 Smart home aplications

How a smart home works or automates specific tasks for the following benefits:

o Smart homes give you greater control over your energy use, while automating
everything like adjusting the temperature, turning lights on and off, opening and
closing treatment windows and adjusting irrigation systems. based on weather.
o Smart homes provide insights into energy usage that can help you become more
energy efficient and eco-conscious.
o Smart homes can identify areas where you're using more energy than necessary,
allowing you to cut back on those areas and save money.

Examples of smart home technology

o Using smart locks and garage door openers, users can allow or deny opening the
door for guests to enter the house. Moreover, the smart lock can also detect when
the homeowner is nearby and unlock it for them.
o With smart CCTV, users can monitor their home while on the go or on vacation.
Smart motion sensors can also identify the difference between homeowners,
guests, pets and thieves to notify authorities if suspicious behavior is detected.

10

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

o Smart TV - Smart TVs that connect to the Internet, accessing content through apps,
such as video and music on demand. Some smart TVs include voice or gesture
recognition.
o smart lighting systems like Hue from Philips Lighting Holding,... can detect when
someone is in the room and adjust the light if needed. Smart bulbs can also adjust
themselves based on daylight.
o Smart thermostats such as Nest Labs Inc.'s Nest, have built-in Wi-Fi, allowing users
to schedule, monitor, and control indoor temperatures remotely. These devices
also learn the host's behavior and automatically modify settings to provide users
with maximum comfort and efficiency. Smart thermostats can also report energy
usage and remind users to change filters.
 Smart city
Smart City is a city model that applies the latest technology to improve the quality of
life in all aspects. In the city, there is the application of information technology and
artificial intelligence to manage and improve urban living standards. At the same time,
it is possible to effectively use energy and natural resources.

Figure 3 Smart city aplications

Benefits of smart city:


o The primary goal of a smart city is to create an urban environment that provides
a high quality of life for its residents, while generating overall economic growth.
Therefore, a big advantage of smart cities is the ability to facilitate and provide
services to citizens with low cost and infrastructure.

11

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

o As populations grow rapidly, urban areas need to respond by making efficient use
of infrastructure and assets. Smart city applications can enable the enhancement
of city operations and improve the quality of life of residents.
o Smart city apps enable cities to find and create new value from their existing
infrastructure, generate new revenue streams, improve operational efficiency,
and help governments and citizens save money. cost.

Some examples of Smart city:

o Use sensors to monitor water pipes that leak clean water or monitor air quality to
measure pollution levels to promptly provide warning information to people,
especially those who are susceptible to diseases. respiratory tract promptly cope..
o Police use video sensors for crowd management, facial recognition of public
transit riders to reduce management, ticketing, labor costs and user convenience.
o Police use video sensors to track suspects in crowds to detect crimes
o The sensor is capable of determining the number of vehicles in the parking lot,
linking the parking lots in the area to coordinate parking, traffic as well as driver
assistance, whether the parking space is enough or not, then activate the signal to
direct direct the driver to other parking spots.
o A custom infrared sensor system is added to the street lights to record the
shadows of pedestrians. The shadow is then replayed through the street lights for
those behind to see.
o A high-tech outdoor luminaire supplier, installs LED lights equipped with sensors
that can automatically adjust brightness according to actual conditions.
 Wearables

Figure 4 Wearable aplications

12

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

Wearable technology can be described as the design of smart devices developed from
Internet of Things technology. Wearable technology is widely used by people today.
The most important part of wearable technology products developed with Internet of
Things technology is the part where the sensors are located. Sensors are devices that
can detect the information needed for these smart devices from the environment.
Smart glasses will be replaced by smart contact lenses. Smart wearable technology
products developed with Internet of Things technology can often find their place in
this area.
Internet of Things wearable technology is one of the technological innovations that
adapt to the digital age. Wearable technology is the choice of many people towards a
healthy life. Wearable technology thanks to the high-tech designs of Internet of Things
technology. Measurement mechanism of wearable technology products provided by
Internet of Things technology.
Examples
o One of the lesser-known wearables includes the Guardian blood glucose monitor.
The device was developed to assist people with diabetes. It detects glucose levels
in the body, using a small electrode called a glucose sensor placed under the skin,
and relays the information via radio frequency to a monitoring device.
o Athletes want to know at the end of the day whether their daily workouts are
working. This naive desire of athletes combined Internet of Things technology and
wearable technology. Athletes often want to learn about the values of body
balance, heart rate, etc. And people want the process to be short. This is what
people want today with smartwatches.
o We can shoot high definition video with wearable tech clothes. Internet of Things
technology works with many clothing brands while producing wearable
technology products.
 Health Care
IoT has opened up a world of potential when it comes to healthcare. Conventional
medical devices can now collect additional and extremely valuable data that can
provide more insight into symptoms and trends and enable telemedicine.

13

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

Figure 5 Aplications of IOT in health care

Benefits
o Simultaneous reporting and monitoring
Real-time monitoring through connected devices can save lives in emergencies
such as heart failure, diabetes, asthma attacks, and more. With real-time disease
monitoring by device smart medical device connected to a smartphone app,
connected devices can collect medical and other essential health data and use the
phone's data connection smart to pass the collected information to the doctor.
o Categorize and analyze data
A lot of data healthcare devices send in very short time due to their real-time
application is difficult to store and manage without access to the cloud. Even for
service providers healthcare services to collect data sourced from multiple devices
and sources and analyze it manually is a hard bet. IoT devices can collect, report,
and analyze data in real time and cut down on the need to store raw data.
o Monitor and alert
Timely warning is very important in case of danger to life. Medical IoT devices
collect vital data and pass it on to doctors for real-time monitoring and inform
people about vital organs through mobile apps and devices. other linked device.
o Remote medical support
In the event of an emergency, patients can contact a doctor from miles away using
a smart mobile app. With mobile solutions in healthcare, doctors can instantly
check on patients and identify diseases on the go.
Examples:
o Monitor activity during cancer treatment

14

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

Their lifestyle and fitness level also play a huge role in coming up with the right
treatment plan for them. The activity monitor monitors the patient's movement,
fatigue level, appetite, etc. In addition, the data collected from the monitor before
treatment and after starting treatment will give health care professionals know
what adjustments to make to the proposed treatment plan.
o Heart monitor with report
Patients can wear a device that monitors their heart rate and that can determine
if they have high blood pressure. Healthcare providers will have access to
reporting patient heart monitoring data when they need to obtain it during exams
and exams. Wearable devices can even alert healthcare professionals when a
patient has an arrhythmia, palpitations, stroke or full-blown heart attack.
o Wireless sensor
Wireless sensors are being used in labs and hospital refrigerators to ensure blood
samples, chilled drugs and other biomedical materials are always kept at the right
temperature.

Besides the above applications, we can also see that the applications of IoT in the world
are many such as in factories, in farms, in smart cars, in the military, ...

2. Review standard architecture, frameworks, tools, hardware


and APIs available for use in IoT development(P2)
a. Architecture
Here are the four layers of IoT architecture described in detail:

 Things, sensors and controllers


o Sensor - Sensors, actuators, devices included in this sensor class. These Sensors or
Actuators accept data, process it, and broadcast it over the network.
o They can be embedded into the devices themselves or deployed as standalone
objects for telemetry measurement and data collection. Think, for example, of
agricultural sensors that measure parameters such as the temperature and
humidity of the air and soil, the pH level of the soil, or the exposure of crops to
sunlight.
 Gateways and data acquisition
o It is critical to processes that collect, filter, and transfer data to edge infrastructure
and cloud-based platforms. Given the sheer volume of inputs and outputs that
deployments of millions of devices can generate, the ability to aggregate, select,
and transport data should be in the spotlight. As the intermediary between cloud-

15

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

connected things and analytics, gateways and data collection systems provide the
necessary connection point that links the rest of the layers together.
o Advanced gateways primarily open the connection between the Sensor network
and the Internet also perform many basic gateway functions such as malware
protection and filtering some decision-making based on entered data and
services. data management,...
 Edge analytics
o While not an essential component of every IoT architecture, edge devices can
offer significant benefits, especially for large-scale IoT projects.
o In light of the limited accessibility and data transfer speeds of IoT cloud platforms,
edge systems can provide faster response times and more flexibility in processing
and analyzing IoT data.
o Since edge infrastructure can be physically located closer to the data source, it will
be easier and faster for it to work on IoT material in real time and provide output
in the form of intelligence. can act immediately.
 Cloud platform

This is the final layer of the 4 phases of the IoT architecture. A data center or cloud is
a data management stage where data is managed and used by end-user applications.

Figure 6 IOT architecture

b. Framework
 Eclipse Smarthome Framework

The Eclipse Smart Home (ESH) framework is designed for ease of resolution of IoT
system and problems by developers who benefits from its interfaces, automation
rules, persistence mechanism, and its SOA implementation. The ESH is a connection
and integration framework for IoT smart home domain and it is independent of the
connectivity features of the hardware but rather, makes emphasis on the

16

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

implementation of a connector to the framework. The ESH has become largely famous
as it is open sourced and thus, widely implemented as a smart home solution by a
large market. This has contributed to its extensive number of shared API available for
a range of commercial products.

Figure 7 Eclipse framework

The ESH is explicitly fixated on home automation and it is built on five major stacks.
These are:

o Operating System
o The Application Container
o Communication and Connectivity
o Data Management and Messaging
o Remote Management
 Calvin Framework

The Calvin framework is a hybrid framework of both the IoT and Cloud programming
models to explicate the complexity of distributed computing, diverse programming
languages and communication protocols. The framework is developed by
consolidating theories from Actor model and Flow Based Computing.

17

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

Figure 8 Calvin framework

An example framework for a Data-Driven IoT application consisting Sensors,


Actuators, Filter, Controller and Data Analytics components.

The Calvin framework combines both IoT and Cloud models by designing the IoT
system to leverage on the Cloud system to perform complex calculations and
computations which are rarely possible with resource constrained actors. The
framework thus prescribes a runtime API for connection and communication between
runtimes and actors. The Calvin framework model propounds a distributed runtime
environment and exhibits multi-tenancy as actors can share runtimes with actors from
other applications. It also supports restrictions of high resource consuming actors at
the <manage= aspect.

c. Tools
Here I would like to introduce some popular IOT development tools today

 Eclipse IoT
o Eclipse IoT is one of the most useful IoT development tools. Many industries and
organizations have worked together to develop this tool. With this tool, IOT
developers can create frameworks, deploy Open Source code, provide services
that will help in using IOT solutions, and also develop new tools. Tools for IoT
developers.
o It has a reputation for providing high quality services in responsible and
predictable fashion. Many people have benefited from this tool, and you will be
amazed how great this IoT development tool is.

18

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

Figure 9 Eclipse

 Arduino
Adruino is one of the popular IoT development tools. It is easy to use and we can
control according to our preferences. The microcontroller included on it is designed
to fulfill different purposes. Users can input information and with the information
provided for input, devices can be controlled and data can be saved or displayed with
the help of output. Multiple devices can be connected to each other and can be
adjusted from anywhere.

Figure 10 Arduino IDE

19

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

 ThingsBoard
ThingsBoard is an IoT platform for data collection and processing, device
management, and visualization for projects. Hundreds of millions of devices can be
measured and it facilitates connectivity by providing IoT protocols such as HTTP,
MQTT,.. We can monitor the technology system and can freely choose any home
What cloud services do you provide? It helps to model the content, the device and
generate the necessary information from the data, thus making it more feasible.

Figure 11 ThingsBoard platform

 Blynk IoT IoT Platform


o One of the most popular IoT platforms, Blynk has a number of unique features
including data display and storage and visualization. You can connect to over 400
hardware models through the Blynk Library. It can connect any hardware via Wi-
Fi, Ethernet, 2G, 3G, 4G, LTE, etc. It has three important parts:
 Blynk . App
 Blynk Server
 Blynk Library
o It is an open source platform and it can work in any environment. It is fast and
reliable and can process billions of information and requests from devices.

20

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

Figure 12 Blynk platform

 Tinkercad
Tinkercad is an online collection of software tools from Autodesk that enables
complete beginners to create 3D models. This CAD software is based on solid
construction geometry, allowing users to create complex models by combining
simpler objects together. Therefore, this 3D modeling software is user-friendly and is
now loved by many people, especially teachers, children, hobbyists and designers, and
it is also free.

Figure 13 Tinkercad simulator

d. Hardwares
 Microcontroller development board

21

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

A microcontroller provides data processing and storage capabilities. A microcontroller


contains a processor core, memory, and erasable programmable read-only memory
to store custom programs that run on the microcontroller. The microcontroller
development board has extra circuitry to support the microcontroller for more
convenient prototyping and programming of the chip.
Following are two popular microcontroller development boards
o ARDUINO
 Arduino is a popular name in the DIY prototyping space. The company offers a
wide range of open source development kits, microcontrollers, and software
tools for building connected products.
 The main advantage that Arduino has over other vendors is a well-established
name in the electronics development space. They also have software tools,
support for third-party libraries, a variety of sensors, resources, and a
community that can help answer questions.

Figure 14 Arduino Uno R3

o ESP8266
It has a community of active adopters. Notable development boards based on the
ESP8266 include AdaFruit's NodeMCU, WeMos D1, and Feather Huzzah. Several
alternative firmware options for the ESP8266-based boards have been developed
by the open source community and manufacturers, allowing IoT developers to
program these boards using Lua, Python, and JavaScript, It also supports over-the-
air (OTA) updates.

22

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

Figure 15 Wifi esp8266 NodeMcu

 The sensors
The most important hardware in IoT may be its sensors. These devices include power
module, power management module, RF module and sensor module. The RF module
manages communication through signal processing, WiFi, ZigBee, Bluetooth, radio
transceiver, duplexer and BAW. The sensor module manages sensors through active
and passive gauge types.
o Below are some of the sensors used in the IOT system:
 Sound sensor
 Acceleration sensor
 Flame sensor
 Gas sensor

Figure 16 The sensors

23

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

 Wearable electronics
Wearable electronics are small devices that are worn on the head, neck, arms, torso,
and feet.
Current smart wearable devices include:
o Head - Helmet, glasses
o Neck - Jewelry, necklace
o Arm - Watch, bracelet, ring
o Torso - Clothes, backpacks
o Feet - Socks, shoes

Figure 17 Wearable electronics

 Standard equipment
o Desktops, tablets, and mobile phones remain integral parts of IoT as command
and remote control centers.
o The desktop provides the user with the highest degree of control over the system
and its settings.
o Tablets provide access to key system features in a similar way to desktop
computers and also act as a remote control.
o Mobile phones allow modification of some necessary settings and also provide
remote functionality.

Other important connectivity devices include standard network devices such as


routers and switches.

24

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

e. APIS
An application program interface (API) is a set of processes, protocols, and tools for
building software applications; it specifies how the software components will interact.
APIs are closely linked to IoT because they allow us to securely expose customer-
connected devices, go-to-market channels, and other applications in IT infrastructure,
and connected APIs connect important things like cars, medical equipment, energy grids.

 Google Assistant API

Google Assistant can be embedded into devices to enable voice control, hot word
detection, natural language understanding and other smart services. These Google
Assistant tracking APIs provide a way to manage and chat with devices. Google
Assistant enables voice control of apps for phones, speakers, smart displays, cars,
watches, laptops, TVs, and other Google Home devices.

 Apple HomeKit

Apple's HomeKit provides a platform for devices, apps, and services to communicate
with each other. Using Siri, iPhone users can control supported devices in their home.
Lights, thermostats, garage doors, etc. All can be controlled by voice.

 REST API

REST allows data to travel over internet protocols and authorize and manage
authorization.

REST plays an important role and you can use REST on the entire stack. REST has
become a de facto protocol for the web. It is understood by almost every web server
and endpoint on the internet. IoT leverages a lot of REST endpoints. Many services
are REST-based, allowing you to quickly assemble an IoT infrastructure.

One thing for sure about IoT is the Internet. Applications and devices in a near-global
way of communicating over the Internet is through RESTful services. REST APIs
provide the simplest way for connected applications and things to interact in a
standard, easy-to-understand way.

25

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

III. Outline a plan for an appropriate IoT


application using common architecture,
frameworks, tools, hardware and APIs
1. Investigate architecture, frameworks, tools, hardware and
API techniques available to develop IoT applications (P3)
Here are the architectures, frameworks, hardware and tools to use for an IoT project:

a. Architecture
While there are countless ways to build a complete IoT architecture from start to finish,
this architecture simplifies it into three basic building blocks:

o Sensing Layer : Sensors, actuators, and edge devices interacting with the
environment
o Network Layer :
 Discover, connect, and translate devices over the network and coordinate with
the application layer
 The IoT gateway is an important intermediary that acts as a messenger and
interpreter between the cloud and clusters of smart devices.
o Application Layer:
 Processing and storing data with specialized services and functions for users
 It communicates with the gateway, usually over wired or cellular internet. The
cloud can be anything from services like AWS or Google Cloud, server farms,
or even a company's on-premises remote server. It provides powerful servers
and databases that enable powerful IoT applications and integrates services
such as data storage, big data processing, filtering, analytics, 3rd party APIs,
business logic, alarms, monitoring, and user interfaces.

26

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

Figure 18 Architecture

b. Framwork (Ewings Framework)


 Ewings Framework gives us what we need to build ESP8266 IoT applications easily and
quickly. It's basically designed on top of the arduino-esp8266 class to make things easy
for developers to understand.
 Ewings Esp frame structure:

Figure 19 Ewings Esp8266 Stack

27

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

 The ESP8266EX integrates an enhanced version of Tensilica's L106 Diamond series 32-
bit processor, with on-chip SRAM, in addition to its Wi-Fi functions.
 Arduino has provided user-friendly libraries using the SDK APIs. Since arduino has
made its iot development environment easy to influence developers, it is easy for us
to develop applications with Arduino Ide. The Ewings framework sits on top of the
Arduino libraries.

c. Tools
 Arduino IDE
o Arduino IDE is an open source software mainly used to write and compile code
into Arduino modules or other modules
o It makes compiling code so easy that even an average person with no technical
knowledge can do it.
o It has versions for operating systems such as MAC, Windows, Linux and runs on
Java platform with built-in functions and commands that are important for
debugging, editing and compiling code in the environment. .
o This environment supports both C and C++ languages.

Figure 20 Arduino IDE

o The Arduino IDE integrates with over 700 libraries, written and shared by the
publisher Arduino Software and members of the Arduino community. We can
utilize them for our own project without spending any money.

28

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

Figure 21 Arduino Libraly

 Blynk
o Blynk is an open source software designed for IoT (Internet of Things) applications.
The application helps us to use remote hardware control, can display sensor data,
store data, transform data or do many other things.
o Currently, Blynk supports 2 platforms, Android and iOS. You can search on Blynk
on AppStore and GooglePlay.

Figure 22 Blynk app

o The Blynk Platform has three main parts


 Blynk App : Blynk application allows to create interfaces for projects dự

29

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

 Blynk Server: Responsible for two-way back-and-forth communication


between the phone and the hardware. We can use Blynk's server but will be
limited to Enegry points.
 Blynk Library: A library containing popular platforms, making it easier to
communicate hardware with the Server

Figure 23 Blynk platform

 IFTTT
o IFTTT is an intermediary web service that stands between two services to perform
a task when a condition occurs, IFTTT stands for If This Then That. In which, If This
(if this happens) will lead to Then That (then do that), this is considered the
operating principle of the statement. That is, when there is any change on this
application, through IFTTT the other application will also work and change the
same.
o The operation of IFTTT is based on the "condition" and "enforcement"
mechanism. That is, when a certain condition is satisfied, the command will be
executed.
o It has popular services such as google assistant, webhok, .... helps in developing
iot applications especially smart home.
o For example, when we execute the command to turn off the lights, the blynk
server immediately changes the state of the lights to the off state

30

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

Figure 24 IFTTT web service

 Google assistant
Virtual assistant can be understood as a complex programmed software. Accordingly,
it is possible to proceed with the execution of various control commands. As well as
carry out the implementation of user requests. Such as conducting information
search, following orders, etc.
Google Assistant was first introduced at the Google I/O conference in May 2016
exclusively for the Pixel, Pixel XL, Google Home and Android Wear 2.0 series. Then
became popular on most Android phones, and also iOS.
We only with the command "Oke Google" that we can control all the devices in the
house. Users no longer have to physically adjust devices with switches like before.
Which can completely control any device with voice.

Figure 25 Google assistant app


31

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

d. Hardware
 The ESP8266 NodeMCU Lua CP2102 Wifi RF Transceiver Kit is a development kit based
on the ESP8266 Wifi SoC chip with an easy-to-use design and it can directly use the
Arduino's compiler to program and load the code.
 The ESP8266 NodeMCU Lua CP2102 Wifi Transceiver RF Kit is used for applications
that need to connect, collect data and control via Wifi waves, especially IoT-related
applications.

Figure 26 Esp8266 NodeMcu

 Pinout:

Figure 27 Pinout of Esp8266

32

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

2. Determine a specific problem to solve using IoT(P4)


a. Problem definition
As technology develops, smart homes will also appear more. A smart home is a house in
which electrical and electronic equipment is installed that can be controlled or automated
or semi-automatically. Replace humans in performing one or several management and
control operations. This electronic system communicates with the user through an indoor
electronic board, a mobile phone application, a tablet computer or a web interface.

In this project, I will do a project "Turn on and off lights and adjust lights through smart
phone devices". This is a very convenient project for users, with high applicability in life,
especially in the era of industrialization.

b. Purpose of the project


My project will save users from having to run to the switch of light bulbs or LEDs. Just
have a smartphone in hand and connect to the home's intranet, we can open the
application to control the light on and off.

Our project can also make it possible for families to set the time the lights turn on and off
through the timer mode. That makes it possible to set the time for the light system, a
modern and smarter function than previous generations of lights.

The third is that the project also allows us to control the RBG Led lights so that we can
change the color of the lights according to our desired color, as well as turn it off if we
don't want to use it anymore.

Finally, users can control the lights on and off through the google virtual assistant
application. The user just needs to say the commands set and the light will change state
as the user wants. Its benefit to users is that when users are busy with their hands, we
can control it via voice.

c. Functions of the project


 Control lights and RGB leds through blynk app
 Set light on and off time via blynk app
 Control light status via google assistant

33

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

3. Apply your selected techniques to create an IoT application


development plan (M4)
a. Scope
Project name: Control lights via phone, tablet with blynk app and google assistant

Development company : A company

 Report scope

The project was approved on June 10, 2021

My aims for a product that features:

o Control lights and RGB leds through blynk app


o Set light on and off time via blynk app
o Control light status via google assistant
 Deliverables

No Deliverables Date of Deliverables


1 Sub-system 1: Create architech for the 24-06-2021
product

2 Sub-system 2: Developed feature to 29-06-2021


turn on/off and control lights through
blynk app

3 Sub-system 3: Developing the feature of 02-07-2021


turning lights on and off through the
google assistant application

4 Sub-system 4: Application development 09-07-2021

Table 1 Deliverales

 Stakeholders

Manager Has a role in managing all project processes

User Is the user of the project product

Vendor Provides support for the project


Partners Work with the project throughout the process

34

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

Project team Contains the management of the project builder and manager, and
inspects and evaluates the project
Table 2 Stackholders

b. Resources
 Money
The cost for the project funded by the company budget is $ 1000
 Human

Name Position Role

Nguyen Ba Mang Leader Instruct team members to complete


projects and resolve group conflicts

Nguyen Thi B Architecture Design architecture for the project


design

Nguyen Van F Interface design Design the interface for the program

Nguyen Van D Write a program Program implementation


Nguyen Ba E Testing Test and evaluate products
Nguyen Thi G Analysis Analyze the system requirements
and identify the risks to the project
Table 3 Human

 Hardware cost

Hardware Image Qua Pric


ntit e
y
ESP8266 1 4$

35

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

LED 4 4$

RGB LED 1 3$

Breadboard 1 2$

40 Yarn File 1 2$
Test Board
Plug

36

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

Cap 1 4$

Table 4 Hardware cost

c. Risk
Risk Priority Suggestions/Actions

Schedules can Hight Report the progress of the project daily using a Gantt
be slow chart.

Spending over Medium Expenditures should be detailed and approved by all


budget stakeholders.

Team member is Hight Occasionally rotate members into different jobs.


sick
Have a timely backup member for the project at any
time.
Table 5 Risk

d. Comunication
 Inside (in project) and outside (customer, team).
 Formal (reports, minutes, briefings) and informal (emails, memos, discussions).
 Vertical (top and bottom within organization) and horizontally (with peers).
 Text, oral, verbal and non-verbal (body language).

37

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

Form
Sponsor and team Communicated by email, each week on Saturday the
leader group manager will send a message to the sponsor's
project manager on the progress of the project.
Each week the project party will have a meeting of all
stakeholders to discuss the progress of the project.
Team leader and Every weekend the team leader must prepare a report on
company director, the progress and progress of everyone on the project to
management the director.
If there is a serious problem urgently, the team leader
must meet directly at the director's office.
Each month the project party will have a meeting of all
stakeholders to discuss the progress of the project.
If the director is on a business trip, the team leader will
email project completion progress reports.
Directly call if in case of emergency.
Team members Team members each day before work must report what to
do for today and the progress of completing it for the day
via email of the team leader.
In case the members work together, the direct work
report must be before everyone and at the end of each
session must report on their completion progress.
The team members will meet on weekends with company
management and monthly with project sponsors.
Members have any conflict, then meet with the leader to
resolve and do not arbitrarily follow their opinion.
Table 6 Comunicatios

e. Project chapter

1. General Project Information

Project Name: Turn on and off lights and adjust lights through smart phone devices
Executive Sponsors: A Company
Department Sponsor: B Company
Impact of project: Start date: 12-16-2021
End Date: 17-07-2021
Budget: 1000 $

38

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

2. Project Team

Name Department Telephone E-mail

Project Nguyen Ba Leader 02020202020 Mang@gmail.com


Manager: Mang
Team Members: Nguyen Thi B Architecture 02002902920 B@gmail.com
design
Nguyen Van F Interface 030393093930 F@gmail.com
design
Nguyen Van D Write program 002039209302 D@gmail.com
Nguyen Ba E Testing 03930390290 E@gmail.com
Nguyen Thi G Analysis 03029302903 G@gmail.com

3. Stakeholders
Partners

User
Manager
Team project
Vendor

4. Project Scope Statement

Project Purpose / Business Justification

An IoT product that allows users to turn on and off lights and control lights through their phones

Objectives

 Control lights and RGB leds through blynk app


 Set light on and off time via blynk app
 Control light status via google assistant

39

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

Deliverables

Sub-system 1: Create architech for the product


Sub-system 2: Developed feature to turn on/off and control lights through blynk app
Sub-system 3: Developing the feature of turning lights on and off through the google assistant
application
Sub-system 4: Application development

Scope

In this project, I will develop an IoT product that helps users control home lighting devices with
smartphones.

Project Milestones

Duration Start Time End Time


Planning 5 12/06/2021 18/06/2021
Analysis 4 17/06/2021 22/06/2021
Design 5 21/6/2021 25/06/2021
Software 7 26/06/2021 06/07/2021
implementation

Software quality 2 03/07/2021 06/07/2021


assessment

Software development 5 05/07/2021 09/07/2021

User manual 3 10/07/2021 14/07/2021

40

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

Major Known Risks (including significant Assumptions)

Risk Risk Rating (Hi, Med, Lo)


Schedules can be slow Hight

Spending over budget Medium

Team member is sick Hight

Constraints

A project team member is six person


The budget of the project is 1000$

5. Communication Strategy

Inside (in project) and outside (customer, supplier, team).


Formal (reports, minutes, briefings) and informal (emails, memos, discussions).
Vertical (top and bottom within organization) and horizontally (with peers).

6. Sign-off

Name Signature Date


(MM/DD/YYY
Y)
Cristiano Ronaldo Ronaldo 17/06/2021
Executive Sponsor

Leo Messi Messi 17/06/2021


Department Sponsor

Nguyen Ba Mang Mang 17/06/2021


Project Manager

7. Notes

41

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

f. Schedule

Figure 28 Grant chart for project

IV. Conclusion
To summarize through the above, I have analyzed what aspects of IoT are necessary and
appropriate when designing software applications and Outline a plan for an appropriate IoT
application using common architecture, frameworks, tools, hardware and APIs. I also applied my
selected techniques to create an IoT application development plan.

V. Slide
During the assignment process, I presented my assignment to my teacher and classmates,
below is my presentation:

42

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

43

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

44

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

45

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

46

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

47

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

48

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

49

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

50

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

51

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)


lOMoARcPSD|22106981

VI. References
1. Ranger, S., 2021. What is the IoT? Everything you need to know about the Internet of Things
right now | ZDNet. [online] ZDNet. Available at: <https://www.zdnet.com/article/what-is-
the-internet-of-things-everything-you-need-to-know-about-the-iot-right-now/> [Accessed
19 June 2021].
2. Investopedia. 2021. Smart Home. [online] Available at:
<https://www.investopedia.com/terms/s/smart-home.asp> [Accessed 19 June 2021].
3. Twi-global.com. 2021. What is a Smart City? – Definition and Examples. [online] Available at:
<https://www.twi-global.com/technical-knowledge/faqs/what-is-a-smart-city> [Accessed 19
June 2021].
4. Avsystem.com. 2021. What is IoT architecture?. [online] Available at:
<https://www.avsystem.com/blog/what-is-iot-architecture/> [Accessed 19 June 2021].
5. Reed, T., 2021. 7Real Benefits that IoT Brings. [online] Hellersearch.com. Available at:
<https://www.hellersearch.com/blog/7-real-benefits-iot-brings> [Accessed 19 June 2021].
6. Framework, I., 2021. IoT Framework | Check Out List of different Iot Framework. [online]
EDUCBA. Available at: <https://www.educba.com/iot-framework/> [Accessed 19 June 2021].

52

Downloaded by Nguyen Quoc Thang (BTEC CT) (thangnqbc00057@fpt.edu.vn)

You might also like