Chapter 1: Introduction: 1.1 Project Overview
Chapter 1: Introduction: 1.1 Project Overview
CHAPTER 1: INTRODUCTION
XBee is a communication device used for the data transfer between the
controllers, computers, systems, really anything with a serial port. As it works with low
power consumption, the transmission distances is limited to 10–100 meters line-of-sight.
XBee devices can transmit data over long distances by passing data through a mesh
network of intermediate devices to reach more distant ones. XBee is typically used in low
data rate applications that require long battery life and secure networking. Its main
applications are in the field of wireless sensor network based on industries as it requires
short-range low-rate wireless data transfer. The technology defined by the XBee
specification is intended to be simpler and less expensive than other wireless
networks.by using RPI and Xbee we are transmitting the information and receiving the
information by the help of xbee co ordinator and Router .
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
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.
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
The Raspberry Pi is a very powerful computer having the dimensions of a business card.
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 come up so far.
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.
TECHNICAL SPECIFICATIONS
512MB RAM
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
The demonstration will require minimum basic components as Raspberri pi2, Xbee
Module,xbee USB Board,
BLOCK DIAGRAM
2.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.
2.1.2 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
2.1.3 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.
2.1.4 Peripherals.
2.1.5XBEE 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.
1.5 Breadbords
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.
Software Descriptions:
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
Department of ECE, VBIT 10
Xbee interfacing with raspberry pi model 2
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
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
2.2 XCTU overview
XCTU is divided into five main sections: the menu bar, main toolbar, devices list,
working area, and status bar.
And finally this picture shows the required out put which will appear on console window
2.3 Raspberri- pi
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.
2.3.2Raspbian Installer
Ecther :
Etcher
Etcher 1.4.4
Developer(s) resin.io
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
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 .
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.
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 ttyAMA0 is
115200, but a baud rate of 9600 is required for XBee. And run the required code to run
to get the out put
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.
5.1TESTING:
Now it is time to test our project. After saving the code and connecting coordinator mode
XBee module to your Raspberry Pi, boot the Raspberry Pi and from the terminal write the
following commands to execute your program.
Now to confirm reception of data, hook up your end device XBee module to your
computer, open the console mode in XCTU, start serial communication with XBee
module. You should get the output on your screen
5.2 Result :
According to our attribute we find the result that data is transffered from the RPI to the
xbee modules which will be seen in the terminal of XCTU software
We found data was accorinding our code ‘Hello user’
The transformation of data can be done mutually RPI to XBEE and XBEE to RPI
The following figures to determine the testing
6.2CONCLUSION :
we used Raspberri-pi and Xbee modules to communicate each other we suceesfully
completed our project first we booted up the raspberri –pi and later dected xbee
modules in the digi software xctu by dumping the small piece of code into the RPI.
we successfully obtained the information which was transformed mutually from to
Xbee to RPI
REFERENCES
https://dzone.com/articles/connecting-xbee-raspberry-pi
https://electronics for u.com Engineering Projects For You
https://www.cooking-hacks.com/index.php/.../xbee-arduino-raspberry-pi-tutorial
APPENDIX - A
import serial
#For Serial Communication
import time
#For Delay Function
ser = serial.Serial(‘/dev/ttyAMA0’)
#Set ser as Object
ser.baudrate = 9600
#Set Baud Rate to 9600
ser.write(“A”)
#Send Character ‘A’
time.sleep(1)
#Give 1 Second Delay
ser.write(“B”)
#Send Character ‘B’
time.sleep(1)
#Give 1 Second Delay
ser.close()
#Close Communication
(Or)
import serial
while True:
ser.write('Hello User \r\n') # write a Data
incoming = ser.readline().strip()
print 'Received Data : '+ incoming