UNIVERSITE INTERNATIONALE DE RABAT
Academic year: 2023-2024
Introduction
What is the IoT?
The term 'Internet of Things' was coined by Kevin Ashton in 1999, to refer to
connecting the Internet to the physical world via sensors.
Since then, the term has been used to describe any device that interacts with
the physical world around it, either by gathering data from sensors, or
providing real-world interactions via actuators (devices that do something like
turn on a switch or light an LED), generally connected to other devices or the
Internet.
The IoT is thus an ecosystem of devices that:
1. Gather data using sensors
2. Interact using actuators
3. Connect with other devices and the Internet
2
Introduction
What are sensors?
Sensors are devices that measure a physical process and convert it to an
electrical signal.
Example of sensors:
• Temperature
• Humidity
• Light
• Acceleration
• Speed
• Proximity
• …
But they can also measure complex signals like:
• Video camera
• Audio signal
• GPS position 3
Introduction
Example of an accelerometer:
4
Introduction
Example of an accelerometer:
5
Introduction
What are actuators?
Actuators are devices that convert an electrical signal into a real-world
interaction.
Example of actuators:
• Switches
• Motors
• LEDs
• Relays
• Buzzers
• …
But there are also actuators that can receive complex signals:
• Displays
• Speakers
• Antennas
• … 6
Introduction
Example of a servomotor:
7
Introduction
IoT is more than just the devices
It also includes:
Cloud services:
1. To process the data coming from the IoT devices
2. Make decisions that are dispatched to the devices to command actuators
Need Internet connectivity
Edge devices:
Can respond to the IoT data and process it without needing and Internet
connection.
Example: run AI models that process the IoT device data. The AI model can
be trained on the cloud on historical data, and run on the edge to speed up
the processing.
8
Introduction
The IoT gateway
9
Introduction
What is an IoT gateway?
As the Internet of Things (IoT) expands, businesses find themselves faced with
the challenge of integrating a multitude of devices and protocols, many with
varying power and connectivity requirements. This mix may also include
legacy technologies.
IoT Gateways are emerging as an essential component in building a robust IoT
and for delivering computational power in edge computing scenarios. Edge
computing distributes the load on a system by performing data processing at
the data source, or “edge”, rather than relying on a central server for the bulk
of the work.
=> IoT gateways are usually the main edge devices in an IoT network
10
Introduction
What is an IoT gateway?
An IoT Gateway is a solution for enabling IoT communication, usually device -
to-device communications or device-to-cloud communications. The gateway is
typically a hardware device housing application software that performs
essential tasks. At its most basic level, the gateway facilitates the connections
between different data sources and destinations.
=> Example: a gateway allows IoT devices using different connectivity
technologies (e.g., Bluetooth, Wifi, Zigbee, …) to communicate with each other
as well as send data to the cloud.
A simple way to conceive of an IoT Gateway is to compare it to your home or
office network router or gateway. Such a gateway facilitates communication
between your devices, maintains security and provides an admin interface
where you can perform basic functions. An IoT Gateway does this and much
more.
11
Introduction
Example of functions an IoT gateway can perform
• Facilitating communication with legacy or non-internet connected devices
• Data caching, buffering and streaming
• Data pre-processing, cleansing, filtering and optimization
• Some data aggregation
• Device to Device communications/M2M
• Networking features and hosting live data
• Data visualization and basic data analytics via IoT Gateway applications
• Short term data historian features
• Security – manage user access and network security features
• Device configuration management
• System diagnostics
12
Introduction
Example of an IoT gateway: Amazon Alexa
13
Introduction
Your smartphone can also be an IoT gateway!
14
Introduction
Your smartphone can also be a normal IoT device!
15
Introduction
IoT MGC architecture:
A Gateway is not necessary but is very useful in many applications
Some devices can be gateways or normal IoT devices (e.g., smartphone) 16
Introduction
IoT is a fast growing technology
It is estimated that by the end of 2020, 30 billion IoT devices
were deployed and connected to the Internet.
17
Introduction
The data is the key to IoT's success
Looking to the future, it is estimated that by 2025, IoT devices
will be gathering almost 80 zettabytes of data or 80 trillion
gigabytes.
18
Introduction
IoT applications
19
Introduction
IoT applications
Can be classified into 4 main areas:
1. Consumer IoT
2. Commercial IoT
3. Industrial IoT
4. Infrastructure IoT
20
Introduction
Consumer IoT
Consumer IoT refers to IoT devices that consumers will buy and use
around the home. Some of these devices are incredibly useful, such as
smart speakers, smart heating systems and robotic vacuum cleaners.
Consumer IoT devices are empowering people to achieve more in their
surroundings, especially the 1 billion who have a disability. Robotic
vacuum cleaners can provide clean floors to people with mobility issues
who cannot vacuum themselves, voice-controlled ovens allow people with
limited vision or motor control to heat their ovens with only their voice,
health monitors can allow patients to monitor chronic conditions themselves
with more regular and more detailed updates on their conditions.
These devices are becoming so ubiquitous that even young children are
using them as part of their daily lives, for example, students doing virtual
schooling during the COVID pandemic setting timers on smart home
devices to track their schoolwork or alarms to remind them of upcoming
class meetings.
21
=> Includes Smart Home, Wearables, Connected Healthcare
Introduction
Commercial IoT
Commercial IoT covers the use of IoT in the workplace.
In an office setting, there may be occupancy sensors and motion detectors
to manage lighting and heating to only keep the lights and heat off when not
needed, reducing cost and carbon emissions. In a factory, IoT devices can
monitor for safety hazards such as workers not wearing hard hats or noise
that has reached dangerous levels.
In retail, IoT devices can measure the temperature of cold storage, alerting
the shop owner if a fridge or freezer is outside the required temperature
range, or they can monitor items on shelves to direct employees to refill
produce that has been sold.
The transport industry is relying more and more on IoT to monitor vehicle
locations, track on-road mileage for road user charging, track driver hours
and break compliance, or notify staff when a vehicle is approaching a depot
to prepare for loading or unloading.
22
=> Includes Smart Retail, Connected Cars
Introduction
Industrial IoT
Industrial IoT, or IIoT, is the use of IoT devices to control and manage
machinery on a large scale. This covers a wide range of use cases, from
factories to digital agriculture.
Factories use IoT devices in many different ways. Machinery can be
monitored with multiple sensors to track things like temperature, vibration
and rotation speed. This data can then be monitored to allow the machine
to be stopped if it goes outside of certain tolerances - it runs too hot and
gets shut down for example. This data can also be gathered and analyzed
over time to do predictive maintenance, where AI models will look at the
data leading up to a failure, and use that to predict other failures before they
happen.
23
Introduction
Industrial IoT
Digital agriculture is important if the planet is to feed the growing
population, especially for the 2 billion people in 500 million households that
survive on subsistence farming. Digital agriculture can range from a few
single digit dollar sensors to massive commercial setups. A farmer can start
by monitoring temperatures and using growing degree days to predict when
a crop will be ready for harvest. They can connect soil moisture monitoring
to automated watering systems to give their plants as much water as is
needed, but no more to ensure their crops don't dry out without wasting
water. Farmers are even taking it further and using drones, satellite data
and AI to monitor crop growth, disease and soil quality over huge areas of
farmland.
24
Introduction
Infrastructure IoT
Infrastructure IoT is monitoring and controlling the local and global
infrastructure that people use every day.
Smart Cities are urban areas that use IoT devices to gather data about the
city and use that to improve how the city runs. These cities are usually run
with collaborations between local governments, academia and local
businesses, tracking and managing things varying from transport to parking
and pollution. For example, in Copenhagen, Denmark, air pollution is
important to the local residents, so it is measured and the data is used to
provide information on the cleanest cycling and jogging routes.
Smart power grids allow better analytics of power demand by gathering
usage data at the level of individual homes. This data can guide decisions
at a country level including where to build new power stations, and at a
personal level by giving users insights into how much power they are using,
when they are using it, and even suggestions on how to reduce costs, such
as charging electric cars at night.
25
Introduction
Examples of IoT applications
26
Introduction
Examples of IoT applications
27
Introduction
Examples of IoT applications
28
Introduction
Examples of IoT applications
29
Introduction
Examples of IoT applications
30
Introduction
How to create new IoT devices?
The T in IoT stands for Things - devices that interact with the physical
world around them either by gathering data from sensors or providing
real-world interactions via actuators.
Devices for production or commercial use, such as consumer fitness
trackers, or industrial machine controllers, are usually custom-made. They
use custom circuit boards, maybe even custom processors, designed to
meet the needs of a particular task, whether that's being small enough to
fit on a wrist, or rugged enough to work in a high temperature, high stress or
high vibration factory environment.
As a developer either learning about IoT or creating a device prototype,
you'll need to start with a developer kit. These are general-purpose IoT
devices designed for developers to use, often with features that you
wouldn't have on a production device, such as a set of external pins to
connect sensors or actuators to, hardware to support debugging, or
additional resources that would add unnecessary cost when doing a large
manufacturing run.
31
Introduction
How to create new IoT devices?
The developer kits usually fall into 3 categories:
• Microcontrollers (MCU)
• Single-board computers
• Smartphones: a smartphone can also be considered to be a general-
purpose IoT device, with sensors and actuators built-in, with different
apps using the sensors and actuators in different ways with different
cloud services.
32
Introduction
Microcontrollers
A microcontroller (also referred to as an MCU, short for microcontroller unit)
is a small computer consisting of:
🧠 One or more central processing units (CPUs) - the 'brain' of the
microcontroller that runs your program
💾 Memory (RAM and program memory) - where your program, data and
variables are stored
🔌 Programmable input/output (I/O) connections - to talk to external
peripherals (connected devices) such as sensors and actuators
Microcontrollers are typically low cost computing devices, with average
prices for the ones used in custom hardware dropping to around US$0.50,
and some devices as cheap as US$0.03. Developer kits can start as low as
US$4, with costs rising as you add more features.
33
Introduction
Microcontrollers
Microcontrollers are designed to be programmed to do a limited number of
very specific tasks, rather than being general-purpose computers like PCs
or Macs. Except for very specific scenarios, you can't connect a monitor,
keyboard and mouse and use them for general purpose tasks.
Microcontroller developer kits usually come with additional sensors and
actuators on board. Most boards will have one or more LEDs you can
program, along with other devices such as standard plugs for adding more
sensors or actuators using various manufacturers' ecosystems or built-in
sensors (usually the most popular ones such as temperature sensors).
Some microcontrollers have built-in wireless connectivity such as
Bluetooth or WiFi or have additional microcontrollers on the board to add
this connectivity.
Microcontrollers are usually programmed in C/C++.
34
Introduction
Example of Microcontroller dev kits:
• The Arduino UNO:
• The NodeMCU ESP8266: has a WiFi module!
35
Introduction
Single-Board Computers
A single-board computer is a small computing device that has all the
elements of a complete computer contained on a single small board.
These are devices that have specifications close to a desktop or laptop PC
or Mac, run a full operating system, but are small, use less power, and are
substantially cheaper.
Like a microcontroller, single-board computers have a CPU, memory and
input/output pins, but they have additional features such as a graphics
chip to allow you to connect monitors, audio outputs, and USB ports to
connect keyboards mice and other standard USB devices like webcams or
external storage. Programs are stored on SD cards or hard drives along
with an operating system, instead of a memory chip built into the board.
Single-board computers are fully-featured computers, so can be
programmed in any language. IoT devices are typically programmed in
Python.
=> Can be used as a gateway! 36
Introduction
Example of Single-Board Computers :
• The Raspberry Pi:
• The Raspberry Pi also has a variant that can be integrated in commercial
products: the compute module
37
Introduction
Production IoT device
38
Introduction
Key element in production IoT devices: Energy Management
IoT devices may be deployed in hard to reach areas: example, sensors
embedded in the street
They cannot be easily charged, or their battery replaced
They need to be able to use their main energy source for a very long
time
39
Introduction
Key element in production IoT devices: Energy Management
Challenge: battery capacity doesn’t evolve very rapidly:
40
Introduction
Energy Management solutions:
Duty cycling:
41
Introduction
Energy Management solutions:
Use lower power wireless technologies:
42
Introduction
Energy Management solutions:
Energy harvesting:
43
Introduction
Summary
• Definition of IoT
• Components of an IoT solution:
o IoT device
o Sensors
o Actuators
o IoT Gateway
o IoT Edge Devices
o Cloud Services
• Examples of IoT applications
• IoT dev kits
• Key challenge for IoT devices: energy management
44