Xbee @ 802.15.4 module

Category :

Xbee is an OEM RF module that is works around IEEE 802.15.4 networking protocol. It is simple to configure, low-powered, small, line of sight range up to 100m(Xbee-PRO offers longer range) and very straightforward to use. Xbee have 3 networking topology or modes, unicast, multicast and broadcast.
I made a summary of important features or guides that you should know :
  • Indoor/Urban range: Up to 100 ft (30 m)
  • Outdoor/RF line-of-sight range: Up to 300 ft (90 m)
  • Interface data rate: Up to 115.2 Kbps
  • Networking topology: Point-to-point, point-to-multipoint, & peer-to-peer
  • Filtration options: PAN ID, Channel, and 64-bit addresses
  • Channel capacity XBee: 16 Channels
  • Addressing: 65,000 network addresses available for each channel
  • power supply XBee: 2.8 - 3.4 VDC
  • Interface options: 3V CMOS UART
  • Antenna options: U.FL, Reverse Polarity SMA (RPSMA), chip antenna or wired whip antenna
Xbee 802.15.4 Addressing
 
802.15.4 specification has two basic forms of addressing between the modules, Broadcast and Unicast.
Broadcast means that you send message that will be received by all modules that having the same PAN ID. In order to use a broadcast mode, you need to set DH=0x0000 and DL=0xFFFF and any module within the range will received the same message.

Unicast mode is more reliable method for delivering messages. In unicast mode, a message from one node transmits to another node based on the modules address and the receiving module will return ACK. If not, the host will keep trying to send the message until it receives an ACK.(a total of 4 attempts).

Xbee 802.15.4 comes with 16-bit and 64-bit addressing and is used for sending a Unicast message or data. The module has 2 configurable register that will keep the address information. DH/DL are for destination address register while MY is the source address. SH/SL registers are not configurable and contain unique ID assigned by manufacturer. SH/SL will be used in 64-bit addressing mode.

16-bit addressing
 
In 16-bit addressing, there are 2 register to play with, which are DH/DL and MY. Let’s say you have 2 Xbee modules, Xbee_A and Xbee_B.
--- Two-ways communication --- Xbee_A Xbee_B MY : 0x22 MY : 0x33 DH : 0 DH : 0 DL : 0x33 DL : 0x22
--- One-way communication ( Only Xbee_A transmit data to Xbee_B ) --- Xbee_A Xbee_B MY : 0x22* MY : 0x33 DH : 0 DH : 0* DL : 0x33 DL : 0* * optional
 
64-bit addressing
 
Disable 16-bit addressing by setting MY=0xFFFF or MY=0xFFFE. SH/SL = unique address incorporated by Digi (Device Serial Number) Set DH/DL of the ‘host’ to match SH/SL of the receiving module.
--- Two-ways communication with 64-bit adressing --- Xbee_A Xbee_B DH : 0x22222222 DH : 0x11111111 DL : 0x22222222 DL : 0x11111111 SH : 0x11111111 SH : 0x22222222 SL : 0x11111111 SL : 0x22222222
 
Xbee X-CTU setup


The screenshots of X-CTU from Digi. My Xbee connected to COM10 at baud rate 9600.
 


Click Test/Query button after selecting a correct COM port



Then click modem configuration tab. As you can see, there are a lot of button such as read, write, download, drop-down menu and etc. Click 'READ' button to read configuration from Xbee.

"Write" button used to 'program' or 'update' the module..



For beginner, there are 5 important registers to play with. PAN ID, Channel, MY, DH and DL should be set properly. In this example, I set MY=0x01, DH=0x00 and DL=0x02. PAN ID and CHANNEL of transmitting device MUST be set to MATCH receiving device.



Click on pull-down menu to choose/select appropriate baud rate.



You also can enable/disable API.



After setup all the required properties, test it using terminal window.

Digi have a lot of articles to support Xbee users --> Xbee support
Minimum connection: VDD, VSS, DIN, DOUT
Minimum connection for firmware upgrade: VDD, VSS, DIN, DOUT, RTS, *DTR (*trick : short DTR to ground )
 
Misc
  1. PAN ID and CHANNEL of trasmitting device must match the receiving device.
  2. Xbee also comes with ADC. That’s mean, depend on the project, it’s possible to use ADC with the absent of microcontroller. Data converted then read by receiving Xbee through UART. *allow the module to be connected directly to analog devices like sensors, and send the data in serial form.>
  3. Instead of using X-CTU application, Xbee also comes with API and AT-command sets. API offers a great flexibility of using Xbee. *I believe that X-CTU works on top of the API
  4. Xbee modules require 2.8 – 3.4 (CMOS logic) Vcc input voltage and NOT 5V-tolerant. Please choose correct microcontroller. Vref for ADC MUST not exceed Vcc.

0 comments:

Post a Comment