building for the internet of things: hardware, sensors & the cloud
TRANSCRIPT
BUILDING FORTHE INTERNET
OF THINGS (IOT)How devices, data, networks and the cloud are changing our world
Nick LandrySenior Technical Evangelist - Microsoft
AgeofMobility.comgithub.com/ActiveNick
@ActiveNick
O V E R V I E W
Devices & “Things”
Networks & Protocols
“IoE”, “IoT”, “M2M” What?
Cloud Computing& Big Data
Part 1 Part 2
“A computer in every pot and chicken.”~ Steve Teixeira (2014)
A C H A N G I N G W O R L D – A N E W P E R S P E C T I V E
“A chicken in every pot.” ~ Henry IV of France – 17th Century
“A computer on every desk
and in every home.” ~ Bill Gates (1977)
W H AT I S T H E “ I N T E R N E T O F T H I N G S ”
Internet of thingsSyllabification (Inter•net of things)
noun
A proposed development of the Internet in which everyday objects have network connectivity, allowing them to send and receive data:
“If one thing can prevent the Internet of things from transforming the way we live and work, it will be a breakdown in security.”
Source: Oxford Dictionary, yep, it’s really in the Oxford Dictionary. It got added at the end of August, 2013
C I S C O ’ S D E F I N I T I O N
“Bringing together people, process, data and things to make networked connections more relevant and valuable than ever before”
Source: Cisco
Kevin Ashton first used the phrase “Internet of Things” in a 1999 presentation on RFID & the Supply Chain at Proctor and Gamble
Later, in 2009, he wrote about what he intended the phrase to mean in an article he wrote for RFID Journal entitled:
“That ‘Internet of Things’ Thing: In the real world, things matter more than ideas”
Source: Kevin Ashton, “That ‘Internet of Things’ Thing: In the real world, things matter more than ideas”, RFID Journal, June 2009
A P H R A S E C O I N E D
“Today computers—and, therefore, the Internet—are almost wholly dependent on human beings for information. Nearly all of the roughly 50 petabytes (a petabyte is 1,024 terabytes) of data available on the Internet were first captured and created by human beings—by typing, pressing a record button, taking a digital picture or scanning a bar code…”
Source: Kevin Ashton, “That ‘Internet of Things’ Thing: In the real world, things matter more than ideas”, RFID Journal, June 2009
“If we had computers that knew everything there was to know about things—using data they gathered without any help from us—we would be able to track and count everything, and greatly reduce waste, loss and cost. We would know when things needed replacing, repairing or recalling, and whether they were fresh or past their best.”
Source: Kevin Ashton, “That ‘Internet of Things’ Thing: In the real world, things matter more than ideas”, RFID Journal, June 2009
“We need to empower computers with their own means of gathering information, so they can see, hear and smell the world for themselves, in all its random glory. RFID and sensor technology enable computers to observe, identify and understand the world—without the limitations of human-entered data.”
Source: Kevin Ashton, “That ‘Internet of Things’ Thing: In the real world, things matter more than ideas”, RFID Journal, June 2009
A R O S E B Y A N Y O T H E R N A M E
Internet of Things (IoT)
Internet of Everything (IoE)
Pervasive Computing
Ubiquitous Computing (ubicomp)
Machine to Machine (M2M)
Industrial Internet
C O N N E C T E D “ T H I N G S ” V S P E O P L E
Source: Cisco & Internet World Stats
2003 2015 2020
Est. 50 Billion connected devices in 20202013 - Est. 10 Billion CONNECTED Devicesvs. Est. 7.14 Billion People World Population
2008
More connected devicesthan connected people
W A N T M O R E S TAT S ?
Source: Cisco
There is as much as
$14.4 Trillion of value at stake for the global
private sector over the next decade
Of the $1.2 Trillion
at stake for 2013, over
47% ($500 Billion)is being left on the
table
99.4% of physical objects are still
unconnected! Or Only 10 Billion of
the total 1.5 Trillionthings are connected
There are approximately 200 connectible things per person in the
world today! Wow!
B U I L D I N G A B E T T E R M O U S E T R A P
Source: “TEDx Warwick – Andy Stanford-Clark – Innovation Begins at Home”
M A K E R S PA C E S , P L A C E S A N D FA I R E S
Not just for adults! Many of these places make significant efforts to educate kids from elementary school age and up. Often this is made possible by STEM (or STEAM) grants.
C R O W D F U N D I N G
Since starting in 2009….
207,829 Projects
8,199,647 People
$1,604,316,630 Pledged
39% Projects Reached Goal
$2,478,287 Repeat Backers
Source: Kickstarter (March 19, 2015)
E N A B L E R S
Moore’s LawLow Power Wireless
Low Power CPUs
Cloud Computing
Cloud Data Storage
Rapid Prototyping
Standards
CrowdfundingToolsets & Libraries
W H AT I S A R D U I N O ?
• Open source hardware platform andretail product line.
• Easy to understand programming language based on C++
• Programmable via USB port using many of today’s PC operating systems (Windows, Mac, Linux)
• Very affordable and popular with a strong community
• Extensible hardware usingdaughterboard “shields”
• Extensible software usingC++ libraries
• http://arduino.cc
A R D U I N O B O A R D S , C L O N E S , A N D S H I E L D S
• Many flavors of Arduino boards available today
• Shields are used to expand hardware capabilities
• Arduino clones thanks to open source – many to choose from:• Sparkfun, SainSmart, Tinyduino, BLEduino, etc.
N E T D U I N O
• Open source hardware created by Secret Labs (NYC)• Netduino Plus 2
• Netduino Go
• Pinout-compatible with Arduino
• Programmable in C# with Visual Studio
• Runs .NET Micro Framework
. N E T M I C R O F R A M E W O R K
• Open source platform by Microsoft Open Technologies
• Enables you to write managed code C# applications using Visual Studio for resource constrained embedded devices
• Originally developed for the Microsoft SPOT smartwatch
• Latest version: 4.3 QFE2. Version 4.4 currently in beta
• http://www.netmf.com
• http://blogs.msdn.com/b/netmfteam
R A S P B E R R Y P I
• Full single-board computer with SoC• Average cost: $30 to $45• Model A, A+, B, B+ and Raspberry Pi 2 B
• Runs Linux – flavor of Debiancalled Raspbian• http://www.raspbian.org
• Huge accessory selection
• Programmable• Python• C# (Mono), etc.
• 5+ million units sold in 3 yearsof manufacture, technically thelargest computer manufacturer in UK!
5mm
32-bit x86 @ 400Mhz, single core
Industry-standard I/Os
DDR3 memory controller
15x15mm package
Scalar instruction set architecture
Arduino-compatible board
Quark CPU
256M RAM
USB, SD slot, Ethernet
I N T E L G A L I L E O A N D Q U A R K X 1 0 0 0
N E W W I N D O W S , N E W D E V I C E S
• Windows 10 is coming to the Raspberry Pi 2
• http://dev.windows.com/en-us/featured/raspberrypi2support
• Arduino
• Raspberry Pi
• .NET Gadgeteer
• Netduino
• Beagleboard
• Intel Galileo
• Intel Edison
• SharksCove
• Windows Embedded
• Android
• Spark Core
• Minnowboard Max
• Gemma
• Tinyduino
• Freescale
• Teensy
A N D L O T S , L O T S M O R E …
• Parallax
• pcDuino
• Espruino
• TI LaunchPad
• Picaxe
• Wiring
• littleBits
• FPGA Boards…
A R D U I N O P O W E R
The Arduino can be powered either by the USB cable from the host PC or by an external DC power source (7V-12V Recommended Range). A 9V battery is a popular choice.
The Arduino also as 5V, 3.3V and 3 GND pins to supply voltages to your project components.
G P I O
• General Purpose Input Output
• Pin that can be controlled by the user
• Can be set to input or output
• Input can be things like temperature sensors, buttons, IR etc
• Output can be LEDs, Motors, LCDs etc
A R D U I N O D I G I TA L P I N S
Pins 0-13 Are Digital Pins
pinMode(pin,INPUT) sets a pin as an input
pinMode(pin,OUTPUT) sets the pin as output
digitalWrite(pin,LOW) sets the pin to 0v
digitalWrite(pin,HIGH) sets the pin to +5v
digitalRead(pin) reads the pin state
Analog Pins A0-A5 can also be used as digital pins if they aren’t needed for analog use.
A N A L O G V S . D I G I TA L
• Computers understand digital signals
• Analog needs to be converted (ADC)
• Analog input covers voltage levels into a digital value within a defined range
• Digital is counted in fixed units, not measured.
• PWM – Pulse Width Modulation – to “fake”analog
• Serial Communication with Rx/Tx
A R D U I N O A N A L O G P I N S
Pins A0-A5 Are Analog Pins
pinMode(pin,INPUT) sets a pin as an input
analogRead(pin) reads the pin value (0-1023)
These pins map to a 6 channel, 10-bit Analog-to-Digital (A/D) converter. This allows you to read an analog voltage as a mapped value that ranges from decimal 0 to 1023
Providing more current than an LED is rated for can destroy the LED. To prevent that, you should use a “Current Limiting” resistor.
To calculate the value of the resistor you need to know the supply voltage, and the LEDs rated Forward Voltage (the voltage drop across the LED) and Forward Current (the maximum current the LED can handle)
C U R R E N T L I M I T I N G R E S I S T O R S
𝑅𝑒𝑠𝑖𝑠𝑡𝑜𝑟 𝑉𝑎𝑙𝑢𝑒 (𝑅) =𝑆𝑢𝑝𝑝𝑙𝑦 𝑉𝑜𝑙𝑡𝑎𝑔𝑒 𝑉𝑠 − 𝐿𝐸𝐷 𝐹𝑜𝑟𝑤𝑎𝑟𝑑 𝑉𝑜𝑙𝑡𝑎𝑔𝑒 (𝑉𝑓)
𝐿𝐸𝐷 𝐹𝑜𝑟𝑤𝑎𝑟𝑑 𝐶𝑢𝑟𝑟𝑒𝑛𝑡 (𝐼𝑓)
𝑅 =𝑉𝑠 − 𝑉𝑓
𝐼𝑓=
5𝑉 − 2𝑉
.02𝐴= 150Ω
𝑉𝑓 = 2𝑉𝑑𝑐 𝐼𝑓 = 20𝑚𝐴
𝑉𝑠 = 5𝑉𝑑𝑐
Having said that, you’ll likely find that for most quick experiments and demos you can skip using a current limiting resistor and just power the LED directly. USUALLY the LED will survive just fine, but sometimes…..
P U L S E W I D T H M O D U L AT I O N ( P W M ) P I N S
Pins 3, 5, 6, 9, 10 & 11 are PWM pins. Identified by “~” symbol
analogWrite(pin,value) (link)
These pins use Pulse Width Modulation to simulate an analog voltage by turning the pin on and off based on the value provided:
0 (always off) - 255 (always on)
Can be used to dim LEDs, control motor speed, etc.
B R E A D B O A R D S
Breadboards offer a great way to prototype circuits. The provide a number of “buses” for connecting both power and components.
Power buses run the entire horizontal length
Component buses give you easy ways to connect pins together
S E R I A L C O M M U N I C AT I O N S
A virtual COM Port is created when you connect your Arduino to your PC
C O N N E C T I O N PAT H S
PeopleMachines(things)
P2PSocial NetworkingEmail, Skype, etc.
P2M
Home automation, Self Tracking, etc.
M2MSmart Grid,
Smart Home, etc…
I P V 6 ( 1 2 8 B I T ) A D D R E S S S PA C E
340,282,366,920,938,463,463,374,607,431,768,211,456
or
340.3 Undecillion Addresses
HundredThousandMillionBillionTrillionQuadrillionQuintillionSextillionSeptillionOctillionNonillionDecillionUndecillion
Remember, we’re only talking about trillions of devices! and billions of people!
W I R E L E S S , S W A R M S , A N D C L O U D S
Want to know more? Check out Cisco’s Flavio Bonomi’s “Emerging Trends in Wireless in the Era of IoT”
H O W M U C H D ATA I S O U T T H E R E ? H A R D T O S AY !
Outlook.com has over 400 million active accounts
Over 150 Petabytes of data stored!
Source: Outlook Blog
G I G A , T E R A , E X A , P E T A , Z E T T A , Y O T T A
If a one minute mp3 music file is about 1.1MB then…
16 Hours
1.8 Years
1913 Years
1.9 Million Years
2 Billion Years
That’s a “yotta” music!
Cisco predicts that annual internet traffic volume will hit 1.3 Zettabytes by 2016 (source)
O U C H . T H AT H U R T S M Y B R A I N
Image courtesy of Jack Germsheid
C L O U D C O M P U T I N G
Compute Services
Application Services
The current state of cloud computing revolves mainly around the running of Virtual Machines (IaaS) or applications (PaaS) in the cloud vendor’s data centers.
In addition to running your code, cloud services can store your files & data, help authenticate your users, route data between your networks, stream your videos, and much more.
C L O U D O V E R V I E W : I A A S , PA A S , S A A S
Networking
Storage
Servers
Virtualization
O/S
Middleware
Runtime
Data
Applications
You m
anag
e
TraditionalSoftware
Networking
Storage
Servers
Virtualization
Man
aged
by ve
nd
or
O/S
Middleware
Runtime
Data
Applications
You m
anag
e
Infrastructure(as a service)
Networking
Storage
Servers
Virtualization
O/S
Middleware
Runtime
Man
aged
by ve
nd
or
Data
Applications
You m
anag
e
Platform(as a service)
Applications
Data
Runtime
Middleware
O/S
Virtualization
Servers
Storage
Networking
Man
aged
by ve
nd
or
Software(as a service)
C L O U D S T O R A G E
Azure Blob Storage
Files
Azure Table StorageMongoDB, etc
NoSQL
Azure SQL Database
Azure QueuesAzure Service Bus
Queues
C O N N E C T T H E D O T S
• MS Open Tech IoT Demo
• Weather data
• Multiple setup options• Arduino + Rasp Pi
• .NET MF Gadgeteer
• Azure Backend• Event Hubs
• Streaming Analytics
• Azure Websites
• https://github.com/MSOpenTech/connectthedots
W H E R E T O B U Y M A K E R S T U F F ?
• Sparkfun (www.sparkfun.com)
• Adafruit (www.adafruit.com)
• Maker Shed (www.makershed.com)
• Mouser Electronics (www.mouser.com)
• Netgate (www.netgate.com)
• Amazon (www.amazon.com)
• Radio Shack (www.radioshack.com) • The retail stores are perfect when you need parts urgently
M A K E R R E S O U R C E S
• HackADay (www.hackaday.com)
• Instructables (www.instructables.com)
• CreativeApplications (www.creativeapplications.net)
M A K E R B O O K S ?
Maker Media (O’Reilly)http://shop.oreilly.com/category/publishers/make.do
Packt Publishinghttps://www.packtpub.com/hardware-and-creative
A R D U I N O P R O J E C T H A N D B O O K
• https://arduinohandbook.wordpress.com
F R I T Z I N G : E L E C T R O N I C D I A G R A M M I N G
• http://fritzing.org
• Open-source hardware initiative that makes electronics accessible as a creative material for anyone• Software tool
• Community website
• Services
• Foster a creative ecosystem
• Allow user to document their prototypes & share with others
• Teach electronics in classrooms
• Layout and manufacture professional pcbs
M I C R O S O F T V I R T U A L A C A D E M Y
• Programming Robotic Systems with Visual Studio• With Chris Howd & Paul Pardi, Microsoft
• Course Outline• 01 | Embedded Systems, Robotics, and this MVA Training Series• 02 | Getting Started with Arduino• 03 | Creating Your First Arduino Robot• 04 | Controlling a Robotic Arm • 05 | Integrating Advanced Sensors and Shields• 06 | Mapping Areas and Detecting Objects• 07 | Integrating Wireless Control and Communication• 08 | Looking Ahead
• http://www.microsoftvirtualacademy.com/training-courses/programming-robotic-systems-with-visual-studio
M I C R O S O F T D X I O T R E S O U R C E L I N K S
• Bret Stateham: IoT, Galileo• https://github.com/bretstateham/iot
• Jeremy Foster: Intel Edison• http://codefoster.com/edison
• Stacey Mulcahy• http://thebitchwhocodes.com/blog
• Paul de Carlo• http://pjdecarlo.com
• Nick Landry• http://AgeofMobility.com
I O T PA N E L AT T H I N G S E X P O 2 0 1 4
• Microsoft, IBM, Kaazing, Xively/LogMeIn & Aria
• http://aka.ms/iotpanel2014
R E V I E W
Devices & “Things”
Networks & Protocols
“IoE”, “IoT”, “M2M” What?
Cloud Computing& Big Data
T H A N K Y O U !
Slides are posted on Slideshare. Demos are on GitHub.Please fill out an evaluation. Your feedback is important and appreciated.
Slideshare: www.slideshare.net/ActiveNick
Blog: www.AgeofMobility.com
Twitter: @ActiveNick
Mobile Apps: www.bigbaldapps.com
LinkedIn: www.linkedin.com/in/activenick
GitHub: github.com/ActiveNick
Email: [email protected]