CACS460 Internet of Things

Internet of ThingsUnit 18 min read

IoT Basics: Definitions, M2M vs IoT, Architecture & Real-World Impact

Unit 1 of Internet of Things explores the core concepts of IoT and Machine-to-Machine (M2M) communication, defining their architectures, comparing key technologies (Arduino vs Raspberry Pi), and illustrating real-world applications from Nepal (eSewa, NTC) and global tech (Google Nest, WhatsApp). This note covers defini

Key points

  • IoT connects physical devices to the internet via sensors/actuators, while M2M focuses on direct machine communication without human intervention.
  • IoT systems follow a **5-layer architecture** (Perception → Network → Processing → Application → Business), visualized with a Mermaid diagram.
  • **IPv6** is critical for IoT’s massive device scalability (e.g., NTC’s smart meters use IPv6 for 65,000+ connections).
  • **Arduino** (microcontroller) vs. **Raspberry Pi** (mini-computer) differ in processing power, cost, and use cases (e.g., Arduino for traffic lights, Pi for eSewa servers).
  • Real-world examples show IoT in **Khalti’s fraud detection** (data analytics), **Pathao’s route optimization** (M2M), and **Google Nest’s predictive maintenance** (edge computing).
  • Exam questions often test **definitions**, **layer-wise functions**, and **comparisons**—always link answers to Nepalese or global case studies.
  • ```

1. Definitions: What Is IoT and M2M?

IoT (Internet of Things) refers to a network of physical objects (things) embedded with sensors, software, and connectivity to collect and exchange data. M2M (Machine-to-Machine) is a subset of IoT where machines communicate without human interaction.

Key Differences

Feature IoT M2M
Scope Broad (humans + machines) Narrow (machines only)
Data Flow Human ↔ Machine ↔ Cloud Machine ↔ Machine (direct)
Example Smart home (Alexa + thermostat) ATMs dispensing cash (no human)

2. How IoT Works: The 5-Layer Architecture

IoT systems are built on 5 layers, each with distinct roles. Below is the Mermaid diagram of the architecture, followed by a breakdown:

Perception (Sensors/Actuators)Network (Wi-Fi/LoRa/Zigbee)Processing (Edge/Cloud)Application (APIs/Dashboards)Business (Analytics/Revenue)data flow
IoT 5-layer architecture (data flow direction: bottom-up)

Layer Breakdown

  1. Perception Layer

    • Devices: Sensors (temperature, motion), actuators (motors, LEDs).
    • Example: A smart traffic light (sensor detects cars → actuator adjusts timing).
    • IMAGE: traffic light controller circuit | Real IoT sensor-actuator setup for Kathmandu’s smart signals.
  2. Network Layer

    • Protocols: Wi-Fi, LoRaWAN, NB-IoT, or IPv6 (critical for 65,000+ devices).
    • Example: NTC’s smart meters use LoRaWAN to send usage data to the cloud without Wi-Fi.
  3. Processing Layer

    • Edge vs. Cloud:
      • Edge: Local processing (e.g., Google Nest adjusting thermostats before cloud sync).
      • Cloud: Centralized analytics (e.g., WhatsApp’s server farms processing messages).
  4. Application Layer

    • Interfaces: Mobile apps (eSewa), dashboards (Daraz logistics), or APIs.
    • Example: Khalti’s fraud detection uses IoT data (transaction speed, location) to flag anomalies.
  5. Business Layer

    • Outcomes: Revenue models (subscription, ads), ROI analysis.
    • Example: NEPSE’s stock market IoT sensors predict trading patterns via predictive analytics.

3. M2M Communication: Steps and Example

M2M follows a 4-step cycle:

  1. Data Collection: Machine (e.g., ATM) reads card → sends transaction data.
  2. Processing: Bank server validates transaction (no human).
  3. Action: ATM dispenses cash or declines.
  4. Feedback: Bank sends confirmation to merchant’s system.

Worked Example: Pathao’s Ride Optimization

  • Step 1: Driver’s phone (sensor) detects idle time.
  • Step 2: M2M message sent to Pathao’s server via NB-IoT.
  • Step 3: Server reroutes driver to nearest passenger (no human dispatch).
  • Step 4: Passenger’s app updates ETA in real-time.
sequenceDiagram
    Driver->>+Server: [M2M] "Idle detected (GPS)"
    Server->>-Driver: [M2M] "Route to Passenger X"
    Passenger->>Server: [App] "Request ride"
    Server-->>Passenger: [App] "Driver Y assigned"

4. Arduino vs. Raspberry Pi for IoT

Feature Arduino Uno (ATmega328P) Raspberry Pi 4
Type Microcontroller Mini-computer
CPU 8-bit/16 MHz 64-bit/1.5 GHz
OS None (firmware) Linux (Raspbian)
Cost ~$10 ~$50
Use Case Sensors (traffic lights) Cloud gateways (eSewa servers)
Connectivity USB/Wi-Fi (shield needed) Built-in Wi-Fi/Bluetooth

When to Use Which?

  • Arduino: Low-power, single-task devices (e.g., NTC’s water meter sensors).
  • Raspberry Pi: Multi-task systems (e.g., Daraz’s warehouse inventory trackers).

5. Real-World IoT in Nepal and Globally

Smart Grid (NTC)Agriculture (Soil Sensors)Healthcare (Remote Monitoring)Traffic (Pathao)Global: Amazon Warehouses
IoT applications in Nepal (local) vs. global scale

Nepal

  1. eSewa

    • Idea Used: M2M + Cloud Processing
    • How: When you pay a bill via eSewa, the app sends an M2M request to the utility’s server (e.g., NTC). The server validates your account → updates the bill status → sends a confirmation SMS (no human intervention).
  2. NTC Smart Meters

    • Idea Used: IPv6 + LoRaWAN
    • How: Each meter has an IPv6 address (e.g., 2001:db8::1234). Data travels via LoRaWAN (long-range, low-power) to NTC’s cloud, where analytics predict peak usage hours.
  3. Khalti Fraud Detection

    • Idea Used: Edge Analytics
    • How: If a transaction seems unusual (e.g., sudden large amount in Pokhara from Kathmandu), Khalti’s edge server flags it before cloud processing.

Global

  1. Google Nest Thermostat

    • Idea Used: IoT + Machine Learning
    • How: Learns your schedule (via phone GPS) → adjusts temperature before you arrive home (edge computing).
  2. WhatsApp’s Message Routing

    • Idea Used: M2M + Load Balancing
    • How: When you send a message, WhatsApp’s servers use M2M to route it to the recipient’s device via the fastest path (no human relay).
  3. Tesla’s Over-the-Air Updates

    • Idea Used: Firmware Updates (IoT Layer 5)
    • How: Tesla cars receive automatic software patches via cellular M2M, fixing bugs without dealership visits.

6. Why IPv6 Matters for IoT

  • Problem: IPv4 only supports ~4.3 billion addresses (Nepal has ~30M people + devices).
  • Solution: IPv6 offers 340 undecillion addresses (enough for 65,000 devices per square meter on Earth).
  • Example: NTC’s smart grid uses IPv6 to assign unique IDs to every meter, enabling real-time monitoring.

IPv6 Packet Format (vs. IPv4):

0326496127Version4 bitsTraffic Class8 bitsFlow Label20 bitsPayloadLength16 bitsNext Header8 bitsHop Limit8 bitsSource Address128 bitsDestination Address128 bitsDatavariable bits
IPv6 packet format (vs. IPv4’s 32-bit addresses)

Exam Tip

  1. Definitions First: Always start with IoT = sensors + connectivity + data → action. M2M is subset of IoT (no humans).
  2. Layer Questions: For the 5-layer architecture, describe one function per layer + one Nepalese/global example.
    • Example Answer:

      "The Network Layer in NTC’s smart meters uses LoRaWAN to transmit data over long distances with low power, ensuring rural areas stay connected."

  3. Comparisons: For Arduino vs. Pi, use the table above and add a use case (e.g., "Arduino is ideal for Pathao’s bike GPS trackers due to its low cost").
  4. Real-World Links: Always tie answers to Nepal (eSewa, NTC, Khalti) or global tech (Google Nest, WhatsApp). Examiners love this!
  5. Diagrams: Draw the 5-layer architecture or M2M sequence in exams—it’s worth 2+ marks and shows understanding.

Final Checklist Before Exam: ✅ Can you draw the 5-layer IoT model? ✅ Do you know 2 Nepalese IoT examples (eSewa, NTC, Khalti)? ✅ Can you compare Arduino vs. Raspberry Pi in 3 points? ✅ Do you understand IPv6’s role in scaling IoT?

Based on the TU BCA syllabus for Internet of Things (CACS460), unit 1.

Discussion

Loading…