IoT Technologies · SYCS · Lecture 3

Physical and logical design of IoT systems

What an IoT thing is made of, and how its parts talk
Nishant Vibhute
Module 1 · Introduction to IoT
Room code IOT3
Recap · Lecture 2

Last class in three questions: answer, then flip

Question 1
Give one key difference between M2M and IoT.
Answer
M2M: one device → one server, closed, one job. IoT: many things → cloud → many apps, open.
Question 2
Name the three layers, bottom to top.
Answer
Perception → Network → Application.
Question 3
Which two layers does the five-layer model add?
Answer
Processing and Business (network is renamed transport). "Please Take Pizza And Biryani".

Ask a student to answer aloud, then click the card to check.

Today's plan

By the end of today, you can…

1️⃣ Tell physical design from logical design
2️⃣ Draw the blocks of a generic IoT device
3️⃣ Place IoT protocols in their layers
4️⃣ List the six functional blocks of an IoT system
5️⃣ Explain four communication models and two APIs
🎯 Course outcome OC 1: design and architecture of IoT systems

Syllabus link: Module 1 → Introduction to IoT: Physical & Logical Design of IoT Systems.

Hook story

Two engineers open the same smart doorbell

🔧 Hardware engineer sees parts:
a camera, a motion sensor, a chip, a Wi-Fi radio, a memory card, a speaker, a battery.
💻 Software engineer sees jobs:
detect a visitor, send an alert, store the video, check who is logged in, show it in the app.
🤔 Think: who is right about what the doorbell "is"?
Both. Parts and protocols = physical design. Jobs and how they talk = logical design. Today we learn to describe any IoT system both ways.
Part A · Two views of design

Physical design is the body; logical design is the mind

Physical design = the things and protocols. Logical design = the functions and how they communicate, without naming exact parts.
  • Physical: devices, their blocks, and protocols used.
  • Logical: functional blocks, communication models, APIs.
  • Physical answers "what is it made of?"
  • Logical answers "what does it do, and how?"
Cricket team: the physical view lists players, bats and pads; the logical view lists roles — opener, bowler, keeper — and the signals between them.
🧱 Physical design
  • IoT devices ("things")
  • Blocks inside a device
  • IoT protocols by layer
🧠 Logical design
  • Functional blocks
  • Communication models
  • Communication APIs
Today's map: Part A = physical (slides 5–12) · Part B = logical (slides 14–24)
Part A · Physical design

Inside a generic IoT device: six building blocks

Every IoT device has a brain (processor) joined to blocks that sense, act, connect, store and handle audio/video.
  • Processor: runs the program and makes decisions.
  • I/O interfaces: sensors in, actuators out.
  • Connectivity: Wi-Fi, Bluetooth, mobile, Ethernet.
  • Memory/storage and audio/video interfaces.
Smart doorbell: motion sensor (input), chime and lock (output), Wi-Fi (connectivity), memory card (storage), camera and speaker (audio/video).
🧠 Processormicrocontroller / CPU 🌡️ Sensor inputsmotion, temp, light ⚙️ Actuator outputsrelay, motor, chime 📶 ConnectivityWi-Fi, Bluetooth, 4G,Ethernet 💾 Memory & storageRAM, flash, SD card 🎥 Audio / videocamera, mic, speaker
Activity · Match it

Smart doorbell: match each part to its block

Click a part on the left, then its block on the right. Correct pairs turn green.
Part A · IoT protocols

IoT protocols work in four layers, like sending a parcel

A protocol is an agreed set of rules for talking. IoT uses four layers of protocols, each doing one part of delivery.
Sending a courier parcel: the road or rail used (link), the address on the box (network), tracked or untracked service (transport), the language of the letter inside (application).
Link — the road: 802.3 Ethernet · 802.11 Wi-Fi · 802.15.4 · 802.16 WiMAX · 2G/3G/4G
Network — the address: IPv4 · IPv6 · 6LoWPAN
Transport — the delivery service: TCP · UDP
Application — the language: HTTP · CoAP · WebSocket · MQTT · XMPP · DDS · AMQP
Part A · Link layer

Link layer: the physical road your data travels on

The link layer decides how bits move over a wire or radio between nearby devices.
  • 802.3 Ethernet: wired, fast, reliable.
  • 802.11 Wi-Fi: wireless LAN for homes and colleges.
  • 802.15.4: low-power, low-rate radio (Zigbee uses it).
  • 802.16 WiMAX and 2G/3G/4G: wide-area wireless.
Your college: lab PCs use Ethernet cables, your phone uses Wi-Fi in the canteen and 4G on the train home.
🔌 Ethernet (802.3) — cable · very reliable · fixed devices
📶 Wi-Fi (802.11) — wireless LAN · fast · uses more power
🐝 802.15.4 (LR-WPAN) — low power, low data rate · battery sensors
🗼 WiMAX (802.16) — wireless broadband over long distances
📱 2G / 3G / 4G (mobile) — anywhere with a tower
Trade-off: more range or speed usually costs more power.
Part A · Network & transport layers

Network gives the address; transport delivers it

IP puts an address on every packet. TCP delivers carefully; UDP delivers quickly with no promise.
  • IPv4/IPv6: addresses and routes packets across networks.
  • 6LoWPAN: squeezes IPv6 into tiny low-power radio packets.
  • TCP: checks delivery, keeps order, resends losses.
  • UDP: no checks — faster, lighter, may lose data.
Post office: TCP is registered post with acknowledgement; UDP is an announcement on the college PA system — quick, but no one confirms they heard.
🏷️ Network layer
IPv4 (32-bit address) · IPv6 (128-bit address) · 6LoWPAN = IPv6 for tiny 802.15.4 devices
📦 TCP
✔ acknowledged
✔ in order
✔ resends lost data
✖ slower, heavier
📢 UDP
✔ fast, light
✔ good for small sensors
✖ no guarantee
✖ no order
Bank payment → TCP · live sensor reading every second → UDP is often fine
Part A · Application layer

Application protocols: the languages IoT apps speak

Application protocols set the format and meaning of messages. Each suits a different job.
  • Web-style: HTTP, CoAP, WebSocket.
  • Messaging: MQTT, XMPP, AMQP, DDS.
  • Details come in Lectures 10–11.
Smart home: your app asks the bulb's status with HTTP; the motion sensor broadcasts "movement!" with MQTT to everyone who subscribed.
🌐 HTTP — the web's request–response protocol; runs on TCP
🪶 CoAP — "light HTTP" for tiny devices; runs on UDP
🔁 WebSocket — one open two-way connection
📨 MQTT — lightweight publish–subscribe via a broker
💬 XMPP — real-time messaging and presence (from chat)
🏦 AMQP — reliable business messaging with queues
⚡ DDS — data-centric publish–subscribe for real-time machine systems
📊 Poll · Quick check

Which protocol solves this problem?

🐝 A tiny battery sensor uses an 802.15.4 radio. Its frames are very small, but it still needs an IPv6 address to join the internet.

Think for 20 seconds, vote with fingers (1–4), then click an option.

☕ Interactive break

Myth or fact? Vote with your hands, then flip

Myth or fact?
"TCP is always better than UDP."
Myth ❌
TCP is more reliable, but UDP is lighter and faster — often better for small, frequent sensor readings.
Myth or fact?
"Wi-Fi and 802.15.4 work at the same protocol layer."
Fact ✅
Both are link-layer standards: different roads, same job of moving bits nearby.
Myth or fact?
"MQTT replaces IP, so MQTT devices need no IP address."
Myth ❌
MQTT is an application protocol that normally runs on top of TCP/IP.

Click a card to flip it. Who got all three right?

Part B · Logical design

Six functional blocks: the jobs every IoT system does

Logical design splits a system into jobs: sense, communicate, offer services, show apps — with management and security watching everything.
  • Device: sensing, actuation, monitoring, control.
  • Communication and services: move data; discovery, control, analytics.
  • Application: the interface users see.
  • Management and security cover all layers.
Smart irrigation: soil sensor (device), 4G link (communication), "pump control" service (services), farmer's app (application), remote updates (management), login and encryption (security).
⚙️ Management
📟 Device
sensing · actuation · monitoring · control
📡 Communication
IoT protocols carry data
🛎️ Services
device discovery · control · data publishing · analytics
📱 Application
interface for users to view and control
🔒 Security
Activity · Sort it

Smart irrigation: which block does each job?

Click a job, then its functional block (or drag it).
🌱 Read soil moisture
📡 Send data over 4G
🔍 Discover new sensors on the farm
📱 Farmer's dashboard
🔄 Update sensor software remotely
🔑 Check the farmer's login
⚙️ Switch the pump relay
🔐 Encrypt readings

📟 Device

📡 Communication

🛎️ Services

📱 Application

⚙️ Management

🔒 Security

Part B · Communication models

Four patterns for who talks to whom

A communication model is the pattern of a conversation: who starts, who answers, and whether the line stays open.
College life: asking a teacher a doubt, a class WhatsApp group, a canteen token queue, a phone call — four different patterns.
🙋 Request–response
Client asks, server answers. Asking a doubt.
📢 Publish–subscribe
Publish to a topic; subscribers receive. WhatsApp group.
📥 Push–pull
Producers push into a queue; consumers pull. Token queue.
🔁 Exclusive pair
One open two-way line. Phone call.
Part B · Model 1

Request–response: the client asks, the server answers

The client sends a request; the server sends back a response. Each pair is separate.
  • Client starts; server waits and replies.
  • Stateless: server keeps no memory between requests.
  • Simple, but client must keep asking for updates.
  • Used by HTTP and CoAP; REST APIs.
Weather app: you pull down to refresh; the app requests "current temperature" and the server responds "28 °C".
📱 Client 🖥️ Server ① Request: GET temperature ② Response: 28 °C ③ New request (server remembers nothing) ④ Response: 29 °C Each request–response pair stands alone
Part B · Model 2

Publish–subscribe: send once, all subscribers receive

Publishers send to a topic on a broker; the broker forwards it to every subscriber of that topic.
  • Publisher: source of data, e.g. a sensor.
  • Broker: manages topics and forwards messages.
  • Subscriber: receives topics it signed up for.
  • Publishers and subscribers don't know each other.
YouTube: a creator uploads once; every subscriber is notified. MQTT works this way for IoT.
🌡️ Temp sensorpublisher 💧 Humiditypublisher 📮 Broker topic: room/temp topic: room/humid 📱 Phonesubscribes temp ❄️ AC controlsubscribes temp 📊 Dashboardsubscribes both Publish once → many receive
Part B · Model 3

Push–pull: producers fill a queue, consumers take when ready

Producers push data into a queue; consumers pull it out at their own pace. The queue absorbs the difference.
  • Producers and consumers don't know each other.
  • The queue is a buffer in the middle.
  • Useful when sending and processing speeds differ.
  • Producers don't wait for consumers.
Canteen at lunch break: students push orders as tokens; the kitchen pulls the next token when a cook is free. The token rack is the queue.
📟 Meter 1 📟 Meter 2 📟 Meter 3 producers 📥 Queue push 🖥️ Billing 🖥️ Analytics consumerspull Queue = buffer when speeds don't match
Part B · Model 4

Exclusive pair: one open two-way line between client and server

Client and server open one connection and keep it open; both can send any time until one side closes it.
  • Bidirectional, full-duplex: both talk at once.
  • Persistent: stays open until closed.
  • Stateful: server remembers all open connections.
  • Used by the WebSocket protocol.
Video call: once connected, both people talk and see each other continuously until someone hangs up.
📱 Client 🖥️ Server ① Handshake: "open connection" ② open two-way pipe ③ Both send at any time ④ One side closes the connection Stays open → fast, but server must remember it
Activity · Which model fits?

Sort each scenario into its communication model

Ask: does one side ask and wait? Is it send once, many receive? Is there a queue? Does a line stay open?
🌐 Browser opens a sensor's web page
📢 Fire alarm alerts every phone in the building
📥 Lakhs of meter readings wait for the billing server
🎮 Live game controller ↔ server
🔄 App refreshes to ask today's rainfall
🌡️ Sensor posts to "room/temp"; three apps listening
🍽️ Orders pile up; kitchen takes the next when free
📹 Live CCTV stream with two-way talk

🙋 Request–response

📢 Publish–subscribe

📥 Push–pull

🔁 Exclusive pair

☕ Interactive break · What would you do?

Your cricket score app has lakhs of fans. Which model?

You run a live-score service for a college sports app. During a final, lakhs of fans want every ball's update within seconds. Pick a model, then click it.
Part B · Communication APIs

Two APIs: REST asks each time; WebSocket keeps a line open

An API (application programming interface) is how one program talks to another. IoT mainly uses REST and WebSocket APIs.
BasisREST-based APIWebSocket-based API
ModelRequest–responseExclusive pair
ConnectionNew request each timeOne persistent connection
StateStatelessStateful
DirectionClient asks, server answersBoth sides send any time (full-duplex)
OverheadHeaders sent with every requestLow after the first handshake
Best forReading status, occasional commandsReal-time streams, live control
Smart home: checking the AC's set temperature → REST. Watching the door camera live and talking to a visitor → WebSocket.
Part B · Try a REST API

Click a request and watch the device answer

In REST, every thing is a resource with an address. You use GET to read and PUT to change it.
Real life: smart plugs, cloud dashboards and services like ThingSpeak offer REST APIs that work like this.
// Click a request on the left. // The device's reply appears here.

Sample device and values for practice. 200 = OK · 404 = resource not found.

☕ Interactive break · 1-minute brain teaser

How does a chat app show "typing…" instantly?

💬 Your friend starts typing and, within a moment, your screen shows "typing…" — you never refreshed. Would a REST API with request–response do this well? What model fits better, and why?
Discussion timer
1:00
Common mistakes

Four mistakes students make in this topic

❌ Mixing the protocol stack with the 3/5-layer architecture.
✅ Stack = how one message travels; architecture = the whole system.
❌ "Publish–subscribe and push–pull are the same."
✅ Pub-sub: broker sends to all subscribers. Push–pull: consumers pull from a queue.
❌ Calling REST stateful.
✅ REST is stateless; WebSocket (exclusive pair) is stateful.
❌ Diagrams without labels.
✅ Label client/server, broker, topics, queue and arrow directions.
Group activity · 12 minutes

Design a smart doorbell on paper, both ways

  1. Form groups of 4.
  2. Physical: draw the device's blocks and name one part for each.
  3. Pick a link and an application protocol; justify.
  4. Logical: write one job for each of the six functional blocks.
  5. Choose a communication model for "visitor alert" and for "live video".
🪜 Stuck? Climb the ladder
Activity timer
12:00
Cheat sheet

Lecture 3 on one page

Physical vs logical
Physical = things + protocols. Logical = functional blocks + communication models + APIs.
Device blocks
Processor · sensor inputs · actuator outputs · connectivity · memory/storage · audio/video.
Protocol layers
Link (Ethernet, Wi-Fi, 802.15.4, mobile) · Network (IPv4/6, 6LoWPAN) · Transport (TCP, UDP) · Application (HTTP, CoAP, MQTT…)
Functional blocks
Device · Communication · Services · Application + Management · Security.
Comm. models
Request–response · Publish–subscribe · Push–pull · Exclusive pair.
APIs
REST: stateless, request–response, GET/PUT. WebSocket: stateful, full-duplex, exclusive pair.
What's next

Next class: enabling technologies, identifiers and frameworks

🔜 Lecture 4
• Cloud, big data, AI, embedded systems in IoT
• How things get unique identifiers
• IoT frameworks: AWS, Azure, Google
📝 Homework
1. Draw labelled diagrams of all four communication models.
2. List the protocols of each layer from memory.
3. Read your textbook's sections on physical and logical design.
Exit question · exam style

Explain publish–subscribe and request–response with diagrams.

✍️ Two labelled diagrams + a short explanation of each. Write for 6 minutes.(5 marks)
IoT Technologies · Lecture 3

Thank you! Questions?

Remember: ask · publish · queue · pair — the four ways things talk
Room code IOT3 · Next: enabling technologies, identifiers and frameworks