Introduction
This course covers some introductory topics about the Internet of Things and helps set up hardware.
In this lesson, we will cover:
-
What is the “Internet of Things”?
-
IoT Devices
-
Setting up Devices
-
IoT Applications
-
Examples of IoT Devices
What is the “Internet of Things”?
The term “Internet of Things” (IoT) was coined in 1999 to describe the connection of the internet to the physical world through sensors. Since then, the term has been used to describe any device that interacts with the surrounding physical world, whether by collecting data from sensors or providing real-world interactions through actuators (devices that perform operations such as turning on switches or lighting LEDs), often connected to other devices or the internet.
Sensors collect information from the world, such as measuring speed, temperature, or location.
Actuators convert electrical signals into real-world interactions, such as triggering switches, turning on lights, making sounds, or sending control signals to other hardware (e.g., turning on power outlets).
IoT as a technical field is not just about devices; it also includes cloud-based services that can process sensor data or send requests to actuators connected to IoT devices. It also includes devices that do not require an internet connection, often referred to as edge devices. These devices can process and respond to sensor data independently, often using AI models trained in the cloud.
IoT is a rapidly developing technical field. By the end of 2020, it was expected that 30 billion IoT devices would be deployed and connected to the internet. Looking forward, it is anticipated that by 2025, IoT devices will collect nearly 80 ZB of data.
This data is key to the success of IoT. To become a successful IoT developer, one needs to understand what data to collect, how to collect it, how to make decisions based on the data, and how to interact with the physical world using these decisions when necessary.
IoT Devices
The “T” in IoT stands for “Things”—devices that interact with the surrounding physical world by collecting data from sensors or providing real-world interactions through actuators.
Devices used for production or commercial purposes, such as consumer fitness trackers or industrial machine controllers, are often custom-built. They use custom circuit boards and may even have custom processors designed to meet specific task requirements, whether small enough to fit on a wrist or rugged enough to operate in high-temperature, high-stress, or high-vibration factory environments.
As a developer learning IoT or creating device prototypes, you need to start with a developer kit. These are generic IoT devices designed for developers, often featuring functionalities not found on production devices, such as a set of external pins for connecting sensors or actuators, hardware for supporting debugging, or additional resources that would add unnecessary costs during large manufacturing runs.
These development kits typically fall into two categories: microcontrollers and single-board computers. Both will be introduced here, and we will cover them in more detail in the next lesson.
Microcontrollers
A microcontroller (also known as MCU, short for microcontroller unit) is a small computer that includes:
One or more central processing units (CPU) – the “brain” of the microcontroller, used to run programs
Memory (RAM and program memory) – the place to store programs, data, and variables
Programmable input/output (I/O) connections – for communicating with external peripherals (connected devices) such as sensors and actuators
Microcontrollers are typically low-cost computing devices, with the average price of microcontrollers used in custom hardware dropping to around $0.50, and some devices even costing as little as $0.03. Development kits start at around $4, with costs increasing as more features are added.
Microcontrollers are designed to perform a limited number of very specific tasks through programming, rather than functioning as general-purpose computers like PCs or Macs. Except in very specialized scenarios, you cannot connect a display, keyboard, and mouse and use them for general tasks.
Microcontroller development kits usually come with additional sensors and actuators. Most boards will have one or more programmable LEDs, along with other devices like standard plugs to add more sensors or actuators using ecosystems from different manufacturers or built-in sensors (usually the most popular sensors like temperature sensors). Some microcontrollers have built-in wireless connectivity (e.g., Bluetooth or WiFi), or an additional microcontroller on board to add this connectivity.
Single-board Computers
A single-board computer is a small computing device that contains all the elements of a complete computer on a single small board. These devices are specifications close to desktop computers, laptops, or Macs, running full operating systems but are smaller, consume less power, and are much cheaper.
Raspberry Pi is one of the most popular single-board computers.
Like microcontrollers, single-board computers also have CPUs, memory, and input/output pins, but they also have additional features such as graphics chips for connecting displays, audio output, and USB ports for connecting keyboards, mice, and other standard USB devices (like webcams or external storage). Programs and operating systems are stored on an SD card or hard drive rather than built into the storage chips on the board.
Single-board computers are fully functional computers and can be programmed in any language. IoT devices are often programmed using Python.
Hardware Choices for the Remaining Course
All subsequent courses include assignments that interact with the physical world using IoT devices and communicate with the cloud. Each lesson supports 3 device choices – Arduino (using Seeed Studios Wio Terminal) or single-board computers, physical devices (Raspberry Pi 4) or virtual single-board computers running on PCs or Macs.
The choice of hardware depends on yourself – it depends on what hardware is available at home or school and what programming languages you understand or plan to learn. Both hardware variants will use the same sensor ecosystem, so if you start down one path, you can switch to another without replacing most of the kit. Virtual single-board computers are equivalent to learning on a Raspberry Pi, and if you eventually use devices and sensors, most of the code can transfer to the Pi.
Arduino Development Kit
If you are interested in learning microcontroller development, you can complete assignments using Arduino devices. You will need a basic understanding of C/C++ programming, as the course only teaches code related to the Arduino framework, the sensors and actuators used, and the libraries for interacting with the cloud.
Assignments will be developed using Visual Studio Code with the PlatformIO extension. You can also use the Arduino IDE.
Single-board Computer Development Kit
If you are interested in learning IoT development using single-board computers, you can complete assignments using Raspberry Pi or virtual devices running on PCs or Macs.
You will need a basic understanding of Python programming, as these courses only teach code related to the sensors and actuators used and the libraries for interacting with the cloud.
Assignments will use Visual Studio Code.
If you are using a Raspberry Pi, you can run your Pi with the full desktop version of Raspberry Pi OS and do all your coding directly on the Pi using the Raspberry Pi OS version of VS Code, or you can run your Pi in headless mode and use VS Code with the remote SSH extension from a PC or Mac, which allows you to connect to the Pi and edit, debug, and run code as if coding directly on it.
If you choose the virtual device option, you will code directly on your computer. You will use a tool to simulate sensors and actuators, providing definable sensor values and displaying the results of actuators on screen.
Setting Up Devices
Before you start programming IoT devices, you need to do a little setup. Depending on the device you will use, please follow the relevant instructions below.
These instructions include links to third-party websites provided by the creators of the hardware or tools you will be using, to ensure you always have the latest instructions for various tools and hardware.
Complete the relevant guides to set up your device and complete the “Hello World” project. This will be the first step in creating an IoT night light in this introductory section of 4 courses.
-
Arduino – Wio Terminal -
Single-board Computer – Raspberry Pi -
Single-board Computer – Virtual Device
(For specific links to the above 3 items, please refer to the original text)
IoT Applications
The Internet of Things covers a wide range of use cases and a broad audience:
-
Consumer IoT -
Commercial IoT -
Industrial IoT -
Infrastructure IoT
Consumer IoT
Consumer IoT refers to IoT devices purchased and used by consumers at home. Some of these devices are quite useful, such as smart speakers, smart heating systems, and robotic vacuum cleaners. The practicality of other products is questionable, such as voice-controlled faucets, which means you cannot turn them off because they cannot hear your voice over the sound of running water.
Consumer IoT devices are helping people, especially the 1 billion disabled individuals, achieve more in the surrounding environment. Robotic vacuum cleaners can provide clean floors for those who are mobility-impaired and cannot vacuum themselves, voice-controlled ovens allow people with limited vision or motor control to heat the oven just by voice, and health monitoring devices enable patients to monitor chronic conditions and update their status more frequently and in detail. These devices are becoming so common that even young children consider them part of daily life, such as students during the COVID-19 pandemic setting timers on smart home devices to track their homework or setting alarms to remind them of upcoming classes.
Commercial IoT
Commercial IoT encompasses the use of IoT in the workplace. In office environments, there may be sensors and motion detectors to manage lighting and heating, turning off lights and heating when not needed, thereby reducing costs and carbon emissions. In factories, IoT devices can monitor safety hazards, such as workers not wearing hard hats or noise levels reaching dangerous levels. In retail, IoT devices can measure the temperature of refrigeration units, alerting store owners if refrigerators or freezers exceed the required temperature range, or they can monitor items on shelves, guiding staff to restock sold-out products. The transportation industry increasingly relies on IoT to monitor vehicle locations, track road user mileage for tolls, track driver work hours and compliance with violations, or notify staff when vehicles are approaching garages for loading and unloading.
Industrial IoT (IIoT)
Industrial IoT (IIoT) involves the large-scale control and management of machinery using IoT devices. It encompasses a wide range of use cases, from factories to digital agriculture.
Factories use IoT devices in various ways. Multiple sensors can be used to monitor machinery, tracking information such as temperature, vibration, and rotation speed. This data can then be monitored to stop machines when they exceed certain tolerances – for example, shutting down a machine if it runs too hot. Over time, this data can also be collected and analyzed for predictive maintenance, where AI models look at data that leads to failures and use that data to predict before other failures occur.
If the earth is to sustain a growing population, especially the 2 billion people living off subsistence farming in 500 million households, digital agriculture is critical. The scope of digital agriculture can range from sensors costing a few dollars to large-scale commercial facilities. Farmers can first monitor temperatures and use daily growth lengths to predict when crops can be harvested. They can connect soil moisture monitoring to automated watering systems to provide the necessary amount of water for plants. Farmers are even going further by using drones, satellite data, and AI to monitor crop growth, diseases, and soil quality across vast farmlands.
Infrastructure IoT
Infrastructure IoT is monitoring and controlling local and global infrastructure that people use every day.
Smart cities are urban areas that use IoT devices to collect data about the city and utilize that data to improve how the city operates. These cities are often operated in collaboration with local governments, academia, and local businesses, tracking and managing various affairs from traffic to parking and pollution. For example, in Copenhagen, Denmark, air pollution is of great concern to local residents, so measurements are taken and data is used to provide information about the cleanest biking and jogging routes.
Smart grids can better analyze electricity demand by collecting usage data from individual households. This data can guide national-level decisions, including where to build new power plants, and can also guide individual-level decisions, allowing users to see how much electricity they are using, when they are using it, and even offering suggestions on how to reduce costs, such as charging electric vehicles at night.
Examples of IoT Devices You Might Have Around You
-
Smart Speakers
-
Refrigerators, Dishwashers, Ovens, and Microwaves -
Solar Panel Power Monitors -
Smart Plugs -
Video Doorbells and Security Cameras -
Smart Thermostats -
Garage Door Openers -
Home Entertainment Systems and Voice-Controlled TVs -
Lights -
Fitness and Health Trackers
All these types of devices have sensors and/or actuators and communicate with the internet. We can check through our phones whether the garage door is open and have the smart speaker close it. We can even set it as a timer, so if it is still open at night, it will close automatically. When the doorbell rings, no matter where we are, we can see who is there through our phones and talk to them through the doorbell’s built-in speaker and microphone. We can monitor blood sugar, heart rates, and sleep patterns, looking for data patterns to improve our self-health.