- Mohit Sharma
Internet of Things and Urban Sensing
©2019 Mohit, NYU CUSP
https://slides.com/mohitsharma44/urban-sensing-2019/live
https://github.com/Mohitsharma44/CUSP-GX-6004-C
mohit sharma (mohit.sharma@nyu.edu)
Day 1 |
---|
Introduction to IoT - What is IoT - Why IoT |
Communication Models |
Introduction to using Raspberry Pi as an IoT module - What is a Raspberry Pi - Using Raspberry Pi as a platform for prototyping |
Hands-on - Demo installing OS on Raspberry Pi - Refresher on basic Linux commands - First login and setting things up for next session |
Go Crazy with the Pi's for the rest of the day!! |
mohit sharma (mohit.sharma@nyu.edu)
mohit sharma (mohit.sharma@nyu.edu)
mohit sharma (mohit.sharma@nyu.edu)
Connect to WiFi: iotclass-5,
(authentication: iotclass)
Do Not Stay on NYU or NYU-legacy or any other AP
If you cannot see iotclass-5, let me know.
mohit sharma (mohit.sharma@nyu.edu)
Despite this, nobody seems to agree on what Internet of Things (IoT) actually is.
The only thing people agree on is that whatever it is, it is worth a lot of money.
mohit sharma (mohit.sharma@nyu.edu)
And where there is a lot of money, there is a lot of competition, which means there is a lot of confusion!
But in order to proceed, we need to Define IoT
mohit sharma (mohit.sharma@nyu.edu)
Before we define IoT, let's look at why IoT?
mohit sharma (mohit.sharma@nyu.edu)
mohit sharma (mohit.sharma@nyu.edu)
A very simple definition would go something like this:
The IoT is what we get when we connect `Things`, which are not operated by humans, to the Internet.
mohit sharma (mohit.sharma@nyu.edu)
Something you can connect to..
Something that can connect to you..
Something that is connected to internet..
Something that senses..
Something that crunches and exchanges data..
Something that automates..
Something that connects to other things..
mohit sharma (mohit.sharma@nyu.edu)
From an operational perspective, it is useful to think technically about how the IoT devices connect and communicate. (RFC 7452)
Device to Device Communication
Device to Cloud Communication
Device to Gateway Model
Back-End Data-Sharing Model
mohit sharma (mohit.sharma@nyu.edu)
Device to Device (D2D) Communication
Devices will be the main users in the IoT ecosystem and thus D2D communication[1]
Smart Bulb
Smart Switch
Wireless Network
e.g. Bluetooth, Z-Wave, ZigBee
These network allows devices that adhere to a particular communication protocol to communicate.
Eg. Home Automation -- lights, door locks, thermostat etc.
mohit sharma (mohit.sharma@nyu.edu)
Device to Cloud (D2C) Communication
In this model, the IoT device connects directly to an Internet cloud application service provider.
Device with Sound sensor
Device with CO
sensor
HTTP, TLS, TCP, IP
CoAP, UDP, IP
Application Server
Eg. NEST, Samsung Smart TVs, etc.
CUSP's $4.2M NSF-funded project -- SONYC uses this model in production!
And so will we, in this course!
mohit sharma (mohit.sharma@nyu.edu)
Device to Gateway (D2G) Communication
In this model, the IoT device connects to an Internet cloud application service provider via Local Gateway.
Device with Sound sensor
Device with CO
sensor
HTTP, TLS,
TCP, IP
CoAP, UDP,
IP
Application Server
Local Gateway
IPv4 / IPv6
Bluetooth, WiFi, Ethernet, LR-WPAN
mohit sharma (mohit.sharma@nyu.edu)
Back-End Data-Sharing Model
Users can export and analyze the smart object data from a cloud service in combination with data from other sources.
Device with Sound sensor
Device with CO
sensor
HTTP, TLS,
TCP, IP
CoAP, UDP,
IP
Application Server 1
Application Server 2
Application Server 3
Protocol Buffers,
JSON
mohit sharma (mohit.sharma@nyu.edu)
What governs the selection of communication models?
Technical complexity
Availability of resources
Open versus Proprietary nature of the IoT devices
Device interoperability
Enabling user (adding value to the user)
mohit sharma (mohit.sharma@nyu.edu)
mohit sharma (mohit.sharma@nyu.edu)
Total of 4 USB 2.0 ports
10/100 Mbps Eth port
28 GPIO Pins*
MicroSD card
Video
Out
5V 2A
DC_supply
mohit sharma (mohit.sharma@nyu.edu)
UART / serial communication (Pin 8, 10)
Communicate with external peripheral like Arduino (I2CPin 3, 5, 27, 28)
Pulse code modulation (Pin 12, 35, 38, 40)
General Purpose Clock (Pin 7, 29, 31) and so on ...
You may want to check out: https://pinout.xyz
mohit sharma (mohit.sharma@nyu.edu)
image credit: http://www.flaticon.com/authors/eucalyp
SensorX
Rpi
Data!
mohit sharma (mohit.sharma@nyu.edu)
SensorX
Rpi
Data!
0.46020967, 2.34629644, 0.16289884, 1.7682243 , 1.09522783
0, 1
Analog
Digital
Example
mohit sharma (mohit.sharma@nyu.edu)
SensorX
Rpi
0, 1
Analog
Digital
Example
ADC
ADC
1.10, 1.66, 2.21, 2.77, 3.33, 3.89, 4.44, 5.00
mohit sharma (mohit.sharma@nyu.edu)
1.10, 1.66, 2.21, 2.77, 3.33, 3.89, 4.44, 5.00
0, 1,
10, 11,
100, 101, 110, 111
Analog
Digital
ADC
mohit sharma (mohit.sharma@nyu.edu)
Debian optimized for the Raspberry Pi hardware
Debian has a reputation within the Linux community for being very high-quality, stable and scalable.
Extensive and friendly user community.
mohit sharma (mohit.sharma@nyu.edu)
Default Raspbian Jessie [Lite and Desktop]
Customized Raspbian
Other OS [Ubuntu, Windows IoT Core]
mohit sharma (mohit.sharma@nyu.edu)
Download the Raspbian Stretch image
Prep the micro SD card
Flash micro SD card
mohit sharma (mohit.sharma@nyu.edu)
Download PiBakery
Fire up PiBakery
mohit sharma (mohit.sharma@nyu.edu)
Windows 10 IoT Core: https://developer.microsoft.com/en-us/windows/iot/getstarted
* I haven't tested these in-depth
mohit sharma (mohit.sharma@nyu.edu)
mohit sharma (mohit.sharma@nyu.edu)
Connect to WiFi: iotclass-5, (authentication: iotclass5) Go to: http://192.168.1.99:8888 (note the port number) Login with your NYU net-id Download the ssh key (Make note of the IP address (this is where your Pi is waiting for you!!)
mohit sharma (mohit.sharma@nyu.edu)
mohit sharma (mohit.sharma@nyu.edu)
Connect to WiFi: iotclass-5,
(authentication: iotclass)
Do Not Stay on NYU or NYU-legacy or any other AP
If you cannot see iotclass-5, let me know*.
* well, I really dont have spare laptops, so just peep into your neighbors
mohit sharma (mohit.sharma@nyu.edu)
mohit sharma (mohit.sharma@nyu.edu)
(Check): sudo dpkg -L wireless-tools (If not installed): sudo apt-get install wireless-tools (Install): sudo apt-get update (Install): sudo apt-get install curl python-pycurl (Install): sudo pip install psutils
mohit sharma (mohit.sharma@nyu.edu)
Link: http://etc.ch/2w8c
mohit sharma (mohit.sharma@nyu.edu)