IoT — Unit 4

Exam Ready Notes

Introduction to IoT Devices

IoT devices are specialised pieces of hardware designed to perform specific applications by transmitting data over the internet or other networks. They can be embedded into industrial equipment, medical devices, mobile hardware, and environmental sensors. Their primary objective is to establish smarter environments by linking cross-domain automation modules through constantly optimised integration standards.

Real-World Examples
Home Automation
Devices that allow users to remotely monitor and control the status of household appliances.
Industrial Applications
Machines that transmit operational health and monitoring data to a central server.
Transportation
Vehicles equipped to send real-time location information to cloud-based services.
Basic Building Blocks
1
Sensing
Onboard or attached sensors collect information such as temperature, light intensity, or humidity from the environment.
2
Actuation
Allows the device to act upon physical entities. A relay switch, for example, can turn an appliance on or off based on received commands.
3
Communication
Handles bidirectional data flow — sending collected information to the cloud and receiving commands from remote applications.
4
Analysis & Processing
Makes sense of collected data using onboard intelligence. The Raspberry Pi is a prominent example — a single-board mini-computer widely used for these tasks.
Hardware Architecture (Single-Board Computer)
Processor (CPU)
The "brain" that executes programs and processes all data.
Graphics (GPU)
Handles graphical output to reduce the load on the CPU.
Memory and Storage
Uses DDR RAM for fast processing and SD cards for OS and data storage.
Connectivity
RJ45/Ethernet for internet access and USB ports for peripherals like keyboards or printers.

Basic Building Blocks of an IoT Device

An IoT device consists of functional modules and hardware components that allow it to interact with the physical world and communicate over a network.

1 — Functional Modules
1
Sensing
Collects information from the environment using onboard or attached sensors — temperature, humidity, light intensity. This data can then be sent to cloud servers or other devices.
2
Actuation
IoT devices have actuators that take physical actions — for example, a relay switch turns an appliance on or off based on received commands.
3
Communication
Responsible for bidirectional data flow — sending collected data to cloud storage and receiving commands from remote applications.
4
Analysis & Processing
The "intelligence" of the device, responsible for making sense of collected data. Single-board computers like the Raspberry Pi are used for this.
2 — Hardware Architecture (Single-Board Computer)
Processor (CPU & GPU)
CPU executes programs and controls operations. GPU handles image and video processing to reduce CPU load.
Memory Interfaces
RAM (DDR1/DDR2/DDR3) for fast processing; NAND/NOR flash memory for firmware and boot storage.
Storage Interfaces
Since these devices often lack a hard disk, they use SD, MMC, or SDIO interfaces for OS and data storage.
Connectivity
Wired/wireless networking through RJ45/Ethernet and peripheral connection via USB Host ports.
I/O Interfaces
Audio/Video: HDMI for HD output, 3.5mm jack for audio, RCA for analog video. Communication: UART, SPI, I2C, CAN for sensors and ICs.
Interconnect (Bus)
Internal path connecting CPU, GPU, memory, and peripherals to transfer data and control signals.

Introduction to Raspberry Pi — Concept, Purpose & Application Areas

The Raspberry Pi (RPi) is a low-cost, credit card-sized Single-Board Computer (SBC) designed to be highly accessible and affordable, encouraging experimentation and learning in computing and electronics.

1 — Concept of Raspberry Pi
1
Single-Board Computer (SBC)
The entire computer — processor (CPU and GPU), memory (RAM), and I/O interfaces — is integrated onto one single printed circuit board.
2
Miniature yet Powerful
Despite its small size, it acts as a minicomputer. By connecting a keyboard, mouse, and display, it can perform tasks similar to a desktop PC.
3
Operating System
Primarily runs Raspberry Pi OS (Debian-based Linux). Also supports Ubuntu and Windows 10 IoT Core.
4
Hardware Interfacing
Includes 40-pin General Purpose Input/Output (GPIO) headers for direct interaction with physical electronic components.
2 — Purpose of Raspberry Pi
Educational Tool
Teaches programming languages (Python, Scratch), computer science concepts, and basic electronics to students and hobbyists.
Affordable Computing
Provides a functional computer at very low cost (starting from ~$4), making technology accessible to a wider audience.
Prototyping Platform
A popular tool for developing custom IoT devices and digital maker projects.
Bridge Between Hardware and Software
Allows users to write code that controls physical objects through sensors, motors, and actuators.
3 — Application Areas
1
Home Automation & IoT
Functions as a central smart home hub to control lights, security systems, and thermostats.
2
Media Centers
With software like Kodi or Plex, used as an affordable device for streaming high-definition video.
3
Networking and Servers
Configured as a low-cost web server, NAS device, or network-wide ad blocker (e.g., Pi-hole).
4
Robotics
Serves as the "brain" for DIY robots and drones, interacting with the physical world via GPIO pins.
5
Industrial Applications
Used for data logging, quality control systems, and building management.
6
Scientific Research
Used for field data collection such as environmental monitoring and weather stations.

Architecture of Raspberry Pi

The Raspberry Pi follows a System on Chip (SoC)-based architecture using an ARM processor. It describes how the processor, memory, storage, and I/O devices are connected and how data flows between them.

Key Architectural Layers
1
System on Chip (SoC)
The heart of the Raspberry Pi. Integrates the CPU, GPU, memory controller, and I/O controllers into a single chip to reduce size, cost, and power consumption.
2
Processor (CPU)
ARM-based processor (32-bit or 64-bit depending on model). Efficient, low-power, handles all computations and program execution.
3
Graphics Processing Unit (GPU)
Integrated inside the SoC. Handles video and graphics output, offloading these tasks from the CPU to enable high-quality multimedia rendering.
4
Memory (RAM)
Shared RAM architecture — CPU and GPU share the same memory. Directly connected to the SoC; stores running programs and temporary data.
5
Storage Architecture
No hard disk. Uses an SD or MicroSD card to store the operating system, applications, and user data.
Interfaces and Connectivity
I/O Architecture
Multiple interfaces: USB ports, HDMI for display, audio output, and networking via Ethernet, Wi-Fi, or Bluetooth.
GPIO Architecture
General Purpose Input Output (GPIO) pins allow digital input/output and support I2C, SPI, and UART communication protocols.
Bus Architecture
Internal data, address, and control buses transfer signals between the CPU, memory, and peripherals.
Power Architecture
Operates on low-voltage 5V DC power, typically supplied via a USB connector.
Operating System Layer
Bridge between hardware and software. The OS (usually Linux-based) manages hardware resources and supports multitasking.

Introduction to Arduino — Concept, Purpose & Application Areas

Arduino is an open-source electronics platform based on easy-to-use hardware and software. Born in Ivrea, Italy in 2005 as a collaborative project to provide a standardised environment for physical computing.

1 — The Concept of Arduino
Hardware

A Microcontroller Development Board. Unlike a laptop's microprocessor, this microcontroller is a compact IC designed to govern specific operations — containing a processor, memory, and I/O peripherals on a single chip.

Software

Code is written in the Arduino IDE using a simplified version of C++. This code, called a Sketch, is uploaded to the board via a USB cable.

2 — Purpose of Arduino
1
Bridging Software and the Physical World
Provides a uniform way to read Analog signals (temperature) and Digital signals (button presses) to manipulate physical reality.
2
Deterministic Execution
Offers real-time processing — ensuring a motor turns off at an exact millisecond, which is vital for robotics.
3
Rapid Prototyping
Acts as a Proof of Concept (PoC) tool using "Shields" (expansion boards) and a vast library ecosystem.
4
Educational Logic
Used to teach students about Embedded C, memory management, and Interrupt Handling.
3 — Application Areas
1
Home Automation
Controlling lamps, air conditioning, and refrigerators via smartphones using Bluetooth or Wi-Fi.
2
Public Utility Automation
Managing street lighting and traffic systems using infrared and light sensors.
3
Medical Equipment
Designing heartbeat monitors, thermometers, and open-source EEG/ECG devices.
4
Industrial Monitoring
Low-cost alternatives for remote control and monitoring of legacy industrial systems.
5
Defense
Serves as the heart of missile guidance systems and object-detection systems like RADAR.

Architecture of Arduino

Arduino uses a Microcontroller-centric design based on the Atmel AVR RISC family (e.g., ATmega328P on the Arduino Uno). Its architecture is optimised for controlling hardware and executing a single program repeatedly.

1 — Microcontroller (The Brain)

The heart of Arduino. Integrates the CPU, memory, and I/O peripherals on a single chip. Processes instructions from the uploaded sketch and manages data flow between all pins.

2 — Memory Architecture
Flash Memory
Program Space — Stores the sketch. Non-volatile; code remains even when power is off.
SRAM
Runtime Memory — Where variables are created and manipulated. Volatile; data lost on power-off.
EEPROM
Long-term Storage — Small non-volatile memory for configuration settings readable by the program.
3 — Input/Output (I/O) Pins
Digital Pins
Configured as inputs (read buttons/sensors) or outputs (drive LEDs/motors). Two states: HIGH (5V) or LOW (0V).
Analog Pins
Read voltages (0–5V) and convert to digital values using a built-in ADC. Essential for light and temperature sensors.
PWM Pins
Pulse Width Modulation — simulates analog output to control motor speed or LED brightness.
4 — Communication Protocols
UART — Universal Asynchronous Receiver/Transmitter
Used for serial communication via the USB port.
SPI — Serial Peripheral Interface
A fast protocol used for communicating with SD card readers or displays.
I2C — Inter-Integrated Circuit
A two-wire protocol used to connect multiple sensors or modules using very few pins.
5 — Power Management & Clock
Voltage Regulator

Converts external power supply (7–12V) down to the 5V or 3.3V required by the board's components.

Crystal Oscillator

Acts as the "heartbeat" — ticking 16 million times per second (16 MHz) to ensure precise timing of all instruction execution.

6 — USB Interface

Arduino boards feature a USB-to-Serial converter for communicating with a PC. Used both for uploading new code and for Serial Monitoring — viewing data sent from the Arduino to the computer screen.

Difference Between Raspberry Pi and Arduino

Raspberry Pi is a mini-computer that runs a full operating system, while Arduino is a microcontroller development board that runs a single program repeatedly.

FeatureRaspberry PiArduino
Basic NatureMini-computer running its own OS (Raspbian).Microcontroller development board — not a full computer.
FunctionalityRuns multiple programs simultaneously.Runs only one program repeatedly.
Processor FamilyARM (Advanced RISC Machine) family.AVR family (e.g., ATmega328P).
StorageNo onboard storage — relies on SD card.Onboard Flash memory for program storage.
Setup & ComplexityComplex — requires OS, libraries, and software.Plug-and-play; program runs immediately on power-on.
Power ManagementDifficult to power from a battery; must be shut down properly.Easily powered from a simple battery pack.
ConnectivityMultiple USB ports for various devices.Typically one USB port — mainly for programming.
ProgrammingPython recommended; also supports C, C++, Ruby.Arduino language based on C/C++.
Primary UseHigh-level computing: multimedia, servers, networking.Hardware control: LEDs, motors, sensors.
CostRelatively expensive compared to Arduino.Available at low cost.
In summary: Use Raspberry Pi when you need a full computer with multitasking and internet capabilities. Use Arduino when you need reliable, real-time hardware control at low cost.