IIoT edge development - Prototyping devices
Editor's Note: The Industrial Internet of Things (IIoT) promises to provide deep insight into industrial operations and enhance efficiency of connected machines and systems. Large-scale IIoT applications rely on layered architectures to collect data from a broad range of sensors, move data reliably and securely to the cloud, and perform analysis required to deliver that insight and efficiency. In Industrial Internet Application Development, the authors provide a detailed examination of the IIoT architecture and discuss approaches for meeting the broad requirements associated with these systems.
Taken from Chapter 3 in the book, this excerpt describes how developers can build prototype devices able to to collect and communicate data to higher level applications. This excerpt is presented in the following installments:
Adapted from Industrial Internet Application Development, by Alena Traukina, Jayant Thomas, Prashant Tyagi, Kishore Reddipalli.
Chapter 3. IIoT Edge Development
By Alena Traukina, Jayant Thomas, Prashant Tyagi, Kishore Reddipalli
This chapter describes the process of prototyping a device for beginners. We provide detailed instructions on how to assemble four different prototypes, and how to build and run simple IoT apps for the prototypes, together with sample source code. Finally, we explore the Predix services that can be used to store, analyze, and merge the sensor data from the prototypes.
In this chapter, you will learn about the following topics:
Choosing hardware for prototyping
The Open Systems Interconnection model and its layers
Application-layer protocols—HTTP and WebSocket
Industrial M2M protocols—Modbus and OPC UA
Assembling a device for a prototype
Preparing an SD card for a prototype
Building and running simple IoT apps using the HTTP, WebSocket, Modbus, and OPC UA protocols
Data management services in Predix
Hardware for prototypes
This section overviews the available variety of hardware that can be used for prototyping, and gives some tips on choosing the hardware and a data exchange protocol to ensure communication between the components of a prototype.
Variety and cost
One can find a variety of open source hardware for prototyping—Arduino, Raspberry Pi, Orange Pi, LinkIt, BeagleBone, and Tessel. Most of them are really cheap; you can buy an Orange Pi for just $33. The price usually depends on how powerful the board is and what interfaces it supports.
In addition to a board, it is possible to purchase a starter kit that usually costs about $70. It includes a few sensors, a small display, lamps, cables, and a breadboard for connecting it all without soldering. The price of a single sensor starts from $1.
The most popular boards are Arduino and Raspberry Pi. Each of them has different modifications. If additional features are required, such as Wi-Fi, Bluetooth, USB, HDMI, or more powerful hardware, it is recommended to compare the modifications to find a board that fits one's exact needs.
All boards are quite small—about 8 cm wide, 5 cm high, and 2 cm thick (without a box). More powerful hardware will have bigger dimensions (for example, Intel NUC is 35 x 25 x 4 cm).
The most significant parameter is connectivity options, as not all the boards support Wi-Fi or Bluetooth. GSM, GPS, a camera, an FM module, and other features common for mobile phones are usually not available either, and one needs to buy them separately.
Another important parameter is the number of connectors for sensors. One needs to understand what sensors are required and whether they are compatible with a chosen board. The number of pins can be extended by connecting special additional boards to the existing ones.
Some connectors on a board may support only analog sensors, while others are only digital.
Digital sensors output a discrete signal, meaning that there is a limited set of possible values for that signal. For example, temperature sensor DHT11 outputs an integer in a range between 0 and 50.
On the other hand, analog sensors output a continuous signal, meaning that there is an infinite number of possible values for that signal. For example, temperature sensor TMP36 can measure temperature from -50°C to 125°C including floating point values such as 11.9°C.
While converting one type of the signal to another is possible, it requires additional components and complicates the design.