Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connecting Things to the Web using Programmable Low-power WiFi Modules
1. Connecting Things to the Web using
Programmable Low-power WiFi Modules
Benedikt Ostermaier, Matthias Kovatsch, Silvia Santini
{ostermaier | kovatsch | santinis}@inf.ethz.ch
Sunday, 12 June 2011 Institute for Pervasive Computing / Distributed Systems Group
2. Internet of Things
Now
Optimized LoWPANs WiFi infrastructure
Matthias Kovatsch Connecting Things to the Web using Programmable Low-power WiFi Modules 2
3. Platform: Roving RN-131G
Programmable low-power WiFi module
44 MHz 32-bit RISC CPU
128 kB RAM, 2 kB non-volatile RAM
2 MB ROM, 8 MBit flash
Built-in IEEE 802.11b/g transceiver with on-board antenna
Rates of up to 54 Mbit/s
WEP, WPA-PSK and WPA2-PSK RN-131
Interfaces
UART, SPI, SDIO, RFID
10 GPIOs, 8 analog sensor I/Fs
Runs eCos with
lwIP TCP/IP stack
37 mm / 1.46 in
Matthias Kovatsch Connecting Things to the Web using Programmable Low-power WiFi Modules 3
4. Platform: Low-power
Current consumption
212 mA when active (max. TX)
4 µA when sleeping
Hardware support
Power Management Unit
Wake-up on sensor or timer events
Sleep mode
2 kB battery-backed RAM
Short wake-up time
(~35 ms until connected)
Matthias Kovatsch Connecting Things to the Web using Programmable Low-power WiFi Modules 4
5. Connecting to Things
Physical connection
electronic attached
Batteries
Power supply
Light switch Chair sensor sleeping
vs.
always on
Grid
Power outlet Room sign
prototype vs. ad-hoc
Matthias Kovatsch Connecting Things to the Web using Programmable Low-power WiFi Modules 5
6. Connecting Things to the Web
REST: maps nicely
to physical resources
Single-threaded
Web server
HTTP callbacks
(Webhooks)
RESTful API for sensors, ,
actuators, configuration
Matthias Kovatsch Connecting Things to the Web using Programmable Low-power WiFi Modules 6
7. Putting Things Together
http://lightswitch
/
/position
/callback
http://poweroutlet
/
/power
/consumption
Matthias Kovatsch Connecting Things to the Web using Programmable Low-power WiFi Modules 7
8. HTTP Callbacks on Sensor Events
POST /power HTTP/1.1
Host: poweroutlet
Content-Length: 4
Content-Type: text/plain
Connection: close
Referer: http://lightswitch/position
User-Agent: WiFiNode 0.4
Date: Sat, 01 Feb 2011 12:45:26 GMT
Last-Modified: Sat, 01 Feb 2011 12:45:26 GMT
X-SensorEvent-Count: 12
X-Last-Uptime: 88
true
http://lightswitch/ http://poweroutlet/power
Matthias Kovatsch Connecting Things to the Web using Programmable Low-power WiFi Modules 8
9. Z
Energy Efficiency Z
Z
Up to 212 mA when active
Maximize sleep time
Z
Only report events
Optimize wake-up and uptime
Z
Problem: Availability
Sleeping for sensors only
Heartbeats
Poll configuration updates
Setup with /sleep resource
or “double-click”
Button “sensor“ prototype
Matthias Kovatsch Connecting Things to the Web using Programmable Low-power WiFi Modules 9
10. 450
Evaluation
400
Wake-up Cycle
350
1. Enable CPU and RAM
Average uptime [ms]
300
2. Boot application Other
250 Callback
3. Find AP and connect*
DNS
4. Run DHCP* 200
DHCP
5. Run DNS* 150 WiFi
6. Open TCP socket 100
7. Perform HTTP callback
50
8. Close TCP socket
0
9. Go to sleep Office Home1 Home2
* can be optimized
Matthias Kovatsch Connecting Things to the Web using Programmable Low-power WiFi Modules 10
11. Results
Reed and PIR sensor
Battery-powered sensors
>99% data reception rate without retries
~300‘000 Callbacks with two AAA batteries
~8 years with 100 callbacks per day
Grid-powered actuators
~24 ms round trip time (~19 ms for Apache)
Real-time support
WiFi Plogg prototype
Matthias Kovatsch Connecting Things to the Web using Programmable Low-power WiFi Modules 11
12. Conclusions and Outlook
Sufficient battery life for event-based sensing
WiFi infrastructure greatly reduces deployment costs
However, may also introduce some hard-to-trace problems
Hardware support for real energy savings
Future Work
RFID bootstrapping
JavaScript programming
Subtle notification
device prototype
Matthias Kovatsch Connecting Things to the Web using Programmable Low-power WiFi Modules 12