Lwin MAUNG

Mechatronics Geek

Solution Architect

IoT 101: Data Flow

  • Authorlmaung
  • Date 30 December 2018
  • CategoryIoT

A few blogs ago, we started on the 4 Ws of IoT. This blog is second blog that explains one of the many “hows” in the question of IoT. 

In order to us to have a IoT solution, we have to have things, or a device, or a system that is willing to gather data for us. In a broad defination, you really do have a basic “so called” IoT solution once you have a device that transmit data into the cloud. 

Choosing a device
Most makers prototype and test using Arduino or Raspberry Pi hardware. While Raspberry Pi is a good hardware platform, in true sense of the world, most devices or things may already have sensors built in that you may just want to intercept rather than re-write the software to control the device. How about Arduino then? Arduinos are cheap with built in interface that is easy to interface from your computer. However, they can not get online so you may have to find a shield so that you can get online with such a device. You have to keep in mind that a shield may take up precious memory that Arduino lacks(512KiB to 4MiB) compare to a Pi device. Luckily, there has been cheap, easy to use SOCs that came out into the market place in the last couple of years. ESP8266 is a SOC running at 80/160Mhz with 16MiB of storage space with 802.11 b/g/n wifi chip on board with matching pins to emulate Arduino interface.  If I want to prototype a quick device, I would choose ESP8266 as my base device. However, if I am testing a complete system design, I would utilize a series of ESP devices and/or Raspberry Pis.

Data Flow
In terms of IoT simplest data flow is to have a device transmit data into a data storage hosted in the cloud. Since we are not dealing with security at the moment, the quickest way is for a device to post to an API end point and voila, you have IoT a solution. In reality and in terms of scale, the API solution will not scale (and communication will only be flowing one way.

This is where solutions such as Microsoft IoT Hub comes to play. By using the IoT Hub as a data entry point into the cloud, IoT solutions can now be created with bi-directional data flow in mind. Security is also addressed by the Microsoft IoT Hub for us.  Once the connections are made, data can be sent via any device that can access the Microsoft IoT Hub api. The best part of this solution is that even a device such as ESP8266 have a C++ library written for API access.

iothub.PNG

Too many devices?
Although IoT hub can handle millions of connected devices, not all devices may have access to open internet. You may not even want every device to be online. In such cases, you may want to use another device as an gateway/access point for connection to the internet. Prime examples of such use cases exists in home/industrial automation where a watch (or a pressure gagues) are connected to a phone (or a IoT Gateway) which then connects to the internet for added on data organization and security.

Write a comment