FIoT Unit-2
FIoT Unit-2
* MACHINE-TO-MACHINE COMMUNICATIONS *
Machine-to-Machine (M2M) refers to networking of machines (or devices) for the purpose of remote
monitoring and control and data exchange. M2M, is the Communication between machines or devices with
computing and communication facilities, without any human intervention. Term which is often synonymous with
IoT is Machine-to-Machine (M2M). IoT and M2M are often used interchangeably.
Example:
Features of M2M:
M2M communication consists of 3 domains like M2M Application Domain, M2M Network Domain and
M2M Device Domain.
M2M Device Domain: It consists of Physical devices, controllers (sensors and edge nodes),
Connecting Interface, and Communication Gateway.
M2M Network Domain: It consists of Connectivity, Server, Device management, Network
Management, Data Analysis, Data accumulation(storage) management, Message Delivery
(Unicast or multicast).
M2M Application Domain: It consists of the Applications reporting, Analysis, control with
collaboration, and Integration.
Fig. Shows the end-to-end architecture of M2M systems comprises of M2M area networks, communication
networks and application domain.
An M2M area network comprises of machines (or M2M nodes) which have embedded network
modules for sensing, actuation and communicating various communication protocols can be used for
M2M LAN such as ZigBee, Bluetooth, M-bus, Wireless M-Bus etc., These protocols provide
connectivity between M2M nodes within an M2M area network.
The communication network provides connectivity to remote M2M area network. It can use either wired
or wireless network (IP based).
To enable the communication between remote M2M are network, M2M gateways are used.
M2M Gateway:
The communication between M2M nodes and the M2M gateway is based on the communication
protocols which are naive to the M2M are network. M2M gateway performs protocol translations to
enable Ip-connectivity for M2M are networks. M2M gateway acts as a proxy performing translations
from/to native protocols to/from Internet Protocol (IP). With an M2M gateway, each mode in an M2M
area network appears as a virtualized node for external M2M area networks.
M2M communication is crucial in IoT because it enables real-time operation and remote interaction of
devices. Moreover, it enhances remote control, robotics, security, traffic, logistics, fleet management,
and automotive functions.
Fig. Shows a block diagram of an M2M gateway
Machine-to-machine communication decreases time, conserves bandwidth, and enables machines to act
independently. Moreover, the goal is to minimize human involvement and tasks.
Need of Interoperability:
Physical objects can interact with any other physical objects and can share their information. Any device
can communicate with other devices anytime from anywhere Machine to Machine
communication(M2M), Device to Device Communication (D2D), Device to Machine Communication
(D2M). Seamless device integration with IoT network.
Heterogeneity:
Different wireless communication protocols such as ZigBee (IEEE 802.15.4), Bluetooth (IEEE
802.15.1), GPRS, 6LowPAN, and Wi-Fi (IEEE 802.11). Different wired communication protocols like
Ethernet (IEEE 802.3) and Higher Layer LAN Protocols (IEEE 802.1). Different programming
languages used in computing systems and websites such as JavaScript, JAVA, C, C++, Visual Basic,
PHP, and Python. Different hardware platforms such as Crossbow, NI, etc. Different operating systems
example, for sensor node: TinyOS, SOS, Mantis OS, RETOS, and mostly vendor specific OS. As an
example, for personal computer: Windows, Mac, Unix, and Ubuntu. Different databases: DB2, MySQL,
Oracle, PostgreSQL, SQLite, SQL Server, and Sybase.
Types of Interoperability
Device identification and categorization for discovery: There are different solutions for generating
unique address like Electronic Product Codes (EPC), Universal Product Code (UPC), Uniform Resource
Identifier (URI), IP Addresses (IPv6).
Syntactic Interoperability for Device Interaction: The interoperability between devices and device
user in term of message formats. The message format from a device to a user is understandable for the
user’s computer. On the other hand, the message format from the user to the device is executable by
the device.
Semantic Interoperability for Device Interaction: The interoperability between devices and device
user in term of message’s meaning. The device can understand the meaning of user’s instruction that is
sent from the user to the device. Similarly, the user can understand the meaning of device’s response
sent from the
device.
Universal Middleware Bridge (UMB): Solves seamless interoperability problems caused by the
heterogeneity of several kinds of home network middleware. UMB creates virtual maps among the
physical devices of all middleware home networks, such as HAVI, Jini, LonWorks, and UPnP. Creates a
compatibility among these middleware home networks. UMB consists of UMB Core (UMB-C) and
UMB Adaptor (UMB-A). UMB-A converts physical devices into virtually abstracted one, as described
by Universal Device Template (UDT). UDT consists of a Global Device ID, Global Function ID, Global
Action ID, Global Event ID, and Global Parameters.
Features of Arduino:
• Arduino boards are able to read analog or digital input signals from different sensors and turn it into an
output such as activating a motor, turning LED on/off, connect to the cloud and many other actions.
• You can control your board functions by sending a set of instructions to the microcontroller on the
board via Arduino IDE (referred to as uploading software).
• Unlike most previous programmable circuit boards, Arduino does not need an extra piece of hardware
(called a programmer) in order to load a new code onto the board. You can simply use a USB cable.
• Additionally, the Arduino IDE uses a simplified version of C++, making it easier to learn to program.
• Finally, Arduino provides a standard form factor that breaks the functions of the micro-controller into a
more accessible package.
We will study the Arduino UNO board because it is the most popular board in the Arduino board family.
In addition, it is the best board to get started with electronics and coding. Some boards look a bit
different from the one given below, but most Arduinos have majority of these components in common.
Arduino IDE:
After learning about the main parts of the Arduino UNO board, we are ready to learn how to set up the
Arduino IDE. Once we learn this, we will be ready to upload our program on the Arduino board.
In this section, we will learn in easy steps, how to set up the Arduino IDE on our computer and prepare
the board to receive the program via USB cable.
Step 1 − First you must have your Arduino board (you can choose your favorite board) and a USB
cable.
In case you use Arduino UNO, Arduino Duemilanove, Nano, Arduino Mega 2560, or Diecimila, you
will need a standard USB cable (A plug to B plug), the kind you would connect to a USB printer as
shown in the following image.
You can get different versions of Arduino IDE from the Download page on the Arduino Official website.
You must select your software, which is compatible with your operating system (Windows, IOS, or
Linux). After your file download is completed, unzip the file.
The Arduino Uno, Mega, Duemilanove and Arduino Nano automatically draw power from either, the
USB connection to the computer or an external power supply. If you are using an Arduino Diecimila,
you have to make sure that the board is configured to draw power from the USB connection. The power
source is selected with a jumper, a small piece of plastic that fits onto two of the three pins between the
USB and power jacks. Check that it is on the two pins closest to the USB port. Connect the Arduino
board to your computer using the USB cable. The green power LED (labeled PWR) should glow.
After your Arduino IDE software is downloaded, you need to unzip the folder. Inside the folder, you can
find the application icon with an infinity label (application.exe). Double-click the icon to start the IDE
To open an existing project example, select File → Example → Basics → Blink.( It turns the LED on
and off)
To avoid any error while uploading your program to the board, you must select the correct Arduino
board name, which matches with the board connected to your computer.
Go to Tools → Board and select your board like Arduino Uno board.
Select the serial device of the Arduino board. Go to Tools → Serial Port menu. This is likely to be
COM3 or higher (COM1 and COM2 are usually reserved for hardware serial ports). To find out, you can
disconnect your Arduino board and re-open the menu, the entry that disappears should be of the Arduino
board. Reconnect the board and select that serial port.
Before explaining how we can upload our program to the board, we must demonstrate the function of
each symbol appearing in the Arduino IDE toolbar.
A basic example of this is a button and an LED. We can write a conditional that checks if a button is
pressed, turn on the LED, and turn it off if the button is not pressed. In an Arduino program, it looks like
this:
else
Output:
When working with Arduino, it is important to understand sensors and actuators, Integration and the
difference between them.
SENSORS:
Basic electronic Device. That convert a physical quantity/ measurement into electrical signals.
Can be analog or digital.
A sensor, in simple terms, is used to sense its environment, meaning it records a physical
parameter, for example temperature, and converts it into an electronic signal.
Sensors can also take the form of just a simple button: when a state changes (we pressed a
button), the electronic signal is switched from low to high (0 to 1).
Luckily, a lot of sensors are accompanied by software libraries, which makes it a lot easier to
read. In many cases using a library, all we need is just one line of code:
sensorValue = sensor.read();
Types of Sensors
Temperature
Humidity
Compass
Light
Sound
Accelerometer
PIN 2- Data
PIN 3-Null
PIN 4- Ground
ACTUATORS:
Data Actuation is a process of sampling signals that measure real world physical conditions and
converting resulting samples int digital numeric values which are manipulated by computer.
Data Actuation System (DAS) will perform tasks such as conversion of data, storage, transmission and
processing data.
Actuators converts electric signals into e.g. radiant energy (light) or mechanical energy (movement).
How actuators are controlled really depends on what type of component we have. The most simple
way is to simply turn something on/off, while more advanced is controlling the amount of voltage a
component receives (i.e. the speed of a motor).