Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
34 views

402C Unit - 2 IoT

Sensor networks comprise groups of small, powered devices and a wireless or wired infrastructure that record conditions in various environments like industrial facilities, farms, and hospitals. Sensor networks connect to the internet or computer networks to transfer data for analysis and use. Sensor nodes cooperatively sense and control the environment, enabling interaction between people, computers and the surrounding environment. Sensor networks can be wired or wireless, with wireless sensor networks being easier to deploy and maintain and offering more flexibility. Sensor networks typically include sensor nodes, actuator nodes, gateways, and clients that form networks to monitor data which is transmitted to management nodes.

Uploaded by

satheesh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views

402C Unit - 2 IoT

Sensor networks comprise groups of small, powered devices and a wireless or wired infrastructure that record conditions in various environments like industrial facilities, farms, and hospitals. Sensor networks connect to the internet or computer networks to transfer data for analysis and use. Sensor nodes cooperatively sense and control the environment, enabling interaction between people, computers and the surrounding environment. Sensor networks can be wired or wireless, with wireless sensor networks being easier to deploy and maintain and offering more flexibility. Sensor networks typically include sensor nodes, actuator nodes, gateways, and clients that form networks to monitor data which is transmitted to management nodes.

Uploaded by

satheesh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

UNIT-II

 What are Sensor Networks


Today sensors are everywhere. We take these for granted, but sensors are in our phones,
workplaces, vehicles, and the environment.
A sensor network comprises a group of small, powered devices, and a wireless or wired networked
infrastructure. They record conditions in any number of environments including industrial facilities,
farms, and hospitals. The sensor network connects to the internet or compu ter networks to transfer
data for analysis and use.
Sensor network nodes cooperatively sense and control the environment. They enable interaction
between persons or computers and the surrounding environment.
Figure 1, illustrates the widespread use of sensors connected via multiple sensor networks.

Wired vs. Wireless Sensor Networks


Sensor networks can be wired or wireless. Wired sensor networks use ethernet cables to connect
sensors. Wireless sensor networks (WSNs) use technologies such as Bluetooth, cellular, wifi or
near field communication (NFC) to connect sensors.
WSNs are easier to deploy and maintain and offer better flexibility of devices. With the rapid
development of sensors and wireless technologies, WSNs have become a key technology of the
IoT. WSNs don't need the physical network infrastructure to be modified. Lesson
Operation of a Sensor Network
Sensor networks typically include sensor nodes, actuator nodes, gateways, and clients. Sensor nodes
group inside the sensor field and form networks of different topologies. The following process
describes how sensor networks operate:
 A sensor node monitors the data collected by the sensor and transmits this to other sensor nodes.
 During the transmission process, data may be handled by multiple nodes as it reaches a gateway
node.
 The data is then transferred to the management node.
 The management node is managed by the user and determines the monitoring required and
collects the monitored data.
Figure 2, shows the components of a sensor network.

RCR Institute of Management & Technology Page 1


Prepared By Mrs.P.Lalitha, Dept.of MCA Internet of Things
Sensor Nodes
There are many nodes in a sensor network.
These nodes are the detection stations. There
is a sensor/transducer, microcontroller,
transceiver, and power source:
 A sensor senses the physical condition,
and if there is any change, it generates
electrical signals.
 The signals go to the microcontroller for processing.
 A central processor sends commands to the transceiver and data is transmitted to a computer.
Sensors
The sensor is the bond of a sensor network node. Examples of sensors include temperature sensors,
accelerometers, infrared detectors, proximity sensors, and motion detectors.
Figure 3, shows the sensors used in a self-driving (autonomous) car.

Sensors are used for sensing things and devices etc.A device that provides a usable output in
response to a specified measurement.
The sensor attains a physical parameter and converts it into a signal suitable for processing (e.g.
electrical, mechanical, optical) the characteristics of any device or material to detect the presence
of a particular physical quantity. The output of the sensor is a signal which is converted to a
human-readable form like changes in characteristics, changes in resistance, capacitance,
impedance etc.

IOT HARDWARE

RCR Institute of Management & Technology Page 2


Prepared By Mrs.P.Lalitha, Dept.of MCA Internet of Things
Transducer :
 A transducer converts a signal from one physical structure to another.
 It converts one type of energy into another type.
 It might be used as actuators in various systems.
What Is A Sensor?
A sensor is an electronic instrument that translates real-world parameters into electrical signals. It
can take the shape of a basic switch or be a more complicated sensor depending on the application.
Sensors are integrated in a way that they can interact with the surrounding environment to sense the
input energy. A transduction element is used to convert this sensed energy into a more consistent
form.
To understand their function, let’s say you need to adjust the altitude of an aircraft, and for this
purpose, you need to develop a control system for it. Just fixing the fuel throttle won’t get the job
done – you need to adjust it for each touch point when there’s a variance in speed, such as when the
airplane goes down or up. Using a sensor can help you measure the speed and convert it into a
readable form for the control system. Based on the measured speed, the connected electronic device
will adjust the throttle.
Sensors exist in various forms and shapes. Here are some of the common ones:
 Biosensors – are typically used in electronically technology. Medical devices use them to
analyze proteins, cells, and more.
 IR sensor – helps measure distance by estimating the depth of IR reflection.
 Temperature sensor – converts temperature changes into electrical signals with the help of
the thermodynamic principle.
 Image sensor – leverages CMOS (Complementary Metal Oxide Sensor) technology to
identify and transfer the details used to create images. You’ll find these sensors in surveillance and
consumer electronics devices.
 Motion detectors – are based on radar, microwave, and ultrasonic technologies. They
generate waves and use echo to determine nearby motion and obstacles in their pathways.
Key Differences Between Actuators and Sensors
Here are the main differences between the two components:
 Sensors identify events or alternations in the environment and transmit this information to
other devices, while actuators are machine components that control the moving mechanism.
 Sensors are placed at the input port, while actuators are fixed at the output port.
 Sensors measure both continuous process and discrete variables. In contrast, actuators help
impel the parameters of these two processes.
 A sensor will convert any physical attribute to a control signal, while an actuator does the
opposite, changing the control signal to physical action.
 Actuators’ industrial applications include valves, couplings, and operating dampers. On the
other hand, sensors are used to analyze asset vibration, fluid level, or pressure.
 Some non-industrial devices that utilize sensors include cameras, microphones, and home
security systems. Other devices like motor controllers, LED, and lasers use actuators.
 Actuators and sensors often depend on each other to perform certain tasks. Where both are
present, the actuator relies on the sensor to power its function. If one or the other fails to work
correctly, the system will malfunction. In most instances, either the actuator triggers the action, and
the sensor transmits the signal, or actuator movements help the sensor send out alerts.
Sensors characteristics :
1. Static
RCR Institute of Management & Technology Page 3
Prepared By Mrs.P.Lalitha, Dept.of MCA Internet of Things
2. Dynamic
1. Static characteristics :
It is about how the output of a sensor changes in response to an input change after steady state
condition.
 Accuracy –
Accuracy is the capability of measuring instruments to give a result close to the true value of the
measured quantity. It measures errors. It is measured by absolute and relative errors. Express the
correctness of the output compared to a higher prior system. Absolute error = Measured value –
True value
Relative error = Measured value/True value
 Range –
Gives the highest and the lowest value of the physical quantity within which the sensor can
actually sense. Beyond these values, there is no sense or no kind of response.
e.g. RTD for measurement of temperature has a range of -200`c to 800`c.
 Resolution –
Resolution is an important specification towards selection of sensors. The higher the resolution,
better the precision. When the accretion is zero to, it is called threshold.
Provide the smallest changes in the input that a sensor is able to sense.
 Precision –
It is the capacity of a measuring instrument to give the same reading when repetitively measuring
the same quantity under the same prescribed conditions.
It implies agreement between successive readings, NOT closeness to the true value.
It is related to the variance of a set of measurements.
It is a necessary but not sufficient condition for accuracy.
 Sensitivity –
Sensitivity indicates the ratio of incremental change in the response of the system with respect to
incremental change in input parameters. It can be found from the slope of the output
characteristics curve of a sensor. It is the smallest amount of difference in quantity that will
change the instrument’s reading.
 Linearity –
The deviation of the sensor value curve from a particular straight line. Linearity is det ermined by
the calibration curve. The static calibration curve plots the output amplitude versus the input
amplitude under static conditions.
A curve’s slope resemblance to a straight line describes the linearity.
 Drift –
The difference in the measurement of the sensor from a specific reading when kept at that value
for a long period of time.
 Repeatability –
The deviation between measurements in a sequence under the same conditions. The
measurements have to be made under a short enough time duration so as not to allow significant
long-term drift.
Dynamic Characteristics :
Properties of the systems
 Zero-order system –
The output shows a response to the input signal with no delay. It does not include energy -storing

RCR Institute of Management & Technology Page 4


Prepared By Mrs.P.Lalitha, Dept.of MCA Internet of Things
elements.
Ex. potentiometer measure, linear and rotary displacements.
 First-order system –
When the output approaches its final value gradually.
Consists of an energy storage and dissipation element.
 Second-order system –
Complex output response. The output response of the sensor oscillates before steady state.
Sensor Classification:
 Passive & Active
 Analog & digital
 Scalar & vector
1. Passive Sensor –
Can not independently sense the input. Ex- Accelerometer, soil moisture, water level and
temperature sensors.
2. Active Sensor –
Independently sense the input. Example- Radar, sounder and laser altimeter sensors.
3. Analog Sensor –
The response or output of the sensor is some continuous function of its input parameter. Ex -
Temperature sensor, LDR, analog pressure sensor and analog hall effect.
4. Digital sensor –
Response in binary nature. Design to overcome the disadvantages of analog sensors. Along with
the analog sensor, it also comprises extra electronics for bit conversion. Example – Passive
infrared (PIR) sensor and digital temperature sensor(DS1620).
5. Scalar sensor –
Detects the input parameter only based on its magnitude. The answer for the sensor is a function
of magnitude of some input parameter. Not affected by the direction of input parameters.
Example – temperature, gas, strain, color and smoke sensor.
6. Vector sensor –
The response of the sensor depends on the magnitude of the direction and orientation of input
parameter. Example – Accelerometer, gyroscope, magnetic field and motion detector sensors.
 Actuators in IoT
An IoT device is made up of a Physical object (“thing”) + Controller (“brain”) + Sensors +
Actuators + Networks (Internet). An actuator is a machine component or system that moves or
controls the mechanism or the system. Sensors in the device sense the environment, then control
signals are generated for the actuators according to the actions needed to perform.
A servo motor is an example of an actuator. They are linear or rotatory actuators, can move to a
given specified angular or linear position. We can use servo motors for IoT applications and make
the motor rotate to 90 degrees, 180 degrees, etc., as per our need.
What Is an Actuator?
An actuator is a device that takes an electrical signal (control input) and blends it with an energy
source to create movement. Typically, actuators receive control input in the form of electric current
or voltage, but they can also accommodate hydraulic fluid, hydraulic or pneumatic pressure. The
device then uses the control signal to generate a change in the physical system via generating
motion, heat, or force. Popular examples of actuators include hydraulic cylinders, comb drives, and

RCR Institute of Management & Technology Page 5


Prepared By Mrs.P.Lalitha, Dept.of MCA Internet of Things
electric motors. A stepper motor where an electrical pulse drives a motor is also a common example
of an actuator.
Of course, electric actuators receive their power from an electronics circuit. Some examples of this
actuator type are servo motors, stepper motors, and AC motors. Then there are hybrid actuators that
have electric controls integrated in addition to the current elements. You’ll find these actuators in
advanced applications like robots and IoT devices.
The following diagram shows what actuators do, the controller directs the actuator based on the
sensor data to do the work

Working of IoT devices and use of Actuators


The control system acts upon an environment through the actuator. It requires a source of energy
and a control signal. When it receives a control signal, it converts the source of energy to a
mechanical operation. On this basis, on which form of energy it uses, it has different types given
below.
Types of Actuators:
1. Hydraulic Actuators –
A hydraulic actuator uses hydraulic power to perform a mechanical operation. They are actuated by
a cylinder or fluid motor. The mechanical motion is converted to rotary, linear, or oscillatory
motion, according to the need of the IoT device. Ex- construction equipment uses hydraulic
actuators because hydraulic actuators can generate a large amount of force.
Advantages:
 Hydraulic actuators can produce a large magnitude of force and high speed.
 Used in welding, clamping, etc.
 Used for lowering or raising the vehicles in car transport carriers.
Disadvantages:
 Hydraulic fluid leaks can cause efficiency loss and issues of cleaning.
 It is expensive.
 It requires noise reduction equipment, heat exchangers, and high maintenance systems.
2. Pneumatic Actuators –
A pneumatic actuator uses energy formed by vacuum or compressed air at high pressure to convert
into either linear or rotary motion. Example- Used in robotics, use sensors that work like human
fingers by using compressed air.
Advantages:
 They are a low-cost option and are used at extreme temperatures where using air is a safer
option than chemicals.
 They need low maintenance, are durable, and have a long operational life.
 It is very quick in starting and stopping the motion.
RCR Institute of Management & Technology Page 6
Prepared By Mrs.P.Lalitha, Dept.of MCA Internet of Things
Disadvantages:
 Loss of pressure can make it less efficient.
 The air compressor should be running continuously.
 Air can be polluted, and it needs maintenance.
3. Electrical Actuators –
An electric actuator uses electrical energy, is usually actuated by a motor that converts electrical
energy into mechanical torque. An example of an electric actuator is a solenoid based electric bell.
Advantages:
 It has many applications in various industries as it can automate industrial valves.
 It produces less noise and is safe to use since there are no fluid leakages.
 It can be re-programmed and it provides the highest control precision positioning.
Disadvantages:
 It is expensive.
 It depends a lot on environmental conditions.
Other actuators are –
 Thermal/Magnetic Actuators
These are actuated by thermal or mechanical energy. Shape Memory Alloys (SMAs) or Magnetic
Shape‐Memory Alloys (MSMAs) are used by these actuators. An example of a thermal/magnetic
actuator can be a piezo motor using SMA.
 Mechanical Actuators
A mechanical actuator executes movement by converting rotary motion into linear motion. It
involves pulleys, chains, gears, rails, and other devices to operate. Example – A crankshaft.
 Soft Actuators
 Shape Memory Polymers
 Light Activated Polymers
 With the expanding world of IoT, sensors and actuators will find more usage in commercial
and domestic applications along with the pre-existing use in industry.
Examples and working of Sensors and Actuators
Actuators and sensors are two vital components of embedded and electronic systems. Actuators
form a link with the output ports while sensors connect to the input ports of a given system. These
components are used to facilitate efficient output in many real-life applications such as process
control systems in nuclear reactors, home automation and security systems, and aircraft flight
control systems. Both actuators and sensors play a significant role in condition-based maintenance.
Plus, they serve as a mediator between the electronic system where they are embedded and the
physical environment.
Although they frequently work together, actuators and sensors differ from each other in function
and purpose. Below is an in-depth definition of each component and a list of areas where they act
differently.
 Introduction To Auduino
Arduino is an open-source platform used for building electronics projects. Arduino consists of both
a physical programmable circuit board (often referred to as a microcontroller) and a piece of
software, or IDE (Integrated Development Environment) that runs on your computer, used to write
and upload computer code to the physical board. Accepts analog and digital signals as input and
gives desired output.

RCR Institute of Management & Technology Page 7


Prepared By Mrs.P.Lalitha, Dept.of MCA Internet of Things
ARDUIN0 UN0 BOARD DETAILS:
 Power Supply:
Feature Value
 USB or power barrel jack
OperatingVoltage 5V  Voltage Regulator
ClockSpeed 16MHz  LED Power Indicator
 Tx-Rx LED Indicator
Digital I/O 14  Output power,
AnalogInput 6  Ground
 Analog Input Pins
PWM 6
 Digital I/O Pin
UART 1 SET UP:
Interface USB via ATMega16U2  Power the board by connecting it to a PC
via USB cable
 Launch the Arduino IDE
 Set the board type and the port for the board
 TOOLS -> BOARD -> select your board
 TOOLS -> PORT -> select your port
TYPES:
1. Arduino Uno (R3)
2. LilyPad Arduino
3. RedBoard
4. Arduino Mega (R3)
5. Arduino Leonardo

Fig. 1 Arduino Board


Power (USB / Barrel Jack):
Every Arduino board needs a way to be connected to a power source. The Arduino UNO can be
powered from a USB cable coming from your computer or a wall power supply (like this) that is
terminated in a barrel jack. In the picture above the USB connection is labeled (1) and the barrel
jack is labeled (2). The USB connection is also how you will load code onto your Arduino board.

RCR Institute of Management & Technology Page 8


Prepared By Mrs.P.Lalitha, Dept.of MCA Internet of Things
NOTE: Do NOT use a power supply greater than 20 Volts as you will overpower (and thereby
destroy) Arduino. The recommended voltage for most Arduino models is between 6 and 12 Volts.
Pins (5V, 3.3V, GND, Analog, Digital, PWM, AREF):
The pins on your Arduino are the places where you connect wires to construct a circuit (probably in
conjunction with a breadboard and some wire. They usually have black plastic ‘headers’ that allow
you to just plug a wire right into the board. The Arduino has several different kinds of pins, each of
which is labeled on the board and used for different functions.
GND (3): Short for ‘Ground’. There are several GND pins on the Arduino, any of which can be
used to ground your circuit.
5V (4) & 3.3V (5): As you might guess, the 5V pin supplies 5 volts of power, and the 3.3V pin
supplies 3.3 volts of power. Most of the simple components used with the Arduino run happily off of
5 or 3.3 volts.
Analog (6): The area of pins under the ‘Analog In’ label (A0 through A5 on the UNO) are Analog
In pins. These pins can read the signal from an analog sensor (like a temperature sensor) and convert it
into a digital value that we can read.
Digital (7): Across from the analog pins are the digital pins (0 through 13 on the UNO). These pins
can be used for both digital input (like telling if a button is pushed) and digital output (like powering
an LED).
PWM (8): You may have noticed the tilde (~) next to some of the digital pins (3, 5, 6, 9, 10, and 11
on the UNO). These pins act as normal digital pins, but can also be used for something called Pulse-
Width Modulation (PWM). We have a tutorial on PWM, but for now, think of these pins as being
able to simulate analog output (like fading an LED in and out).
AREF (9): Stands for Analog Reference. Most of the time you can leave this pin alone. It is
sometimes used to set an external reference voltage (between 0 and 5 Volts) as the upper limit for
the analog input pins.
Reset Button
Just like the original Nintendo, the Arduino has a reset button (10). Pushing it will temporarily
connect the reset pin to ground and restart any code that is loaded on the Arduino. This can be very
useful if your code doesn’t repeat, but you want to test it multiple times. Unlike the original
Nintendo however, blowing on the Arduino doesn’t usually fix any problems.
Power LED Indicator
Just beneath and to the right of the word “UNO” on your circuit board, there’s a tiny LED next to the
word ‘ON’ (11). This LED should light up whenever you plug your Arduino into a power source. If
this light doesn’t turn on, there’s a good chance something is wrong. Time to re- check your circuit!
TX RX LEDs
TX is short for transmit, RX is short for receive. These markings appear quite a bit in electronics to
indicate the pins responsible for serial communication. In our case, there are two places on the
Arduino UNO where TX and RX appear – once by digital pins 0 and 1, and a second time next to
the TX and RX indicator LEDs (12). These LEDs will give us some nice visual indications
whenever our Arduino is receiving or transmitting data (like when we’re loading a new program
onto the board).
Main IC
The black thing with all the metal legs is an IC, or Integrated Circuit (13). Think of it as the brains
of our Arduino. The main IC on the Arduino is slightly different from board type to board type, but
is usually from the ATmega line of IC’s from the ATMEL company. This can be important, as you
RCR Institute of Management & Technology Page 9
Prepared By Mrs.P.Lalitha, Dept.of MCA Internet of Things
may need to know the IC type (along with your board type) before loading up a new program from the
Arduino software. This information can usually be found in writing.
Voltage Regulator
The voltage regulator (14) is not actually something you can (or should) interact with on the
Arduino. But it is potentially useful to know that it is there and what it’s for. The voltage regulator
does exactly what it says – it controls the amount of voltage that is let into the Arduino board. Think of
it as a kind of gatekeeper; it will turn away an extra voltage that might harm the circuit. Of course,
it has its limits, so don’t hook up your Arduino to anything greater than 20 volts.
ARDINO IDE OVERVIEW:
Program coded in Arduino IDE is called a SKETCH
1.To create a new sketchFile -> New To open an existing sketch File -> open ->
There are some basic ready-to-use sketches available in the EXAMPLES section File ->
Examples -> select any program
2.Verify: Checks the code for compilation errors
3.Upload: Uploads the final code to the controller board
4.New: Creates a new blank sketch with basic structure
5.Open: Opens an existing sketch
6.Save: Saves the current sketch

Fig. 2 Compilation and Execution


Serial Monitor: Opens the serial console
All the data printed to the console are displayed here

Fig. 3 Structure of SKETCH

RCR Institute of Management & Technology Page 10


Prepared By Mrs.P.Lalitha, Dept.of MCA Internet of Things
A sketch can be divided into two parts: Setup ()
Loop()
The function setup() is the point where the code starts, just like the main() function in C andC++
I/O Variables, pin modes are initialized in the Setup() functionLoop() function, as the name
suggests, iterates the specified task in the program
DATA TYPES:
Void ,Long, Int ,Char ,Boolean, Unsigned char ,Byte, Unsigned int, Word ,Unsigned
long,Float,Double,
Array
,String-char
array,
String-object,
Short
Arduino Function libraries
Input/Output Functions:
The arduino pins can be configured to act as input or output pins using the pinMode() function Void
setup ()
{
pinMode (pin , mode);
}
Pin- pin number on the Arduino board Mode- INPUT/OUTPUT digitalWrite() : Writes a HIGH or
LOW value to a digital pin
analogRead() : Reads from the analog input pin i.e., voltage applied across the pin
Character functions such as isdigit(), isalpha(), isalnum(), isxdigit(), islower(), isupper(),
isspace() return 1(true) or 0(false)
Delay() function is one of the most common time manipulation function used to provide a delayof
specified time. It accepts integer value (time in miliseconds).
EXAMPLE BLINKING LED:
Requirement:
Arduino controller board, USB connector, Bread board, LED, 1.4Kohm resistor, connecting wires,
Arduino IDE
Connect the LED to the Arduino using the Bread board and the connecting wiresConnect the
Arduino board to the PC using the USB connector
Select the board type and port
Write the sketch in the editor, verify and upload
Connect the positive terminal of the LED to digital pin 12 and the negative terminal to the
ground pin (GND) of Arduino Board
void setup()
{
pinMode(12, OUTPUT); // set the pin mode
} void loop()

RCR Institute of Management & Technology Page 11


Prepared By Mrs.P.Lalitha, Dept.of MCA Internet of Things
{
digitalWrite(12, HIGH); // Turn on the LED delay(1000); digitalWrite(12, LOW); //Turn of the LED
delay(1000);
}
 RASPBERRY PI:
Raspberry Pi is a credit card sized micro processor available in different models with different
processing speed starting from 700 MHz. Whether you have a model B or model B+, or the very old
version, the installation process remains the same. People who have checked out the official
Raspberry Pi website, But using the Pi is very easy and from being a beginner, one will turn pro in
no time. So, it's better to go with the more powerful and more efficient OS, the Raspbian. The main
reason why Raspbian is extremely popular is that it has thousands of pre built libraries to perform
many tasks and optimize the OS. This forms a huge advantage while building applications.

Fig. 4 Raspberry Pi Elements


As for the specifications, the Raspberry Pi is a credit card-sized computer powered by the
Broadcom BCM2835 system-on-a-chip (SoC). This SoC includes a 32-bit ARM1176JZFS
processor, clocked at 700MHz, and a Videocore IV GPU. It also has 256MB of RAM in a POP
package above the SoC. The Raspberry Pi is powered by a 5V micro USB AC charger or at least 4
AA batteries (with a bit of hacking). While the ARM CPU delivers real-world performance similar
to that of a 300MHz Pentium 2, the Broadcom GPU is a very capable graphics core capable of
hardware decoding several high definition video formats. The Raspberry Pi model available for
purchase at the time of writing — the Model B — features HDMI and composite video outputs,
two USB 2.0 ports, a 10/100 Ethernet port, SD card slot, GPIO (General Purpose I/O Expansion
Board) connector, and analog audio output (3.5mm headphone jack). The less expensive Model A
strips out the Ethernet port and one of the USB ports but otherwise has the same hardware.
Raspberry Pi Basics: installing Raspbian and getting it up and running.

RCR Institute of Management & Technology Page 12


Prepared By Mrs.P.Lalitha, Dept.of MCA Internet of Things
1 Downloading Raspbian and Image writer.
You will be needing an image writer to write the downloaded OS into the SD card (micro SD card
in case of Raspberry Pi B+ model). So download the "win32 disk imager" from the website.
2 Writing the image
Insert the SD card into the laptop/pc and run the image writer. Once open, browse and select the
downloaded Raspbian image file. Select the correct device, that is the drive representing the SD
card. If the drive (or device) selected is different from the SD card then the other selected drive will
become corrupted. SO be careful.
After that, click on the "Write" button in the bottom. As an example, see the image below, where
the SD card (or micro SD) drive is represented by the letter "G:\"

Fig. OS Installation
Once the write is complete, eject the SD card and insert it into the Raspberry Pi and turn it on.It
should start booting up.
Setting up the Pi
Please remember that after booting the Pi, there might be situations when the user credentials like
the "username" and password will be asked. Raspberry Pi comes with a default user name and
password and so always use it whenever it is being asked. The credentials are:
login: pi
password: raspberry
When the Pi has been booted for the first time, a configuration screen called the "Setup Options"
should appear and it will look like the image below.

Fig. 6 Raspberry Configuration

RCR Institute of Management & Technology Page 13


Prepared By Mrs.P.Lalitha, Dept.of MCA Internet of Things
If you have missed the "Setup Options" screen, its not a problem, you can always get it by typing
the following command in the terminal.
sudo raspi-config
Once you execute this command the "Setup Options" screen will come up as shown in the image
above.
Now that the Setup Options window is up, we will have to set a few things. After completing each
of the steps below, if it asks to reboot the Pi, please do so. After the reboot, if you don't get the
"Setup Options" screen, then follow the command given above to get the screen/window.
 The first thing to do:
select the first option in the list of the setup options window, that is select the "Expand
Filesystem" option and hit the enter key. We do this to make use of all the space present on the SD
card as a full partition. All this does is, expand the OS to fit the whole space on the SD card which
can then be used as the storage memory for the Pi
 The second thing to do:
Select the third option in the list of the setup options window, that is select the "Enable Boot To
Desktop/Scratch" option and hit the enter key. It will take you to another window called the
"choose boot option" window that looks like the image below.

Fig. 7 Boot Options


In the "choose boot option window", select the second option, that is, "Desktop Log in as user 'pi'
at the graphical desktop" and hit the enter button. Once done you will be taken back to the "Setup
Options" page, if not select the "OK" button at the bottom of this window and you will be taken
back to the previous window. We do this because we want to boot into the desktop environment
which we are familiar with. If we don't do this step then the Raspberry Pi boots into a terminal each
time with no GUI options. Once, both the steps are done, select the "finish" button at the bottom of
the page and it should reboot automatically. If it doesn't, then use the following command in the
terminal to reboot.
sudo reboot
Updating the firmware
After the reboot from the previous step, if everything went right, then you will end up on the
desktop which looks like the image below.

RCR Institute of Management & Technology Page 14


Prepared By Mrs.P.Lalitha, Dept.of MCA Internet of Things
Fig.8 Raspberry Desktop
Once you are on the desktop, open a terminal and enter the following command to update the
firmware of the Pi.
sudo rpi-update
Updating the firmware is necessary because certain models of the Pi might not have all the required
dependencies to run smoothly or it may have some bug. The latest firmware might have the fix to
those bugs, thus its very important to update it in the beginning itself.
 What is RFID (radio frequency identification)?
Radio Frequency Identification (RFID) is a method that is used to track or identify an object by
radio transmission uses over the web. Data digitally encoded in an RFID tag which might be read
by the reader. This device work as a tag or label during which data read from tags that are stored
in the database through the reader as compared to traditional barcodes and QR codes. It is often
read outside the road of sight either passive or active RFID.
RFID (radio frequency identification) is a form of wireless communication that incorporates the
use of electromagnetic or electrostatic coupling in the radio frequency portion of the
electromagnetic spectrum to uniquely identify an object, animal or person.
How does RFID work?
Every RFID system consists of three components: a scanning antenna, a transceiver and
a transponder. When the scanning antenna and transceiver are combined, they are referred to as an
RFID reader or interrogator. There are two types of RFID readers -- fixed readers and mobile
readers. The RFID reader is a network-connected device that can be portable or permanently
attached. It uses radio waves to transmit signals that activate the tag. Once activated, the tag sends a
wave back to the antenna, where it is translated into data.
The transponder is in the RFID tag itself. The read range for RFID tags varies based on factors
including the type of tag, type of reader, RFID frequency and interference in the surrounding
environment or from other RFID tags and readers. Tags that have a stronger power source also have
a longer read range.
Working Principle of RFID
Generally, RFID uses radio waves to perform AIDC function. AIDC stands for Automatic
Identification and Data Capture technology which performs object identification and collection
and mapping of the data.

RCR Institute of Management & Technology Page 15


Prepared By Mrs.P.Lalitha, Dept.of MCA Internet of Things
An antenna is an device which converts power into radio waves which are used for
communication between reader and tag. RFID readers retrieve the information from RFID tag
which detects the tag and reads or writes the data into the tag. It may include one processor,
package, storage and transmitter and receiver unit.

What are the types of RFID systems?


There are three main types of RFID systems: low frequency (LF), high frequency (HF) and ultra -
high frequency (UHF). Microwave RFID is also available. Frequencies vary greatly by country and
region.
 Low-frequency RFID systems. These range from 30 KHz to 500 KHz, though the typical
frequency is 125 KHz. LF RFID has short transmission ranges, generally anywhere from a few
inches to less than six feet.
 High-frequency RFID system These range from 3 MHz to 30 MHz, with the typical HF
frequency being 13.56 MHz The standard range is anywhere from a few inches to several feet.
 UHF RFID systems. These range from 300 MHz to 960 MHz, with the typical frequency of 433
MHz and can generally be read from 25-plus feet away.
 Microwave RFID systems. These run at 2.45 GHz and can be read from 30-plus feet away.
The frequency used will depend on the RFID application, with actual obtained distances sometimes
varying from what is expected. For example, when the U.S. State Department announced it would
issue electronic passports enabled with an RFID chip, it said the chips would only be able to be read
from approximately 4 inches away. However, the State Department soon received evidence that
RFID readers could skim the information from the RFID tags from much farther than 4 inches --
sometimes upward of 33 feet away.
If longer read ranges are needed, using tags with additional power can boost read ranges to 300-plus
feet.
RFID applications and use cases
RFID dates back to the 1940s; however, it was used more frequently in the 1970s. For a long time,
the high cost of the tags and readers prohibited widespread commercial use. As hardware costs have
decreased, RFID adoption has also increased.
Some common uses for RFID applications include:
 pet and livestock tracking
 inventory management
 asset tracking and equipment tracking

RCR Institute of Management & Technology Page 16


Prepared By Mrs.P.Lalitha, Dept.of MCA Internet of Things
 inventory control
 cargo and supply chain logistics
 vehicle tracking
 customer service and loss control
 improved visibility and distribution in the supply chain
 access control in security situations
 shipping
 healthcare
 manufacturing
 retail sales
 tap-and-go credit card payments
RFID vs. barcodes
Using RFID as an alternative for barcodes is increasing in use. RFID and barcode technologies are
used in similar ways to track inventory, but there are some important differences between them.
RFID tags Barcodes
Can identify individual objects without direct lineDirect line of sight required for scanning.
of sight.
Can scan items from inches to feet away, depending Require closer proximity for scanning.
on type of tag and reader.
Data can be updated in real time. Data is read-only and can't be changed.
Require a power source. No power source needed.
Read time is less than 100 milliseconds per tag. Read time is half a second or more per tag.
Contain a sensor attached to an antenna, often Printed on the outside of an object and more s
contained in a plastic cover and more costly than
barcodes.
RFID security and privacy
A common RFID security or privacy concern is that RFID tag data can be read by anyone with a
compatible reader. Tags can often be read after an item leaves a store or supply chain. They can
also be read without a user's knowledge using unauthorized readers, and if a tag has a unique serial
number, it can be associated to a consumer. While a privacy concern for individuals, in military or
medical settings this can be a national security concern or life-or-death matter.
Because RFID tags do not have a lot of compute power, they are unable to accommodate
encryption, such as might be used in a challenge-response authentication system. One exception to
this, however, is specific to RFID tags used in passports -- basic access control (BAC). Here, the
chip has sufficient compute power to decode an encrypted token from the reader, thus proving the
validity of the reader.
At the reader, information printed on the passport is machine-scanned and used to derive a
key for the passport. There are three pieces of information used -- the passport number, the
passport holder's birth date and the passport's expiration date -- along with a checksum digit for
each of the three.
Researchers say this means passports are protected by a password with considerably less
entropy than is normally used in e-commerce. They key is also static for the life of the
passport, so once an entity has had one-time access to the printed key information, the passport
is readable with or without the consent of the passport bearer until the passport expires.

RCR Institute of Management & Technology Page 17


Prepared By Mrs.P.Lalitha, Dept.of MCA Internet of Things
The U.S. State Department, which adopted the BAC system in 2007, has added an anti-
skimming material to electronic passports to mitigate the threat of undetected attempts to
steal users' personal information.
 Wireless Sensor Network (WSN)
WSN is an infrastructure-less wireless network that is deployed in a large number of
wireless sensors in an ad-hoc manner that is used to monitor the system, physical or
environmental conditions.
Sensor nodes are used in WSN with the onboard processor that manages and monitors the
environment in a particular area. They are connected to the Base Station which acts as a
processing unit in the WSN System.Base Station in a WSN System is connected through
the Internet to share data. WSN can be used for processing, analysis, storage, and mining
of the data.

The definition of WSN, according to, Smart Dust program of DARPA is:
“A sensor network is a deployment of massive numbers of small, inexpensive, self powered devices
that can sense, compute, and communicate with other devices for the purpose of gathering local
information to make global decisions about a physical environment”.
Components of WSN:
Sensors:
Sensors in WSN are used to capture the environmental variables and which is used for data
acquisition. Sensor signals are converted into electrical signals.
1. Radio Nodes:
It is used to receive the data produced by the Sensors and sends it to the WLAN access point. It
consists of a microcontroller, transceiver, external memory, and power source.
2. WLAN Access Point:
It receives the data which is sent by the Radio nodes wirelessly, generally through the internet.
3. Evaluation Software:
The data received by the WLAN Access Point is processed by a software called as Evaluation
Software for presenting the report to the users for further processing of the data which can be
used for processing, analysis, storage, and mining of the data.
The Sensor Node
Sensor node: Capable of executing data processing, data gathering and communicating with
additional associated nodes in the network. A distinctive sensor node capability is about 4-8
MHz, having 4 KB of RAM, 128 KB flash and preferably 916 MHz of radio frequency.

RCR Institute of Management & Technology Page 18


Prepared By Mrs.P.Lalitha, Dept.of MCA Internet of Things
Relay node: It is a midway node used to communicate with the adjacent node. It is used to
enhance the network reliability. A rely node is a special type of field device that does not have
process sensor or control equipment and as such does not interface with the
process itself. A distinctive rely node processor speed is about 8 MHz, having 8 KB of RAM,
128 KB flash and preferably 916 MHz of radio frequency.
Actor node: It is a high end node used to perform and construct a decision depending upon the
application requirements. Typically these nodes are resource rich devices which are outfitted
with high quality processing capabilities, greater transmission powers and greater battery life. A
distinctive actor node processor capability is about 8 MHz, having 16 KB of RAM, 128 KB flash
and preferably 916 MHz of radio frequency .
Cluster head: It is a high bandwidth sensing node used to perform data fusion and data
aggregation functions in WSN. Based on the system requirements and applications, there will be
more than one cluster head inside the cluster. A distinctive cluster head processor is about 4-8
MHz, having 512 KB of RAM, 4 MB flash and preferably 2.4 GHz of radio frequency . This
node assumed to be highly reliable, secure and is trusted by all the nodes in the sensor network.
Gateway: Gateway is an interface between sensor networks and outside networks. Compared
with the sensor node and cluster head the gateway node is most powerful in terms of program
and data memory, the processor used, transceiver range and the possibility of expansion through
external memory. A distinctive gateway processor speed is about 16 MHz, having 512 KB of
RAM, 32 MB flash and preferably 2.4 GHz of radio frequency.
Base station: It is an extraordinary type of nodes having high computational energy and processing
capability.
Attractive functionality of sensor nodes in a WSN includes effortlessness installation, fault
indication, energy level diagnosis, highly reliablity, easy coordination with other nodes in the
network, control protocols and simple network interfaces with other smart devices. In WSN, based on
the sensing range and environment, the sensor nodes are classified into four groups, namely
specialized sensing node, generic sensing node, high bandwidth sensing node and gateway node. The
radio bandwidth for the sensor nodes are
<50 Kbps, <100 Kbps, ≈500 Kbps and >500 Kbps respectively. On board processing, computational
rate and communication ranges differ from node to node in WSN. Particularly for some dedicated
application sensor nodes with different capabilities are used. For example, smart specialized sensing
nodes are preferred for special purpose devices, intelligent generic sensing node preferred for generic
functions. For interconnectivity functions high end smart bandwidth sensing node and gateway
nodes are preferred.
The sensor nodes are intelligent to observe an extensive diversity of ambient circumstances that
includes flow, temperature, pressure, humidity, moisture, noise levels, mechanical stress, speed,
etc. Many novel applications are being developed due to the new concept of micro sensing and
wireless networking for these smart sensing devices. Some of the possible assorted applications
of WSN ’s are temperature control, inventory management, physiological monitoring, habitat
monitoring, precision
agriculture, forest fire detection, nuclear, chemical, and biological attack detection, military,
transportation, disaster relief, and environmental monitoring.
WSN ORGANIZATION
Any WSN can be configured as a five layered architecture as explained below
 The physical layer is responsible for frequency selection, modulation and data encryption.
RCR Institute of Management & Technology Page 19
Prepared By Mrs.P.Lalitha, Dept.of MCA Internet of Things
 The data link layer functions as a pathway for multiplexing of data streams, data frame
detection, Medium Access control (MAC) and error control.
 The network layer is used to route the data supplied by the transport layer using special
multi-hop wireless routing protocols between sensor nodes and sink nodes.
 The transport layer maintains the flow of data if the application layer requires it.
 The application layer makes the hardware and software of the lower layerstransparent to the
end user.
ISSUES AND CHALLENGES IN DESIGNING WSN
 Sensor networks do not fit into any regular topology, because while
deploying thesensor nodes they are scattered
 Very limited resources
o Limited memory,
o Limited computation
o Limited power
 It comes under fewer infrastructures and also maintenance is very difficult.
 Unreliable communication
o Unreliable data transfer
o Conflicts and latency
 Sensor node relies only on battery and it cannot be recharged or replaced.
Hardware design for sensor node should also be considered.
 Unattended operations
o Exposure to physical attack
o Remotely managed
o No central control point
 Achieving synchronization between nodes is also another issue.
 Node failure, topology changes and adding of nodes and deletion
of nodes isanother challenging issue.
 Because of its transmission nature and hostile environment,
security is a challenging issue.
 Based on the applications, sensor node has to be chosen with
respect tocomputation rate.
Single Node Architecture
Choosing the hardware components for a wireless sensor node, obviously the applications has to
consider size, costs, and energy consumption of the nodes. A basic sensor node comprises five main
components such as Controller, Memory, Sensors and Actuators, Communication devices and

Power supply Unit.

RCR Institute of Management & Technology Page 20


Prepared By Mrs.P.Lalitha, Dept.of MCA Internet of Things
A controller is used to process all the relevant data, capable of executing arbitrary code. The controller
is the core of a wireless sensor node. It collects data from the sensors, processes this data, decides
when and where to send it, receives data from other sensor nodes, and decides on the actuator’s
behavior. It has to execute various programs, ranging from time critical signal processing and
communication protocols to application programs; it is the Central Processing Unit (CPU) of the
node.For General-purpose processors applications microcontrollers are used.

These are highly overpowered, and their energy consumption is excessive. These are used in
embedded systems. key characteristics of microcontrollers are particularly suited to embedded
systems are their flexibility in connecting with other devices like sensors and they are also convenient
in that they often have memory built in. In a wireless sensor node, DSP could be used to process data
coming from a simple analog, wireless communication device to extract a digital data stream. In
broadband wireless communication, DSPs are an appropriate and successfully used platform.DSP-
specifically geared, with respect to their architecture and their instruction set, for processing large
amounts of vectorial data, as is typically the case in signal processing applications.Memory -to store
programs and intermediate data.Different types of memory are used for programs and data.
In WSN there is a need for Random Access Memory (RAM) to store intermediate sensor readings,
packets from other nodes, and so on. While RAM is fast, its main disadvantage is that it loses its
content if power supply is interrupted. Program code can be stored in Read-Only Memory (ROM) or,
more typically, in Electrically Erasable Programmable Read-Only Memory (EEPROM) or flash
memory (the later being similar to EEPROM but allowing data to be erased or written in blocks
instead of only a byte at a time). Flash memory can also serve as intermediate storage of data in case
RAM is insufficient or when the power supply of RAM should be shut down for some time.Turning
nodes into a network requires a device for sending and receiving inform.
I. COMPONENTS OF SENSOR NODE
Sensor nodes are conventionally made up of five basic components as shown in Figure 2
microcontroller, a power supply unit, a transceiver, memory unit, and sensor unit.
Microcontroller
The microcontroller is the central component in the WSN signal chain. It communicates with all of
the sensors to read and process the data that the sensors are measuring. It communicates with the
radio, to package the data in a manner that the radio can transmit wirelessly. It also houses the
memory, containing all of the system parameters such as sleep modes, and the RF communications
protocol. ADI has a family of microcontrollers that are designed specifically for this extremely low
power application space such as the ADuCRF101 which is based on Cortex M3 processor
technology.
Power Supply
Each component in the wireless sensor node is powered through the power supply unit and the
limited capacity of the power supply unit requires energy efficient operations for the task performed
by each component. The power in a WSN is mainly dissipated by sensors and Transceivers while
either transmitting or receiving
Two options for power supply are:-

RCR Institute of Management & Technology Page 21


Prepared By Mrs.P.Lalitha, Dept.of MCA Internet of Things
1. Primary batteries –not rechargeable
2. Secondary batteries –rechargeable, only makes sense in combination with some form of energy
harvesting
Examples of primary batteries are Zinc-air, Lithium and Alkaline. Examples of secondary batteries
are Lithium, NiMHd and NiCd.
Other power supply options are also available like solar energy.
Transceiver Unit
A transceiver unit acts as transmitter as well as receiver. It provides the communication between
any two wireless sensor nodes. It also connects wireless sensor network to the network. Transceiver
unit mostly uses Radio Frequency waves to as a transmission media. Transceiver can be in four
operational states:- transmitting, receiving, sleep and idle.
Memory Unit
Memory in sensor nodes consists of: RAM (for fast data storage), internal flash (for code storage),
EEPROM (for data storage), and external flash which is required for data persistence.
Sensor
Sensor is a hardware device which gathers information from the physical world. Different kinds of
sensors are used for gathering different kinds of information. Mainly sensor is composed of twp
subunits: a sensor and an analog to digital convertor (ADC). Sensor receives analog signals from
physical world and ADC converts these analog signals to digital signals and fed them to processing
unit.
A sensor can be in one of two modes, i.e. active mode (AM) and power-save mode (PS). In active
mode, a node is awake and may receive data at any time. In power-save mode, a node is sleeping
most of the time and wakes up periodically to check for pending messages. Transitions between
power-save and active mode are triggered by packet arrivals and expiration of the keep alive timer.
EXAMPLES OF SENSOR NODES EMPLOYED IN WIRELESS SENSOR NETWORKS
Wireless sensor networks (WSN) consist of a great deal of sensor nodes with limited power,
computation, storage, sensing and communication capabilities. WSN will have broad applications in
either controlled environments (such as home, office, warehouse, etc) or uncontrolled environments
(such as hostile or disaster areas, toxic regions, etc).
Wireless sensor networks have broadly utilized in a variety of industrial, medical, consumer and
military applications. Some of the examples of sensor nodes are given in Table 1.
Table 1 Sensor nodes employed in Wireless Networks

Sr. Sensor Application Sensed Events


No. area
1 Accelerometer Transportation 2D and 3D acceleration of movements of people and
objects
2 Electroencephalography Health Care Heart Rate
3 Magnetic Sensor Transportation Presence, intensity, direction, rotation and variation of
magnetic field
4 Oximeter Health Care Blood oxygenation of patient’s hemoglobin
5 Photo acoustic spectroscopy
Pipeline Gas sensing
6 pH sensor Pipeline(water) Concentration of hydrogen ions
Structure of a wireless sensor node

RCR Institute of Management & Technology Page 22


Prepared By Mrs.P.Lalitha, Dept.of MCA Internet of Things
A sensor node is made up of four basic components such as sensing unit, processing unit, transceiver
unit and a power unit which is shown in Fig. 5. It also has application dependent additional components
such as a location finding system, a power generator and a mobilizer. Sensing units are usually
composed of two subunits: sensors and analogue to digital converters (ADCs) (Akyildiz et al., 2002).
The analogue signals produced by the sensors are converted to digital signals by the ADC, and then fed
into the processing unit. The processing unit is generally associated with a small storage unit and it can
manage the procedures that make the sensor node collaborate with the other nodes to carry out the
assigned sensing tasks. A transceiver unit connects the node to the network. One of the most important
components of a sensor node is the power unit. Power units can be supported by a power scavenging
unit such as solar cells. The other subunits, of the node are application dependent.
A functional block diagram of a versatile wireless sensing node is provided in Fig. 6. Modular design
approach provides a flexible and versatile platform to address the needs of a wide variety of
applications. For example, depending on the sensors to be deployed, the signal conditioning block can
be re-programmed or replaced. This allows for a wide variety of different sensors to be used with the
wireless sensing node. Similarly, the radio link may be swapped out as required for a given
applications’ wireless range requirement and the need for bidirectional communications.

Figure 5.
The components of a sensor node

RCR Institute of Management & Technology Page 23


Prepared By Mrs.P.Lalitha, Dept.of MCA Internet of Things
Figure 6.
Functional block diagram of a sensor node
Using flash memory, the remote nodes acquire data on command from a base station, or by an event
sensed by one or more inputs to the node. Moreover, the embedded firmware can be upgraded through
the wireless network in the field.
The microprocessor has a number of functions including:
Managing data collection from the sensors
performing power management functions
interfacing the sensor data to the physical radio layer
managing the radio network protocol
A key aspect of any wireless sensing node is to minimize the power consumed by the system. Usually,
the radio subsystem requires the largest amount of power. Therefore, data is sent over the radio network
only when it is required. An algorithm is to be loaded into the node to determine when to send data
based on the sensed event. Furthermore, it is important to minimize the power consumed by the sensor
itself. Therefore, the hardware should be designed to allow the microprocessor to judiciously control
power to the radio, sensor, and sensor signal conditioner.
 WSN and IoT :
WSN as a Subset of IoT
IoT exists at a higher level then WSN. In other words, WSN is often a technology used within
an IoT system. A large collection of sensors, as in a mesh network, can be used to
individually gather data and send data through a router to the internet in an IoT system.
Wireless sensor network (WSN):
o Wireless sensor network (WSN) refers to a group of dedicated sensors for
monitoring and recording the physical conditions of the environment and organizing
the collected data at a central location.
The Internet of things (IoT)
o The Internet of things (IoT) is the network of physical devices, vehicles, home
appliances, and other items embedded with electronics, software, sensors, actuators, and
connectivity which enables these objects to connect and exchange data.
o Each thing is uniquely identifiable through its embedded computing system but is able to
inter-operate within the existing Internet infrastructure.
o All sensor data further processed and analyzed in the data analyzing area.
Wireless Sensor Networks
The devices that are involved in WSN are:
Wireless_Sensor - In general, sensors monitor and records the physical conditions of the
environment which is then sent to a central location (Sink node) where the data is collated and
analysed for further action. Sensors in NetSim are abstract in terms of what they sense, and NetSim
focuses on the network communication aspects after sensing is performed.
WSN_Sink (in WSN): Sink node is the principal controller in WSN. All sensors send their
datato this sink node. In NetSim, users can drop only one sink node in a WSN.
Ad-hoc Link: Ad hoc link depicts a decentralised type of wireless network. The network is ad
hoc because it does not rely on any pre-existing infrastructure, such as routers in wired networks or
access points in managed wireless networks. In NetSim, Ad hoc link are used to connect the
Sensors and the Sink node. Ad hoc links are used here for a visual representation of connection of all
the devices in an Ad hoc basis.

RCR Institute of Management & Technology Page 24


Prepared By Mrs.P.Lalitha, Dept.of MCA Internet of Things
Note: While designing a network, after dropping the sensor nodes and the sink node, click on the
Adhoc link present in the top ribbon/toolbar and drop it inside the grid like you did for sensors and
sink node. Once the Ad hoc link is present inside the grid, click on the same and now click on the
other devices (say sensors or sink) you wish to connect. Similarly repeat the same procedure to
connect all the devices to the Ad hoc link.

Internet of Things
The devices that are involved in IoT are:
IoT_Sensor - In general, sensors monitor and records the physical conditions of the environment
which is then sent to a central location (Sink node) where the data is collated and analysed for further
action. Sensors in NetSim are abstract in terms of what they sense, and NetSim focuses on the
network communication aspects after sensing is performed.
LoWPAN Gateway (in IoT) - LoWPAN is an acronym of Low power Wireless Personal Area
Networks. The LoWPAN IoT gateway functions as a border router in a LoWPAN network,
connecting a wireless IPv6 network to the Internet.
Ad-hoc Link: Ad hoc link depicts a decentralised type of wireless network. The network is
ad hoc because it does not rely on any pre-existing infrastructure, such as routers in wired
networks or access points in managed wireless networks. In NetSim IoT, Ad hoc link are
used to connect the IoT_Sensors and the 6LowPAN_Gateway. Ad hoc links are used here for
a visual representation of connection of all the devices in an Ad hoc basis.
Users can also add routers and nodes as shown below. Routers can be connected to the
6LoWPAN-Gateway and nodes/switches can be connected to routers using wired/wireless
RCR Institute of Management & Technology Page 25
Prepared By Mrs.P.Lalitha, Dept.of MCA Internet of Things
links.

Differences between IoT and WSN in NetSim


WSN IoT
WSN consists of a network of only IOT has a gateway which can be
sensors. used to connect to internetworks
(having routers,
switches, APs etc).
WSN runs IPv4 and features a sink IOT runs IPv6 in the sensor network
(not a gateway). (802.15.4 MAC/PHY) and IPv4 on the
inter-
network portion.
Routing protocols in NetSim WSN Routing protocols in NetSim IoT
include, include,
DSR, AODV, OLSR, and ZRP. AODV and RPL.

RCR Institute of Management & Technology Page 26


Prepared By Mrs.P.Lalitha, Dept.of MCA Internet of Things

You might also like