Skip to content
IoT Overview — Architecture, Protocols, Sensors, and Real-World Applications Explained

IoT Overview — Architecture, Protocols, Sensors, and Real-World Applications Explained

DodaTech Updated Jun 15, 2026 5 min read

The Internet of Things (IoT) is a network of physical devices embedded with sensors, software, and connectivity that collect and exchange data over the internet without requiring human-to-human or human-to-computer interaction.

Why IoT Matters

By 2026, there are over 30 billion connected IoT devices — more than 3 per person on Earth. Smart thermostats save 10-15% on heating bills. Industrial IoT sensors predict machine failures before they happen, saving millions in downtime. Healthcare IoT monitors patients remotely. Agriculture IoT optimizes irrigation and fertilizer use. IoT is transforming every industry by bridging the digital and physical worlds. Edge Computing makes real-time IoT decisions possible by processing data near the device rather than in the cloud.

Plain-Language Explanation

Think of a traditional home. You wake up, feel the room temperature, decide it’s cold, walk to the thermostat, and turn up the heat. You’re the sensor, the decision-maker, and the actuator all in one.

Now think of a smart home. A temperature sensor detects it’s 16°C. It sends that data to a smart hub (gateway). The hub compares it to your settings (18°C at 7 AM). It sends a signal to the heater (actuator) to turn on. A notification appears on your phone. The entire loop happens without you doing anything.

This is IoT in action: sensors collect data, connectivity transports it, processing makes decisions, actuators execute actions.


graph TD
    subgraph "IoT Architecture Layers"
        D[Device Layer] --> G[Gateway Layer]
        G --> C[Cloud Layer]
        C --> A[Application Layer]
    end
    D --> Sensors[Sensors: Temp, Motion, Light]
    D --> Actuators[Actuators: Motors, Valves, Relays]
    G --> Protocols[Protocols: MQTT, CoAP, HTTP]
    C --> Processing[Data Processing & Storage]
    A --> Dashboard[User Dashboard]
    A --> Analytics[Analytics & ML]
    style D fill:#3498db,color:#fff
    style G fill:#e67e22,color:#fff
    style C fill:#27ae60,color:#fff
    style A fill:#9b59b6,color:#fff

Architecture Layers

Device Layer: Physical hardware — sensors (temperature, humidity, motion, pressure, gas) and actuators (motors, valves, relays, LEDs). Devices range from tiny battery-powered sensors to industrial PLCs.

Gateway Layer: Bridges devices to the cloud. Gateways handle protocol translation, local processing, and security. A Raspberry Pi running MQTT broker is a common DIY gateway.

Cloud Layer: Ingests, stores, and processes device data. AWS IoT Core, Azure IoT Hub, and Google Cloud IoT provide managed IoT backends. This layer handles device shadows, rules engines, and fleet management.

Application Layer: User-facing dashboards, analytics, alerts, and integrations. A mobile app that shows your home temperature is an application layer component.

Communication Protocols

ProtocolTransportBest For
MQTTTCPLow-power, unreliable networks. Pub/sub model with QoS levels.
CoAPUDPConstrained devices. REST-like, low overhead.
HTTP/HTTPSTCPDevices with enough power and bandwidth. Simple to implement.
LoRaWANLoRaLong-range (km), low-bandwidth. Smart agriculture, city infrastructure.
Zigbee802.15.4Mesh networks. Smart home lighting and sensors.

Sensor Types

Temperature: Thermocouples, thermistors, digital (DS18B20). Used in HVAC, industrial process control.

Motion: PIR (passive infrared) sensors detect human presence. Used in security systems, automatic lighting.

Proximity: Ultrasonic, IR, LiDAR. Used in parking sensors, collision avoidance.

Environmental: Humidity (DHT22), air quality (MQ-135), gas (MQ-2). Used in weather stations, air purifiers.

Pressure: BMP280, MPU6050. Used in weather forecasting, altitude measurement.

Real-World Applications

Smart Home: Nest thermostat learns your schedule and adjusts temperature automatically. Philips Hue lights turn on when you enter a room. August smart lock lets you grant temporary access to guests.

Industrial IoT (IIoT): Vibration sensors on motors predict bearing failures 2 weeks in advance. Temperature sensors in server rooms trigger cooling before overheating. GPS trackers on shipping containers provide real-time location. Industrial IoT covers this in detail.

Healthcare: Smart insulin pumps adjust dosage based on continuous glucose monitoring. Wearable ECG patches alert cardiologists to arrhythmias in real time.

Agriculture: Soil moisture sensors trigger irrigation only when needed, reducing water usage by 30%. Drone-mounted multispectral cameras detect crop stress before visible signs appear.

Common Mistakes

  1. No security planning: Default passwords, unencrypted communication, and no update mechanism turn devices into botnet fodder. The Mirai botnet exploited exactly these gaps.

  2. Overpowered hardware: Using a Raspberry Pi to read one temperature sensor when an ESP32 costing 1/10th the price would work. Match hardware to requirements.

  3. Ignoring power consumption: Battery-powered devices that transmit every second will die in days. Optimize sleep cycles and data frequency for years of battery life.

  4. No offline behavior: Devices that require cloud connectivity for basic functionality frustrate users. Design for local operation with cloud sync.

  5. Inconsistent data formats: Every device sending data in a different format creates parsing nightmares. Standardize on JSON or Protocol Buffers from day one.

Practice Questions

  1. What are the four layers of IoT architecture? Device layer (sensors/actuators), gateway layer (connectivity/processing), cloud layer (storage/analytics), application layer (user interface).

  2. What is the difference between a sensor and an actuator? A sensor measures physical quantities (temperature, light, motion). An actuator performs physical actions (turn on a motor, open a valve, light an LED).

  3. When would you use MQTT over HTTP? MQTT when devices are power-constrained, on unreliable networks, or need pub/sub messaging. HTTP when you need simple RESTful communication and have sufficient bandwidth.

  4. Why is a gateway needed in IoT? Gateways handle protocol translation (sensors may speak Zigbee, cloud speaks MQTT), local processing for low latency, and security (isolating devices from the internet).

  5. What was the Mirai botnet and why does it matter? Mirai infected IoT devices using default passwords and used them to launch massive DDoS attacks. It demonstrated that unsecured IoT devices threaten the entire internet.

Mini Project

Build a simulated temperature monitoring system:

import random, time, json

class TemperatureSensor:
    def __init__(self, device_id: str, location: str):
        self.device_id = device_id
        self.location = location

    def read(self) -> float:
        return round(random.uniform(18.0, 30.0), 1)

class IoTGateway:
    def __init__(self):
        self.sensors = []
        self.readings = []

    def add_sensor(self, sensor: TemperatureSensor):
        self.sensors.append(sensor)

    def collect_and_upload(self):
        for sensor in self.sensors:
            temp = sensor.read()
            reading = {
                "device_id": sensor.device_id,
                "location": sensor.location,
                "temperature": temp,
                "timestamp": time.time(),
            }
            self.readings.append(reading)
            print(json.dumps(reading))

        # Check for alerts
        for r in self.readings[-len(self.sensors):]:
            if r["temperature"] > 28.0:
                print(f"ALERT: High temperature at {r['location']}! ({r['temperature']}°C)")

# Simulate
gateway = IoTGateway()
gateway.add_sensor(TemperatureSensor("sensor-1", "Living Room"))
gateway.add_sensor(TemperatureSensor("sensor-2", "Kitchen"))
gateway.add_sensor(TemperatureSensor("sensor-3", "Garage"))

print("Collecting sensor data (3 rounds):")
for _ in range(3):
    gateway.collect_and_upload()
    time.sleep(0.5)

Expected output:

Collecting sensor data (3 rounds):
{"device_id": "sensor-1", "location": "Living Room", "temperature": 23.4, ...}
{"device_id": "sensor-2", "location": "Kitchen", "temperature": 26.8, ...}
{"device_id": "sensor-3", "location": "Garage", "temperature": 29.2, ...}
ALERT: High temperature at Garage! (29.2°C)
...

Cross-References

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro