Trygve Laugstøl <trygvis@trygvis.io>
foo/
foo.ino
config.h
Chip | CPU | Freq | RAM | Flash | Price |
---|---|---|---|---|---|
nRF52810 | Cortex-M4 | 64 MHz | 24k | 192k | $1.88 |
nRF52832 | Cortex-M4F | 32k | 256k | $2.54 | |
64k | 512k | $2.59 | |||
nRF52840 | Cortex-M4F | 256k | 1024k | $3.85 |
Module | Data Rate | Price |
---|---|---|
RN2483A-I/RM104 | $12.05 @ 250 | |
CMWX1ZZABZ-078 | SX1276 | $10.74 @ 1000 |
RF-LORA-868-SO | SX1272 | $16.55 @ 1000 |
Chip | Price |
---|---|
SX1281 | $3.23 |
SX1272 | $4.25 |
SX1276 | $4.25 |
SX1279 | $4.74 |
Module | Price |
---|---|
uBlox SARA-N210 | ~$10 @ 100 |
Sierra Wireless HL7800_1103933 | $15.72 |
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
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 |
Agents have one of two roles:
CONNECT
clientId
username
password
keepAlive
PINGREQ
PINGRESP
foo/bar/baz
foo/bar/?
foo/#
Message is kept by the server even after disconnect
CONNECT
PUBLISH
RETAIN
$app/$device/temperature
22.3
DISCONNECT
Later on:
SUBSCRIBE
$app/#/temperature
PUBLISH
$app/$device/temperature
22.3
Message sent when you disconnect
Client #1:
CONNECT
WILL TOPIC: $app/$device/online
WILL PAYLOAD: 0
PUBLISH
$app/$device/online
1
DISCONNECT
Broker
PUBLISH
$app/$device/online
0
The temperature sensor:
myapp/$device-id/temperature
myapp/$device-id/humidity
myapp/$device-id/altert
myapp/$device-id/command
The central application:
myapp/#/temperature
myapp/#/humidity
myapp/$device-id/command
PubSubClient is our MQTT client implementation.
mqtt
The central application is split:
myapp/#/temperature
myapp/#/humidity
myapp/$device-id/altert
myapp/$device-id/command
mqtt2
mqtt3
Wikipedia “Internet of Things”↩