0% found this document useful (0 votes)
5 views13 pages

FIoT Unit-2

The document covers the fundamentals of the Internet of Things (IoT), focusing on Machine-to-Machine (M2M) communications, interoperability, Arduino programming, and the integration of sensors and actuators. It explains the architecture of M2M systems, the importance of interoperability in IoT, and provides a guide to programming with Arduino, including setting up the IDE and interfacing with sensors and actuators. Key concepts include the differences between IoT and M2M, the role of M2M gateways, and the functionality of various sensors and actuators.

Uploaded by

22wh1a05i1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views13 pages

FIoT Unit-2

The document covers the fundamentals of the Internet of Things (IoT), focusing on Machine-to-Machine (M2M) communications, interoperability, Arduino programming, and the integration of sensors and actuators. It explains the architecture of M2M systems, the importance of interoperability in IoT, and provides a guide to programming with Arduino, including setting up the IDE and interfacing with sensors and actuators. Key concepts include the differences between IoT and M2M, the role of M2M gateways, and the functionality of various sensors and actuators.

Uploaded by

22wh1a05i1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

FUNDAMENTALS OF INTERNET OF THINGS(IoT)

Unit-II: Machine-to-Machine Communications, Difference between IoT and M2M,


Interoperability in IoT, Introduction to Arduino Programming, Integration of Sensors and
Actuators with Arduino

* 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:

1. Controlling of Electronic devices like fans and bulbs using Bluetooth.


2. Objects talk to each other like cellular phone with 2G/3G using a network without human.

Features of M2M:

• Large number of nodes or devices.

• Low cost and Energy efficient.

• Small traffic per machine/device.

• Large quantity of collective data.

• M2M communication free from human intervention.

M2M System Architecture:

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.

* DIFFERENCE BETWEEN IOT AND M2M*


* INTEROPERABILITY IN IOT*

Interoperability is a characteristic of a product or system, whose interfaces are completely understood, to


work with other products or systems, present or future, in either implementation or access, without any
restrictions.

Need of Interoperability:

 To fulfil the IoT objectives:

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

1. User Interoperability: Interoperability problem between a user and a device

The following problems need to be solved

• Device identification and categorization for discovery

• Syntactic interoperability for device interaction.

• Semantic interoperability for device interaction.

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.

2. Device Interoperability: Interoperability problem between two different devices

Solution approach for device interoperability.

• Universal Middleware Bridge (UMB)

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.

* INTRODUCTION TO ARDUINO PROGRAMMING*

Arduino is a prototype platform (open-source) based on an easy-to-use Hardware and Software. It


consists of a circuit board, which can be programed (referred to as a microcontroller) and a ready-
made software called Arduino IDE (Integrated Development Environment), which is used to write and
upload the computer code to the physical board.

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.

Components of Arduino Board:

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.

Step 2 − Download Arduino IDE Software.

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.

Step 3 − Power up your board.

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.

Step 4 − Launch Arduino IDE.

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

Step 5 − Open your first project.

Once the software starts, you have two options −

• Create a new project.


• Open an existing project

To create a new project example, select File → New.

To open an existing project example, select File → Example → Basics → Blink.( It turns the LED on
and off)

Step 6 − Select your Arduino board.

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.

Step 7 − Select your serial port.

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.

Step 8 − Upload the program to your board.

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.

Example using Arduino:

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:

int buttonState = digitalRead(buttonPin); //read and store the button state (0 or 1)

if(buttonState == HIGH){ //check if state is high (button is pressed)

digitalWrite(LED, HIGH); //turn on LED

else

digitalWrite(LED, LOW); //turn off LED


}

Output:

* INTEGRATION OF SENSORS AND ACTUATORS WITH ARDUINO*

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

Sensor Interface with Arduino

Digital Humidity and Temperature Sensor (DHT)

PIN 1,2,3,4 (from left to right)

PIN 1-3.3V-5V Power supply

PIN 2- Data

PIN 3-Null

PIN 4- Ground

ACTUATORS:

An actuator, in simple terms, is used to actuate or change a physical state.

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.

Types of DAS: Digital DAS and Analog DAS.

Some examples are:

 A light (such as an LED).


 A motor.
 A switch.

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).

To control actuators, it is common to use


digitalWrite() and analogWrite()

You might also like