Cortana analytics help organization to transform data into intelligence. In this post I will show how to use Cortana Analytics for IoT and Machine Learning Purpose. In propose scenario I will try to show some components of Cortana intelligence that has been used for collecting data from a weather station sensor and show the live temperature data in Power BI visualization. In this post I will show how to get data from raspberry Pi and a weather station sensor[1]. In next Posts the process of creating Event hub, creating stream analytics, Azure ML and Power BI will illustrate.
What is Cortana Intelligence?
Cortana has four main parts as “Information Management”, “Big Data Stores”, “Machine Learning and Analytics”, “Dashboard and Visualization.
Information Management: has four main components that help us to gather information from different resources into Cortana.
Big Data Stores: it a another component of Cortana for storing data and information such as Azure SQL database and Azure data lake.
Machine Learning and Analytics: is another component that bring intelligence from collected data by Azure ML, and Azure HDInsight.
Dashboard and Visualization: the fourth component that shows the result of analytics to end user.
In this post I used four main component in Cortana to transfer data from sensor to power BI.
IoT
The internet of things (IoT) is one of the hot topics in last years. So, what is IoT and how we can make benefit from it? according to Wikipedia: “The Internet of things (stylised Internet of Things or IoT) is the internetworking of physical devices, vehicles (also referred to as “connected devices” and “smart devices”), buildings, and other items—embedded with electronics, software, sensors, actuators, and network connectivity that enable these objects to collect and exchange data”
There are many examples of using IoT in farming, greenhouse, boats and houses.
IoT can be used in a farm or greenhouse to check the weather elements constantly. some plant are so sensitives to suddenly changes in temperature and humidity. These changes may has some terrible impacts on plants, herbs and flowers.
IoT can helps people who are going for fishing or boating. It possible to check the sea depth, temperature, location and wind via sensors and observe the changes live.
also IoT devices can be used to control the home automation. for instance, control the heat of rooms, speed of fans, switch off and on the lights or even check the movements in home live and via different sensors
In this post I will show how to get data from a raspberry bi and weather station sensor.
First of all you can see the whole process in below video
Get Data
first of all we should collect data from sensors. To do that we use a Raspberry PI
Raspberry pi 3 has been used widely in creating games, teaching computer programming to children, or as a IoT device to control the home environment.
approximately 8 millions raspberry pi has been sold around the word.
according to the Wikipedia raspberry pi “The Raspberry Pi is a series of small single-board computers developed in the United Kingdom by the Raspberry Pi Foundation to promote the teaching of basic computer science in schools and in developing countries”
raspberry pi is like a PC that has all main elements of a PC such as CPU, USB Ports, Memory (SD card), HDMI port, Bluetooth, Ethernet port, audio jack and composite video, RAM and so forth
to run the raspberry pi 3 we have to install windows IoT on it. to do that, we install windows IoT 10 on it via below website: https://developer.microsoft.com/en-us/windows/iot/getstarted
we first choose the Raspberry pi model which in my case it was Raspberry pi 3
then the related hardware is choose
and finally we choose the windows IoT version
Finally we install windows 10 IoT in SD memory card, you should follow the rest steps to install the IoT into Sd card.
Then we put the SD memory card into Raspberry pi3 (see below picture)
now we have windows in out Raspberry pi. Now, we connect it to the power and monitor to see its environment. Moreover, as the windows IoT is a visual IOS, we can connec a keyword and mouse to the Raspberry pi 3 USB ports.
now in monitor we can see the windows IoT that we install in raspberry PI 3
the device name, network connection, the setting and other information has been shown in monitor. moreover, to set the wifi and Bluetooth we use the setting.
Now, we should set up the weather station sensor.
I purchased online from https://www.sparkfun.com/products/12081.
this sensor able to measure weather temperature, humidity, and some other elements.
to connect the weather station to raspberry pi I followed instruction provided in : https://www.hackster.io/windowsiot/build-hands-on-lab-iot-weather-station-using-windows-10-5b818f
. we need a Ribbon cable to connect them.
I have took some picture on which port of raspberry pi 3 should be connected to weather station ports
after connecting the weather station to raspberry pi 3, now we should sent the message from weather station sensors to raspberry pi and then from raspberry pi to Cortana.
In the next posts, I will explain the below process. In part 2 the connection of weather station to raspberry pi and the process of creating event hub in Cortana will be explained. In part3, the process of creating stream analytics and showing the data in power Bi and Azure Ml will be shown.
[1]https://www.hackster.io/windowsiot/build-hands-on-lab-iot-weather-station-using-windows-10-5b818f