Edexcel International Advanced Level Computer Science, point 12.2.1
Definition
The Internet of Things (IoT) is a network of physical objects ("things") that contain sensors, software and connectivity, so they can collect and exchange data over the Internet. Examples: smart thermostats, wearable fitness trackers, smart speakers, connected cars, smart meters, industrial sensors, smart street lights.
The IoT stack is the set of layers that together make an IoT system work, from the device at the bottom to the application at the top.
Function and why needed
- It lets everyday objects be monitored and controlled remotely.
- It collects data from the physical world on a huge scale, for analysis and automation.
- Thinking in a stack shows what is needed at each level, and where problems and security risks lie.
The stack
a. Device hardware
The physical "thing": an embedded system (11.1.5):
- Microcontroller, memory, sensors (temperature, motion, light), actuators (motors, valves, lights), a communication module (Wi-Fi, Bluetooth, cellular) and a power supply (often battery, so low power is vital).
- Constraints: small, cheap, low power, limited memory and processing.
b. Device software
- Operating system: often none (bare metal), a real-time OS (RTOS), or a small embedded Linux (11.1.5).
- Applications: the firmware program that reads the sensors, applies simple rules, controls actuators, and sends and receives data.
- Updates: over-the-air (OTA) updates for bug fixes and security patches.
c. Connectivity
How the device talks to the rest of the system.
Networks:
| Network | Range and use |
|---|---|
| Wi-Fi | Home and office, high data rate, higher power |
| Bluetooth / BLE | Short range, low power, wearables |
| Zigbee / Z-Wave | Low-power mesh for smart homes |
| Cellular (4G/5G) | Wide area, mobile devices, vehicles |
| LoRaWAN | Long range, very low power, low data rate for sensors |
Protocols (the rules for sending the data):
| Protocol | Notes |
|---|---|
| MQTT | Lightweight "publish/subscribe" messaging, ideal for small devices: devices publish readings to a topic and applications subscribe |
| HTTP/HTTPS | Web-style requests, heavier than MQTT |
| CoAP | Lightweight web-like protocol for constrained devices |
| TCP/IP, UDP | Underlying transport (12.1.2) |
| TLS | Encrypts the data (12.1.2) |
Many devices connect through a gateway, which collects data from local devices and forwards it to the cloud.
d. Cloud platform
The backend services that handle the data (12.4.1):
- Data collection: receiving and storing the huge stream of readings (databases and data lakes).
- Analytics: processing the data to find patterns, detect problems and predict (big data techniques and machine learning, 6.1 and 6.2).
- APIs (6.3.4): interfaces that let applications and other systems read the data and send commands to devices.
- Also device management (registration, updates), authentication and security.
e. Cloud applications
The software that people use: mobile apps, web dashboards, alerts and notifications, automated rules ("if the room is above 25 °C, switch the fan on") and reports.
How the layers work together: data flow
Benefits
- Remote monitoring and control.
- Automation: saves time and effort.
- Efficiency: energy and resource savings (smart heating, smart grids).
- Data-driven decisions, predictive maintenance (a machine reports a fault before it breaks).
- Convenience and safety (health monitors, smoke alarms).
Drawbacks and risks
- Security: many devices have weak passwords and no updates, and they can be hacked and used in attacks (botnets). Each device is a possible way into the network.
- Privacy: devices collect personal data (location, habits, voice).
- Reliability: depends on the network and cloud. If the connection fails, the device may stop working.
- Interoperability: different makers use different standards.
- Cost and complexity of managing thousands of devices.
- Battery life and updates of constrained devices.
- Large amounts of data to store and process.
Worked example
Task: describe the IoT stack for a smart plant-watering system in a greenhouse.
| Layer | In this system |
|---|---|
| Device hardware | MCU with a soil-moisture sensor, a water-pump actuator, a Wi-Fi module and a battery with solar panel |
| Device software | Firmware (C) that reads the sensor every 10 minutes, turns the pump on if the soil is too dry, and sends the reading |
| Connectivity | Wi-Fi to the greenhouse router, using MQTT over TLS to publish readings |
| Cloud platform | Stores the readings, analyses moisture trends and weather forecasts, and offers an API |
| Cloud application | A mobile app showing moisture graphs, sending an alert if a tank is empty, and letting the owner water manually |
Security measures: encrypt the data (TLS), unique device passwords, signed OTA updates, and limit what the device can do.
Exam tip: name the five layers in order and say what each contains. You may be asked to complete a diagram of an IoT system (device, connectivity, cloud platform, application). For issues, link security and privacy to the large number of cheap, connected devices.
Check yourself
What is the Internet of Things?
A network of physical objects with sensors, software and connectivity that collect and exchange data over the Internet.
State the five layers of the IoT stack
Device hardware, device software, connectivity, cloud platform and cloud applications.
Why is MQTT suited to IoT devices?
It is a lightweight publish/subscribe protocol with little overhead, which suits small, low-power devices.
What does the cloud platform do in an IoT system?
It collects and stores the device data, analyses it, and provides APIs so applications can use the data and control devices.
Give two security risks of IoT devices
Any two of: weak or default passwords; no software updates; unencrypted data; being hijacked for botnets; privacy of collected data.