IoT Workshop

Trygve Laugstøl <trygvis@trygvis.io>

What is IoT

What is IoT

  • Not “a computer connected to the internet”
    • Then it is really just another computer connected to the internet
  • Must be something else
    • It is simply devices that are resource constrained
      • Usually in more than one way
  • Autonomous operation, the connection might not be permanent

IoT is just a concept

  • The Internet of Things (IoT) is the network of physical devices, vehicles, home appliances and other items embedded with electronics, software, sensors, actuators, and connectivity which enables these objects to connect and exchange data.1

What is an IoT Device?

What is an IoT Device?

  • Constrained in (one or more of):
    • Memory
    • CPU
    • Network bandwidth and/or latency
    • Storage

Typical IoT chips - Bluetooth 4/5

Chip CPU Freq RAM Flash Price
nRF52810 Cortex-M4 64 M Hz 24k 192k $1.88
High perf ormance, entry -level Bl uetooth 4/ANT/2.4GHz SoC

nRF52832 Cortex-M4F 32k 256k $2.54 64k 512k $2.59 High performance Bluetooth 4/ANT/2.4GHz SoC

nRF52840 Cortex-M4F 256k 1024k $3.85 Advanced multi-protocol System-on-Chip Supporting: Bluetooth 5, ANT/ANT+, 802.15.4 and 2.4GHz proprietary

Typical IoT chips - Wi-Fi

Chip CPU Freq ROM RAM Price
ESP8266 Tensilica L106 160 MHz N/A ~50 kB < $1

ESP32 - dual cpu, Wi-Fi, Bluetooth 4 ESP32-D0WDQ6 2x Xtensa @ 160MHz $ 4.53 @ 10

ESP8266 details - Power usage

State Current usage
Off 0.5 µA
Deep sleep with RTC 20 µA
Light sleep (with Wi-Fi) 1 mA
Sleep with peripherials 15 mA
TX 170 mA

ESP8266 details - Arduino

https://github.com/esp8266/Arduino

Going back to basics

What is the internet again?

OSI model

  1. Physical Layer
  2. Data Link Layer
  3. Network Layer
  4. Transport Layer
  5. Session Layer
  6. Presentation Layer
  7. Application Layer

Layer 1: Physical Layer

  • 10BASE5, 10BASE2
  • 10BASE-T / 100BASE-TX / 1000BASE-TX
  • 802.11a/b/g/n PHY
  • RS-232

Layer 3: Network Layer

  • IP
  • ICMP
  • IPX

Layer 4: Transport Layer

  • TCP
  • UDP

Layer 5: Session Layer

  • “sockets”
  • NetBIOS

Layer 6: Presentation Layer

  • SSL

Layer 7: Application Layer

  • HTTP
  • DNS
  • MQTT
  • CoAP
  • (everything else..)

Details: IP

Details: IP

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

Lecture: ESP8266 aka NodeMCU aka ESP-12

Lecture: MQTT

MQTT

MQTT Implementations

  • Mosquitto
  • Eclipse Paho
  • Redis with MQTT connector

MQTT Cloud Connectors

  • Cloud
    • Amazon IoT
    • Google Cloud IoT
    • Microsoft Azure IoT
    • CloudMQTT
  • DIY
    • ThingMQ
    • HiveMQ

Notes

Assignments

  • Measure round trip time/latency. Measure UDP, TCP. Measure when the packet size is greater than the MTU

  • Measure ISR timing


  1. Wikipedia “Internet of Things”