CMPE 246 (3) Computer Engineering
Design Studio
Dr. Ling Bai
[email protected]
IEEE Member, ACM Member
Faculty of Applied Science | School of Engineering
The University of British Columbia, Okanagan Campus
1137 Alumni Avenue, Kelowna BC, V1V 1V7 Canada
Instructor Name: Ling Bai
Office Hours: By appointment
Please click on the link to book a 15-minutes
appointment during office hours ( EME 3280,
Friday, 2:30pm-4:30pm). You may book multiple
time slots if needed. If none of the available
times work for you, please feel free to email me.
[email protected] Appointment booking link:
https://lingbai.youcanbook.me
2
Lecture 19
3
Start
Earn your stars in Lecture 19! (Only in person)
iclicker classpoint
In Week 12’s Team session, Redeem your stars for the order of your presentation. 4
Start
5
1-Internet of Things (IoT)
What is Internet of Things (IoT)?
What is the
IoT?
6
1-Internet of Things (IoT)
The Internet of Things (IoT) refers to a network of physical devices,
vehicles, appliances, and other physical objects that are embedded with
sensors, software, and network connectivity, allowing them to collect and
share data.
7
1-Internet of Things (IoT)
IoT devices—also known as “smart objects”—can range from simple “smart
home” devices to wearables clothing, to complex industrial machinery and
transportation systems.
8
1-Internet of Things (IoT)
Even “smart cities” on IoT technologies.
9
1-Internet of Things (IoT)
An IoT gateway is a network component that acts as a translator between IoT devices and other
network entities such as servers, applications, and other devices.
The IoT gateway’s main function is to translate data packets from one protocol to another to ensure
the transmission is readable by the intended recipient.
10
1-Internet of Things (IoT)
IoT enables these smart devices to communicate with each other and with
other internet-enabled devices. Like smartphones, creating a vast network
of interconnected devices that can exchange data and perform various
tasks autonomously.
11
1-Internet of Things (IoT)
12
1-Internet of Things (IoT)
13
1-Internet of Things (IoT)
14
1-Internet of Things (IoT)
The potential applications of IoT are vast and varied, and its impact is
already being felt across a wide range of industries, including
manufacturing, transportation, healthcare, and agriculture. As the number of
internet-connected devices continues to grow, IoT is likely to play an
increasingly important role in shaping our world.
15
1-Internet of Things (IoT)
16
1-Internet of Things (IoT)
17
1-Internet of Things (IoT)
Here are the core benefits of IoT:
1. Improved efficiency: By using IoT devices to automate and optimize processes,
businesses can improve efficiency and productivity.
2. Data-driven decision-making: IoT devices generate vast amounts of data that can be
used to make better-informed business decisions and new business models.
3. Cost-savings: By reducing manual processes and automating repetitive tasks, IoT
can help businesses reduce costs and improve profitability.
4. Enhanced customer experience: By using IoT technology to gather data about
customer behavior, businesses can create more personalized and engaging
experiences for their customers.
18
1-Internet of Things (IoT)
An IoT system has main components:
• Sensors/Actuators or devices: The physical objects that are connected to the
internet
• Connectivity: The way the devices connect to the cloud, communication and
network.
• Data processing/analytics: Process the data collected by the devices, these
tools can include machine learning algorithms, data visualization tools and
predictive analytics models.
• Cloud/Edge computing: Stored, processed, and analyzed data platforms.
• Security and privacy technologies: Encryption, access controls.
• User interface/Applications: How the user interacts with the devices 19
1-Internet of Things (IoT)
An IoT system has main components:
• Sensors/Actuators or devices: The physical objects that are connected to the
internet
• Connectivity: The way the devices connect to the cloud, communication and
network.
• Data processing/analytics: Process the data collected by the devices, these
tools can include machine learning algorithms, data visualization tools and
predictive analytics models.
• Cloud/Edge computing: Stored, processed, and analyzed data platforms.
• Security and privacy technologies: Encryption, access controls.
• User interface/Applications: How the user interacts with the devices 20
2-Architecture of IoT
The architecture of IoT is divided into 4 different layers i.e. Sensing Layer,
Network Layer, Data processing Layer, and Application Layer.
21
2-Architecture of IoT
Sensing Layer: The sensing layer is the first layer of the Internet of Things
architecture and is responsible for collecting data from different sources.
This layer includes sensors and actuators that are placed in the
environment to gather information about temperature, humidity, light, sound,
and other physical parameters. Wired or wireless communication protocols
connect these devices to the network layer.
22
2-Architecture of IoT
Network Layer: The network layer of an IoT architecture is responsible for
providing communication and connectivity between devices in the IoT
system. It includes protocols and technologies that enable devices to connect
and communicate with each other and with the wider internet.
Additionally, the network layer may include gateways and routers that act as
intermediaries between devices and the wider internet, and may also include
security features such as encryption and authentication to protect against
unauthorized access.
23
2-Architecture of IoT
Data processing Layer: The data processing layer of IoT architecture refers
to the software and hardware components that are responsible for collecting,
analyzing, and interpreting data from IoT devices. This layer is responsible
for receiving raw data from the devices, processing it, and making it available
for further analysis or action.
24
2-Architecture of IoT
Application Layer: The application layer of IoT architecture is the topmost
layer that interacts directly with the end-user. It is responsible for providing
user-friendly interfaces and functionalities that enable users to access and
control IoT devices.
25
3-Communication Networking in IoT
• Specific Communication Networking in IoT
• Socket Programming
• MQTT
• CoAP
26
3-Communication Networking in IoT
• Socket programming
Socket programming is a way of connecting two nodes on a network to
communicate with each other. One socket(node) listens on a particular port
at an IP, while the other socket reaches out to the other to form a connection.
The server forms the listener socket while the client reaches out to the
server.
27
3-Communication Networking in IoT
• Socket programming
Socket Types:
a) TCP Socket (Stream Socket): Provides reliable, connection-based
communication (i.e., TCP protocol).
b) UDP Socket (Datagram Socket): Provides connectionless
communication, faster but unreliable (i.e., UDP protocol).
28
3-Communication Networking in IoT
• Socket programming
29
3-Communication Networking in IoT
• MQTT
What is MQTT? Message Queuing Telemetry Transport
MQTT is a Lightweight standards-based messaging protocol, or set of
rules, used for machine-to-machine communication.
Smart sensors, wearables, and other Internet of Things (IoT) devices
typically have to transmit and receive data over a resource-constrained
network with limited bandwidth.
These IoT devices use MQTT for data transmission, as it is easy to
implement and can communicate IoT data efficiently. MQTT supports
messaging between devices to the cloud and the cloud to the device.
30
3-Communication Networking in IoT
• MQTT
◎ Lightweight and efficient: MQTT implementation on the IoT device requires minimal
resources, so it can even be used on small microcontrollers.
◎ Scalable: MQTT implementation requires a minimal amount of code that consumes
very little power in operations.
◎ Reliable: Many IoT devices connect over unreliable cellular networks with low
bandwidth and high latency.
◎ Secure: MQTT makes it easy for developers to encrypt messages and authenticate
devices and users using modern authentication protocols
◎ Well-supported: Several languages like Python have extensive support for MQTT
protocol implementation.
31
3-Communication Networking in IoT
• MQTT
An MQTT broker is an intermediary entity that enables MQTT clients to communicate. Functioning
as a central hub, an MQTT broker efficiently handles the flow of messages between devices and
applications.
32
3-Communication Networking in IoT
• CoAP
The CoAP Protocol, short for Constrained Application Protocol, is a
specialized internet application protocol for constrained devices.
Constrained Application Protocol (CoAP) is a UDP-based transport
protocol developed for constrained devices.
It was designed to allow small, low-power devices to join the Internet of
Things (IoT). The protocol allows these devices to communicate with the
wider Internet using minimal resources.
Similar to HTTP, it is client and server-based, where the client makes a
request and the server sends a response.
33
3-Communication Networking in IoT
• CoAP
MQTT uses a publish/subscribe method, while CoAP uses request/response. And
while MQTT uses a central broker to communicate messages, CoAP has a one-to-one
architecture, with no middle element. 34
3-Communication Networking in IoT
• Socket programming is a low-level network programming approach that directly interacts
with the operating system's network interface to transmit data between devices using
protocols such as TCP or UDP. It forms the foundational layer of network communication,
upon which all higher-level communication protocols are built.
• MQTT is a lightweight, publish/subscribe messaging protocol built on top of the TCP
protocol. It mainly uses sockets (TCP connections) for data transmission and provides a
simplified, reliable message distribution mechanism for IoT scenarios, especially suitable
for environments with limited bandwidth and unstable networks.
• CoAP is an application-layer protocol designed for resource-constrained devices,
typically operating over UDP via sockets (UDP connections). It follows a
request/response communication model similar to HTTP but is optimized for lower data
overhead and power consumption, making it ideal for low-power and low-bandwidth IoT
35
applications.
4-Raspberry Pi in IoT
Remote:
RaspController
36
4-Raspberry Pi in IoT
Remote:
RaspController https://youtu.be/Gh63Mp9aH3s
37
4-Raspberry Pi in IoT
User Interface:
e.g.
React Native
https://reactnative.dev/
Flutter
https://www.flutterflow.io/
API
38
4-Raspberry Pi in IoT
Front-End Development
Back-End Development
Data Management and Cloud Integration
https://youtu.be/n_zXSw7AeVA
39
4-Raspberry Pi in IoT
Specialist Operating Systems:
e.g.
Home Assistant
Home Assistant is an open-source OS that provides a
centralized hub to control all your smart gadgets.
Motioneye, Windows10 IOT, Batocera, LibreELEC,
OpenMediaVault, OSMC (Open Source Media
Center),OpenMediaVault
https://www.intuz.com/top-iot-operating-systems-for-iot-devices
https://www.electronicdiys.com/2018/11/raspberry-pi-os-links-for-download.html
https://www.makeuseof.com/tag/7-operating-systems-you-can-run-with-raspberr
y-pi/
40
https://www.xda-developers.com/best-operating-systems-for-raspberry-pi-5/
Next
41
Dr. Ling Bai
(email: [email protected])