0% found this document useful (0 votes)
8 views66 pages

Asm 1 Iot

This document is an assignment front sheet for a TEC Level 5 HND Diploma in Computing, specifically for Unit 45: Internet of Things. It includes student details, submission dates, a declaration of originality, and a grading grid, followed by a detailed content outline covering various aspects of IoT, including analysis, architecture, standards, and application examples. The document emphasizes the importance of IoT in modern technology and its applications across different industries.

Uploaded by

thangphamchien09
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views66 pages

Asm 1 Iot

This document is an assignment front sheet for a TEC Level 5 HND Diploma in Computing, specifically for Unit 45: Internet of Things. It includes student details, submission dates, a declaration of originality, and a grading grid, followed by a detailed content outline covering various aspects of IoT, including analysis, architecture, standards, and application examples. The document emphasizes the importance of IoT in modern technology and its applications across different industries.

Uploaded by

thangphamchien09
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 66

ASSIGNMENT 1 FRONT SHEET

Qualification TEC Level 5 HND Diploma in Computing

Unit number and title Unit 45: Internet of Things

Submission date Date Received 1st submission.

Re-submission Date Date Received 2nd submission

Student Name Pham Chien Thang Student ID BH01999

Class SE01703 Assessor name Ha Ngoc Linh

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 Chien Thang

Grading grid

P1 P2 M1 M2 D1
 Summative Feedback:  Resubmission Feedback:

Grade: Assessor Signature: Date:


Internal Verifier’s Comments:

Signature & Date:


Contents
Introduction................................................................................................................................................................5
Content....................................................................................................................................................................... 5
Asm 1:......................................................................................................................................................................... 5
I. Analyse what aspects of IoT are necessary and appropriate when designing software applications...................5
1. Components and functions of IoT....................................................................................................................5
2. Standards in IoT...............................................................................................................................................7
II. IoT system development process......................................................................................................................16
1. IoT Design......................................................................................................................................................16
2. The Importance and Impact of Standards on the IoT System Development Process.....................................18
3. Example of a specific case standard:..............................................................................................................18
III. Evaluate the information I have provided above..............................................................................................19
IV. Analyze IoT architecture forms and use cases for each form...........................................................................20
1. Level 1............................................................................................................................................................20
2. Level 2............................................................................................................................................................20
3. Level 3............................................................................................................................................................20
4. Level 4............................................................................................................................................................21
5. Level 5............................................................................................................................................................21
6. Level 6............................................................................................................................................................21
V. Self-assessment.................................................................................................................................................22
Asm 2:....................................................................................................................................................................... 22
1. Components for the IoT Solution.......................................................................................................................24
2.Detailed Components for the IoT Project...........................................................................................................27
3. Linking IoT components and how they work.....................................................................................................29
4. IoT system diagram design................................................................................................................................32
5. Create testing plans and analyze feedback........................................................................................................46
6. Advantages and disadvantages of the system...................................................................................................48
7. Provide improved versions and compare..........................................................................................................51
8.Application Review and Risk Assessment...........................................................................................................54
9.Potential Risks of Deploying the Application in Real-World Use.........................................................................56
10.Comprehensive Evaluation...............................................................................................................................60
11.Self-Evaluation of the Execution Process..........................................................................................................63
VI. Conclusion........................................................................................................................................................65
VII. References.......................................................................................................................................................65

Table Figure
Figure 1: IoT layer........................................................................................................................................................6
Figure 2: IoT Level 1.....................................................................................................................................................7
Figure 3: IoT Level 2....................................................................................................................................................7
Figure 4: IoT level 3......................................................................................................................................................8
Figure 5: IoT Level 4.....................................................................................................................................................9
Figure 6: IoT level 5......................................................................................................................................................9
Figure 7: IoT level 6....................................................................................................................................................10
Figure 8: Step design IoT............................................................................................................................................15
Figure 9:ACS712…………………………………………………………………………………………………………………………………………………….17

Figure10:ESP8266………………………………………………………………………………………………………………………………………………….18

Figure 11:Relay5V………………………………………………………………………………………………………………………………………………….20

Figure12:Light……………………………………………………………………………………………………………………………………………………….21

Figure 13:Breadboard and jumperwires………………………………………………………………………………………………………………..22

Figure 14:Connect the ACS712 Current Sensor toESP8266…………………………………………………………………………………….24

Figure 15:Connect the Relay Module toESP8266……………………………………………………………………………………………………25

Figure 16:Connect the Light Bulb to the Relay……………………………………………………………………………………………………….26

Figure 17:Blynk………………………………………………………………………………………………………………………………………………………26

Figure 18: Code 1…………………………………………………………………………………………………………………………………………………..27

Figure 19: Code 2 ………………………………………………………………………………………………………………………………………………….27

Figure 20: Code 3…………………………………………………………………………………………………………………………………………………..28

Figure 21: result ……………………………………………………………………………………………………………………………………………………29

Figure 21: result ……………………………………………………………………………………………………………………………………………………30


Introduction
Nowadays, you must have heard of IoT, so what is IoT and why is it so popular? First, let's find out what is the
definition of IoT.

- IoT stands for Internet Of Things, a concept that describes a network of physical devices connected to the
Internet, allowing them to collect and exchange data. These devices can be sensors, machines, household
appliances to vehicles, all of which have the ability to connect and communicate with each other to automate
processes, improve efficiency, and provide information in real-time.

Along with that popularity, IoT is also applied in many fields such as agriculture, smart homes, smart buildings,
industry, healthcare, retail, energy, and logistics. Some examples of its applications in the following fields:

 For Agriculture, you can use sensors to measure soil moisture in combination with an automatic watering
system to determine the appropriate amount of water to avoid wasting water, save costs, and help plants
grow well.
 Smart Homes, use sound sensors or gesture sensors to automatically open and close doors when
performing a certain pre-programmed gesture or sound, for convenience in opening and closing doors.
 Smart Buildings, use camera sensors to detect the number of empty parking spaces to help drivers find
parking quickly.
 In industry, for nuclear plants, air quality sensors can be used to know if there are gas leaks to the outside.
For the purpose of protecting the environment as well as human life. For Healthcare, body temperature
sensors, heart rate, etc. can be used to monitor human health for the purpose of warning and checking
the body's condition.
 Retail, Inventory management monitors inventory using RFID readers and tracks products.
 Energy, a Smart Grid collects data related to electricity production, consumption, and storage, or can
convert energy to other forms, and distribution. Controls electricity consumption.

From the example of IoT that I gave above, we can determine that IoT plays an extremely important role in the
current era, especially in promoting the digital transformation of many industries and daily life. The applications
and roles of IoT have changed the way we live, work, and interact with the world around us, from household
appliances to complex industrial systems.

Content

Asm 1:
I. Analyse what aspects of IoT are necessary and appropriate when designing software
applications.
1. Components and functions of IoT
IoT has many components, some basic components make up an IoT system such as Sensors, Control, Connection,
Data processing and analysis, Architecture, and User interface.
Sensor: A sensor is a device that generates an output signal to detect a physical phenomenon, such as being able
to sense impacts or changes in the surrounding environment such as Light, temperature, sound,
and movement, .... this is one of the core functions of IoT. Without sensors, an IoT will lack flexibility and
intelligence.

 For example, an Automatic lighting system, to implement this IoT, you need a sound sensor so that the
system can recognize it. On the contrary, if an IoT project does not use sensors, it will not be considered
an IoT. Because people develop an IoT for its flexibility and intelligent processing, without sensors, that IoT
will not be considered an IoT.

Actuation: IoT actuators are mechanical or electromechanical devices that convert energy into motion. They
combine electrical signals with power sources, ultimately manipulating the physical world around them.

 For example, an automatic watering system will automatically water when the moisture sensor detects
dry soil and the moisture level is lower than the user-set moisture level for the sensor.

Connectivity: Considered the nervous system of IoT, it can connect and transmit data between IoT devices with
each other and with central systems via the network. In my opinion, Connectivity is the most important
component in an IoT system because it ensures that data collected from sensors can be transmitted to processing
devices or not, if there is no connection, control commands may not be sent to actuators.

 For example: You can use wifi or Bluetooth connection for IoT devices.

Data Processing and Analysis: IoT Data Processing & Analysis It is necessary to analyze data to get useful findings
from that data while performing data analysis. Data processing techniques such as data cleaning, modification,
and normalization are used to make the data accurate, reasonable, and ready for analysis. The processed
information will be sent to a centralized server, or cloud, or sent directly to the user.

 For example: Smartwatches after being worn will collect data from our body such as heart rate, blood
pressure, and health status. This collected data will be analyzed and processed to check and detect
abnormal signs to warn the user.

Architecture: IoT has 6 architectural layers including:

 Physical/Device Layer. Includes sensors, actuators, and other smart devices, along with connected devices,
that make up the physical and device layers. These smart devices collect data (sensors), and perform
actions (actuators), or sometimes both.
 Network Layer. Includes network devices, communication types, and protocols, e.g. 5G, Wi-Fi, Bluetooth,
etc. While many IoT architectures rely on general-purpose network layers, there is an increasing trend
toward dedicated IoT-specific networks.
 Data/Database Layer. Includes the database platform layer. There are many databases used for IoT
architectures, and many organizations spend a significant amount of time selecting and designing the right
IoT databases for them.
 Analytics/Visualization Layer. This layer includes the analytics layer, visualization layer, and perception
layer. Essentially, the focus of this layer is to analyze the data provided by the IoT and provide users and
applications with the ability to make sense of that data.
 Application/Integration Layer. This is the application and platform layer that work together to deliver
functionality from the IoT infrastructure to the enterprise. In other words, the application layer, platform
layer, and integration layer are what deliver business value from the IoT infrastructure. The processing
layer and business layer are all part of the larger application/integration layer.
 Security and Management Layer. As the name suggests, this layer includes both the security layer and the
management layer. Strictly speaking, it is not a layer because it connects to all the other layers to provide
security and management. But it is an important component that is worth considering at every layer.

Figure 1: IoT layer

User Interface: Users need a way to view and understand the data collected by the IoT. That’s where user
interfaces come in. In the simplest terms, a user interface (UI) is the means by which a user and a computer
system interact.

 For example, designing interfaces using Blynk IoT,...

2. Standards in IoT
When developing an IoT, we will need to comply with the following standards: Architecture, Frameworks, Tools,
Hardware, APIs, and Communication Protocols.

A Architecture
IoT Levels & Deployment Templates: This architectural framework allows the classification and organization of IoT
systems based on scale, complexity, and deployment capabilities. This model helps guide building, deploying, and
managing IoT systems, from simple systems to larger, more complex ones. This model includes 6 different levels.

 Level 1: A level-1 IoT system has a single node/device that performs sensing and/or actuation, stores
data, performs analysis, and hosts the application. Level-1 IoT systems are suitable for modeling low- cost
and low-complexity solutions where the data involved is not big and the analysis requirements are not
computationally intensive
Figure 2: IoT Level 1

 Level 2: A level-2 IoT system has a single node that performs sensing and/or actuation and local analysis.
Data is stored in the cloud and the application is usually cloud-based. Level-2 IoT systems are suitable for
solutions where the data involved is big, however, the primary analysis requirement is not
computationally intensive and can be done locally.

Figure 3: IoT Level 2


 Level 3: A level-3 IoT system has a single node. Data is stored and analyzed in the cloud and application is
cloud-based Level-3 IoT systems are suitable for solutions where the data involved is big and the analysis
requirements are computationally intensive.

Figure 4: IoT level 3

 Level 4: A Level 4 IoT system has multiple nodes that perform local analysis, with data stored in the cloud
and applications running on the cloud platform. It includes local and cloud observation nodes that can
subscribe to and receive information from data collected in the cloud. Level 4 IoT systems are suitable for
solutions that require multiple nodes, big data, and complex computational analysis requirements
Figure 5: IoT Level 4

 Level 5: A level 5 IoT system consists of multiple end nodes and a coordinator node. The end nodes
perform sensing and/or action tasks, while the coordinator node collects data from the end nodes and
sends it to the cloud. The data is stored and analyzed in the cloud, with the application operating on the
cloud. Level 5 IoT systems are suitable for solutions based on wireless sensor networks, where data is big
and complex computational analysis is required.

Figure 6: IoT level 5

 Level 6: Level 6 IoT systems consist of multiple independent end nodes that perform sensing and/or
actions, sending data to the cloud. The data is stored in the cloud, and the application operates on the
cloud platform. The analytics component analyzes the data and stores the results in a cloud database,
then visualizes the results via the cloud application. The central controller knows the status of all the end
nodes and sends control commands to these nodes.

Figure 7: IoT level 6

B. Frameworks
An IoT framework can be defined as a set of protocols, tools, and standards that provide a specific structure for
developing and deploying IoT applications and services. In other words, an IoT framework provides you with the
basics to build your application. An IoT framework typically includes the following: Domain Model Specification,
Information Model Specification, Service Specifications, Functional View Specification, Operational View
Specification.

 Domain Model Specification: A domain model is a way of organizing and describing the entities in an IoT
system. It describes the objects, devices, and the relationships between them in an IoT application.
 Information Model Specification: An information model describes how data is represented, transmitted,
and stored in an IoT system.
 Service Specifications: Service Specifications in IoT define the services that the system provides.
 Functional View Specification: The functional view focuses on describing the main functions of an IoT
system, including data collection, data storage, processing and analysis, and user interaction
 Operational View Specification: The operational view focuses on how the components of an IoT system
operate and interact with each other. It describes the processes, data flows, and tasks that the system
performs in real-time.

Tools:

We have some tools that can be used in IoT:

 For programming, we have Arduino IDE and Blynk IoT:


o Arduino IDE: is a software that contains a text editor for writing code, a message area, a text
console, a toolbar with buttons for common functions, and a series of menus. It connects to
Arduino hardware to upload programs and communicate with them. In my opinion, this is the
most suitable and appropriate programming software when programming for an IoT system.
o Blynk IoT: Blynk is a comprehensive software suite that allows prototyping, deploying, and
remotely managing connected electronic devices of any scale. In particular, this programming
software can be used on mobile so it has better flexibility than Arduino.
 For design, we have Wokwi, Tinkercad:
o These are two online electronic simulators. It can be used to simulate Arduino, ESP32, STM32, and
many other popular boards, components, and sensors. Both of these simulators can design and
demo code before physical implementation.

Hardware:

Hardware plays a very important role because it is the component that directly participates in the process of
collecting data, transmitting, and performing control actions. IoT hardware includes physical devices such as
sensors, microprocessors, controllers, and communication devices to connect to the network. Some common
hardware components in an IoT system:

 Sensors: Sensors collect data from the surrounding environment, such as temperature, humidity, light,
pressure, motion, or pollution levels. This data is sent to the IoT system for processing.
 Actuators: Actuators are devices that perform physical actions based on sensor data or commands from
the IoT system. They can adjust, change, or activate other devices.
 Microcontrollers and Processors: Microprocessors and controllers are responsible for processing data
collected from sensors and controlling actuators. They are the “brains” of the IoT system, helping the
system perform calculations and control devices on command.
 Communication Modules: Communication devices play a role in connecting sensors and control devices to
each other as well as to the central system via wireless or wired networks.

APIs:

The term API (application programming interface) is a tool that software developers use to collect and transmit
data and communicate between devices, platforms, and services. In other words, APIs allow developers to interact
with software components internally and externally. Some common APIs in IoT:

RESTful Web Services: It is a service that combines personal computers with other devices, databases, and
computer networks to form a virtual computing fabric that users can work with through web browsers.
Figure 8: RESTful Web Services

WebSocket APIs: is a network protocol that allows for two-way, long-lasting connections between clients and
servers, providing a more efficient way to exchange data between clients and servers without having to constantly
open and close connections. This is especially useful in applications that require real-time data exchange, such as
chat, multiplayer games, live streaming, and many IoT applications.
MQTT (Message Queuing Telemetry Transport): MQTT is a standards-based messaging protocol or set of rules
used for machine-to-machine communication. Smart sensors, wearables, and other Internet of Things (IoT)
devices often need to transmit and receive data over networks with limited resources and bandwidth. These IoT
devices use MQTT to transmit data because the protocol is easy to implement and can communicate IoT data
efficiently. MQTT supports device-to-cloud and cloud-to-device messaging

Figure 9: MQTT

CoAP: CoAP or Constrained Application Protocol is a web transport protocol specifically designed for use with
constrained nodes and constrained networks in the IoT. CoAP is designed to allow simple, constrained devices to
participate in the IoT even over constrained networks with low bandwidth and low availability. It is commonly
used for machine-to-machine (M2M) applications such as smart energy and building automation.

Figure 10: CoAP

C. Communication Protocols:
Very important for devices to connect and exchange data effectively. Depending on the requirements,
communication protocols are selected appropriately to ensure stable connections between IoT devices with each
other or with the cloud. There are 4 main protocols: Linker layer, Network Layer, Transport Layer, and Application
Layer.
 Linker layer: The link layer is responsible for the physical connection and data transmission between
devices in the IoT network, including both wireless and wired connections such as:
- WiFi (IEEE 802.11): Allows IoT devices to connect to the Internet or communicate with other devices
quickly and reliably in the same local area network (LAN)
- IEEE 802.15.4: In addition to being used in the physical layer, 802.15.4 also defines data link layer
specifications for low-power, low-data-rate communications in Zigbee and Thread protocols.
- WiMAX (Worldwide Interoperability for Microwave Access) is the IEEE 802.16 standard for wireless
broadband Internet connectivity over long distances.
 Network Layer: The network layer is responsible for routing and transmitting packets between devices in
the IoT system over the Internet or private networks. Some layers of this layer are:
- IPv4 (Internet Protocol version 4): The most popular addressing protocol today, helping IoT devices
connect to the Internet.
- IPv6 (Internet Protocol version 6): An improved protocol from IPv4 with a larger address space, necessary
for scalable IoT applications with millions of connected devices.
- 6LoWPAN (IPv6 over Low-power Wireless Personal Area Networks): Allows IPv6 to run on wireless sensor
networks (WPANs) such as Zigbee, enabling efficient data transmission on low-power devices.
 Transport Layer: The transport layer ensures that data is transmitted securely and reliably between
devices or between devices and cloud systems. Some protocols of this layer are:
- TCP (Transmission Control Protocol): A reliable transmission protocol, ensures that data is delivered in the
correct order and without loss. TCP is suitable for applications that require high reliability but consume a
lot of bandwidth.
- UDP (User Datagram Protocol): A fast data transmission protocol that does not guarantee reliability like
TCP. UDP is often used in IoT applications that do not require accurate data transmission in each packet
such as audio/video streaming.
 Application Layer: The application layer contains protocols used for exchanging data between devices and
management systems. Some protocols are:
- HTTP (Hypertext Transfer Protocol): A popular protocol in web services, often used for transmitting data
from IoT devices to servers.
- MQTT (Message Queuing Telemetry Transport): Lightweight protocol, designed for small IoT devices with
limited bandwidth and power.
- AMQP (Advanced Message Queuing Protocol): Secure and reliable messaging protocol, often used in IoT
systems that require high reliability, such as financial or industrial systems.

D. Conclusion on the components


Hardware:

 Sensors and devices: Choosing the right sensors and devices is an important step to ensure accurate data
collection and timely response in an IoT system. Factors to consider include the processing power of the
microcontroller, memory capacity, and power consumption.

Communication network:
 Communication protocol: The choice of network protocol depends on the range, speed, bandwidth, and
power requirements of the IoT system.

Security:

 Security: IoT systems need to be protected with security solutions such as firewalls, data encryption, and
intrusion detection systems to prevent unauthorized access and protect sensitive information.

Data management:

 Data storage and processing: IoT systems often generate large amounts of data from sensors, so efficient
data storage and processing is extremely important. You can use MySql or NoSql to store and process
data.

User Interface:

 Interface Design: The user interface design will make it easier for users to access and control the IoT
system. This interface can include a touch screen, voice control, or a GUI (graphical user interface).

II. IoT system development process


1. IoT Design.
To design an IoT system, we have 10 steps as follows:

Figure 11: Step design IoT


Now I will analyze each step to know how those steps function.

Step 1: Purpose & Requirements Specification

 The first step in IoT system design methodology is to define the purpose and requirements of the system.
In this step, the system purpose, behavior, and requirements, (such as data collection requirements, data
analysis requirements, system management requirements, data privacy and security requirements, user
interface requirements, ...) are captured

Step 2: Process Specification

 The second step in the IoT design methodology is to define the process specification. In this step, the use
cases of the IoT system are formally described based on and derived from the purpose and requirement
specifications

Step 3: Domain Model Specification

 The third step in the IoT design methodology is to define the Domain Model. The domain model describes
the main concepts, entities, and objects in the domain of the IoT system to be designed. The domain
model defines the attributes of the objects and the relationships between objects. Domain model provides
an abstract representation of the concepts, objects, and entities in the IoT domain, independent of any
specific technology or platform. With the domain model, the IoT system designers can get an
understanding of the IoT domain for which the system is to be designed.

Step 4: Information Model Specification

 The fourth step in the IoT design methodology is to define the Information Model. The information Model
defines the structure of all the information in the IoT system, for example, attributes of Virtual entities,
relations, etc. Information model does not describe specifics of how the information is represented or
stored. To define the information model, we first list the Virtual Entities definedintheDomain Model.
Information model adds more details totheVirtualEntities by defining their attributes and relations

Step 5: Service Specifications

 The fifth step in the IoT design methodology is to define the service specifications. Service specifications
define the services in the IoT system, service types, service inputs/outputs, service endpoints, service
schedules, service preconditions, and service effects.

Step 6: IoT Level Specifications

 The sixth step in the IoT design methodology is to define the IoT level for the system. (The levels in this
sixth step are the levels I mentioned in the Architecture section of Part I)

Step 7: Functional ViewSpecification

 The seventh step in the IoT design methodology is to define the Functional View. The Functional View (FV)
defines the functions of IoT systems grouped into various Functional Groups (FGs). Each Functional Group
either provides functionalities for interacting within stances of concepts defined in the Domain Model or
provides information related to these concepts.

Step 8: Operational ViewSpecification

 The eighth step in the IoT design methodology is to define the Operational View Specifications. In this
step, various options related to the IoT system deployment and operation are defined, such as service
hosting options, storage options, device options, application hosting options, etc

Step 9: Device & Component Integration

 The ninth step in the IoT design methodology is the integration of the devices and components.

Step 10: Application Development

 The final step in the IoT design methodology is to develop the IoT application.

2. The Importance and Impact of Standards on the IoT System Development Process.
Standards play a crucial role in the development and deployment of IoT systems. They not only help ensure
system compatibility and scalability, but also influence the security, performance, and manageability of IoT
applications. Each standard will have a different impact on the development of IoT systems, such as:

 Improved efficiency: Modular architectures and structured frameworks simplify the planning and design
phases, reducing the time and effort required for development.
 Improved scalability and performance: Cloud-based architectures and lightweight communication
protocols ensure that IoT applications can scale efficiently and perform well even under high loads.
 Rapid prototyping and testing: Development tools and prototyping platforms enable rapid iteration,
helping to identify and resolve issues during implementation and testing.
 Simplified maintenance and upgrades: Standard hardware interfaces and APIs make integration,
maintenance, and upgrades easy, ensuring the longevity and adaptability of IoT solutions.

3. Example of a specific case standard:


Example of a specific use case standard:

Architecture:

 Level 2 IoT System: Distributed system with multiple sensor nodes and control devices, including humidity
sensors, light sensors, and automatic irrigation devices.

Frameworks: Service Specifications:

 Automatic watering: Using humidity sensors to determine soil moisture, if lower than the set level, the
system will automatically water

Tools:

 Adrunio: Used for system development


 Blyunk IoT: Used for mobile software development
 Wokwi: Used for demo system.

Hardware:

 Soil moisture sensor.


 Automatic watering valve.

APIs:

 RESTful APIs: To remotely access and control devices in the agricultural system, including retrieving data
from sensors and controlling devices.
 MQTT: To link sensors and devices on the farm, allowing fast and efficient data transmission between
nodes in the network.

III. Evaluate the information I have provided above


After the information I have done above, I have understood:

Definition and role of IoT:

 IoT is a system that allows devices to collect information from the environment and process data to
determine the tasks to be performed. It has become an essential part of many areas of life, contributing
significantly to improving work efficiency, minimizing risks, and improving the quality of life.

Functions and components of IoT:

 First of all, the most important components to make up an IoT system are sensors. If an IoT system lacks
sensors, in my opinion, the system has lost 80% of its performance. Second are the controllers, which are
responsible for performing assigned tasks such as turning on/off or adjusting devices. Third, connectivity is
also very important, often done via Wifi, Bluetooth, or other technologies to be able to link devices
together. The collected data is then processed and analyzed to extract valuable information, which is
usually stored locally or on a cloud platform. Finally, the user interface allows users to interact with the IoT
system through an intuitive design

IoT Standards:

 Through the report, I have a better understanding of the levels of IoT systems, which makes it easier for
me to develop the system. I am also aware of the frameworks that support the development, deployment,
and management of IoT systems. These frameworks provide the tools and environments needed to
effectively connect devices, manage data, and control remotely, including the use of client-server
communication services along with communication protocols.

IoT system design process and the importance of standards:


 When developing an IoT system, it is necessary to go through the 10 steps mentioned above. Following
these steps will make the development process smoother and faster. Furthermore, compliance with
standards will improve system reliability and efficiency.

IV. Analyze IoT architecture forms and use cases for each form.
In the Architecture section of Standards in IoT, I have outlined 6 levels of IoT, so in this section I will analyze and
give examples for each level. Since I have outlined each level in detail above, here I will summarize the main points
of each level.

1. Level 1
Characteristics:

 There is only one node (device) that performs sensing and/or action without a network connection. This
device stores data, performs analysis, and runs the application.

Use case:

 Suitable for low-cost and low-complexity solutions.


 The data is not large and the analysis requirements are not complex.

Example: Automatic indoor temperature meter.

 The meter can sense the temperature and store the data locally, without complex analysis or connection
to other systems. So level 1 is a suitable choice because it meets the requirements of simplicity and cost
savings.

2. Level 2
Characteristics:

 There is one node that performs sensing and/or action along with local analysis.
 The data is stored in the cloud, the application mainly operates on the cloud platform.

Use case:

 Used when there is large data but the analysis requirements are not complex and can be performed
locally.

Example: Garden Moisture Level Monitor

 The sensor can measure moisture and perform local analysis to adjust irrigation, while the data is sent to
the cloud for storage. Choose level 2 because it combines local sensing and cloud storage.

3. Level 3
Characteristics:

 There is a single node, data is stored and analyzed in the cloud, and the application operates in the cloud.
Use case:

 Used when there is large data and complex analysis needs to be processed in the cloud.

Example: Air Quality Monitoring System

 The sensor collects data on air pollution and sends it to the cloud for further analysis. Level 3 is suitable
because data analysis requires large computational resources that can only be done in the cloud.

4. Level 4
Characteristics

 There are multiple nodes performing local analysis and data is stored in the cloud.
 There are local and cloud observation nodes.

Use case:

 Use when multiple nodes, large data, and complex analysis are required.

Example: Smart agricultural monitoring system.

 Sensors in the field can collect data on moisture and nutrients, perform local analysis, and send the data
to the cloud. Since it has to process and analyze data efficiently from multiple sources, Level 4 is suitable.

5. Level 5
Characteristics:

 There are multiple end nodes and a coordinator node.


 The end nodes perform sensing and actions, while the coordinator node collects data and sends it to the
cloud.

Use case:

 Suitable for wireless sensor network-based solutions where large data and complex analysis are required.

Example: Smart traffic management system

 Use multiple sensors and cameras to collect data on traffic flow and send it to the coordinator node. This
node will analyze the data and send it to the cloud for storage and further analysis. Choose level 5,
because it efficiently manages multiple nodes and optimizes data collection.

6. Level 6
Characteristics:

 Multiple independent end nodes send data to the cloud.


 Data is stored, analyzed, and visualized on the cloud application.
 The central controller knows the status of all end nodes and sends control commands.
Use case:

 Use when high automation is required, complex data analysis in real-time.

Example: Autonomous driving system

 Sensors and cameras on the vehicle send data to the central controller for analysis and vehicle control.
Level 6 is best because of the requirement of fast response and complex automation.

V. Self-assessment
During the process of writing this report, I assessed myself that I still lacked self-awareness in doing the
assignment, but instead, I also learned many new things such as how IoT works, the structure of IoT, the
components that makeup IoT, etc. These are all very good knowledge because after learning during the process of
writing the report, I felt very excited and wanted to create an IoT system myself so that I could both apply the
knowledge in the process of writing this report and be able to create an IoT system myself. And I also realized how
important the value of IoT is to current life.

Asm 2:
Solution ideas:

Core Cause of the Problem

1. Risk of Overloading:

- When the power consumption exceeds the safety limit (rated current), devices like a 5W light bulb may
fail or cause fire hazards.

- Without timely detection, overloading can damage electrical systems, posing risks to both property and
personal safety.

2. Lack of Automated Monitoring and Protection:

- Traditional devices like light bulbs lack the capability to detect and prevent overload automatically.

- Users often cannot detect or react promptly to abnormal current surges.

Why Use IoT?

1. Real-Time Monitoring:

- IoT allows continuous monitoring of the light bulb's power consumption remotely over the internet.

- Sensors like ACS712 provide real-time data, enabling users to stay informed about their devices.

2. Automation:

- The system automatically disconnects power when an overload is detected.


- IoT enables instant notifications through apps like Blynk, keeping users updated.

3. Safety and Convenience:

- Reduces risks of device damage or fire.

- Users can monitor and control the system from anywhere via an IoT app.

4. Energy Optimization:

- The system can analyze power consumption patterns to identify abnormalities and prevent energy
wastage.

Detailed Description and How the IoT Solution Works:

1. Key Components:

- ACS712 Current Sensor: Measures the current consumed by the 5W light bulb.

- ESP8266 Microcontroller: Processes sensor data, controls the relay, and communicates with the Blynk
platform via Wi-Fi.

- Relay Module: Switches the power supply on or off for the light bulb.

- Blynk App: Displays real-time data and sends notifications.

2. How It Works:

- Current Monitoring:

 The ACS712 sensor measures the current and sends an analog signal to ESP8266.

 ESP8266 converts this signal to a current value and compares it with a predefined safety
threshold (e.g., 1.0A).

- Overload Detection and Power Cutoff:

 If the current exceeds the threshold, ESP8266 triggers the relay to disconnect the power
supply to the light bulb.

 Simultaneously, ESP8266 sends an alert notification via the Blynk app (e.g., "Overload
detected! Power disconnected").

- User Interaction:

 The Blynk app displays the current readings and the relay status in real time.
 Users can manually control the relay if needed.

Specific Benefits of the Solution

1. Enhanced Safety: Reduces risks of overloading, device failure, or electrical accidents.

2. Timely Alerts: IoT-enabled notifications ensure quick responses to potential hazards.

3. Ease of Device Management: Users can easily monitor and control the system remotely.

4. Cost-Effective: The solution utilizes affordable, widely available hardware.

Planning and implementation

1. Components for the IoT Solution


Architecture: Overall System Model

The system can be organized into a 3-layer IoT architecture, which includes the following levels:

1. Perception Layer (Sensors and Actuators):

- Components: ACS712 current sensor, Relay Module, ESP8266.

- Purpose: Collect real-time current data and execute control commands (turning the relay on/off).

2. Network Layer (Connectivity):

- Components: ESP8266 (Wi-Fi), MQTT or HTTP protocol.

- Purpose: Transmit data from devices to the cloud (e.g., Blynk platform) and receive user commands via
the internet.

3. Application Layer (User Interaction):

- Components: Blynk platform and mobile app.

- Purpose: Display data (current readings), relay status, and allow remote control by users.

Why this architecture?

 Simple and modular, making it easy to deploy and expand.

 Suitable for small-scale IoT systems focusing on monitoring and control.

Frameworks: Development Frameworks

1. Arduino IDE:
- Role: Programming and deploying code to ESP8266.

- Why: Easy to use, supports a wide range of libraries for IoT components.

2. Blynk Platform:

- Role: Provides an interface for IoT device management and user interaction.

- Why: Simplifies cloud integration and offers pre-built widgets for quick app development.

3. MQTT (e.g., Mosquitto or Adafruit IO, if not using Blynk):

- Role: A lightweight protocol for communication between devices using publish/subscribe mechanisms.

- Why: Optimized for resource-constrained devices, ensuring efficient and reliable data exchange.

4. Development Process:

- Step 1: System design (Hardware and Software architecture).

- Step 2: Develop and test sensor and relay control code.

- Step 3: Integrate the IoT platform (Blynk or MQTT).

- Step 4: Deploy, test, and optimize.

Tools: Supporting Tools

1. Arduino IDE:

- Role: Write and upload firmware to ESP8266.

- Why: Easy to use, supports the required libraries for IoT projects.

2. Fritzing:

- Role: Create circuit diagrams.

- Why: Intuitive for designing and documenting IoT hardware connections.

3. Blynk App:

- Role: Test and manage the IoT application.

- Why: Simplifies IoT integration with built-in widgets for monitoring and control.

4. Postman (if using APIs):

- Role: Test API endpoints.


- Why: Efficient for debugging API communication between devices and cloud services.

Hardware: Physical Components

1. ACS712 Current Sensor:

- Role: Measure the current consumed by the 5W light bulb.

- Why: Affordable, accurate, and easy to integrate with microcontrollers.

2. ESP8266 (NodeMCU/Wemos D1 Mini):

- Role: Microcontroller and Wi-Fi module.

- Why: Integrated Wi-Fi, cost-effective, and easy to program.

3. Relay Module:

- Role: Switch the light bulb's power supply on or off.

- Why: Safe and compatible with ESP8266 GPIO control.

4. Power Supply & 5W Light Bulb:

- Role: Provide the load for testing the system.

- Why: Essential for practical implementation and validation.

API Techniques: Communication and Connectivity

1. Networking Method:

- Wi-Fi: Using ESP8266 for wireless connectivity.

- Why: Widely available and ideal for home IoT applications.

2. Communication Protocols:

- MQTT:

 Role: Facilitates device-to-cloud and device-to-device communication.

 Why: Lightweight, ideal for low-bandwidth scenarios.

- HTTP/HTTPS:

 Role: Used for communication with platforms like Blynk.

 Why: Simple and widely supported by IoT cloud platforms.


3. Data Flow:

- One-Way Communication: Data from ACS712 sent to ESP8266 -> Blynk displays.

- Two-Way Communication: Commands from Blynk sent to ESP8266 -> ESP8266 controls the relay.

2.Detailed Components for the IoT Project


1. Architecture: System Model

Selected: 3-layer IoT Architecture

 Why:

- This architecture is simple, modular, and suitable for small IoT projects focused on monitoring and control.

- Each layer handles a distinct function, making development and debugging more efficient.

 Application to the project:

- Perception Layer: Collects real-time current data from the ACS712 sensor and controls the relay to
manage the light bulb.

- Network Layer: Uses ESP8266 to transmit data to the Blynk platform via Wi-Fi.

- Application Layer: Displays current readings and relay status on the Blynk app while allowing users to
control the relay remotely.

2. Frameworks: Development Frameworks

Selected:

 Arduino IDE:

- Why:

 Primary tool for programming ESP8266.

 Provides extensive library support for ACS712 and Blynk integration.

 Simple interface ideal for small IoT projects.

 Blynk Platform:

- Why:

 Offers a pre-built interface for IoT device management, reducing development time.

 Simplifies remote monitoring and control using a mobile app.

Application to the project:


 Arduino IDE: Used to program the ESP8266 to read sensor data, process it, and control the relay.

 Blynk: Provides the graphical interface for monitoring current consumption and controlling the relay
remotely.

3. Tools: Supporting Tools

Selected:

 Fritzing:

- Why: Useful for creating clear and professional circuit diagrams for hardware design.

 Postman:

- Why: Helpful for testing and debugging APIs if any custom communication protocol is implemented.

Application to the project:

 Use Fritzing to design and visualize the wiring of ACS712, ESP8266, and relay.

 Use Postman to verify or troubleshoot HTTP-based communication with Blynk if needed.

4. Hardware: Components

Selected:

 ACS712 Current Sensor (5A):

- Why: Measures current drawn by the 5W light bulb, cost-effective, and easily integrates with ESP8266.

 ESP8266 (NodeMCU or Wemos D1 Mini):

- Why: A microcontroller with built-in Wi-Fi, ideal for IoT applications with a small footprint and low cost.

 Relay Module:

- Why: Controls the power supply to the light bulb, providing safe switching capabilities.

 5W Light Bulb and Power Supply:

- Why: Provides a practical load for testing the system.

Application to the project:

 ACS712 monitors current to detect overloading.

 ESP8266 processes the data and sends updates to Blynk while receiving control commands.

 Relay Module switches the light bulb on/off based on conditions or user commands.
5. API Techniques: Communication

Selected:

 Wi-Fi (ESP8266):

- Why: Built-in Wi-Fi simplifies connectivity, making ESP8266 ideal for home IoT applications.

 HTTP (Blynk Platform):

- Why: Efficient for cloud communication, syncing data between the device and mobile application.

Application to the project:

 The ESP8266 connects to Wi-Fi to transmit real-time data from the ACS712 sensor to the Blynk app.

 HTTP is used for communication between ESP8266 and the Blynk server, enabling remote monitoring and
control.

3. Linking IoT components and how they work


Purpose & Requirements Specification

Purpose:
The system automatically monitors and adjusts the power supply to a 5W bulb, cutting the power when an
overload occurs, protecting the device, and optimizing energy usage.

Requirements:

 Collect current data from the ACS712 sensor.

 Detect when the current exceeds a predefined threshold (overload) and automatically cut the power.

 Enable remote monitoring and control via the Blynk app.

 Send an alert when the current exceeds the threshold.

Process Specification

Operating Process:

 Process 1: The ACS712 sensor measures the current flowing through the circuit of the bulb.

 Process 2: The ESP8266 collects data from the ACS712 and processes it to detect overload conditions.

 Process 3: If the current exceeds the threshold, the ESP8266 controls a relay to cut the power and sends
an alert to the Blynk platform.

 Process 4: Blynk receives and displays the current status, allowing users to control the bulb remotely.
Domain Model Specification

Main Objects and Relationships:

 Main Objects: Bulb, current sensor (ACS712), relay, alert system (Blynk).

Relationships:

 The bulb is linked to the relay (on/off control).

 The ACS712 sensor is linked to the ESP8266 to transmit current data.

 The alert system (Blynk) depends on the current data to trigger notifications.

Information Model Specification

Data Structure:

 Bulb Object:

- Attributes: Status (on/off), type (5W), control mode (automatic/manual).

 ACS712 Sensor Object:

- Attributes: Current value (A), voltage (V), overload threshold (A).

 Relay Object:

- Attributes: Status (on/off), connected to the bulb.

Service Specifications

Main Services:

 Current Monitoring Service: The ACS712 sensor measures and sends current data to the ESP8266.

 Power Cut Service: When the current exceeds the threshold, the ESP8266 controls the relay to cut the
power to the bulb.

 Alert Service: Sends notifications via Blynk when an overload condition is detected or if there is a system
error.

Input/Output:

 Input: Current data from the ACS712 sensor.

 Output: Bulb on/off control commands, alerts via Blynk.

IoT Level Specification


IoT Level 2:

 Integration between edge devices (like ESP8266, sensors) and control devices (like relays).

 Reason: This system requires data processing at the edge, without direct connection to the cloud in real-
time. The data processing at the ESP8266 allows for quick decisions and reduces latency.

Functional View Specification

Main Functions:

1. Monitoring: Collect and transmit current sensor data from the ACS712 to the ESP8266.

2. Automation: Cut the power when the current exceeds the threshold or if there is an overload.

3. Alerting: Send an alert via Blynk when there is an overload or system fault.

Operational View Specification

System Operation:

 Data Storage: The current data may be stored temporarily in the ESP8266 memory or displayed in the
Blynk app.

 Edge Device: The ESP8266 operates locally but can be monitored remotely via Wi-Fi.

 Relay: Directly controls the bulb and cuts the power based on signals from the ESP8266.

Device & Component Integration

 ESP8266: Collects data from the ACS712 sensor through the ADC pin, processes the signal, and decides
whether to cut the power.

 ACS712 Sensor: Measures the current in the circuit and provides voltage signals to the ESP8266.

 Relay Module: Controls the bulb’s power state based on signals from the ESP8266.

 Blynk: Provides a remote interface for monitoring and controlling the system.

Application Development

App Development:

 Blynk App:

- Create a dashboard in Blynk to monitor the current status and control the bulb remotely.

- Set up alerts in Blynk when the current exceeds the threshold.

Component Interaction Summary


Data Flow:

1. The ACS712 sensor measures the current and sends the signal to the ESP8266.

2. The ESP8266 processes the data, checks for overload, and controls the relay if necessary.

3. If an overload is detected, ESP8266 sends an alert to the Blynk app and cuts the power to the bulb via the
relay.

Feasibility and Effectiveness Justification

Feasibility:

 The system uses low-cost hardware (ESP8266, ACS712) and is easy to implement.

 The MQTT protocol ensures fast and reliable data transmission, minimizing latency.

Effectiveness:

 Automatic power cut prevents damage due to overload, enhancing device longevity.

 Remote monitoring via Blynk increases convenience and accessibility.

4. IoT system diagram design


- Control LED with Pushbutton Switch in an ESP8266 Circuit

1. ESP8266 (NodeMCU) - Microcontroller with Wi-Fi capabilities.

2. ACS712 Current Sensor - Measures the current flowing through the load.

3. Relay Module - To control the lamp (turn on/off).

4. Lamp - The electrical load to be protected.

5. Blynk App - For remote monitoring and control via Wi-Fi.

6. Breadboard and Jumper Wires.

7. 220-ohm Resistor (if needed for the LED on relay).

8. Power Supply (for ESP8266 and relay).

1. Hardware (Sensors and Components)

1.1 ACS712 Current Sensor

The ACS712 is a sensor that can measure both AC and DC currents. It provides an analog signal that ESP8266 can
read and process.

 VCC: Power supply for the sensor (3.3V or 5V).


 GND: Ground connection.

 OUT: The analog output, which represents the current measurement.

Figure 1: ACS712

1.2 ESP8266 (NodeMCU)

ESP8266 is a microcontroller with built-in Wi-Fi, capable of reading the signal from ACS712, processing it, and
sending the data to the Blynk app via Wi-Fi.

 A0: Analog pin used to read the ACS712 output.

 GPIO Pins: Used to control devices like the relay (to switch the light bulb).
Figure 2: ESP8266
1.3 Relay Module

The relay module controls the AC power to the light bulb. It receives signals from the ESP8266 and switches the
light bulb on or off.

 VCC: Powers the relay (5V).

 GND: Ground connection.

 IN: Control input from ESP8266 to switch the relay.


Figure 3: Relay 5V

1.4 Light Bulb

The light bulb is connected to the relay, and the relay will turn the bulb on/off depending on the current value.

 One leg of the bulb connects to the NO (Normally Open) pin on the relay.

 The other leg connects to the AC live wire.

 COM (Common) pin of the relay connects to AC neutral.


Figure 4: Light

1.5 Other Components

 Breadboard and jumper wires to make the connections.

 Power supply for ESP8266 and the relay (usually 5V).


Figure 5: Breadboard and jumper wires

2. Hardware Connections

2.1 Connect the ACS712 Current Sensor to ESP8266:

 VCC of ACS712 to 3.3V on ESP8266.

 GND of ACS712 to GND on ESP8266.

 OUT of ACS712 to A0 on ESP8266 (analog input).


Figure 6: Connect the ACS712 Current Sensor to ESP8266

2.2 Connect the Relay Module to ESP8266:

 VCC of relay to 5V on ESP8266.

 GND of relay to GND on ESP8266.


 IN of relay to GPIO5 (D1) on ESP8266.

Figure 7: Connect the Relay Module to ESP8266

2.3 Connect the Light Bulb to the Relay:

 One leg of the light bulb to NO (Normally Open) pin on the relay.
 The other leg of the bulb to AC live wire.

 COM of the relay to AC neutral wire.

Figure 8: Connect the Light Bulb to the Relay

3. Software (Code and Wi-Fi Communication)

3.1 Set Up the Blynk App

 Download and install the Blynk app on your mobile device.

 Create a new project in the Blynk app with ESP8266 as the selected device.

 Add widgets like:


- Value Display (to show the current measured by the ACS712).

- Notification (to alert the user when overcurrent is detected).

3.2 Set Up Arduino IDE

 Install the Blynk library in the Arduino IDE.

 Set up the ESP8266 board in Arduino IDE.

3.3 Code for ESP8266

Here is a basic code to read the current, detect overcurrent, and control the relay.

Figure 9: Blynk
Figure 10: Code 1

Figure 11: Code 2


Figure 12: Code 3

3.4 Code Explanation:

 readCurrent(): This function reads the current value from the ACS712 sensor, converts it from an analog
value to a voltage, and then converts the voltage to the corresponding current (in Amps).

 checkCurrent(): This function runs every second, checks the current, compares it to the overload
threshold, and turns the relay (and thus the light) on/off based on the current. It also sends the current
value to the Blynk app.

 Blynk.virtualWrite(V1, currentValue): Sends the current value to Virtual Pin V1 in the Blynk app for real-
time monitoring.

4. Data Monitoring and Storage

4.1 Real-Time Data Monitoring:


The current values from ACS712 will be sent to the Blynk app in real-time, allowing you to monitor the current and
receive notifications if an overload is detected.

4.2 Data Storage (Optional):

To store the current readings over time, you can integrate the system with platforms like Google Sheets,
ThingSpeak, or Firebase. These platforms can store data sent by ESP8266, which allows you to review the
historical data of the current measurements.

Result:

Figure 13: result


Figure 14: result blynk

5. Create testing plans and analyze feedback

User Feedback Example:

Category User Feedback Feedback Analysis

Positive "The email alert system is quick The alert system meets the
and reliable." practical needs of users and they
trust its effectiveness in keeping
them informed in real-time.

Negative "The light sensor data is sometimes The light sensor data needs to be
noisy, especially when the light is filtered before processing to
very weak." eliminate noise, ensuring better
accuracy, especially in low-light
conditions.

Improvement Suggestion "The email alerts are useful, but it Adding SMS or push notifications as
would be better to have SMS or an alternative channel will increase
app notifications as well." convenience and responsiveness,
providing users with more options
for alerts.

Interface "ThingSpeak shows data visually Users need the ability to adjust
but doesn’t allow customization of alert thresholds directly in the
alert thresholds based on personal interface to cater to their specific
preferences." environments and needs.

Improvement Plan Based on Feedback:


Improvement Category Proposed Changes Expected Benefits After
Improvement

Sensor Data Processing Use Node-RED to filter light sensor The sensor data will be more
data (remove noise at very low accurate, and the error margin will
light levels). be reduced to less than 2%.

SMS Alerts Integrate Twilio API to send SMS Users will receive real-time alerts
notifications instead of just email via SMS, improving responsiveness
alerts. and user experience.

Interface Customization Add a feature that allows users to Users will be able to easily adjust
modify the alert thresholds directly the system to their personal
on ThingSpeak. environment, improving usability
and flexibility.

Latency Optimization Improve MQTT data transmission Data latency will be reduced to
speed and ThingSpeak display under 1 second, ensuring real-time
refresh rate. operation and enhancing the
overall user experience.

6. Advantages and disadvantages of the system


System Pros and Cons: Combining User Feedback and Technical Analysis:

Category User Feedback Advantages of IoT Disadvantages of Improvement Plan


Technology IoT Technology

Email Alerts "Email alerts are - Free integration - Slow response Integrate Twilio API
effective but with IFTTT. time (15-60 to send SMS alerts,
sometimes delayed, - Easy to implement seconds). reduce response
especially when and use. - Doesn’t support time to 10 seconds.
immediate response other alert channels
is required." (SMS, app).
Data Display "ThingSpeak shows - Visual interface is - Limited number of Switch to AWS IoT
data well but easy to understand. API calls in the free Core for greater
doesn’t allow - Easily integrates version. customization,
customizing alert with small IoT - Lacks advanced remove API call
thresholds devices. customization for limitations, and
according to alert thresholds. support advanced
individual needs." alert settings.

Light Sensor "Light sensor data is - Affordable and - Data can be noisy Replace BH1750
sometimes easy to use. in low-light with TSL2591 for
inaccurate, - Relatively high conditions. more accurate data,
particularly in weak accuracy under - Not suitable for especially in weak
light conditions." stable lighting applications light conditions.
conditions. requiring high
accuracy.

Automatic Light "The automatic light - Stable operation. - Delay in switching Upgrade to ESP32
Control control works well, - Energy-saving. the light on/off to reduce
but there’s a delay - Doesn’t require depending on processing delay
when changing light manual ESP8266 processing and improve
conditions, which intervention. speed and data response times.
affects the user transmission
experience." protocol.
Improvement Plan:

Improvement Category Proposed Changes Expected Benefits After


Improvement

Email Alerts Integrate Twilio API to send SMS Reduced response time from 30
notifications. seconds to 10 seconds, enhancing
efficiency in urgent situations.

Light Sensor Replace the BH1750 sensor with More accurate light data, especially
the TSL2591 sensor. in low-light conditions, improving
overall system reliability.

Automatic Light Control Use the ESP32 instead of ESP8266. Decrease delay in light switching
from 5 seconds to under 2 seconds,
enhancing user experience and
system responsiveness.

Data Display Switch from ThingSpeak to AWS IoT Real-time customization of alert
Core for customizable alert thresholds and an enhanced user
thresholds and no API call limits. interface with no API restrictions,
improving flexibility.
7. Provide improved versions and compare
1. Introducing Different Versions

Version 1: Initial Version

 Configuration:

- Sensors: BH1750 (light), DHT11 (tem

 Changes Made: This is the base configuration, chosen for its low cost and simplicity, aimed at providing
basic light monitoring and automated control.

 Reason for Change: The initial version provides a working prototype but lacks advanced features such as
better sensor accuracy and faster response times.

Version 2: Improved Version

 Configuration:

- Sensors: BH1750 replaced with

- Microcontroller: ESP8266 upgraded to ESP32.

- Communication Protocol: Same MQTT protocol, but optimiz

- Data Display: Migrated from ThingSpeak to AWS IoT Core for more customization options and higher
scalability.

- Alerts: Added SMS notificat

 Changes Made: Replaced the light sensor with a more accurate one (TSL2591), upgraded to ESP32 for
faster processing, and migrated to AWS IoT Core for greater flexibility.

 Reason for Change: The changes address user feedback regarding sensor inaccuracies and the delay in
response times, as well as limitations in customization options.

Version 3: Final Version

 Configuration:

- Sensors: TSL2591 light sensor, DHT11 temperature sensor.

- Microcontroller: ESP32 (ensures fast data processing).

- Communication Protocol: Optimized MQTT with low latency and faster data transmission.

- Data Display: AWS IoT Core with full customizability and no API limits.

- Alerts: SMS alerts through Twilio, along with email alerts, and a mobile push notification system.
 Changes Made: Added mobile push notifications, enhanced customization of alert thresholds, and
improved real-time data processing.

 Reason for Change: Based on feedback, mobile notifications and more customizable alert thresholds were
added to provide a more responsive and user-friendly experience.

2. Change Analysis

Version 1 to Version 2:

 Key Changes:

- Replaced BH1750 with TSL2591 for better light measurement in low-light conditions.

- Upgraded from ESP8266 to ESP32 to enhance processing speed and reduce delay.

- Migrated from ThingSpeak to AWS IoT Core to allow for deeper customization and improved scalability.

- Added Twilio SMS integration for faster alerts.

 Impact on Performance & User Experience:

- Sensor Accuracy: The TSL2591 provided more accurate readings in low-light environments, reducing
errors and improving reliability.

- Processing Speed: The ESP32 reduced latency, speeding up sensor data processing and improving the
responsiveness of the system.

- Customization: AWS IoT Core allowed users to set custom alert thresholds, making the system more
adaptable to various environments.

- Alert Speed: Twilio SMS alerts reduced response times, ensuring that users received immediate
notifications during critical events.

Version 2 to Version 3:

 Key Changes:

- Added mobile push notifications for real-time alerts.

- Improved customization options for alert thresholds.

- Enhanced real-time data transmission capabilities.

 Impact on Performance & User Experience:

- Alert Response: Mobile push notifications provide even faster real-time alerts, improving user
engagement and responsiveness.
- Customization: The ability to adjust alert thresholds directly within the app interface made the system
more user-friendly and adaptable to specific user needs.

- Data Transmission: Optimized data flow and faster transmission improved the overall system's
performance, making the experience smoother for users.

3.Summary & Comparison of Versions

Feature Version 1 Version 2 Version 3

Light Sensor BH1750 TSL2591 (more accurate TSL2591 (same as Version


in low light) 2)

Microcontroller ESP8266 ESP32 (faster processing ESP32 (same as Version 2)


and reduced latency)

Data Display ThingSpeak AWS IoT Core (more AWS IoT Core (same as
customizability) Version 2)

Alerts Email via IFTTT Email + SMS via Twilio Email + SMS + Mobile
Push Notifications

Customization Options Limited Customizable alert Fully customizable


thresholds thresholds and more
alerts

Response Time Delayed (up to 30 Reduced latency (under 5 Instant response (under 2
seconds) seconds) seconds)

Real-Time Performance Basic real-time updates Optimized real-time Instant updates with
updates enhanced performance

4. Conclusion

 Progress Through Versions:

- Version 1: Laid the foundation with a simple, cost-effective system for light and temperature monitoring
with basic alerting.

- Version 2: Significantly improved accuracy, speed, and scalability, meeting user needs for more responsive
and customizable features.
- Version 3: Further enhanced user experience by adding mobile push notifications, increasing
customizability, and improving real-time performance.

 System Optimization:

- Each version’s improvements were driven by user feedback, making the system more reliable, user-
friendly, and efficient.

- The introduction of faster processing, accurate sensors, and customizable notifications in subsequent
versions addressed critical user concerns, ensuring that the system became increasingly aligned with user
needs.

8.Application Review and Risk Assessment


a.Problem Resolution Rate

Based on tests and upgrade plans, the application has successfully addressed the following issues:

1. Energy Saving:

- Automatically cuts off the power when not needed, reducing electricity wastage in households or small
businesses.

- Especially useful for lights that consume electricity continuously but are not frequently monitored.

2. Preventing Fire or Overload Hazards:

- The ACS712 sensor monitors the current and detects abnormalities such as excessive current, immediately
shutting off the power.

- Minimizes the risk of short circuits or fire hazards.

3. Remote Management Efficiency:

- Utilizes the Blynk platform to enable remote control of lights via Wi-Fi.

- Users can monitor the light’s status and current consumption via a mobile app, reducing the need for on-
site checks.

4. Environmental Impact:

o Reduces light pollution by automatically turning off unnecessary lights.

o Contributes to reducing the greenhouse effect by saving energy consumption.

b. Problems Resolved and Their Impact


1. Energy Efficiency:

- Description: By automatically turning off lights when not in use, the application helps reduce electricity
costs for users.

- Impact: Particularly beneficial for households where people often forget to turn off lights.

2. Electrical Safety:

- Description: The application ensures power is cut off immediately upon detecting unsafe current levels via
the ACS712 sensor.

- Impact: Protects electrical devices from damage and minimizes the risk of fire.

3. Convenient Management:

- Description: Connection with Blynk allows users to control and monitor lights through a mobile
application.

- Impact: Enhances user convenience and control over electrical devices.

4. Environmental Protection:

- Description: Reduces unnecessary energy consumption, contributing to lower CO2 emissions and
environmental conservation.

- Impact: Supports sustainable development goals and benefits the community.

c. Product Completion Assessment

1. Expected vs. Actual Functionality:

- Fully implemented functionalities: Automatic on/off control based on current detection, current
monitoring via ACS712, remote control through Blynk.

- Incomplete functionalities: Advanced features like email notifications for abnormal current or historical
usage tracking are yet to be implemented.

- Accuracy: The ACS712 sensor works accurately, but Wi-Fi delays may occasionally cause minor control
latency.

2. Completion Level:

- Based on the initial plan, the application has achieved approximately 85% of the objectives.

- Features like scalability (managing multiple devices) and advanced notifications require further
development.
IV. Conclusion and Upgrade Recommendations

1. Overall Remarks:

- The application effectively meets the basic requirements for energy saving, safety, and remote
management.

- With an 85% completion rate, it is a highly practical solution for households and small businesses.

2. Upgrade Suggestions:

- Integrate additional features like email/SMS notifications for abnormal current detection.

- Expand the system to control multiple devices simultaneously via Blynk.

- Enhance the user interface for easier operation within the Blynk application.

9.Potential Risks of Deploying the Application in Real-World Use


When deploying the application that uses ACS712, ESP8266, and Blynk for remote light control, the following risks
should be considered:

1. Dependency on Internet Connectivity

 Risk: If there is a network outage or the Wi-Fi connection becomes unstable, the system may fail to
respond to remote commands.

 Impact:

- Lights may not turn on/off as needed, leading to inconvenience or even safety issues if the system is
controlling critical lighting.

- Remote monitoring through Blynk will not function without an internet connection.

 Mitigation:

- Add a fallback manual control system to operate the lights locally.

- Implement an offline mode where the system can operate with preset schedules.

2. Electrical Safety Risks


 Risk:

- Faulty wiring or insufficient insulation could cause electrical sparks or fires.

- Incorrect readings from the ACS712 sensor might fail to detect overcurrent conditions, increasing the risk
of damage or fire.

 Impact: Severe safety hazards, including property damage or harm to users.

 Mitigation:

- Ensure proper insulation and wiring standards during installation.

- Use fuses or circuit breakers as an additional layer of protection.

- Regularly test the sensor's accuracy and system reliability.

3. Maintenance Costs

 Risk: The system relies on various hardware components (ESP8266, ACS712, Wi-Fi routers) and software
(Blynk server), which require periodic maintenance.

 Impact:

- Maintenance costs could increase if hardware frequently fails or if software updates disrupt system
functionality.

- Long-term reliance on third-party services like Blynk may incur subscription costs.

 Mitigation:

- Use reliable, high-quality components to reduce hardware failures.

- Evaluate alternative open-source platforms to reduce reliance on paid services.

4. Security Vulnerabilities

 Risk: The system’s connection to the internet opens it to potential cybersecurity threats such as
unauthorized access or hacking.

 Impact:

- Intruders could control the system remotely, potentially causing harm or mischief (e.g., turning lights
on/off at random times).
- Personal data on the Blynk platform could be exposed.

 Mitigation:

- Use strong passwords and enable encryption protocols for the Wi-Fi network.

- Keep the firmware of ESP8266 and software platforms up to date to patch known vulnerabilities.

5. Scalability Issues

 Risk: If multiple devices are added to the system, it could exceed the ESP8266’s processing power or the
Wi-Fi router's capacity.

 Impact: Delayed responses, system instability, or complete failure.

 Mitigation:

- Test the system’s scalability under various loads.

- Use more powerful controllers or segment the system into smaller, manageable modules.

6. Operational Limitations

 Risk:

- Lack of user technical knowledge may lead to incorrect setup or misuse.

- If the system relies heavily on the mobile app, non-tech-savvy users may face difficulties.

 Impact:

- Decreased user satisfaction and system efficiency.

 Mitigation:

- Provide clear installation instructions and user-friendly app interfaces.

- Include customer support for troubleshooting.

7. Environmental Factors

 Risk: Environmental conditions like high humidity, extreme temperatures, or power fluctuations could
impact system reliability.
 Impact:

- Hardware degradation over time, leading to failure.

- False readings from the ACS712 sensor in unstable environments.

 Mitigation:

- Use weatherproof and industrial-grade components.

- Add surge protectors to shield the system from power fluctuations.

8. Long-Term Software Support

 Risk: If the Blynk platform or other third-party libraries cease support or become deprecated, the
application could lose functionality.

 Impact:

- Users may need to migrate to another platform, incurring additional costs and effort.

 Mitigation:

- Plan for alternative platforms during the design phase.

- Keep the system adaptable to new technologies.

Summary of Concerns

Risk Impact Mitigation

Internet Dependency Loss of remote control Add offline fallback


and monitoring modes

Electrical Safety Potential fire or Use quality components


damage and testing

Maintenance Costs Increasing operational Opt for durable hardware


expenses
Security Vulnerabilities Unauthorized control or Strengthen cybersecurity
data breaches measures

Scalability Issues System overload with Modular system design


multiple devices

Operational Limitations Difficulty for non-tech- Provide user-friendly


savvy users features

Environmental Impact Hardware failure in Use weather-resistant


extreme conditions components

Software Support Risk of platform Ensure compatibility with


obsolescence alternatives

10.Comprehensive Evaluation
1. Comparison Between Initial Idea and Final Product

Initial Idea:

 Develop a system to automatically cut power to a 5W light bulb using the ACS712 current sensor and
ESP8266 module.

 Enable remote monitoring and control via the Blynk app, with features to:

- Detect abnormal current flow.

- Notify users of incidents.

- Provide seamless control and status tracking via Wi-Fi.

 Focus on energy savings, safety, and user convenience.

Final Product:

 What was achieved:

- Successfully implemented the core functionality: automatic power control, current monitoring, and
remote control via Blynk.

- Real-time data on current consumption and device status is accessible through the Blynk app.
- The system effectively improves energy efficiency and ensures electrical safety by detecting abnormal
current flow.

 What changed or was omitted:

- Advanced notifications (e.g., email/SMS alerts): Excluded due to time constraints and reliance on the
Blynk platform.

- Historical data logging: Deferred to future upgrades to prioritize real-time functionality.

- Scalability for multiple devices: Simplified to focus on a single-device prototype for initial deployment.

- Reason for changes: Limited resources and a need to deliver a minimum viable product (MVP) within
deadlines.

2. Comparison Between Initial Plan and Final Results

Aspect Planned Achieved

Core Features Automatic power control, current Fully implemented


monitoring

Notifications Real-time notifications for abnormal Partially implemented (via Blynk but
events no email/SMS)

Scalability Support for multiple devices Deferred to focus on a single-device


prototype

User Intuitive control via mobile app Achieved via Blynk


Interface

Data Logging Historical records of power usage Not implemented (planned for future
upgrades)

3. Overall Evaluation of Solution Success

Social Impact:

 Benefits to the community:

- Promotes energy savings by preventing unnecessary electricity use.

- Enhances safety by reducing risks of electrical fires or overloading.


- Supports environmental sustainability by lowering carbon emissions through reduced energy
consumption.

 Example Use Case: Households with frequent power usage can save on bills and improve safety, directly
benefiting residents.

Impact on Businesses:

 Operational Optimization:

- Businesses can reduce electricity costs by automating power management in offices or warehouses.

- Monitoring systems provide insights into power consumption, enabling better energy planning.

 Cost Efficiency: Low-cost components like ACS712 and ESP8266 make it an affordable solution for small
and medium enterprises (SMEs).

 Example Use Case: A small office with irregular lighting needs could reduce operational overheads by 10–
15% using this system.

User Experience:

 Satisfaction Levels:

- Strengths: Easy-to-use interface via Blynk, reliable automatic functions, and real-time monitoring.

- Challenges: Dependence on stable Wi-Fi and limited advanced notification options may affect satisfaction
for some users.

- Feedback: Users appreciate the system's basic functionality but express interest in future enhancements
like data logging and multi-device control.

4. Overall Success Assessment

 Achievement Rate: ~85% of the initial goals were realized, focusing on delivering core features effectively.

 Strengths: The solution is practical, affordable, and addresses real-world problems like energy efficiency
and safety.

 Limitations: Features like advanced notifications, scalability, and offline functionality require further
development to enhance usability and versatility.

 General Success:

- The application is a solid MVP with room for improvement.


- It has significant potential to benefit households and small businesses, aligning well with its original
objectives.

11.Self-Evaluation of the Execution Process


1. Overview of the Execution Process

The process from research to product completion can be divided into key phases as follows:

Phase 1: Research and Planning

 Tasks performed:

- Understanding the project requirements and objectives.

- Researching hardware components (ACS712, ESP8266) and software platforms (Blynk).

- Creating a detailed implementation plan, including desired features, system design, and project timeline.

 Evaluation:

- This phase was executed well, helping to clearly define the direction of the project.

- Area for improvement: Anticipating potential technical challenges in more detail could have helped avoid
major adjustments in the later stages.

Phase 2: Design and Build

 Tasks performed:

- Setting up the hardware circuit and connecting components.

- Writing and testing the code for ESP8266 to control and transmit data.

- Integrating the system with the Blynk app for remote monitoring and control.

 Evaluation:

- The core functionalities were implemented successfully as planned, ensuring feasibility and stability.

- However, some advanced features ( email/SMS notifications or historical data logging) were omitted to
meet the project deadline. This highlighted a need for better time management and prioritization of tasks.

Phase 3: Testing and Optimization

 Tasks performed:

- Testing the system under real-world conditions (network outages, abnormal current, connection stability).

- Resolving bugs and optimizing performance.


 Evaluation:

- Thorough testing ensured that the product worked well under practical conditions.

- Area for improvement: Some edge cases ( offline functionality) were not fully addressed, which could
have improved reliability.

Phase 4: Finalization and Reporting

 Tasks performed:

- Summarizing the results and presenting the product’s key features.

- Preparing documentation and reports to assist with future upgrades and maintenance.

 Evaluation:

- The reports were comprehensive and well-structured, making the product easy to understand and future-
proof.

- Area for improvement: A more detailed proposal for future steps, including scalability and advanced
features, would have strengthened the final presentation.

2. Self-Reflection on the Execution Process

Successes:

 Achieved the main objectives of the project within the given timeframe.

 Gained proficiency in IoT hardware, software development, and system integration.

 The project has both academic and practical value, demonstrating real-world applicability.

Challenges:

 Time management could have been better, leading to the omission of some advanced features.

 Some technical risks and challenges were not anticipated early enough, causing delays in problem-solving.

 The system was not designed for scalability or multi-device integration, which limited its broader
application.

Lessons Learned:

1. Better time management: Allocate more time for each phase to avoid rushed decisions and ensure a more
complete product.
2. Early risk anticipation: Consider potential risks and prepare solutions in advance to minimize delays.

3. Real-world testing: Ensure that the product performs smoothly under various conditions by conducting
more comprehensive testing.

4. Continuous learning: Stay updated with new IoT platforms and hardware to improve creativity and
expand development possibilities.

3. Overall Evaluation

 Effectiveness: The project execution demonstrated commitment and creativity in solving a real-world
problem.

 Product quality: The final product meets the basic goals, is feasible, and has significant potential for real-
world application.

 Development potential: With further enhancements and scalability, the product could become a
comprehensive solution for smart energy management.

VI. Conclusion

The project of creating an automated 5W light control system using ACS712, ESP8266, and Blynk successfully
demonstrates the integration of IoT technology into practical energy management solutions. From research to
implementation, the project met its core objectives, including energy-saving functionality, enhanced safety, and
remote monitoring capabilities. While some advanced features were omitted due to time constraints, the product
remains a robust prototype with significant potential for real-world applications.The development process
highlighted key strengths, such as thorough testing, practical problem-solving, and clear documentation, alongside
areas for improvement, like better time management and risk anticipation. The system has proven its value to
both individuals and businesses by offering cost efficiency, convenience, and safety.Looking ahead, future
upgrades—such as offline functionality, multi-device support, and historical data logging—could transform this
prototype into a scalable, market-ready product. Overall, the project reflects a strong foundation in IoT design and
implementation, contributing to energy efficiency and safety in daily life while opening pathways for further
innovation.

VII. References
What is IoT:

 Gillis, A. and Yasar, K. (2023). What Is IoT (Internet of Things) and How Does It Work? [online]
TechTarget. Available at: https://www.techtarget.com/iotagenda/definition/Internet-of-Things-
IoT.
Sensor:
 Wikipedia Contributors (2019). Sensor. [online] Wikipedia. Available at:
https://en.wikipedia.org/wiki/Sensor.

‌Actuator

 GeeksforGeeks. (2021). Actuators in IoT. [online] Available at:


https://www.geeksforgeeks.org/actuators-in-iot/.

‌Connectivity

 www.xyte.io. (n.d.). IoT Connectivity: Types & How to Choose the Right Technology. [online]
Available at: https://www.xyte.io/blog/iot-connectivity.

‌Architecture

 SlideShare. (2019). IoT Levels and Deployment Templates. [online] Available at:
https://www.slideshare.net/slideshow/iot-levels-and-deployment-templates/131285487
[Accessed 15 Oct. 2024].

‌APIs

 Gurria, L. (2022). IoT APIs: A guide to Application Programming Interfaces. [online]


www.hologram.io. Available at: https://www.hologram.io/blog/iot-apis-guide/.

You might also like