Networks Overview

A overview of network topologies and Mesh networking using RF

MESH NETWORKING / RF COMMUNICATION:

This page is a overview of network types and how they specifically relate and function using the ZIGBEE PROTOCAL and XBEE modules. All networks come from a need to transfer something from one place to another, the ability to do this consistently is how networks propagate.

It is the why in the shape of roads.

map_constantinople1922-l.jpg

Swarm protocol

RF communication:

One of the main goals of this project was to investigate the possibilities of linking up the new mesh technologies provided by the XBEE ZIGBEE protocol and hardware with the older idea of swarm intelligence and “self” organizing systems.

The technical opportunities:

The new XBEE modules support a full range of low power operations linked with persistent routing tables and sleep modes. This allows the modules to be run off of battery or intermittent power supplies while keeping the integrity of the overall network. Creating the methods and interactions necessary in a functioning Swarm intelligence network.

Quote overview of swarm intelligence:

“SI systems are typically made up of a population of simple agents 
interacting locally with one another and with their environment. The 
agents follow very simple rules, and although there is no centralized 
control structure dictating how individual agents should behave, local 
interactions between such agents lead to the emergence of complex 
global behavior. Natural examples of SI include ant colonies, bird flocking, 
animal herding, bacterial growth, and fish schooling.“
Beni, G., Wang, J. Swarm Intelligence in Cellular Robotic Systems, Proceed. 
NATO Advanced Workshop on Robots and Biological Systems, Tuscany, Italy, June 26–30 (1989)

DISTRIBUTED POWER AND FUNCTIONALITY:

Using a dispersed network of modules to complete a task provides some benefits and problems. When using multiple modules you can build in a redundancy of function, which is essential when working with intermittent power supplies. In this way the overall system function remains even if multiple modules go down.

The power needs of a modular system are also more manageable when collecting energy derived from the environment. It allows for a dispersal of function over a larger area, this translates into a expanded area of possible power collection. In this way a lower density energy concentration can be used to provide the same function as a high density source.

networkneedspower1.jpg

protocol (greek pr?tos ‘first’ + kolla ‘glue.’) a protocol can be defined as the rules governing the syntax, semantics, and synchronization of communication.

The large problem then becomes how to coordinate the modules into a functioning system. This becomes a question of protocol. A protocol is just a agreed upon form of informational transmission and is used almost all areas of our lives:

Definitions:

http://en.wikipedia.org/wiki/Protocol_(computing) sciences

http://www.protocol-online.org/ communications

http://www.protocols.com/

The Xbee/ZIGBEE protocol:

is based around the transferring of packetized information between devices, there are three main strategies of doing this. ZIGBEE PROTOCOL OVERVIEW

For an overview of xbee function visit:

www.digi.com/

Point to point:

pointtopoint.jpg

Series 1 xbees Source XBee/XBee-PRO™ OEM RF Modules - 802.15.4 - v1.xAx [2007.05.031]

"By default, XBee/XBee-PRO RF Modules are configured to support NonBeacon 
communications. NonBeacon systems 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. MaxStream's peer-to-peer architecture features fast synchronization 
times and fast cold start times. This default configuration accommodates 
a wide range of RF data applications."

This is the most robust and fastest network topology that the Xbees employ. This style of network passes messages from a single module to single module with a package recognition response in between. There is no hopping or routing of messages with this protocol. Because of this the network can only communicate as far as the broadcast range of the individual device.

Uses:

Single point communications.

Fast connections between two devices.

Point to multipoint:

pointtomultipoint.jpg

Series 1 xbees Source XBee/XBee-PRO™ OEM RF Modules - 802.15.4 - v1.xAx [2007.05.031]

"In a NonBeacon (w/ Coordinator) system, the Coordinator can be configured to use 
direct or indirect transmissions. If the SP (Cyclic Sleep Period) parameter is set 
to “0”, the Coordinator will send data immediately. Otherwise, the SP parameter 
determines the length of time the Coordinator will retain the data before discarding 
it. Generally, SP (Cyclic Sleep Period) and ST (Time before Sleep) parameters should 
be set to match the SP and ST settings of the End Devices."

This configuration links all devices through a single node (the coordinator) in order to transfer information. This allows a slightly expanded network area and the ability to sleep the end devices. When the end devices are slept the message is sent to the coordinator ho buffers the message for a fixed time waiting for the end device to wake before sending on the message.

Uses:

Non expandable networks that need low power or intermittent functioning.

Self healing Mesh Networks:

selfhealingmesh.jpg

XBEE ZB+ZNET MODULES series 2 xbees

http://www.digi.com/pdf/wp_zigbeevsdigimesh.pdf Mesh networking is a powerful way to route data. Range is extended by allowing data to hop node to node and reliability is increased by “self healing,” the ability to create alternate paths when one node fails or a connection is lost.

As you can see in the above drawing the power of the mesh network comes from a dynamic system using routing tables. Each module has a routing table with the closest modules addresses on it. When a module goes down the surrounding devices can still take the message and use there routing table to find a reliable path to the destinations goal. This allows a robust dynamic system to form that can pass messages much farther than the broadcast ranges of the individual devices.

This technique is applied to a couple network topologies that XBEE offer’s.

The central uses are:
  • Large systems that need to expand without a loss of function.
  • Systems with intermittent function of the individual modules, due to power loss or cyclical functioning.
  • Systems that need extended communications.
  • A system using non directional communications patterns.

Networks that use mesh networking:

Scale free (star) network:

scalefree.jpg

XBEE ZB+ZNET MODULES series 2 xbees Source XBee ZNet 2.5/XBee PRO Znet 2.5 OEM RF Modules- ZigBee - v1.x4x [2/11/2008]

"ZigBee supports mesh routing in the network, allowing data packets 
to traverse multiple nodes (multiple "hops") in order to reach the 
destination node.  This allows ZigBee nodes to be spread out over a 
large region, and still support communications amongst all devices 
in the network."

The second topology forms around central nodes or hubs, which then connect to each other. This is often referred to as a scale free or power network because the topology doesn't change with a increase or decrease in the number of nodes, similar to a Koch curve. This allows a system to be infinitely expandable in regards to protocol. A larger and larger system can be formed without having to increase the complexity of the protocol. The world wide web TCP protocol and router system is an example of this set up.

Scale free network

http://en.wikipedia.org/wiki/Scale_free_network

Networks power law shows scale invariance

http://en.wikipedia.org/wiki/Scale_invariance

It is a robust network and can be expanded over distances and scale. The down side is a dependence on a parent child relationship, which forms a reliance on the central nodes to keep the mesh connected. If one of the central nodes goes down, there is a chance of the end devices associated with that central node to get stranded or 'lost'. Also the router or central nodes can’t utilize power saving techniques like sleep mode.

Uses:

*All above mesh networking capabilities
plus
*If you need a large scale network with low power functioning on end devices.
*Good for linked embedded devices or devices that move.

Open mesh:

openmesh.jpg

XBee/XBee-PRO DigiMesh True mesh network:

Source  XBee/XBee-PRO DigiMesh 2.4 OEM RF Modules  
"Mesh networking allows messages to be routed through several 
different nodes to a final destination. DigiMesh firmware 
allows OEMs and system integrators to bolster their networks with
the self-healing attributes of mesh networking. In the event that 
one RF connection between nodes is lost (due to power-loss, 
environmental obstructions, etc.) critical data can still reach its
destination due to the mesh networking capabilities embedded 
inside the modules."

A true mesh network is a collection of nodes that can function as router or end device allowing for a true democratized system. The topology consists of each module containing the routing tables necessary to relay messaging anywhere in the system. So a message can be sent and buffered for any device from any device allowing all modules to use power reduction techniques like sleep mode. The Digimesh accomplishes this by creating a synchronized sleep wake cycle for all the devices in the system. So as a system they sleep and wake together creating no out of sync buffering needs.

The benefit is a robust system where modules can drop in and out of the network without large effects to the overall system function. The downsides are a reduction in routing speeds and a complexity increase in protocol which can lead to more dropped packets or module disconnect than the other two systems.

Uses:

Choose DigiMesh if you need:

Source XBee/XBee-PRO DigiMesh 2.4 OEM RF Modules  
*Ability to sleep on all nodes
*Simplified network setup and expansion.
*More robust mesh networks (no Parent/Child dependencies).
*Fast 900 MHz (up to 156 Kbps)
*Longer range options, up to 40 miles (64 km) for each hop
*Larger frame payloads
*Smaller code space to allow more room for specialized features

This system is the best suited for intermittent power supplies and reactive swarm intelligence set ups.

XBEE BROADCAST RANGE TESTS:

The xbee range tests in 3/4 plank wood boxes:

inthewoods.jpg

For the Will O the Wisp project I tested the broadcast abilities of the The XBee znet (series 2) modules. The spec sheet for the device have the ranges at:

Indoor/Urban Range up to 133 ft. (40 m)
Outdoor RF line-of-sight Range up to 400 ft. (120 m)

I am using a housing for the units so I needed to test what the range would be functioning inside that housing. For the test a box made ot of ¾ pine plank was used to see the effects on broadcast range.

{{ :xbeerangetest:xbeebox.jpg }}

I performed the tests in two areas a dense forest setting and an open field.

boxtape.jpg

The first test had the modual in a box and I paced out a path till I lost the signal at ~ 121'- 130’.

tapemeasure.jpg

I walked in a couple directions to see if the tree density had an effect, which it did not.

hello.jpg

The receive message. The second test was in the woods using a third XBEE as a router. This effectively doubled the range to about 300’ with no appreciable time lag to the broadcasts.

xbeeintree.jpg

road.jpg

The third test was done using the wood box in a open line of site field. The first hop signal could be received at 180’ broadcasting from in the box.

farthest.jpg

The last test was using a router with a single hop to extend the signal range. The router was out of the box. The broadcast distance from the uncovered router was about 320 ’. Adding the two together gives about a 500’ range using three modules in the clear.

Broadcast overview (between regular modules) :
  • in pine forest 121'- 130 with box.
  • 180' in clear with box.
  • no box over 320'

Sleep mode power saving:

sleeppowexbee.jpg

Sleep mode is a great power saving technique that the Xbees employ. The XBees can be slept in two ways, with pin sleep mode or cyclical sleep mode.

Pin sleep works by going in or out of sleep mode based on the state of an external pin, which is brought low or high to enter or exit sleep mode. Cyclical sleep mode is based on a timed sequence that takes the XBee in and out at regular intervals. I prefer the pin sleep for most applications because it is usually in conjunction with a micro controller anyway.

SLEEP MODE GOTCHAS:

#Pin sleep is enabled by setting SM to 1
*If you use Znet XBEEs, only end devices can be slept.
*If you use the new DIGIMESH XBEES routers and end devices can sleep.
#Sleep period

The sleep period is very important in making a mesh that has intermittent power. The SP setting controls how long the sleep period is on end devices and if set on a router it regulates the length of time the router device holds messages sent to sleeping devices.

Findings using sleepmode:

The ZB mesh mode for the Series 2 modules gets really buggy when employing sleep mode I think due to mismatch sleep wake cycles. The new DIGIMESH claims to have addressed this problem.

When using pin wake when going from high to low on pin 9 to trigger a wake from sleep, you have to give 80millie second delay before sending. This means the st time has to be longer also. It works well though.

SP=SLEEP PERIOD ST=SLEEP TIME
st 0x64 ->100 mil before it goes back to sleep(restarts with new serial or RF data).
sp 0x64 -> 1000 mil sleeps for one second.

ZNET has problems with the coordinator dropping the network after 20 hours or so and problems dropping child devices when the device sleeps for long periods.

POWER TEST:

The normal operating current draw of the xbees is about 40 mA. Using a ½ SP(sleep period with with a 100millsecond “on” time) my average power dropped to 9mA. This gives more than a 75% power savings. Using a 2 sec sleep period the average current draw dropped to 7mA.

Settings:
ST -> 0x64
SP -> 0x1F4

*note

ST-> 100 mill sec has to be set in order to re triggered
 fast enough for serial data out. It seems to get hung up below this.
PINSLEEP ALTERNATIVES Using DIGIMESH:

Switch xbee on off with a 2n2222 transistor with a 3.3k resister to base. Base draws 1mA with a 50 min hfe gain. With sleep mode 9ma +1ma saves 3/4 power budget of original 40 ma. Have to consider restart/route finding times.

Technical gotchas for / intermittent power with Xbees:

Technical gotchas and things to investigate in using a XBEE system for mesh networking;

Interfacing with a microcontroller:

When interfacing with a microcontroller I have found that if the microcontroller is using a bootloader the xbee can confuse it on a power up. Two solutions are to have the microcontroller control the power up of the xbee. Or two don’t use a bootloader on the microcontroller.

Coordinator re-powering:

Unless hardwired, if your coordinator is turned off then back on it will automatically pick a different network ID and channel because it has no memory of the old network and will think it is a new one. This will mess the whole network up so if there is a danger your coordinator could be powered off then on you'll need to hardcode the PAN ID.

Coordinator wandering:

With the ZNet firmware the coordinator wanders away from the network after a while so you can't contact it. The solution is to start the network with the coordinator then drop a brick on it and use one of the routers as your main node.

Joining: (if not set to always allow joining modules get stranded)

This setting controls the ability to join in too a routers routing table I keep it set to always allow joining. This gives the modules the ability to turn off then back on and rejoin into different routing tables, keeping the overall network up to date and preventing the “stranding” of modules if their parent turns off then on. It should be turned off IF security is a factor or the modules group is important to the structure of the network.

  • Allowing nodes to join always
  • Permit-Joining Attribute
  • NJ attribute should be set to 0xFF
Navigation
Print/export
Toolbox