By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4...

42
By Ambuj Varshney & Akshat Logar

Transcript of By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4...

Page 1: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

By Ambuj Varshney & Akshat Logar

Page 2: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

Wireless operations permits services, such as long range communications, that are impossible or impractical to implement with the use of wires. The term is commonly used in the telecommunications industry to refer to telecommunications systems (e.g. radio transmitters and receivers, remote controls, computer networks, network terminals, etc.) which use some form of energy (e.g. radio frequency (RF), infrared light,laser light, visible light, acoustic energy, etc.) to transfer information without the use of wires. Information is transferred in this manner over both short and long distances.

Page 3: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

The different wireless standards include Bluetooth , Wi-Fi , Wireless communication using RF links and many more .

These wireless networking standards already existed so why their was a need for a new wireless networking standard ???

Because there hasn’t been a wireless network standard that meets the unique needs of sensors like low energy consumption for longer battery lives, low latency, the ability to sleep.

Page 4: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

IEEE 802.15.4 is a standard which specifies the physical layer and media access control for low-rate wireless personal area networks (LR-WPANs). It is maintained by the IEEE 802.15 working group.

It is the basis for the ZigBee, Wireless HART, and MiWi specification, each of which further attempts to offer a complete networking solution by developing the upper layers which are not covered by the standard.

IEEE standard 802.15.4 intends to offer the fundamental lower network layers of a type of wireless personal area network (WPAN) which focuses on low-cost, low-speed ubiquitous communication between devices (in contrast with other, more end user-oriented approaches, such as Wi-Fi). The emphasis is on very low cost communication of nearby devices with little to no underlying infrastructure, intending to exploit this to lower power consumption even more.

Page 5: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

Important features include real-time suitability by reservation of guaranteed time slots, collision avoidance through CSMA/CA and integrated support for secure communications. Devices also include power management functions such as link quality and energy detection.

As mentioned before this protocol lies over the level 2 of the OSI. This layer is called the Data Link.

Page 6: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

This layer is similar to others known ones such as the 802.11 (commercially named under Wi-Fi technologies) or the common Ethernet (802.3). The frequencies defined in the standard are spread among 27 different channels divided in three main bands:

868.0 - 868.6MHz -> 1 channel (Europe) 902.0-928.0MHz -> 10 channels (EEUU) 2.40-2.48GHz -> 16 channels (Worldwide) 868MHz -> XBee 868MHz OEM 900MHz -> XBee 900MHz OEM 2.40GHz -> XBee 802.15.4 OEM / XBee ZB Bit Rates: 868.0 - 868.6MHz -> 20/100/250 Kb/s 902.0-928.0MHz -> 40/250 Kb/s 2.40-2.48GHz -> 250 Kb/s

Page 7: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

XBee /XBee-PRO is a Zigbee module. XBee - family of small radios with compatible footprints The XBee and XBee-PRO OEM RF Modules were engineered to

meet IEEE 802.15.4 standards and support the unique needs of low-cost, low-power wireless sensor networks.

XBee ZB - Zigbee @ 2.4 GHz XBee DM - Digimesh @ 2.4 GHz & 900 MHz XBee 802.15.4 - 802.15.4 & 2.4 GHz

Page 8: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

ZigBee is a specification for a suite of high level communication protocols using small, low-power digital radios based on the IEEE 802.15.4standard for wireless personal area networks (WPANs), such as wireless headphones connecting with cell phones via short-range radio. The technology defined by the ZigBee specification is intended to be simpler and less expensive than other WPANs, such as Bluetooth. ZigBee is targeted at radio-frequency (RF) applications that require a low data rate, long battery life, and secure networking.

The ZigBee Alliance is a group of companies that maintain and publish the ZigBee standard.

ZigBee is a low-cost, low-power, wireless mesh networking proprietary standard. The low cost allows the technology to be widely deployed in wireless control and monitoring applications, the low power-usage allows longer life with smaller batteries, and the mesh networking provides high reliability and larger range

Page 9: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

This standard defines a communication layer at level 3 and uppers in the OSI model. Its main purpose is to create a network

topology (hierarchy) to let a number of devices communicate among them and to set extra communication features such as

authentication, encryption, association and in the upper layer application services

Page 10: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is
Page 11: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

802.15.4 Versus ZigBee, summarizing...

802.15.4 is thought to be a protocol to get point to point and energy efficient communications.

ZigBee defines extra services (start topology routing, encryption, application services) over 802.15.4.

ZigBee creates semi-centralized networks where just the end devices can sleep

Page 12: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network.

Xbee is a Wireless Transceiver RF module provided by Digi.

Zigbee protocol is developed above IEEE 802.15.4 protocol and adds additional routing and networking functionality. It allows one to create Mesh Networking.

Mesh Networking is useful and used in application where the range between two points maybe greater than range of devices and intermediate radios are in between devices and could forward any message sent to and from desired radios.

performance and cost and are series 1 module to be used for point to point or point to multipoint communication.

Page 13: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

ZigBee protocol is designed in a way that a number of radio's each within range of other will automatically form a network without user intervention. The ZigBee protocol within the radios will take care of retries, acknowledgements and data message routing. ZigBee also has the ability to self-heal the network. If the radio at point was removed for some reason, a new path would be used to route messages if it exists.

XBEE and XBEE-Pro 802.15.4 OEM RF Module were designed to meet this IEEE 802.15.4 specification and provide reliable data transfer with minimal power consumption. Modules operate at data rate of 250 kilo bits per second.

There are special version of Xbee radios Xbee-ZB and Xbee Pro – ZB , Xbee Znet which allow advanced mesh configurations. However, Xbee 802.15.4 and Xbee-ZB cannot talk to each other!

XBEE and XBEE-Pro are pin compatible with each other , difference being in the performance and cost and are series 1 module to be used for point to point or point to multipoint communication.

Page 14: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

Xbee Xbee Pro

Indoor up to 30 m and out door line of

sight up to 90 m .

Indoor up to 90m/ 60 m and out door

line of sight up to 1600m /750m

(depending on the country of use )

Transmit power 1 mW. Transmit power 63 mW /10mW

Sensitivity = -92dbm Sensitivity = -100dbm

TX Peak current 45mA (@ 3.3 V)RX Peak Current 50 mA

TX Peak Current 250mA/150mARX current 55 mA

Page 15: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

Xbee designed to mount on Rectangular socket and hence does not need soldering.

Page 16: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

Data enters Xbee module through DI(Data Input) pin as asynchronous signal and the pin is maintained high when no data is being transmitted.

Data byte : Start Bit (Low ) , Eight data bits (LSB first ) , stop bit (High)

Page 17: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

Xbee has two different modes :-

Transparent Mode of Operation API mode of Operation

Page 18: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

Transparent mode is the default mode of operation. In this mode module act as a serial line replacement and all UART data

received through DI pin is queued up for RF transmission and is sent only if RF data is received.

Page 19: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

Data is buffered in DI buffer till one of the following conditions occur and in which case data is packetized and transmitted:

1. No serial character received for time determined by RO ( Packetization Time out )

2. Maximum number of characters that can fit into DI buffer (100) has already arrived.

3. Command mode sequence (GT + CC + GT) received and causes any data in DI buffer before this sequence is received to be transmitted.

Page 20: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

In case the buffer is filled, we need flow control either implemented at hardware level or software level to prevent over run of stored data.

Hardware Flow Control (CTS). When the DI buffer is 17 bytes away from being full; by default, the module de-asserts CTS (high) to signal to the host device to stop sending data CTS is re-asserted after the DI Buffer has 34 bytes of memory available.

Ways to avoid this – Send less data, adjust baud rate less than throughput :)

DI Buffer Size 202 bytes

If the module is receiving a continuous stream of RF data, any serial data that arrives on the DI pin is placed in the DI Buffer.

Hardware Flow Control (RTS). If RTS is enabled for flow control (D6 (DIO6 Configuration)

Parameter = 1), data will not be sent out the DO Buffer as long as RTS (pin 16) is de-asserted.

Page 21: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is
Page 22: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

When not receiving or transmitting data, the RF module is in Idle Mode. The module shifts into the other modes of operation under the following conditions:

Transmit Mode (Serial data is received in the DI Buffer) Receive Mode (Valid RF data is received through the antenna) Sleep Mode (Sleep Mode condition is met) Command Mode (Command Mode Sequence is issued)

Page 23: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

Sleep Modes enable the RF module to enter states of low-power consumption when not in use. In order to enter Sleep Mode, one of the following conditions must be met (in addition to the module having a non-zero SM parameter value): • Sleep_RQ (pin 9) is asserted and the module is in a pin sleep mode (SM = 1, 2, or 5) • The module is idle (no data transmission or reception) for the amount of time defined by the ST (Time before Sleep) parameter. [NOTE: ST is only active when SM = 4-5.]

Page 24: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

The SM command is central to setting Sleep Mode configurations. By default, Sleep Modes are disabled (SM = 0) and the module remains in Idle/Receive Mode. When in this state, the module is constantly ready to respond to serial or RF activity.

Page 25: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

To modify or read RF Module parameters, the module must first enter into Command Mode, a state in which incoming characters are interpreted as commands.

Two Command Mode options are supported: AT Command Mode and API Command Mode

Page 26: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is
Page 27: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

API which stands for Application Programming Interface extends the way that host application interacts with networking capabilities of the module.

All data entering or leaving module is contained in frames which define the operations or events in the module.

The API provides alternative means of configuring modules and routing data at the host application layer. A host application can send data frames to the module that contain address and payload information instead of using command mode to modify addresses.

The API operation option facilitates many operations such as the examples cited below:

Transmitting data to multiple destinations without entering Command Mode

Receive success/failure status of each transmitted RF packet Identify the source address of each received packet

Page 28: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

RF data packets Direct transmission Indirect transmission CCA Acknowledgement

Page 29: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

RF data packets Each transmitted data packet contains a source address and destination

address.Source address -specified by MY, SH and SL parametersDestination address –specified by DH and DL parameters

Page 30: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

Direct transmission A NonBeaconing Coordinator can be configured to use only Direct

Transmission by setting the SP (Cyclic Sleep Period) parameter to “0”. Also, a NonBeaconing Coordinator using indirect transmissions will

revert to direct transmission if it knows the destination module is awake.

Page 31: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

Indirect transmission:-

Indirect Transmissions can only occur on a Coordinator. Thus, if all nodes in a network are End Devices, only Direct Transmissions will occur.

Indirect Transmissions are useful to ensure packet delivery to a sleeping node.

Page 32: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

Analog to Digital conversion Provides retries and acknowledgement Supports Direct Sequence Spread Spectrum Is very easy to use with an extensive array of command set included in a

small form factor. Littler or no configuration necessary for out of box RF communication. AT and API command mode to configure module.

Page 33: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

Nonbeacon:- By default, XBee®/XBee-PRO RF Modules are configured to operate

within a Peer-to-Peer network topology and therefore are not dependent upon Master/Slave relationships.

This means that modules remain synchronized without use of master/server configurations and each module in the network shares both roles of master and slave .

Page 34: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

NonBeacon(with Coordinator): - In this the Coordinator can be configured to use direct or indirect

transmissions An RF data network that consists of one Coordinator and one or

more End Devices forms a PAN (Personal Area Network). Each device in a PAN has a PAN Identifier.

PAN ID must be unique to prevent miscommunication between PANs.

Association: Association is the establishment of membership between End Devices and a Coordinator

Page 35: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

Supports both 16 and 64 bit addressing . Every RF data packet sent over-the-air contains a Source Address and

Destination Address field in its header. A unique 64-bit IEEE source address is assigned at the factory and can be

read with the SL (Serial Number Low) and SH (Serial Number High) commands. Short addressing must be configured manually. A module will use its unique 64-bit address as its Source Address if its MY (16-bit Source Address) value is “0xFFFF” or “0xFFFE .

Page 36: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

To send a packet to a specific module using 64-bit addressing: Set the Destination Address (DL + DH) of the sender to match the Source Address (SL + SH) of the intended destination module. To send a packet to a specific module using 16-bit addressing: Set DL (Destination Address Low) parameter to equal the MY parameter of the intended destination module and set the DH (Destination Address High) parameter to '0'.

Page 37: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

Acknowledgement If the transmission is not a broadcast message, the module will expect to

receive an acknowledgement from the destination node. If an acknowledgement is not received, the packet will be resent up to 3

more times.

Page 38: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

CCA(Clear Channel Assessment) Prior to transmitting a packet, a CCA is performed on the channel to

determine if the channel is available for transmission. If the detected energy exceeds the CA parameter value, the packet is not

transmitted. On a CCA failure, the module will attempt to resend the packet up to two

additional times.

Page 39: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

Receiving modules sends an ACK Re-sends the packet up to three times or until the ACK is received.

Page 40: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

Receiving modules do not send ACK To send a broadcast packet to all modules

regardless of 16-bit or 64-bit addressing, set the destination addresses of all the modules

DL (Destination Low Address) = 0x0000FFFF

DH(Destination High Address) =0x00000000 (default value)

Page 41: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

For XBee radios to communicate, they must have:-

The same channel ID (CH) The same network ID (ID) The source ID on the receiving radio(SH+SL)

must match the destination ID(DH+DL)of the sending radio.

Page 42: By Ambuj Varshney & Akshat Logarcourses.daiict.ac.in/pluginfile.php/8875/mod... · IEEE 802.15.4 specification was defined for Low Cost , Low Power wireless sensor network. Xbee is

XBee-PRO product manual http://www.digi.com/products/wireless/point-multipoint/xbee-series1-

moduledocs.jsp