How to use Arduino with the Azure IoT hub

By James Brand, Lead Developer at Intellihub.io Arduino

James from Intellihub.IO, one of the companies in Microsoft's IoT Innovation Programme, talks through how to take the data from sensors connected to Arduinos and stream that into a Microsoft Azure IoT hub.

IntelliHub.io is an Industrial IoT company, designing, manufacturing and deploying IoT devices and sensors in commercial buildings and other high value assets. IntelliHub collects the data from the IoT devices and uses it to provide insights into cost and efficiency savings that can be achieved in the building as well as providing predictive maintenance, user defined workflows and alerts.

IntelliHub is built on .NET and Azure, specifically IoT Hubs, Stream Analytics and Azure ML. We're using Arduino's to prototype sensors because of their compact format, price, availability and ease of use. The challenge was how to take the data from sensors connected to Arduinos and stream that into a Microsoft Azure IoT hub.

I've been developing a use case study for IntelliHub at a local dog day care centre called Woofs n Wiggles based in Colchester, Essex. Woofs n Wiggles had a number of challenges we wanted to try and solve:

  • Some rooms were infrequently used but lights and other devices were left on. We've installed PIR motion sensors connected to an Arduino and are using Azure ML to predict when the rooms will be in use to provide Woofs n Wiggles with potential cost savings if they connected the lights and devices to IntelliHub.
  • The reception is unmanned so if a customer rings the bell the dogs in the building bark. We're using the Arduino based motion sensor data to notify the staff discreetly that someone has arrived with the use of push notifications and a flashing light. In addition to this we are using the data to predict when people will arrive so staff can get to the reception before a customer arrives.

One of the problems with the Arduinos is that they're typically low powered boards and don't support encryption protocols such as SSL. This makes talking directly to the Azure IoT hub pretty difficult. In this video I describe how I got round this issue using an Arduino Yún and a Raspberry Pi as a gateway.

https://www.youtube.com/watch?v=LbCAIWbQEkI

Resources