0% found this document useful (0 votes)
2 views

Microcontroller_Notes

The document outlines a comprehensive curriculum on microprocessors and microcontrollers, focusing on their architecture, roles in embedded systems, and applications in IoT. It covers various units, including microcontroller types, programming with Arduino, interfacing with sensors, and hardware platforms for IoT development. Additionally, it contrasts microcontrollers with general-purpose microprocessors, emphasizing their efficiency and suitability for specific tasks in embedded systems.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Microcontroller_Notes

The document outlines a comprehensive curriculum on microprocessors and microcontrollers, focusing on their architecture, roles in embedded systems, and applications in IoT. It covers various units, including microcontroller types, programming with Arduino, interfacing with sensors, and hardware platforms for IoT development. Additionally, it contrasts microcontrollers with general-purpose microprocessors, emphasizing their efficiency and suitability for specific tasks in embedded systems.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 24

Unit1 (6 hrs)

Microprocessor Microcontroller architecture 4


Introduction of Microprocessor Microcontroller, Architecture and Role of
microcontroller in
Embedded System and Internet of Things (IoT)
Unit 2 (6 hrs)
Microcontrollers in IOT
Microcontrollers used in IoT open-source environment, design issues, operating
conditions and requirements, platform details.
Unit 3 (6 hrs)
Microcontroller
AVR microcontroller, Overview of Architecture, Programming model, Pipelining,
Interrupt structure and peripheral connectivity, assembly code, c code
Unit 4 (6 hrs)
Introduction to Arduino
Architecture of Arduino board. Software and development tools for the platform
Arduino- AVR microcontroller.
Unit 5: (6 hrs)
Arduino Interfacing and Programming
Embedded C, Interfacing of Arduino Uno with LED, LCD, Keypad, PIR Sensor,
Light Sensor, Temperature Sensor, Bluetooth, Case Studies: Home Automation,
Displaying Sensor data on LCD.
Unit 6 (6 hrs)
Hardware Platforms for IoT application Development
Arduino Uno, Arduino Mega, ESP8266, Raspberry Pi, STM32, Intel Galileo, Beagle
Bone, Comparison of these boards
Microprocessor Microcontroller architecture
Introduction of Microprocessor Microcontroller, Architecture and Role of
microcontroller in Embedded System and Internet of Things (IoT)

Introduction of Microprocessor Microcontroller

In this section we discuss the need for microcontrollers and contrast them
with general-purpose microprocessors such as the Pentium and other x86
microprocessors. We also look at the role of microcontrollers in the
embedded market. In addition, we provide some criteria on how to choose
a microcontroller.

Microcontroller versus general-purpose microprocessor What is the


difference between a microprocessor and a microcontroller? By
microprocessor is meant the general-purpose microprocessors such as
Intel’s x86 family (8086, 80286, 80386, 80486, and the Pentium) or
Motorola’s PowerPC family. These microprocessors contain no RAM, no
ROM, and no I/O ports on the chip itself. For this reason, they are
commonly referred to as general-purpose A system designer using a
general-purpose microprocessor such as the Pentium or the PowerPC must
add RAM, ROM, I/O ports, and timers externally to make them functional.
Although the addition of external RAM, ROM, and I/O ports makes these
systems bulkier and much more expensive, they have the advantage of
versatility, enabling the designer to decide on the amount of RAM, ROM,
and I/O ports needed to fit the task at hand. This is not the case with
microcontrollers. A microcontroller has a CPU (a microprocessor) in
addition to a fixed amount of RAM, ROM, I/O ports, and a timer all on a
single chip. In other words, the processor, RAM, ROM, I/O ports, and timer
are all embedded together on one chip; therefore, the designer cannot
add any external memory, I/O, or timer to it. The fixed amount of on-chip
ROM, RAM, and number of I/O ports in microcontrollers makes them ideal
for many applications in which cost and space are crit cal. In many
applications, for example, a TV remote control, there is no need for the
computing power of a 486 or even an 8086 microprocessor. In many
applications, the space used, the power consumed, and the price per unit
are much more critical considerations than the computing power. These
applications most often require some I/O operations to read signals and
turn on and off certain bits. For this reason some call these processors
IBP, “ittybitty processors.” (See “Good Things in Small Packages Are
Generating Big Product Opportunities” by Rick Grehan, BYTE magazine,
September 1994 (http://www.byte.com) for an excellent discussion of
microcontrollers.) It is interesting to note that many microcontroller
manufacturers have gone as far as integrating an ADC (analog-to-digital
converter) and other peripherals into the microcontroller. Microcontrollers
for embedded systems In the literature discussing microprocessors, we
often see the term embedded system. Microprocessors and
microcontrollers are widely used in embedded system products. An
embedded system is controlled by its own internal microprocessor (or
microcontroller) as opposed to an external controller. Typically, in an
embedded system, the microcontroller’s ROM is burned with a purpose for
specific functions needed for the system. A printer is an example of an
embedded system because the processor inside it performs one task only;
namely, getting the data and printing it. Contrast this with a Pentium-
based PC (or any x86 PC), which can be used for any number of
applications such as word processor, print server, bank teller terminal,
video game player, network server, or Internet terminal. A PC can also
load and run software for a variety of applications. Of course, the reason a
PC can perform myriad tasks is that it has RAM memory and an operating
system that loads the application software into RAM and lets the CPU run
it. In an embedded system, typically only one application software is
burned into ROM. An x86 PC contains or is connected to various
embedded products such as the keyboard, printer, modem, disk
controller, sound card, CD-ROM driver, mouse, and so on. Each one of
these peripherals has a microcontroller inside it that performs only one
task. For example, inside every mouse a microcontroller performs the task
of finding the mouse’s products.

Criteria for choosing a microcontroller 1. The first and foremost criterion in


choosing a microcontroller is that it must meet the task at hand efficiently
and cost effectively. In analyzing the needs of a microcontroller-based
project, we must first see whether an 8-bit, 16-bit, or 32-bit
microcontroller can best handle the computing needs of the task most
effectively. Among other considerations in this category are: (a) Speed.
What is the highest speed that the microcontroller supports? (b)
Packaging. Does it come in a DIP (dual inline package) or a QFP (quad flat
package), or some other packaging format? This is important in terms of
space, assembling, and prototyping the end product. (c) Power
consumption. This is especially critical for battery-powered products. (d)
The amount of RAM and ROM on the chip. (e) The number of I/O pins and
the timer on the chip. (f) Ease of upgrade to higher-performance or lower-
power-consumption versions. (g) Cost per unit. This is important in terms
of the final cost of the product in which a microcontroller is used. For
example, some microcontrollers cost 50 cents per unit when purchased
100,000 units at a time. 2. The second criterion in choosing a
microcontroller is how easy it is to develop products around it. Key
considerations include the availability of an assembler, a debugger, a
code-efficient C language compiler, an emulator, technical support, and
both in-house and outside expertise. In many cases, third-party vendor
(i.e., a supplier other than the chip manufacturer) support for the chip is
as good as, if not better than, support from the chip manufacturer. 3. The
third criterion in choosing a microcontroller is its ready availability in
needed quantities both now and in the future. For some designers this is
even more important than the first two criteria. Currently, of the leading
8-bit microcontrollers, the 8051 family has the largest number of
diversified (multiple source) suppliers. (Supplier means a producer besides
the originator of the microcontroller.) In the case of the 8051, which was
originated by Intel, many companies also currently produce the 8051.
Notice that Freescale Semiconductor (Motorola), Atmel, Zilog, and
Microchip Technology have all dedicated massive resources to ensure
wide and timely availability of their products because their products are
stable, mature, and single sourced. In recent years, companies have
begun to sell Field-Programmable Gate Array (FPGA) and Application-
Specific Integrated Circuit (ASIC) libraries for the different
microcontrollers.
1. Consumer Electronics Products:
l Toys, Cameras, Robots, Washing Machine, Microwave Ovens etc.
[any automatic home appliance] ¢
2. Instrumentation and Process Control: l Oscilloscopes, Multi-meter,
Leakage Current Tester, Data Acquisition and Control etc. ¢
3. Medical Instruments: l ECG machine, Electronic Cardiac Monitor, Blood
gas analyzer, Blood Glucose Monitor, MRI Machine etc. ¢
4. Communication: l Cell Phones, Telephone Sets, Answering Machines
etc. ¢
5. Office Equipment: l Fax, Printers, etc. ¢
6. Multimedia Application: l Mp3 Player, PDAs, optical players, digital
camcorders etc. ¢
7. Automobile: l Speedometer, Auto-breaking system etc. ¢
8. Robotics: l Domestic or household robots, Industrial robots, Medical
robots, Service robots, Military robots, Entertainment robots, Space
robots,
MICROPROCESSOR MICROCONTROLLER

A microprocessor incorporates the functions In the simplest of terms, a microcontroller is


of a Central Processing Unit (CPU) on a single basically a computer that comes in a variety
integrated circuit. It is basically the brain of of packages and sizes. Consider an example
the microcontroller. A microprocessor is a of a personal computer that can perform a
computation engine in a single chip. It is number of tasks or run a variety of programs
impossible to perform any computations simultaneously such that you can listen to
without a microprocessor. music while typing in a word processor all at
the same time.

A microprocessor is a programmable device A microcontroller is a computer that is


that takes some input, performs some logical typically dedicated to a single task. Just like
and arithmetic operations on it and produce any other computer, a microcontroller has a
some desired output. Central Processing Unit that allows it to
perform all the calculations and logic
operations in the background.

A Microprocessor will take instructions in It has a memory used by the microcontroller


machine language, execute them and then to store programs that are specific to one
command the processor what it has to do. single task it is dedicated to. The most
The microprocessor performs the given three important component in a microcontroller is
things while doing so: the clock, as it determines how fast a
It does operations like addition, subtraction, microcontroller will run, which could impact
multiplication, division and logical operations certain aspect of your applications such as
with the help of an Arithmetic and Logical resolution, response, power consumption, etc.
Unit (ALU).
The data in this is capable of moving from
one location to another.
A Program Counter register stores the
reference of the next instruction. The
microprocessor will jump from one location to
another and thus take a decision after each
jump.

It uses Von Neumann architecture in which The microcontroller uses Harvard


data and programs are present in the same architecture, where data and program are
memory module. stored in a separate memory module.

It is a chip with only a processor/CPU A Microcontroller comes with internal memory


incorporated in it. External memory and I/O and peripherals or I/O components and an
components are required. external processor.

It has a large circuit because of the external Because of the internal memory and i/o
i/o components attached externally. components, a microcontroller has a small
size of the circuit.

Microprocessors are inefficient when it comes Microcontroller, however, is an efficient


to their use in compact systems. technique as they can be used in compact
systems.

System cost is high System cost is low

The external components consume much The lower the number of external
amount of power which increases the power components, the lesser the total power
consumption rate resulting in high power consumption, thus making it more suitable for
consumption. This makes it less suitable for devices exhausting stored power like the
devices that run on batteries with power that power in the batteries.
can be exhausted easily.

When it comes to being power efficient, the When it comes to being power efficient, the
major number of microprocessors are not major number of microcontrollers is efficient
Architecture and Role of microcontroller in Embedded System

What is Embedded Systems


Architecture?
Embedded systems architecture refers to the framework and structure of
an embedded system, encompassing its hardware and software
components. Unlike general-purpose computing systems, embedded
systems are designed for specific tasks, often with real-time computing
constraints. The architecture defines how these tasks are managed and
executed, ensuring the system’s efficiency, reliability, and performance.

Key Components of an Embedded


System
1. Microcontroller/Microprocessor
Microprocessor: A microprocessor is more powerful but lacks integrated
peripherals, requiring additional components. ARM is the most popular
microprocessor used in embedded systems. ARM, with 3 variants (M,R and
A series of processors) supports a wide range of applications from low end
to high end.
Microcontroller: A microcontroller integrates a processor, memory, and
peripherals on a single chip, making it ideal for simple, cost-effective
embedded applications. Some of the popular microcontrollers providers
are ST Micro(STM32), NXP(i.MX), Texas Instruments(MSP 430, Sitara),
Microchip(PIC series), Nordic Semiconductor (nRF).
2. Memory
Volatile Memory (RAM): Random Access Memory (RAM) is used for
temporary storage of data and instructions that the CPU needs during
execution. It is fast but loses its contents when power is turned off.
Non-Volatile Memory (ROM, Flash): Read-Only Memory (ROM) and
Flash memory store firmware and critical data that must persist even
when the system is powered down. ROM is used for fixed programs, while
Flash allows for updates and modifications. Sometimes the embedded
product designers start with Flash based systems and once the product
has stabilized they move to ROM based systems to reduce costs.
3. Inputs Devices
Standard inputs: Keypads and touch pads are used as standard input
devices in many embedded systems. On lower end systems you may find
keypads whereas touchpads are used in higher end systems.
Sensors: Sensors collect data from the environment, such as
temperature, light, pressure, and motion. This data is then processed by
the embedded system to perform specific tasks. Examples include
temperature sensors, accelerometers, and light sensors.
4. Output Devices
Displays: You can find a wide variety of displays in embedded systems
that start from simple LEDs, Seven Segment Displays to Character
displays to complex LCD displays. LCDs come in different form factors
from small 320×240 to large screens depending on type of applications.
Actuators: Actuators convert electrical signals into physical actions. They
are used to control devices such as motors, lights, and displays. Examples
include servo motors, LED indicators, and relays.
5. Communication Interfaces
Wired Communication: Interfaces like Ethernet, UART, SPI, I2C, and CAN
bus enable communication between the microcontroller and other
components or external systems through physical connections.
Wireless Communication: Technologies such as Wi-Fi, Bluetooth,
Zigbee, and cellular modules facilitate wireless data exchange between
the embedded system and other devices or networks.
6. Power Supply
Power Management: The power supply provides the necessary
electrical power for the embedded system to operate. It may include
batteries, power adapters, or power management circuits to regulate
voltage and current. Many modern rechargeable battery based systems
have adapted USB as a standard interface for charging.
7. Timers and Counters
Timing Control: Timers and counters are essential for managing time-
dependent operations, such as generating delays, measuring time
intervals, Pulse Width Modulation (PWM) for motor control and triggering
events at precise moments.In real time systems Watchdog timers are
used to restart the system automatically in case it is stuck in an infinite
loop due to issues or hazards.
8. Analog-to-Digital Converters (ADC) and Digital-to-
Analog Converters (DAC)
Signal Conversion: ADCs convert analog signals from sensors into digital
data that the microcontroller can process. DACs perform the reverse,
converting digital data into analog signals to control actuators. These are
very crucial in sensing many environmental conditions to take appropriate
action.
9. Software/Firmware
Embedded Software: The software or firmware is programmed into the
microcontroller or any other memory infrastructure available. It dictates
how the embedded system interacts with its components and performs its
designated tasks. Many Linux variants are popular today in the embedded
systems world like Ubuntu, Angstrom Linux, Raspberry Pi OS etc.
Real-Time Operating System (RTOS): In complex real time embedded
systems, an RTOS manages the execution of tasks, ensuring real-time
performance and efficient resource utilization.
Also read: Characteristics of an Embedded System
Example of an Embedded System in
Action
Consider a smart thermostat as an example of an embedded system. Its
components include:
Microcontroller: Manages the thermostat’s operations and user
interface.
Memory: Stores the control algorithms and user settings.
Input devices: Measures the ambient temperature and provides input to
an embedded system.
Output devices: Controls the HVAC system to regulate the temperature
and displays status of embedded systems
Communication Interfaces: Allows remote control and monitoring via
Wi-Fi or Bluetooth.
Power Supply: Powers the thermostat, possibly with battery backup.
Software: Implements the control logic, user interface, and
communication protocols.
Also read: VLSI vs Embedded Systems

Key Characteristics of Embedded


Systems
1. Specific Functionality
Dedicated Task Performance: Embedded systems are designed to
execute specific functions or tasks. This specialization allows for optimized
cost, performance and efficiency in their designated roles. For example a
system designed for the computer mouse will not be usable for gaming
joystick application. Each of them are optimized for those specific
applications.
Tailored Design: The hardware and software of an embedded system
are customized to meet the exact requirements of its application,
ensuring that resources are used effectively. For example the embedded
system designed for airbag and ABS applications in a car is specially
designed to address safety which may not be necessary for a consumer
grade application like DVD player.
2. Real-Time Operation
Real-Time applications: Many embedded systems operate in real-time,
meaning they can process data and respond to inputs almost
instantaneously. This is crucial for applications where timing is critical,
such as in automotive safety systems or medical devices. Here again
there are hard real time systems and soft real time systems. Safety
related applications like ABS fall into hard real time applications whereas
ATM falls into soft real time applications. Hard real time systems have
very strict constraints on response times otherwise the result is
catastrophic. Soft real time applications have relaxed constraints on the
response time.
Deterministic Behavior: Real-time systems exhibit predictable
behavior, with guaranteed response times to specific events or inputs. In
fact some of the processors like ARM provide features like FIQ (Fast
Interrupt Request) which is useful in this case to provide faster response
to such critical events. To achieve faster response some of the application
is written in lower level languages like C including assembly language.

3. Resource Constraints
Limited Memory and Processing Power: Embedded systems are often
designed with specific resource constraints in mind, including limited
memory and processing power. This necessitates efficient programming
and resource management. This will help bring down the cost of the
system.
Power Efficiency: Many embedded systems, especially those in the
portable devices category, are designed for low power consumption to
extend battery life and reduce energy costs. You would like the battery in
your glucometer to last longer. Most of the cars have keyless entry
systems and you don’t want to change the batteries on your remotes too
often.

4. Reliability and Consistency


High Reliability: Given their critical roles in various applications,
embedded systems must be highly reliable. They are often used in
environments where failure is not an option, such as in medical devices or
aerospace systems.
Consistency: Embedded systems are designed to operate consistently
the same way, ensuring stable performance over long periods. You would
like your blood pressure meter showing you correct reading consistently.

5. Compact Size
Miniaturization: Embedded systems are typically compact, designed to
fit within the physical constraints of the devices they control. This is
particularly important in consumer electronics, medical implants, and
wearable technology. Moore’s law has helped here significantly to
package a significant amount of logic inside the SoCs using deep
submicron technologies.
Integration: The components of an embedded system, including the
microcontroller, memory, and peripherals, are often integrated onto a
single chip to save space and reduce complexity. Multi Chip Modules
(MCMs) and 3-D integration are further improving the integration.

6. Embedded Software
Firmware and Operating System: The software running on an
embedded system, often referred to as firmware, is usually stored in read-
only memory (ROM) or flash memory. This software is specifically written
to perform the system’s designated tasks. Many of the high end
embedded systems are running operating systems like Linux, low footprint
Linux variants, QNX etc.
Efficient Code: Given the resource constraints, embedded software must
be highly efficient, both in terms of processing speed and memory usage.
Depending on target domains standards and guidelines have evolved on
how to write code. For example AUTOSAR and MISRA guidelines for
automotive applications.

7. Interfacing and Connectivity


Sensor and Actuator Interfaces: Embedded systems often interact
with various sensors and actuators to monitor and control physical
processes. This requires specialized interfaces and communication
protocols.
Network Connectivity: Many modern embedded systems feature
connectivity options, such as Wi-Fi, Bluetooth, or Ethernet, enabling them
to communicate with other devices and systems as part of the Internet of
Things (IoT). With the emergence of IoT communication standards have
evolved to support seamless connectivity of sensors and actuators at the
same time conserving power.

8. Cost Sensitivity
Cost-Effective Design: Embedded systems are typically designed to be
cost-effective, balancing performance with budget constraints. This is
crucial in consumer electronics, where cost can be a significant factor in
market success.
Applications of Embedded Systems
Embedded systems are found in a wide array of applications across
various industries:
Consumer Electronics: Smartphones, smart TVs, and digital cameras.
Automotive: Engine control units (ECU), Anti Lock Braking Systems (ABS)
with Electronics Brakeforce Distribution (EBD, Airbags, Infotainment
systems, and advanced driver-assistance systems (ADAS).
Healthcare: Medical devices like pacemakers, MRI machines, and
Glucometers
Industrial Automation: Robotics, assembly line controllers, and process
monitoring systems.
Home Appliances: Washing machines, refrigerators, and microwave
ovens.
Telecommunications: Routers, modems, and base stations.

VLSI vs Embedded Systems:


VLSI technology is primarily focused on improving the performance and
efficiency of electronic devices, while embedded systems are focused on
controlling and monitoring specific functions within a device. Another
difference in VLSI vs Embedded Systems is the size and complexity of the
systems. VLSI systems are typically larger and more complex than
embedded systems, which are designed to be small and efficient.
In terms of career opportunities, both VLSI and embedded systems offer a
wide range of options for professionals. VLSI professionals may work in
research and development, design and engineering, or manufacturing,
while embedded systems professionals may work in fields such as
automotive engineering, industrial control systems, or consumer
electronics. Both VLSI and embedded systems require professionals to
have strong technical skills and a deep understanding of electronic
systems and technologies.

Challenges in Embedded Systems


Complexity
Designing and programming embedded systems can be complex due to
their specialized nature. They also need specialized tools for the
development and debugging.
Scalability
Upgrading or scaling embedded systems can be challenging, as they are
most of the time tailored for specific tasks.
Security
Ensuring the security of embedded systems is crucial, especially for
applications in healthcare and automotive industries. With low memory
footprint embedded systems implementing security is a challenge secure
systems many a times need larger memory. Some of the embedded
systems are deployed in life critical applications and small breaches could
lead to disasters like loss of life and property.

Interoperability
Embedded systems must often interact with other systems, requiring
careful design to ensure compatibility. In low end systems the system
(hardware and firmware) is optimized for the specific operation and
interoperability may be a big challenge.
Future Trends in Embedded Systems
IoT Integration
The Internet of Things (IoT) is driving the evolution of embedded systems,
enabling more devices to connect and communicate over networks. The
number of devices on the internet has already crossed the number of
humans.
Artificial Intelligence
AI is being integrated into embedded systems for smarter and more
autonomous operations. Tiny ML is the new focus area to optimize the ML
models on low footprint memory devices.
Edge Computing
Embedded systems are increasingly used for edge computing, processing
data closer to where it is generated to reduce latency and bandwidth use.
Wearable Technology
Embedded systems are at the heart of wearable devices, offering new
functionalities and applications in health monitoring and personal fitness.
Fitbit and similar devices have mushroomed into the market to help us
measure many vital parameters all the time.

Architecture and Role of microcontroller in Internet of Things (IoT)


What is IoT? Internet of Things Explained

From Smart Homes to Autonomous Cars, IoT that Connects


Billions of Devices Explained

The IoT is the collection of devices connected to the internet


to enable communication between them. This reliable
communication between the devices in a connected
ecosystem helps humankind to attain authority, better
visibility, management, and control in applications involving
them. IoT promises a better user experience to its
consumers, the best example being smart home
automation .
Ever imagined coming home after a hectic day to find your
space perfectly set instantly?
Picture this: your lights automatically adjust as you enter,
the thermostat sets the perfect temperature before you
arrive, and your favorite music starts playing in the
background. It's all possible with advanced intelligent home
automation.
With IoT, these smart home features seamlessly work
together to create an environment that anticipates your
needs and enhances your comfort. IoT is not just limited to
home automation.
In earlier years, could you have imagined a car that self-
diagnoses and schedules its own maintenance?
In the automotive industry, IoT applications such as on-
board diagnostics, Smart ECUs, Battery Management
Systems , Telematics Control Units and more are
revolutionizing the modern driving experience.
We can quote similar examples like smart
agriculture , robotic surgery and others from diverse
industries that leverage IoT to make automation of devices
possible. IoT is that magic potion, enabling intelligent data
flow between devices, driving innovation and efficiency in
today's connected world.
The Architecture of IoT: The Foundation of Intelligent
Connectivity in IoT Architecture

IoT architecture refers to the structured framework that


outlines how various elements within an IoT system interact
and work together. It includes the physical devices,
networks, data management processes, and user interfaces
that enable these devices to connect and interact with each
other.
IoT applications collect data from various devices and
sensors. The most critical task in IoT is managing this vast
amount of data effectively. IoT architecture involves both
hardware and software, establishing a relationship between
dataflow, protocols, and interfaces. To get it right, there
needs to be a robust IoT architecture that oversees all the
components of IoT in a systematic way.
IoT Architecture Layers: Slicing Through the 7-Layer
IoT Architecture

The 7-layer IoT architectural view, also known as the Open


System Interconnection (OSI) model, is a refined
representation of the essential IoT architecture layers. This
7-layer architecture of IoT is designed to tackle the
increasing challenges of IoT systems by providing a clear
structure for data flow, security, and efficiency. Visualizing
these layers in an IoT architecture diagram helps illustrate
how each layer interacts to create a cohesive and secure IoT
environment, optimizing communication, data management,
and connectivity in modern technological ecosystems.
The 7 IoT layers in the architecture of IoT, often depicted in
an IoT architecture diagram, are grouped into three main
categories:
 Hardware Layers
 Transport Layer
 Software Layers

Hardware Layers

 Physical Layer
The physical layer consists of the devices and
transmits data in binary form (as 0s and 1s). It
also includes wireless network connections and
network components like repeaters, modems,
cabling, etc. This layer is crucial in the IoT
architecture because it forms the base of the 7-
layer architecture of IoT.

 Data Link Layer

The data link layer defines the structure in which


the data moves in and out of the network
entities and corrects errors that may have
occurred at the physical layer. The two control
protocols that the data link layer uses for
security and error control are MACsec (Media
Access Control security) and LLC (Logical Link
Control). It plays a significant role in maintaining
the integrity of the IoT architecture layers.

 Network Layer

The network layer is responsible for deciding


which path the data packets should take for
sending them back and forth between different
networks. This layer divides the transport layer
into network packets and carries out data
transmission with the help of IP addressing,
which is essential in ensuring the IoT
architecture diagram maintains its efficiency.
Transport IoT Layer

The fourth layer in the IoT architecture, known as the


Transport Layer, is often considered the heart of OSI. It
uses transmission protocols like TCP (Transmission
Control Protocol) and UDP (User Datagram Protocol) to
ensure reliable data transfer services to the software
layers. It is the most crucial layer in the 7-layer
architecture of IoT as it facilitates transmission. This IoT
architecture layer collects data from the network layer
and provides services to the Application Layer while
also debugging errors in data transmission and
providing an acknowledgment of successful transfer.
Software Layers

 Session Layer

As the name suggests, the Session Layer opens a


session between two systems to communicate with
each other. It also determines how long the session
will continue and when the session will end. This is
vital in establishing robust IoT architecture layers.

 Presentation Layer

The Presentation Layer acts as a data translator for


the network. It retrieves data from different points
and delivers it to the Application Layer. This IoT
architecture ensures that data is structured and
presented in a usable format for both the Application
and Network Layers. The 7-layer architecture of IoT
relies on this layer for efficient communication
between the lower and upper layers.

 Application Layer

The Application Layer is the closest to the end user in


an IoT architecture diagram. It collects information
from the end user and sends back the desired action.
This IoT architecture layer consists of protocols that
allow data transmission like HTTP and HTTPS, FTP,
DNS, etc., making it essential in the complete IoT
architecture.

From Data to Business Decisions: Key


Components Explained in IoT Architecture
As we advance, understanding the roadmap of data—from
its collection to its transformation into insightful decisions—
is crucial. Imagine each stage as a milestone in the journey
of data becoming a decision.
1. Devices on Field

The devices in an IoT ecosystem, equipped with sensors, collect


and transmit data. This ecosystem supports bidirectional
communication between IoT layers to receive timely instructions.
Depending on specific requirements or applications, sensors collect
various data parameters, such as temperature, movement, and
others.

1.1. Sensors

Sensors are devices that detect and measure physical properties


from the environment, such as temperature, humidity, pressure,
and motion. Examples of sensors include:
 Temperature sensors
 Humidity sensors
 Pressure sensors
 Motion sensors

1.2. Actuators

Actuators are devices that carry out a physical movement or


function on getting a command from the IoT system. For example,
carrying out tasks like opening a valve, turning the lights off/on are
all carried out by actuators. Examples of actuators include:
 Valves
 Motors
 Lights
 Pumps

2. Physical Gateways

Gateways serve as the entry point and exit points within the IoT
layers. It manages device connectivity and security in the network
by authenticating the first layer of filtering the raw data collected
from the devices.

Physical gateways (LAN, WAN) are hardware devices located at the


edge of the network. They facilitate communication between
sensors, actuators, and the cloud. Physical gateways support the
following functions:
 Aggregates data from multiple sensors and transmits it to the
cloud.
 Perform local data processing processing and filtering to reduce
data load on the cloud.
 Implement security measures to ensure secure data transmission.

2.1. Cloud Gateways

Cloud gateways ( Cavli Hubble ) are centralized devices that


establish a connection between IoT devices and sensors to the
cloud environment. The data from the gateway enters the cloud so
that an extra additional layer of protection can be incorporated.
Cloud gateways support the following tasks in IoT architecture
 Transforming data into different formats suitable for further
processing.
 Routing data to appropriate destinations such as data lakes, data
warehouses, or analytics platforms.
 Implementing security measures to protect data during
transmission to the cloud.

3. Data Lake

The data lake is a repository designed for storing raw and


unstructured data from all IoT devices until it needs to be
processed. It is from this data lake the raw data is moved to the
data warehouse for further analysis. Data lakes enables
 Ability to store large volumes of data.
 Flexibility to store all types of data (structured, semi-structured,
and unstructured).
 A centralized location for data scientists and analysts to access
raw data.

3.1. Data Warehouse

The data warehouse is where structured, cleaned and filtered data


is stored for business intelligence purposes. It acts as a structured
database optimized for reporting making it easier to manage
queries and offer flexible reporting.A data warehouse is where
structured, cleaned, and filtered data is stored for business
intelligence purposes. It acts as a structured database optimized
for reporting, making it easier to manage queries and offer flexible
reporting. Features of data warehouses include:
 Data is organized in a structured schema that supports efficient
querying.
 Optimized for high-speed performance in data retrieval and
analysis.
 Integrating data from multiple sources for comprehensive
analysis.
3.1.1. Machine Learning and Models

Machine Learning (ML) is the modern dynamic engine in IoT


systems that helps to process and analyze vast data volumes.
Incorporating ML can help in building predictive models,
identify patterns, and enable intelligent decision-making.
Benefits of ML in IoT include:
 Anticipating equipment failures before they occur.
 Identifying anomaly patterns that may indicate security
threats or system malfunctions.
 Enabling smart systems to make autonomous decisions
based on data insights.

Models in the context of IoT data processing refer to


mathematical and statistical models used to analyze data.
These models are used for
 Predictive analytics for forecasting future trends based on
historical data.
 Pattern recognition for identifying patterns and anomalies
in data.
 Optimization for improving processes and utilization based
on data insights.

4. Control Applications

Control applications in IoT architecture are software systems that


automate and manage device behavior based on sensor data. For
example, an actuator can trigger action given by control
applications. Therefore control applications automate processes
and facilitate remote management. Therefore control applications
play a crucial role in:
 Automating processes based on predefined rules and real-time
data.
 Allowing users to manage and control devices remotely.
 Making autonomous decisions to optimize operations and respond
to changing conditions.

4.1.User Interfaces

Control applications often include user interfaces for interaction


and management.

 4.1.1. Mobile:

It allows users to interact with IoT systems using


smartphones and tablets.
 4.1.2. Web:

It provides access to IoT systems via web browsers.

4.2. Business Logic

Business logic refers to the rules and algorithms that govern the
behavior of the IoT system. It includes:
 Defining automation rules and conditions under which certain
actions should be taken.
 Implementing algorithms for intelligent decision-making.
 Designing process workflows to streamline operations and
improve efficiency.

4.3. Business Analytics

Business analytics within control applications involves analyzing


operational data to optimize performance and drive strategic
decisions. It includes:
 Performance monitoring by tracking key performance indicators
(KPIs) to ensure system efficiency.
 Trend analysis by identifying trends to predict future conditions
and make informed decisions.
 Optimization by continuously improving processes based on data
insights.
The Strategic Edge: Why a Robust IoT Architecture is Crucial for
Your Business

A well-defined and simplified IoT architecture is important to help


you with the following.

 Scalability

The volume of connected devices and their data generation


is on an exponential growth. A scalable architecture of IoT
should handle this surge without any performance
degradation or service quality.

For instance, a smart city's traffic management system


should possess a robust IoT architecture to handle the
increasing number of connected sensors and cameras.

Here the scalability of the IoT architecture is designed to


allow the system to easily add more nodes and devices and
handle the exponential growth of data in real-time as the
city's vehicle count grows.
 Flexibility

From sensors to complex systems, an IoT ecosystem


requires a robust yet an adaptable structure to
accommodate this variety of devices. This adaptability is
crucial for integrating security patches and emerging
technologies that future-proof the architecture of IoT.

In a manufacturing company, there may be different


machineries from different vendors working together to
complete a specific IoT process.

In this case, a flexible IoT architecture is crucial to integrate


new sensors and devices through different communication
protocols such as MQTT , CoAP, and HTTP, allowing the
company to easily integrate new devices and systems.

 Reliability

To keep IoT systems running around-the-clock is critical,


especially in applications like healthcare , industrial
automation , and smart cities . Downtime in IoT
architecture can have significant consequences. Reliable
architecture of IoT ensures effective system functioning
without interruption, thereby minimizing downtime.

For example, in the case of a hospital, the Internet of


Medical Things (IoMT) requires reliable architecture of
IoT for various tasks. It is essential for real time monitoring
of patient vitals and other medical equipments.

It is this strong architecture that ensures medical things


remain operational 24/7, process real time data and
reduces downtime. The IoT architecture provides enhanced
security to the critical medical records, preventing
unauthorized cyberattacks that can be accessed, and
exploited by cyber attackers.

Microcontrollers use network interfaces to interact with other devices


locally and to push the data to the IoT application for any analysis.
Moreover, they are designed to support one or many network protocols
like Wifi, Bluetooth, Cellular networks like 2G/3G or even RFID.
When it comes to the Internet of Things (IoT) and smart objects,
computational ability is often driven by devices called microcontrollers, or
MCUs. Essentially scaled-down computers, MCUs operate smart devices
by providing processing power, memory, and input/output peripherals.
A microcontroller is a small computer typically used to control electronic
devices. It is often used in Internet of Things (IoT) applications because it
is inexpensive, has low power consumption, and can easily integrate into
various devices.

A microcontroller is a single chip that contains a processor, memory, and


input/output parts. The processor runs instructions, the memory stores
data and programs, and the I/O parts let the microcontroller communicate
with the environment using sensors and tools.

Many different microcontrollers are available on the market, each with its
features and capabilities. Some common microcontrollers in IoT
applications include Arduino, Raspberry Pi, and ESP8266.

A microcontroller needs to be given instructions, and programming


languages like C or C++ can be used in an IoT application. This can be
done with a computer and a USB or serial port connection. After it is
programmed, the microcontroller can link to the internet using Wi-Fi or
cellular and control or communicate with other devices.

The role of Microcontrollers in IoT Systems

Small computer chips called microcontrollers are often used in Internet of


Things (IoT) systems to control and monitor different systems and
devices. They are often found in sensors, actuators, and other electronic
parts. They help to manage how the device works and behaves while
processing and sending data.

Microcontrollers are essential for connecting to and communicating with


other systems and devices in an IoT system. They gather sensor data,
process it, and send it via wired or wireless communication protocols to
other devices or systems. Additionally, they can receive and decipher
commands and control signals from other devices, which they can then
use to control the actions and behaviors of the embedded device.

Microcontrollers are ideal for use in Internet of Things (IoT) systems


because of their small size, low cost, and low energy consumption. They
can be programmed to do many different tasks, making them suitable for
many IoT applications. They are also great for battery-powered devices as
they use less energy.

How to choose the best Microcontroller for your IoT Application?

Choosing the best microcontroller (MCU) for an Internet of Things (IoT)


application can be daunting, especially if you are new to the field. Here is
a step-by-step guide that can help you make an informed decision −

Determine your application's requirements − Clearly defining your


IoT application's requirements is the first step. This covers the kinds of
sensors and actuators you'll be using, how much memory and processing
power you'll require, the communication protocols you'll employ, and the
operating environment (temperature, humidity, etc.).

Consider the MCU architecture − There are different types of MCU


architectures, such as 8, 16, and 32-bit. The type you choose will depend
on your project's complexity and the memory and power you need.

Look at the available MCUs − Once you know your application needs,
you can look for the right microcontroller unit (MCU). It is important to
compare different MCUs to make sure it meets your requirements.

Consider the communication protocols − IoT applications frequently


need to communicate with the outside world in some way. Make sure the
MCU you select is compatible with the wireless, Bluetooth, cellular, or
Zigbee protocols you intend to use.

Evaluate the development tools and support − It is important to


consider the availability of development tools and support for the MCU
you are considering. Look for an MCU with a well-established ecosystem of
development tools and a strong community of developers who can help
you get started and troubleshoot any issues that may arise.

Test and evaluate − Once you have narrowed down your options, it is a
good idea to test and evaluate the performance of the MCUs you are
considering. This can help you determine the best fit for your application.

By following these steps, you can choose the best microcontroller for your
IoT application and ensure that it meets your requirements.

Explore our latest online courses and learn new skills at your own pace.
Enroll and become a certified expert to boost your career.

Which microcontroller is suitable for the Internet of Things (IoT)?

Several microcontrollers are suitable for use in IoT applications, including


ESP32 − This is a good choice for Internet of Things projects because it


has WiFi and Bluetooth, a fast processor, and uses little energy.

Arduino − Arduino boards are popular for Internet of Things projects


because they are easy to use and not too expensive. They have many
features, like digital and analog inputs and outputs, and they support
different programming languages.
Raspberry Pi − The Raspberry Pi is a small, low-cost computer popular in
IoT projects because of its versatility and ability to run a full operating
system. It can build many IoT devices, from simple sensors to complex
systems.

STM32 − The STM32 family of microcontrollers is widely used in IoT


applications due to their high-speed processing capabilities, low power
consumption, and support for various communication protocols.

ATtiny − The ATtiny microcontroller is affordable for basic Internet of


Things projects. It has digital and analog inputs and outputs and can be
programmed with Arduino.

Microcontrollers in IOT
Microcontrollers used in IoT open-source environment, design issues,
operating conditions and requirements, platform details.

You might also like