Connecting Things to Internet (Part 1) – Background and The Project Setup

The “Internet of Things” is expanding exponentially and everybody is talking about it. Samsung’s recent show case of  internet connected refrigerator, Family Hub Refrigerator, is a perfect example of how the world is evolving as a connected world. So, what is IoT anyway?

Simply put, this is the concept of basically connecting any device, with an on and off switch, to the Internet (and/or to each other). This includes everything from mini-scale chips, cell phones, coffee makers, washing machines, headphones, cars, wearable devices and almost anything else you can think of. According to IDC there were about 2 billion things connected to the internet by 2006 and the number passed  15 billion by the end of 2015. It is projected that  200 billion devices and thing will be connected to the internet by year 2020. that is on average 26 smart devices per every person on earth!

Past, present and future of IoT

Not so long ago, it was extremely hard to get something connected to the internet. this subject was mostly limited to major manufacturing and healthcare industry. with the commoditization of mini-scale computers like Raspberry Pi and low cost internet software services, like Windows Azure IoT Suite, opened up a whole new era for makers, hobbyists and  electronics enthusiasts by providing low cost ways to easily get things connected to internet. Recently Microsoft has announced Azure IoT Suite in public preview. This suite is an abstraction layer on top of existing services such as IoT Hub, Stream Analytics, DocumentDb, Event Hubs and other services allowing you to focus on your business scenario rather than the implementation. There are so many blog posts and articles on IoT and it’s uses, and on Windows Azure IoT and telemetry. At the time of writing it was hard to find one location that explains how to get started on IoT suite end-to-end. This was the reason for me to write a series of articles that consolidates all the information scattered every where on the public domain. The series comprises of 5 parts and acts as a one stop shop for how to get started with Azure IoT hub and configuring, and connecting devices. I would suggest that you would follow the steps in the given order to have the project successfully completed.

  1. Connecting Things to Internet (Part 1) – Background and The Project Setup (this article)
  2. Connecting Things to Internet (Part 2) – Setting up IoT Hub
  3. Connecting Things to Internet (Part 3) – Device Setup
  4. Connecting Things to Internet (Part 4) – Configuring  and Connecting the Device to IoT Hub
  5. Connecting Things to Internet (Part 5) – Device Management and Monitoring

This is the first part of multi-part series of articles on how to get started with Internet of Things. The article focuses on building a simple temperature and humidity sensing network using Azure IoT hub. this project is extremely simple and may not suite your current business requirements. however, it serves as the starting point and gives a good understanding of what to expect in a IoT project. It can be built quickly and easily with minimal knowledge of programming or Microsoft Azure, using commodity devices – for example an Arduino UNO board with a simple temperature and humidity sensor like DHT22, connected to a Raspberry Pi sending data to an Azure website.

Project Setup

Setup

 

Hardware prerequisites

For this project I am using Arduino UNO as the micro-controller that acts as the remote device that collects sensory data of DHT22 humidity and temperature collector. This device lacks computing power to directly connect to the internet and send data over secured connection. However, there are micro-controllers that are capable of directly connecting to the internet, like Intel Edison that bypasses a gateway device that is capable of connecting to the internet.

I am using Raspberry Pi 2 as the gateway device that connects to the internet. Pi communicates with Arduino, reads sensory data via serial port, formats the data to a pre-agreed format  and sends the stream to IoT hub.

Software prerequisites

For the purpose of the article, I will be using Node.js on Pi that runs on Debian Linux to read data from Arduino and connect to Azure hub. the choice was mainly determined due to 2 reasons.

  1. Lack of mono support for Azure C# IoT SDK on Pi.
  2. Node.js IoT SDK can be used on previous less powerful models of RPi.

Next Step

In my next article, I will focus on how to set up the IoT hub that provides the skeleton of remote monitoring solution that will be used in the rest of the series. I would recommend that you start by going to Azure portal and sign-up for free trial subscription if you don’t have one already.

2 thoughts on “Connecting Things to Internet (Part 1) – Background and The Project Setup

Leave a Comment