INTRO COURSE · 9 CHAPTERS · 18 QUIZ QUESTIONS

The Internet of Things, from sensor to app

Each chapter has pictures and two questions. The questions are written as cases where several answers sound reasonable. Allow 25 to 30 minutes.

01 / 09

The four layers

IoT means physical things that measure or control something and are connected. Almost every IoT system has the same four layers, and data flows from left to right in the picture.

DeviceNetworkCloudAppmeasuressendsstoresshowscommands travel back the same way
Readings travel from the device to the app. Commands, such as "turn on the heating", travel the other way.
  • The device device
    A small computer with sensors. It measures, and can sometimes control something.
  • Connectivity connectivity
    The radio that carries the data: Wi-Fi, Bluetooth, cellular or LoRaWAN.
  • The hub or the cloud gateway / cloud
    Receives, stores and processes data from many devices.
  • The application app / dashboard
    Where the user sees the data and decides what should happen.

When something goes wrong, the first question is always which layer. Follow the value from the device onwards until it stops being right.

QUESTION 1 OF 18

A customer complains that the app shows 21 degrees although the room is 26. You can see that the device measures correctly and that the cloud has the right value stored. Where is the fault most likely?

QUESTION 2 OF 18

Which statement about commands from app to device is most accurate?

02 / 09

The device

The heart of the device is a microcontroller: processor, memory and radio in a single chip. It runs one program, over and over. Around it sit sensors that measure the world and actuators that act on it.

MicrocontrollerSensormeasuresActuatorcontrolsradiobattery or mains
The sensor is the device's senses, the actuator its hands. A smart plug is a microcontroller, a relay and a Wi-Fi radio in a plastic case.
  • Sensor sensor
    Measures something: temperature, humidity, motion, light, position, current.
  • Actuator actuator
    Does something: a relay, a motor, a valve, a lamp, a buzzer.
  • Firmware firmware
    The program that lives in the device. This is what gets updated remotely.
  • Local control
    Anything that must work without a network belongs in the device. The cloud handles settings and overview.

Two kinds of small computer are often confused. The difference decides what each can be used for.

ESP32
microcontroller
Raspberry Pi
single-board computer
PRICE
about SEK 100
SEK 1,000 to 4,000
MEMORY
about 0.5 MB
1 to 16 GB
SYSTEM
none, a single program
Linux
SLEEP
microamps, wakes in milliseconds
draws power even when idle
ROLE
the device
the hub

QUESTION 3 OF 18

You are building a door sensor that must run for three years on a coin cell. What is the decisive reason to choose a microcontroller over a small Raspberry Pi?

QUESTION 4 OF 18

A smart thermostat has a temperature sensor, a relay and Wi-Fi. What should happen to the heating if Wi-Fi goes down, in a well-built product?

03 / 09

The relay, the most common actuator

A relay is a switch controlled by another current. A weak control signal from the microcontroller turns a completely separate and much more powerful circuit on or off. Press the button and see what happens.

air gap, no electrical contactESP32coilcontactControl circuit · 3.3 VLoad circuit · 230 V
Off: no current in the coil. A spring holds the contact open and the lamp is dark.

It is the magnetic field that crosses the gap, not the current. That is why 3.3-volt electronics can control 230 volts without ever touching the dangerous voltage. The click you hear from a thermostat or a fuse box is the contact arm snapping shut.

  • Solid-state relay solid state relay
    The same job with no moving parts. Silent, fast and not worn out by frequent switching. Runs warmer and lets a small leakage current through even when off.
  • Troubleshooting
    If the relay clicks, the control side works. The fault is then in the contact or in the load.

QUESTION 5 OF 18

A relay has to switch a heating element on and off several times a minute, around the clock. What is the strongest argument for a solid-state relay?

QUESTION 6 OF 18

The relay in a smart plug clicks audibly, but the lamp does not light. Where is the fault most likely?

04 / 09

Connectivity

No radio is best at everything. The choice is a trade-off between range, power consumption and how much data needs to be sent. Long range and low power are possible together, but only if the amount of data is tiny and is allowed to take time.

Bluetooth LE · 10–50 mWi-Fi · 30–100 mLoRaWAN · 2–15 kmNB-IoT / LTE-M · cellular coverage10 m100 m1 km10 km
Typical range. The scale is logarithmic: each step to the right is ten times further. Walls, terrain and antenna move the limits in both directions.
  • Bluetooth LE
    power: lowdata: small to medium
    Talks to a phone nearby. Wearables, locks, health sensors.
  • Wi-Fi
    power: highdata: large
    Already in the home. Cameras and gadgets that plug into a wall socket.
  • LoRaWAN
    power: very lowdata: very small
    A few readings over several kilometres. You set up your own gateways or rent capacity in an existing network.
  • NB-IoT and LTE-M
    power: lowdata: small
    Cellular networks built for things. The operator owns the infrastructure and you pay a subscription per device.
  • Private 5G
    power: highdata: very large
    Your own cellular network on a site. High capacity, low latency and full control over who connects. Factories, ports, mines.

QUESTION 7 OF 18

A city wants to measure the fill level of 400 waste bins across town once a day. The batteries must last five years and the city does not want to own any radio infrastructure. What fits best?

QUESTION 8 OF 18

Why does LoRaWAN reach several kilometres on so little power?

05 / 09

MQTT, how devices talk

MQTT is the most common protocol in IoT. Devices never talk directly to each other. They send short messages to a switchboard in the middle, a broker, which hands them out to everyone who has asked for that particular topic.

topic: home/kitchen/temperaturevalue: 21.5SensorpublishesBrokerAppsubscribesDatabasesubscribes
The sensor does not know who is listening. It just publishes on its topic.
  • Publish and subscribe publish / subscribe
    Send a message on a topic, or ask the broker for everything that arrives on a topic.
  • Topic topic
    The address, written as a path: home/kitchen/temperature.
  • Delivery level (QoS 0, 1, 2) QoS 0, 1, 2
    At most once, at least once or exactly once. Applies to delivery to those already subscribed.
  • Retained message retain
    The broker stores the latest value on the topic and gives it straight away to anyone who subscribes later.
  • Last will last will
    A message the device leaves with the broker in advance. The broker publishes it if the connection drops unexpectedly.

QUESTION 9 OF 18

A door sensor publishes "open" and goes to sleep. An hour later the app starts and subscribes to the topic. What is needed for the app to learn immediately that the door is open?

QUESTION 10 OF 18

A device loses power without warning. How does the rest of the system find out that it is gone?

06 / 09

Where the product questions get hard

Technology is rarely what sinks an IoT product. The gaps between the layers do, and this is where product skills matter most.

  • Onboarding (provisioning) provisioning
    How does the customer get the device onto their network without giving up? This is where many products lose their users.
  • Remote updates (OTA) OTA, over-the-air
    Firmware must be replaceable remotely. A safe design writes the new version next to the old one and switches only once the new one has been verified. If it fails to start, the device rolls back.
  • Offline mode
    What does the device do when the network disappears? Does it store the readings and send them later, and what does the app show in the meantime?
  • Security
    Every device is a way into the customer's network. Identity and encryption have to be there from the start.
  • Unit cost
    Every device sold costs money to make, and hardware faults cannot be fixed with a new release.

The sixth question is power. The battery lasts for years only if the device sleeps almost all the time. The radio is usually the biggest consumer, so the number of transmissions sets the battery life almost directly.

one hourasleepwakesmeasuressendsthe thin line enlarged: about 2 seconds awake
An example with one reading per hour. How often the product measures is therefore as much a product decision as a technical one.

QUESTION 11 OF 18

A remote update is interrupted halfway when the battery runs out. What protects the device from becoming unusable?

QUESTION 12 OF 18

A sensor sends every ten minutes and the battery lasts a year. The product manager wants data every minute. Roughly what happens to battery life, if transmission dominates consumption?

07 / 09

Where does the AI model live?

A microcontroller has about half a megabyte of working memory. A small language model needs several gigabytes, thousands of times more. So the work is split up.

The deviceabout 0.5 MB memoryTinyML: wake words,vibrations, gesturesHub or cloudseveral GB memorylanguage model,analysis, historyreadingsdecisions
The device stays cheap and power-efficient. The heavy thinking happens where memory and compute are available.
  • TinyML
    Very small models that run directly on the microcontroller. They recognise a pattern, such as a wake word or a motor starting to vibrate wrongly. The device can then send a conclusion instead of raw data.
  • Edge computing edge computing
    Computing close to the device, for example on a server at the site, instead of in the cloud. Gives faster responses, works without internet and keeps the data inside the walls.

QUESTION 13 OF 18

A vibration sensor on a pump has to detect bearing faults. What is the main reason to run a small model on the device instead of sending raw data to the cloud?

QUESTION 14 OF 18

A factory wants a language model to summarise alarms for the operators. The data must not leave the site. Where is the model placed?

08 / 09

Defence and dual use

The defence sector uses the same four layers as everyone else. Much of the technology starts out civilian and is then called dual-use: the same sensor that monitors a pump in a factory can monitor a pump on a ship.

Maintenancesensors predict faultsin aircraft and vehiclesLogisticstracking equipmentand spare partsProtectionsensor networks aroundbases, ports and cablesProductionconnected machinesand tools in the factory
The two green ones are close to civilian industrial IoT. The two copper-coloured ones place tougher demands on security and radio.

The difference from civilian IoT lies in the requirements. Five things change how the product has to be built.

  • Radio silence (emission control) emission control
    Every transmission can be located and reveal where the device is. The device stores data locally and sends rarely, briefly and on command.
  • Jamming jamming
    An adversary can knock out radio and satellite navigation. The system must work disconnected and make decisions locally.
  • Sovereignty
    The data must stay in your own infrastructure: your own cloud, your own server or a network with no internet at all.
  • Protective security
    In Sweden the supplier normally needs a protective security agreement and security-vetted staff. The origin of components is reviewed. Exports of dual-use products are assessed by the export control authority, ISP.
  • Lifetime
    The systems are expected to last 20 to 30 years. Spare parts, updates and documentation have to last just as long.
Civilian sensor: transmits oftenIn the field: silent, then a short burststores locallyburst
In civilian IoT, silence saves battery. In the field it is about not being seen. Same technique, different reasons.

QUESTION 15 OF 18

Why is "always connected" a problem for a sensor in the field?

QUESTION 16 OF 18

A civilian IoT company is to become a subcontractor in a Swedish defence project involving sensitive information. What normally has to be in place before the work begins?

09 / 09

Thought experiment: the defence group, the platform company and the funder

This is an invented example for practising the roles. The parties are types, not real companies.

Three kinds of party often meet when civilian IoT is to be put to use in defence.

  • The platform company
    A civilian IoT company that sells connectivity, 4G/5G, cloud and edge in pre-configured packages, hosted in a public or sovereign cloud. It moves fast but has neither protective security arrangements nor defence customers.
  • The defence group
    Builds and maintains large systems: aircraft, sensors, command and control, underwater. It cannot build everything itself and increasingly brings in smaller companies as subcontractors.
  • The funder
    A public innovation agency with a civil-military programme, often run together with the armed forces. The programme aims to put civilian technology to use in defence.
Defence customerowns the needDefence groupsystem integratorPlatform companyIoT platformFunderco-fundsrequirementssubsystemgrantgrant
The defence group has the customer relationship, the protective security and the whole picture. The platform company can move fast in a well-defined subsystem. The grant lowers the risk for both in the early phase.

Three possible collaborations

  • Connected production
    threshold: low
    Private 5G and machine monitoring in the defence group's own factories. This is closest to what the platform company already sells to industry, and no operational defence data is involved.
  • Maintenance of delivered systems
    threshold: medium
    Sensor data from vehicles or aircraft is analysed on a server at the customer's site and produces maintenance forecasts. Requires sovereign hosting and a protective security agreement.
  • Sensor networks protecting infrastructure
    threshold: high
    The defence group provides the sensors and command systems, the platform company the connectivity, device management and edge layer. Radio silence, jamming and disconnected operation all apply in full.

How the funding route works

  • Accelerator grants
    For small and medium-sized companies with civilian technology that can meet a defence need. Often a modest sum, combined with an accelerator programme.
  • Collaboration projects
    For consortia of at least two parties, often over about a year. Suits a small and a large company applying together.
  • Test and evaluation
    Support for smaller companies to try their technology against military requirements in a test environment.
  • Thematic calls
    Aimed at a particular area or region, often with larger sums per project.

Calls open and close during the year, and amounts and terms change between them. In the assessment it often counts heavily that a defence actor has been involved and that the solution answers a stated military need. A small company applying alone therefore benefits from having a defence group or the armed forces on board.

  • The product role
    Someone has to turn a broad platform into a narrow, measurable use case that can be demonstrated within twelve months and described in an application. That is product work, not hardware work.

QUESTION 17 OF 18

In the thought experiment: which collaboration between the defence group and the platform company has the lowest threshold for getting started?

QUESTION 18 OF 18

The platform company wants to apply for funding from a civil-military innovation programme. What strengthens the application most?

RESULT

How it went

0 / 18

Answer the questions in the chapters and your result is counted here.

Questions to ask an IoT team

  1. Which devices and which connectivity do you build on today?
  2. Where do projects usually get stuck: in the hardware, in the connectivity or in the service on top?
  3. Can the platform run fully disconnected from the internet, on the customer's own server?
  4. How are devices updated remotely, and what happens if an update is interrupted?
  5. What happens to readings and commands when a device is offline?