KiZAN will bring 25 Raspberry Pi starter kits that run Windows 10 IoT Core. This will enable participants to build a really compelling IoT/Azure/Power BI story in a single day! Interet of Things (IoT) Raspberry Pi starter kit
We’ll start off the day with an introduction to IoT and build IoT devices (hands on). Next, we’ll build a simple temperature sensor, collecting ambient temperature readings, and stream the data to an Azure IoT Hub.
Once the data is in Azure, we’ll analyze it with Azure Stream Analytics, and ship it to an Azure SQL Database.
Finally, we’ll report on the data and build dashboards of our temperature readings using Power BI.
Stream Data into the Cloud with Raspberry Pi and Windows 10 IoT Core
1. + Cincinnati + Louisville
+ Nashville + Columbus
+ Detroit + Indianapolis
Mike Branstein – Director, Application Development
@mikebranstein
mikeb@kizan.com
Internet of Things
(IoT)
Workshop
3. 3
• You rarely get the chance to practice for practice’s sake
• IoT and cloud architecture/development patterns can be
confusing and are frankly “new” to many of us
• It’s not what’s going to change, it’s when – and the answer is likely yesterday
• Today
• The Internet of Things (IoT)
• Cloud architecture
• See an end-to-end solution
• Hands-on practice
• Get excited or inspired
Practice Makes Perfect
5. Source: Oxford Ditionary 5
Internet of things
noun
A proposed development of the
Internet in which everyday objects
have network connectivity, allowing
them to send and receive data.
What is the Internet of Things?
6. Source: Cisco & Internet World Stats, sourced and created by Nick Landry 10
How Big is Big?
9. Source: Nick Landry 19
• Full single-board computer with SoC
• Average cost: $30 to $45
• Model A, A+, B, B+ and Raspberry Pi 2 B, 3, Zero
• Runs Linux – flavor of Debian called Raspbian
• http://www.raspbian.org
• Huge accessory selection
• Programmable
• Python
• (Mono), etc.
• 5+ million units sold in 3 years of
manufacture, technically the largest
computer manufacturer in UK!
Raspberry Pi
10. Source: Nick Landry 21
• Windows 10 is on Raspberry Pi 2 and 3!
• http://windowsondevices.com
New Windows == More Fun!
12. 23
The RPi can be powered
either by the USB cable
from the host PC or by
an external DC power
source (5V).
The RPi also has 5V,
3.3V and GND pins to
supply voltages to your
project components.
Raspberry Pi 2 Introduction
Source: Nick Landry
13. 24
• 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
GPIO
Source: Nick Landry
14. 25
• 40 pins total
• Pi Wedge organizes pins
• 17 GPIO
• 6x power
• 5x SPI (Serial Peripheral
Interface) serial comm.
• 2x UART, Tx (out) / Rx (in) serial
comm.
• 4x I2C (comm. Protocol,
master/slave)
Pi Wedge Pin Out
15. 29
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 (vertical)
give you easy ways to
connect pins together
Breadboards
Source: Nick Landry
18. 36
• Analog Temp. Sensor
• Analog to Digital
Convertor (RPi 2 only
reads digital signals, so
we need a convertor from
Analog to Digital)
• Capacitor (to reduce line
noise)
Temperature Sensor Components
19. 37
• Red are Power and GRD
• Analog/Digital
Convertor (1 set for
the analog
component, another
for the digital
component)
• Temperature Sensor
Powering the Circuit
20. Customer & KiZAN confidential 38
• Serial Communications
happen over 4 lines
• Yellow
• White
• Blue
• Green
• Yellow connects Temp
sensor to the Convertor
Communicating with the RPi
24. 44
• PaaS is where you “should” want to be
• Use the service, don’t do the plumbing
• We’ve been doing the plumbing for a long time
• Challenges
• Mapping exercise
• Architect the
PaaS way or the
highway
Moving to PaaS
29. Standard Data Analysis
59
• Your data already exists – it’s
all from the past or
projections of the future
• You can aggregate everything
• Not real-time
• Batch processing
• Reactionary in nature
Data Analysis
30. Streaming Data Analysis
60
• Data arrives temporally
• You can’t aggregate data all at once
• Real-time
• Data is grouped into different
windows
Data Analysis
• What is a data window?
• What’s your data window?
• Concept: arriving data as an “event”
31. Tumbling Window Hopping Window
Source: MSDN and MSDN 61
• Tumbling Windows that overlap
• Timeunit (minutes, seconds, etc.)
• Windowsize (duration)
• Hopsize (skip duration)
• Series of fixed-size, non-
overlapping and contiguous
time windows
Temporal Windowing
32. Source: Microsoft 62
• Real-time stream processing in
the cloud
• Real-time cloud-based ETL
• Millions of events per second
• Scale dynamically
What is Azure Stream Analytics?
33. 63
• Create Stream Analytics Job
• Configure 1 or more Inputs and Outputs
• Create Queries to ETL from Inputs to Outputs
• Use SQL-like language
Making Cloud ETL Easy
Talking Points
I want to welcome everyone to our workshop on the Internet of Things. Today is going be an exciting day. You’ll get to work hands-on with a Raspberry Pi, building several simple circuits. You’ll get to see Windows 10 running on the Raspberry Pi and see how it can be a simple development platform for IoT devices. You’ll see how to interact with Windows Azure as a scalable platform for data transmission and IoT device management. We’ll then use Azure’s Stream Analytics service to analyze our data streams in real-time, prepping them for reporting. Finally, we’ll round-out the day by looking at Power BI, a reporting tool that we will use to build and share visualizations based upon the data we analyzed with Stream Analytics.
Talking Points
Aside from learning about the different technologies available to you, we’ve found that you rarely get the opportunity to practice developing or experimenting.
So, what do you need to be successful today?
The pre-requisites – if you haven’t looked at them yet, please do.
We’ll also be sharing an Azure subscription today, but everything you see here today can be done with either an Azure trial or the Azure credits you may have with MSDN.
Finally, we want you to have fun. We built this workshop because we enjoy the content, we’re passionate about building and making.
Let’s dive in. I’ve said IoT or the Internet of Things several times, but what is IoT? I could launch into a lengthy explanation, but I think Joseph Sirosh from Microsoft said it really well, when he talked about the power of data, internet connectivity, and cows.
Talking Points
When you think of IoT, you’re most familiar with consumer or hobbyist hardware: Fitbit, Garmin, lightbulbs, the Nest, etc. But as Joseph Sirosh said, imagine what can happen in industry, or farming. There are immense applications of what we can do with IoT across multiple industries. As we’re exploring today, keep thinking how IoT could help transform your businesses, either by creating new streams of revenue, decreasing costs, or by streamlining processes.
So what is the internet of things.
It’s about sending and receiving data. To illustrate this – think of Fitbit – it is passive, Nest is passive monitoring and receiving. Two-way communication.
Essentially, what Kevin was saying is that the internet emerged becaue of our social and technological need t communicate more easily, but this was driven by interpersnall communication needs. However, the IoT is driven by the need for devices to communicate with each other, on behalf of us.
Talking Points
We’ve mentioned how IoT is about device communication and data.
Let me give you an idea of how far we’ve come, and the size of where we’re going. The blue dots are world population. The orange are the number of connected devices. Back in 2008, we had more connected devices than people, but by 2020 – in 4 years, it’s estimated that we’ll have over 50 billion connected devices.
This pattern of growth is truly gargantuan. And we’re just starting to talk about how these connected devices can help us out.
Talking Points:
What I find truly interesting is not the shear amount of data these device generate, but that even though we have 10 Billion devices connected, that’s only a fraction of a percent.
So, stop and think for a moment. How many connected devices do you interact with each day. How many do you own?
Talking Points
Why is IoT exploding? I’d suggest there are a number of factors leading to the explosion in IoT. One of the strongest motivators driving IoT is the cloud.
There are a variety of IoT devices that may have heard of. I’m not going to look at each one, perhaps if we had the time, we could demo each; however, they are all fairly similar. They run a version of linux, you can program them in C++ like languages and/or Python.
Talking Points
The purpose of creating the Raspberry pi was to provide low-cost computers for educational purposes around the world.
They designed and built a single-board computer with a system-on-a-chip. The relatively low cost and variety of models helped to sell 5+ million units, making it the largest computer manufacturer in the UK.
Talking points
It looks big here, but it’s tiny. The Particle photon is a favorite of mine actually,. It’s so small, inexpensive, and powerful, that it just makes me giddy whenever I can pull it out of my bag and show someone.
The core advantages of the photon are price, built-in wireless, a cloud-based dev platform, and the manufacturing capabilities behind the company. As a prototype board, it’s meant to be purchased in single-unit counts, but quickly scale up by allowing you to submit and create PCBs based upon your prototype designs. This can scale up to the 10’s of thousands.
With a new OS, comes new platforms that support the OS. Check out windowsondevices.com for more information, but you can insall and run Windows 10 on a raspberry pi.
It’s beneficial to show this. I don’t need to go into every tab. You understand the operating system and GUIs.
Demonstrate the Remote client
LEDs are all around us: In our phones, our cars and even our homes. Any time something electronic lights up, there’s a good chance that an LED is behind it. They come in a huge variety of sizes, shapes, and colors.
LEDs (that’s “ell-ee-dees”) are a particular type of diode that convert electrical energy into light. In fact, LED stands for “Light Emitting Diode.”
The basic template for an LED circuit is pretty simple, just connect your battery, resistor and LED in series. Like this:
Talking Points
There’s no damage if you plug this in backwards, it’s just not going to work
Talking Points
Each LED is rated for a specific amount of voltage. If you give it too much, it’ll pop.
Talking Points
The power buses are divided
Another demo? Blinky flashing light of what IoT code is going to look like most of the time.
Talking Points
We’re going to turn an LED on with 3.3v to Ground
Insert Pi Wedge into Bread board
Talking Points
Why is IoT exploding? I’d suggest there are a number of factors leading to the explosion in IoT. One of the strongest motivators driving IoT is the cloud.
Talking Points
Why is IoT exploding? I’d suggest there are a number of factors leading to the explosion in IoT. One of the strongest motivators driving IoT is the cloud.
Talking Points:
Coupled with IoT is a movement to return to getting our hands dirty, tearing apart devices, finding out how things work. We’ve gotten accustomed to buying pre-made devices, like phones, laptops. But now it’s cool again to tinker and build.
Talking Points:
From conferences, like maker con, weekend festivals like Maker faire, start-up maker spaces, and magazines like Make: magazine, dedicated to making and building, we’re encouraging the community to get together and share their ideas and talents, and at the same time teaching the next generation of kids that technology isn’t just snapping Instagram Photos or an iPhone or playing Angry Birds or Candy Crush Saga.
Talking Points:
For me, it’s a little more personal. From building lego pirate ships, iPad apps with text-to-speech sound boards, and now circuits with a breadboard.
I’m raising my kids as builders and makers. We’re experimenting, building some cool contraptions, and learning that failure is ok.
Talking Points:
Something else fueling the Maker Movement has been 3D printing and the concept of additive manufacturing. Historically, manufacturing has been subtractive. Give me a solid block of metal, and I’ll use a CNC machine to mill it down to the right shape and size.
The rise of consumer-priced, desktop 3D printers has exploded. It may not be tomorrow or even in 10 years, but the day when you can print a replacement part for your broken appliance is coming.
3D printing is bigger than just a hobbyist activity. There are real applications for prototyping, because it allows you to quickly do a POC. Once you’ve prototyped, 3D printing can replace traditional hardware manufacturing.
Right now, there are dozens of companies in the 3D printing arena. And it’s a race to the bottom. Who can make the least expensive, fastest 3D printer, with the highest resolution. Competition is thriving with different technology and materials.
Talking Points
This is back from 2014, but it shows all of the companies involved in 3D printing. By now, there are dozens more, with a race to the bottom. Who can make the least expensive, fastest 3D printer, with the highest resolution. Competition is thriving with different technology and materials.
Talking Points
And one of the coolest applciations of 3D printing was with SpaceX and their SuperDraco engine. They’re building and flying additive manufacturing rocket engines into space.
Talking Points
Another significant contributor to the Maker and IoT Movement is the rise of crowdsourced funding options. Who here has supported a crowdsourced effort?
Talking Points
The most popular of these services is Kickstarter, with almost $2.4 Billion pledged to date.
KickStarter and other crowdsourced funding companies are helping companies innovate, and launch products that may not have seen the light of day in the past. You’ll often see startups using KickStarter to launch their business, but also well-established companies using KickStarter to try out a new product, raise awareness, and market a product that may have never made it out of the R&D phase.
KickStarter is actually being used as a pre-order system for many businesses, although, it’s not a pre-order system. You can still lose your money.
Talking Points
There are many other factors leading to the explosion in IoT. We won’t dive deep into them all, but may touch on a few.
At the top, a combination of more powerful processors running at reduced speeds, while getting smaller allows us to build and create devices that are usable now. Remember the Cell Phone that was the size of a laptop? That was unusable.
In the middle, standardization on hardware platforms has dirven prices down, and making IoT even more compelling. Coupled with a reasonably-priced mechanism to communicating with millions of devices, cloud computing seems to have come around just in time.
Talking Points
- Now that we have data flowing into the cloud, what’s next?
Talking Notes
Stream Analytics Job
Inputs
Outputs
Queries
Watch the Stream Processing – SQL Mgmt Studio or VS 2015 connect to SQL Server
Talking Points
Power BI is a cloud-based business analytics service that enables anyone to visualize and analyze data with greater speed, efficiency, and understanding.
It connects users to a broad range of live data through easy-to-use dashboards, provides interactive reports, and delivers compelling visualizations that bring data to life.
Power BI dashboards
With updates to Power BI customers can now see all their data through a single pane of glass. Live Power BI dashboards show visualizations and KPIs from data that reside both on-premises and in the cloud, providing a consolidated view across their business regardless of where their data lives.
Simplifying how you interact with data, natural language query is built into the dashboard allowing users to type questions and receive answers from data in the form of interactive visualizations.
You can then explore their data further by drilling through the dashboard into the underlying reports, discovering new insights that they can pin back to the dashboard to monitor performance going forward.
Stay connected from any device
Power BI mobile apps are available for iPhone, iPad, Android Phone, and Windows 8.1.
Power BI makes it easy for users to visualize and analyze their data in minutes, providing pre-built solutions for popular services as part of the Power BI experience. A subscriber to a supported service can quickly connect to their account from Power BI and see their data through live dashboards and interactive reports that have been pre-built for them. We have released content packs for 16 popular services such as Salesforce.com, Marketo, and Quickbooks Online. We have announced that over the coming months we will extend this support to include content packs and integrations for Adobe Analytics, comScore, Azure Mobile Engagement, Sage, SpaceCurve, tyGraph, CircuitID, Sumo Logic, SQL Sentry, Zuora, Planview, Insightly, Troux, Inkling, and others.
Power BI Desktop – currently known in preview as the Power BI Designer – is a powerful new visual data exploration and interactive reporting tool available for free at PowerBI.com. It provides a free-form canvas for drag-and-drop exploration of your data and an extensive library of interactive visualizations, while streamlining report creation and publishing to the Power BI service.
Connect live to on-premises Analysis Services models
Realize the benefits of a cloud based BI solution without having to move your data. With the new Power BI connector for Analysis Services you can create a secure connection to SQL Server Analysis Services from Power BI. When users view and explore dashboards and reports the system will interactively query the on-premises cube to fetch the data using the user’s credentials. With this hybrid solution, you can continue to manage and secure your data on-premises, removing the need to have data reside in the cloud.
FAQ:
How does security work with the new SQL Server Analysis Service connector?
Power BI customers can now benefit from the role level security in SQL Server Analysis Services. The Power BI user name is passed through to on-premises Analysis Services and appropriate role-based security. Analysis Services resolves the user name to an authorized user via Azure Active Directory (more info:: http://support.powerbi.com/knowledgebase/articles/505323-why-you-need-dirsync-to-connect-to-on-premises-ana) and then applies appropriate role-based security to restricted access.
How does data transfer work between Power BI and SQL Server Analysis Services?
Data is transferred between on-premises Analysis Services and Power BI through the Service Bus (which uses a secure SSL channel).
Does the Power BI connector for Analysis Services add security risk by opening a port on the firewall?
Service Bus (which is the underlying transport/relay service used in this scenario) only uses an outbound port -- it does not require an inbound port to be opened on the on-premises firewall. It uses a shared secret mechanism to create a secure channel between cloud and on-prem.
Will the SQL Server Analysis Service connector work in IaaS as well?
Yes, as long as the IaaS VM is domain-joined and Azure Active Directory DirSync is set up.
Power BI is a cloud based business analytics service for pulling together live views across all your data. Connecting to data that resides on premises in SQL Server Analysis Services, data from Microsoft Cloud properties like Dyanmics and Office 365 or from Azure data services like SQL DB, Azure Stream Analytics or from a partner solution hosted on Azure.