You are on page 1of 24

ENERGY ANALYSIS OF MULTIHOP PROPAGATION BY

USING RASPBERRY-PI 3
CHAPTER 1: INTRODUCTION

1.1 PROJECT OVERVIEW

wireless sensor network system that we have developed using open-source


hardware platforms, Raspberry Pi and zigbee. The system is low-cost, low power
consuming and highly scalable both in terms of the type of sensors and the number
of sensor nodes, which makes it well suited for a wide variety of applications
related to environmental monitoring.

Raspberry Pi is cheap, flexible, fully customizable and programmable small


computer embedded linux board and abilities of its usage as WSN node and sensor
node.

The project is compare multihop communication versus single hop


communication. Here computer works as Sink node while two Paspberry Pis works
as sensor nodes. The comparison is between energy consumed direct transmission
to Sink node and through another closer Sensor node. In the second case,
intermediate sensor consumes additional energy while receiving from the first
sensor node and fusioning the data before forwarding to the Sink Node. The energy
saved by reducing transmission distance by first Sensor node must more than the
additional energy spent by Intermediate sensor node while the receiving and
fusioning the data. This is to be tested and analysed.

1.2 INFORMATION TRANSFER

The interface of Xbee with Raspberry Pi2 for a proper wireless communication.
Raspberry Pi2 has got four USB ports, so it is better to use a Xbee Dongle for this interface.The
two Xbee must be paired with the same baudrate (for Ex: 9600) with X-CTU Software. Attach
the two xbee’s to the two dongle’s and connect one pair on the USB port of the Raspberry Pi2.
Connect the other pair to the USB port of a computer or a Laptop. Install the FTDI Driver on the
Computer /laptop to provide usb communication. Create a hyperterminal, select the
corresponding com port and the baudrate for the connected device.for the transformation of
information from RPi to xbee.
1.3 ADVANTAGES

Works anywhere
If your Raspberry Pi is connected to the internet, you can access it via Dataplicity. You can even
connect to devices behind firewalls.
Easy access via browser
Log in to Dataplicity, select the device you want and access your remote shell. It's that simple!

Simple and secure


Dataplicity connects using client-initiated HTTPS, so it's safe, encrypted and you don't need to
make specific firewall exceptions.

1.4 APPLIATIONS

The raspberry pi boards are used in many applications like

1. Media streamer,

2.Arcade machine,

3.Tablet computer

4.Home automation,

5. Carputer,

6.Internet radio,

7.Controlling robots,

8.Cosmic Computer,

9.Hunting for meteorites,

10.Coffee and also in raspberry pi based projects


CHAPTER 2:LITERATURE SURVEY

In this paper we review Raspberry Pi whose popularity has taken the learning process and
application of ideas to a whole new level. We also discuss some of the best projects that have
The Raspberry Pi is a very powerful computer having the dimensions of a business card. come
up so far.

Keywords: Raspberry Pi, Business card etc

2.1 INTRODUCTION

The engineers with a pragmatic approach are the biggest boon to a society. The application of
ideas, theories, new innovations is what drives them. For years the work was done on Arduino
boards but with the launch of the very cheap Raspberry Pi it all changed. Raspberry Pi’s
inception began in 2006 it was finally released on 19 February 2012 as two models: Model A
and Model B. After the sale of 3 million units in May 2014, the latest Model B+ was announced
in July 2014. It contains many minor improvements based on the user suggestions without any
increase in price.

2.2 TECHNICAL SPECIFICATIONS

The following are specifications for Model B+:

1. Broadcom BCM2835 SoC processor with 700MHz ARM1176JZF-S core

512MB RAM

2. Videocore 4 GPU supports up to 1920x1200 resolution

3. MicroSD card slot

4. 10/100Mbps Ethernet port

5.4 x USB 2.0 ports


6. HDMI, audio/video jack

7.GPIO header containing 40 pins

8..MicroUSB power port providing 2A current supply

9. DSI and CSI ports

10. Dimensions: 85.6x56mm

Computers are now utilities essential for communicating, entertainment, and accessing all kinds
of business and government services. But in the process of becoming so crucial, computers
have become increasingly locked-down. It’s not impossible to tinker with the guts of a
computer running Windows or Mac OS, but it’s tricky and getting trickier with every new
release. It’s also risky if you depend on the machine to do your homework. And few kids have
the courage to seriously mess with Dad’s computer. But parents generally condone this
behavior.

The Raspberry Pi offers another path: encouraging experimentation by lowering the cost of
accidentally breaking when you’re trying to be making. The computer was conceived of by Eben
Upton, formerly a lecturer at the University of Cambridge, U.K., who created the Raspberry Pi
Foundation to make it a real product. Upton is also a veteran of several years at chip maker
Broadcom, designing the kind of chips that make it possible to sell a complete computer
CHAPTER 3: SYSTEM DESCRIPTION

This system uses the following descriptions.

3.1 Hardware descriptions

The demonstration will require minimum basic components as Raspberri pi2, Xbee Module,
xbee USB Board, dht11 temperature and humidity sensor, Battery

BLOCK DIAGRAM

 DIRECT PATH

Raspberry pi – System – Raspberry pi

(R - S - R)

 INDIRECT PATH

Raspberry pi – Raspberry pi – System

(R - R - S)

1.DIRECT PATH (R-S-R)


2.INDIRECT PATH (R-R-S)

3.1.1 Raspberri pi

The Raspberry Pi hardware has evolved through several versions that feature variations in
memory capacity and peripheral-device support.

This block diagram describes Model B and B+; Model A, A+, and the Pi Zero are similar, but
lack the Ethernet and USB hub components. The Ethernet adapter is internally connected to an
additional USB port. In Model A, A+, and the Pi Zero, the USB port is connected directly to
the system on a chip . On the Pi 1 Model B+ and later models the USB/Ethernet chip contains a
five-point USB hub, of which four ports are available, while the Pi 1 Model B only provides two.
On the Pi Zero, the USB port is also connected directly to the system on a chip, but it uses a
micro USB (OTG) port.

3.1.1.1 Processor

The Broadcom BCM2835 SoC used in the first generation Raspberry Pi is somewhat equivalent
to the chip used in first modern generation smartphones(its CPU is an
older ARMv6 architecture), which includes a 700 MHz ARM1176JZF-S
processor, VideoCoreIV graphics processing unit (GPU) and RAM. It has a level 1 (L1) cache of
16 KB and a level 2 (L2) cache of 128 KB. The level 2 cache is used primarily by the GPU. The
SoC is stacked underneath the RAM chip, so only its edge is visible.
The earlier V1.1 model of the Raspberry Pi 2 used a Broadcom BCM2836 SoC with a 900 MHz
32-bit quad-core ARM Cortex-A7 processor, with 256 KB shared L2 cache.The Raspberry Pi 2
was upgraded to a Broadcom BCM2837 SoC with a 1.2 GHz 64-bit quad-core ARM Cortex-
A53 processor, the same SoC which is used on the Raspberry Pi 3, but underclocked (by default)
to the same 900 MHz CPU clock speed . The BCM2836 SoC is no longer in production

Raspberry Pi 2 included a quad-core Cortex-A7 CPU running at 900 MHz and 1 GB


RAM. It was described as 4–6 times more powerful than its predecessor. The GPU was identical
to the original.In parallelised benchmarks, the Raspberry Pi 2 could be up to 14 times faster than
a Raspberry Pi 1 Model B+

3.1.1.2 RAM
On the older beta Model B boards, 128 MB was allocated by default to the GPU, leaving 128 MB
for the CPU.On the first 256 MB release Model B (and Model A), three different splits were
possible. The default split was 192 MB (RAM for CPU), which should be sufficient for
standalone 1080p video decoding, or for simple 3D, but probably not for both together.

3.1.1.3 Peripherals.

The Raspberry Pi may be operated with any generic USB computer keyboard and mouse. It may
also be used with USB storage, USB to MIDI converters, and virtually any other
device/component with USB capabilities.
Other peripherals can be attached through the various pins and connectors on the surface of the
Raspberry Pi.

3.2 XBEE MODULE

Digi XBee is the brand name of a family of form factor compatible radio modules from Digi
International. The first XBee radios were introduced under the MaxStream brand in 2005 and
were based on the IEEE 802.15.4-2003 standard designed for point-to-point and star
communications at over-the-air baud rates of 250 kbit/s.

Xbee consits of two series of modules

1.xbee series 1 hardware

2.Xbee series 2 hardware

1. X-Bee Series 1 hardware

These radios use a microchip made by free scale to provide simple, standards-
based point-to-point communication as well as implementation of mesh
networking
Fig 3.2.1: XBee series 1 module

2.X-Bee series 2 hardware

The series xbee uses a micro chip from ember networks that enables several different flavors of
standards based zigbee networking

Fig 3.2.2: XBee series 2 module

3.3 Bread bords


solderless device for temporary prototype with electronics and test circuit designs. Most
electronic components in electronic circuits can be interconnected by inserting their leads or
terminals into the holes and then making connections through wires where appropriate. The
breadboard has strips of metal underneath the board and connect the holes on the top of the
board. The metal strips are laid out as shown below. Note that the top and bottom rows of
holes are connected horizontally and split in the middle while the remaining holes are
connected vertically.

3.4 X-Bee USB Explorer Board

XBee USB board is used for interfacing any of the series-1 wireless modules with the PC. Using
this USB adaptor board for XBee wireless modules you can communicate between PC to PC, PC
to robot / embedded board. You can also use this module to change configuration of the XBee
devices using PC via USB port using XCTU software from Digi.

Fig 3.4.1: X-Bee explorer module


Fig3.4.2 : XBee board with XBee radio

3.5 Software Descriptions


3.5.1 Download and install

This section contains download and install instructions based on operating system. XCTU is
compatible with Linux, OSX, and Windows. It may be necessary to configure your system prior
to installing XCTU for the first time.

XCTU requirements

Operating systems

xctu is competable with following operating systems

Windows

Mac os

linux
Supported RF modules

XCTU supports configuration and communication for most Digi RF modules. XCTU uses
a serial link to interact with these radio modules, providing an easy-to-use and intuitive
graphical interface. The following is a complete list of XCTU-compatible RF modules:.

Some of them are

XBee SX l

XBee-PRO SX l

XBee 802.15.4 l

XBee-PRO 802.15.4 l

XBee ZB l

XBee-PRO ZB l

Programmable XBee-PRO ZB

3.5.2 Install XCTU - linux

Follow the steps below to download and install XCTU on your computer.

1. Open a terminal console.


2. Execute this command: sudo usermod -a -G dialout where is the user you want to add
to the dialout group.
3. Log out and log in again with your user in the system. Download and install XCTU
Install XCTU - OSX XCTU User Guide 11
4. Visit www.digi.com/xctu.
5. Click Download XCTU.
6. Under Utilities, click the Linux installer link.
7. When the file has finished downloading, run the executable file and follow the steps
in the XCTU Setup Wizard. A “What’s new” dialog appears when XCTU opens the first time after
the installation
3.5.3 XCTU overview

XCTU is divided into five main sections: the menu bar, main toolbar, devices list, working area,
and status bar.

Fig:3.5.3.1 basic terminal page of xctu

Next picture shows the configuration of devices of router and coordinator


Fig:3.5.3.2 detection of no. of xbee modules

And finally this picture shows the required out put which will appear on console window

Fig: 3.5.3.3 console window


These were the software specifications for the xbee module.

3.6 Raspberri- pi(Software)

The software for the raspberri-pi is raspbian .

Raspbian is a free operating system based on Debian optimized for the Raspberry Pi hardware.
An operating system is the set of basic programs and utilities that make your Raspberry Pi run.
However, Raspbian provides more than a pure OS: it comes with over 35,000 packages, pre-
compiled software bundled in a nice format for easy installation on your Raspberry Pi.

3.6.1 Raspbian Image


A Raspbian image is a file that you can download onto an SD card which in turn can be used to
boot your Raspberry Pi and Via APC into the Raspbian operating system. Using a Raspbian
image is the easiest way for a new user to get started with Raspbian.

3.6.2 Raspbian Installer

Ecther :

Etcher

Etcher 1.4.4
Developer(s) resin.io

Stable release 1.4.4

Operating system Cross-platform

License Apache License

Website etcher.io

Etcher is free and open-source cross platform software used for burning images
(ZIP,ISO,IMG). It supports Windows , OSx and GNU/Linux and has been developed with the
help of electron framework and supports hardware such as USB Keys and SD cards.
And then after flashing just remove the sd card put it on raspberrypi
CHAPTER 4: IMPLEMENTATION OF XBEE AND RASPBERRY-PI

4.1 interfacing xbee with raspberry-pi

The components required are Raspberry Pi Model 2, two XBee modules with Explorer shields
and some female-to-female jumper wires

To configure XBee module, connect XBee Explorer shield to a computer via USB.

1.Then run the XCTU software and click on ‘Add Devices’ icon.

2. You will get an ‘Add radio device’ window. Confirm the COM port of the Explorer and set
the baud rate to 9600, data bits to 8, parity to none and click on finish

3. Now click on ‘XBee Module’ on the left of the Radio Configuration screen .

4. to configure it. There are three types of devices in a communication network: coordinator,
end device and Now first, configure XBee as coordinator.
(Fig 4.1)

(Fig 4.2)

To do that, click on ‘Update Firmware,’ set it to ‘XBee coordinator AT,’ click on the latest
firmware available and then click on ‘Finish.’ Each XBee has two important keys, SH and SL,
which help in transmission and reception of data. SL is unique to each XBee whereas SH is the
same. The bottom view of a typical XBee module is shown in fig 5 along with its SL number as
406F70BEand SH as 0013A200.The coordinator sends the data, so the XBee connected to
Raspberry Pi is set as coordinator.

End device receives the data. Here we will use Console Mode of X-CTU to view received data,
hence, XBee connected to the computer with XCTU should be set as end device. Router (sort of
repeater)is an optional mode; in this, XBee simply receives and then transmits the same data, and
so this mode is used to extend the range of transmitter.To configure XB2 as end device, repeat
the steps done for configuring XB1, update the firmware and replace its DH and DL values with
the SH and SL values of coordinator XB1, respectively. Now XB1 can transmit data and XB2
can receive it. You can see the details of coordinator (XB1) and end device (XB2) modules in
Fig. and Fig. , respectively.

You can see the details of coordinator (XB1) and end device (XB2) modules in Fig. and Fig. ,
respectively.

Fig 4.3 setting the modules

The communication between XBee and Raspberry Pi is done through serial communication. The
connections for serial communication between XBee and Raspberry Pi Model 2 are given below
and also shown in Fig.8
Fig 4.4 terminal of RPI

Fig. 9: Screenshot of minicom on Raspberry Pi

Rx (Pin 3) of XBee Pin 08 (GPIO14)

Tx (Pin 2) of XBee Pin 10 (GPIO15)

Vcc (Pin 1) of XBee Pin 01 (3.3V DC)

GND (Pin 10) of XBee ® Pin 06 (GND)

You need to reboot the Raspberry Pi board after these connections and the configurations as
explained below.
In order to use the serial port for communication between Raspberry Pi and XBee, some
configurations are required in files cmdline.txt and inittab.txt. Start the ‘Terminal’ on Raspberry
Pi

Now the serial port of Raspberry Pi is disengaged from the boot sequence and can be used to
communicate with XBee module. The default baud rate of the ttyUSB0 is 115200, but a baud
rate of 9600 is required for XBee. And run the required code to run to get the out put code This

code send data ‘hello user’ to the console (refer Fig.

Fig 4.5 console window

Make sure to run the code in python which was already present in the rasbian software The
transformation of information done via serial communicationAnd run the source code This code
send data ‘hello user’ to the console (refer Fig.

Fig 4.7 console window

IMPLEMENTATION OF DIRECT PATH

 DIRECT PATH

Raspberry pi – System – Raspberry pi

(R - S - R)
from the above block diagram we are going to implement the direct path transmission of data using a
system and two raspberry pi’s the above block diagram gives the clear picture about the direct path

You might also like