*3.1.4 Problem 4. Setting up communication to remote broker through MQTT protocol*

It is required to design and implement a remote dashboard, which will run in Cloud, using Message Queueing Telemetry Transport (MQTT) protocol.

It is recommended to have at least some hardware setup (sensors, microcontrollers, power supply, etc.) available with the instructor. In case students do not have any hardware at home, they write the code and send it to the instructor for testing purpose. A schematic diagram showing the architecture for interfacing sensors and uploading the data to Cloud is shown in **Figure 8**. The data from the analog pin is sent to serial port of Arduino. The data from the controller board serial port is sent to the Internet gateway. Node-Red flow is run on the gateway and enable the data to be sent to Cloud.

#### **Figure 6.**

*Example of Node-Red dashboard for Problem 2.*


#### **Table 4.**

*OPC UA tags for Problem 3.*

A snapshot of flow where a SW-420 vibration sensor has been interfaced to an Arduino Nano, which sends the values to dashboard and display them in form of chart, is shown in **Figure 9**.

The sensors may be interfaced to the microcontrollers using various protocols. An example of this is the Zigbee protocol where sensors communicate with an end point device, which in turn sends the sensor data through routers to the Zigbee coordinator. The advantage of this type of connection is that multiple sensors can be connected to endpoint devices, and many such endpoint devices may be connected in star topologies to the controller through routers.

The Zigbee protocol is known to be secure and low power consuming as the endpoints which are inactive may sleep for the inactive duration. A typical application could be connecting crop monitoring sensors to end points and sending the data from endpoints to coordinator, which in turn may send the data to an MQTT server using the node-red-contrib-zigbee pallete (see **Figure 10**).

Various other wireless protocols like the Sigfox and LoRa WAN may be used for interfacing the sensors to the master coordinator/controller. The advantage of some of these emerging protocols are low power consumption and high data rates [11, 12]. The IoT Gateway is used to convert the data format received from any of these protocols to internet protocols like the HTTP, MQTT, XMPP or any other light weight protocol. The Gateway also implements security for the Endpoint and Coordinator devices and may do some edge computing or data analytics before sending the data to the Cloud storage.


#### **Figure 7.** *Dashboard displaying required OPC UA tags.*

## *3.1.5 Problem 5. Implementation of more complex applications like computer vision, anomaly detection, etc*

Students were able to interface the Raspberry Pi camera to upload images to Cloud, trying to optimize bandwidth usage. MQTT protocol and associated libraries for image transmission using Python programming are used in some of these projects for uploading data to Cloud. The Node-Red palletes required for implementing the flows were identified and installed.

Machine Learning services available on Cloud like IBM Watson were used by students, where algorithms for image recognition and classification, text recognition and other resources of AI/ML deployed. Knowledge of Raspberry Pi boards and Python programming as well as running Node-Red using Docker container was introduced. Node-Red flow was used to upload camera images and to classify objects using pretrained models from Tensorflow.js (Common Objects in Context dataset), available from pallete node-red-contribtensorflow [13, 14]. A simple flow for interfacing the camera and sending images to Cloud is shown in **Figure 11**. The flow consists of an inject node followed by execute node which contains the command to run the python program and a message payload node to debug the messages.

#### **3.2 Project**

Once students have completed all the previous hands-on activities, they were requested to work on a project, so they can apply the methods they have learned. First, they must submit a project charter, describing the project goals,

#### **Figure 9.**

*Displaying SW-420 vibration sensor data in form of chart.*

#### **Figure 10.**

*Example of Zigbee architecture for agriculture application.*

**Figure 11.** *Simple flow for interfacing the camera and sending images to Cloud.*

responsibilities of team members, resources/bill of materials, references to literature and timing charts. Students should be made conscious of the professional ethics while working on this project. We consider the following facts as academic dishonesty offenses:


Some of the project ideas identified by the students for this course are:

