XBee Digital I/O Adapter

Product description

The XBee Digital Adapter is a product designed to take digital input or programatically assert digital output and communicate the I/O changes across the XBee network. For more details of usage and configuration, please review the Drop-in-Networking Accessories user Guide at: http://www.digi.com/din/docs

Major Features of the XBee Digital Adapter:

Supported platforms

The XBee Digital Adapter is supported on all Digi's XBee protocols. All of Digi's ConnectPort X gateways that are using the same XBee protocol as the adapter are compatible.

Example: If you have a gateway product with a XBee ZB radio installed, a XBee ZB Analog Adapter is compatible, but not a XBee ZNet 2.5 Digital Adapter.

Programming options

The XBee Digital adapter uses a unique function set for each of the protocols, requiring that configuration of the radio be done via the RF interface through remote AT commands.

Important: Serial communications disabled on XBee Analog and Digital I/O Adapters

For the XBee Analog and Digital I/O Adapters, the XBee firmware disables the XBee module’s serial communications functionality, so that the pins normally used for serial communications can instead be used for additional I/O functionality. As a result, once an XBee module has been loaded with the firmware image specific to the XBee Analog or Digital I/O Adapters, the XBee module can no longer be configured using XCTU, the XBee serial API, or local AT commands.

The only way to configure these adapters is by using the Ident or Ident/Reset commissioning and identification button (described in the topic "Commissioning and identity behaviors" in the Drop-in Networking Accessories user Guide) and OTA commands—either by using a ConnectPort gateway, XCTU, or by using the remote command API of another serial-enabled module associated to the same network.

Mode and terminal configuration

The Digital Adapter's terminals can be configured independently for input or output operation. It is possible to set a single terminal to be in both input and output mode.

To configure a Terminal for Input

D8=3 (Enables Terminal 1 for Digital Input)

D1=3 (Enables Terminal 2 for Digital Input)

D2=3 (Enables Terminal 3 for Digital Input)

D3=3 (Enables Terminal 4 for Digital Input)

To configure a Terminal for Output

D4=5 (Enables Terminal 1 for Digital High Output)

D6=5 (Enables Terminal 2 for Digital High Output)

D7=5 (Enables Terminal 3 for Digital High Output)

P2=5 (Enables Terminal 4 for Digital High Output)

D4=4 (Enables Terminal 1 for Digital Low Output)

D6=4 (Enables Terminal 2 for Digital Low Output)

D7=4 (Enables Terminal 3 for Digital Low Output)

P2=4 (Enables Terminal 4 for Digital Low Output)

Sensor readings retrieval

Once the device has been configured, it is time to start polling sensor samples from the device. There are three methods of polling available for the Digital Adapter. An active polling, and two methods of passive polling. All forms of polling require the user to parse the IS data structure.

Active polling is when an application or user on the XBee network sends the Remote AT command 'IS', which causes the Digital sensor to take a sensor reading and return the results to the requester.

802.15.4 I/O line passing support

The I/O Line Passing function of XBee 802.15.4 Modules is not supported with the Digital I/O Adapter, as the Input Port mapping is not identical to the Output Port mapping, e.g. Terminal 2 input is D1, but output on Terminal 2 is D6. Line Passing would require that both are the same!

Advantages

Disadvantages

The first passive polling option is to periodically transmit a sensor reading and send it to the configurable destination address. To configure this setting, set the 'IR' parameter to the rate in milliseconds to send the sensor reading, and the 'DH' and 'DL' parameters to match the 'SH' and 'SL' parameters of the desired destination. In cases where the sensor is also sleeping, enabling the 'IR' parameter causes the sensor to send at least 1 reading per wake cycle. If you desire the device to send only one sensor reading per wake cycle (recommended), set the 'IR' parameter to 0xFFFF.

Advantages

Disadvantages

More difficult to setup, requires working knowledge of sleep settings.

The second passive polling option is to wait for a change in state on the I/O lines. To enable this feature, the 'IC' parameter is set to a mask indicating which I/O lines to monitor for a state change. Once the desired mask is set, any changes in logical state on the specified lines will generate a sensor reading and send it to the 'DH' and 'DL' address.

Advantages

Disadvantages

More difficult to setup, requires working knowledge of sleep settings.

DIP switches

The adapter has several DIP switches on the underside of the unit. DIP switch 1 is the leftmost switch. When the adapter is oriented with the mounting tabs facing upwards, the DIP switches are in the ON position when the switches are positioned away from the screw-lock connector.

Switch settings are:

DIP Switch Settings

DIP Switch Settings
1 ON = Internal Battery Powers Pin #6, OFF = battery power not used.
2 ON = External Supply Powers Pin #6, OFF = external supply not used.
3 ON = Enables a 10K pullup on terminal #1 to 3vdc.
4 ON = Enables a 10K pullup on terminal #2 to 3vdc.

Notes:

Power output

Terminal 6 is the power out pin. It can be set in either battery pack voltage out or +12VDC at 50mA out if mains powered. To set battery pack voltage output, set dip switch 1 to the on position. To enable +12VDC output, set dip switch 2 to the on position. Setting both to the on position defaults to +12VDC output but incurs extra battery drain as well.

Once the desired power output is selected, the 'P3' setting needs to be set to 5.

Note: In order for consistent output voltage, the XBee Adapter cannot sleep. Using the power out function of this adapter in conjunction with batteries will result in significant additional battery usage.

DIA configuration and programming examples

The Remote Manager Wiki is a Python framework designed to gather information from multiple sources, provide programmatic control over the information collecting, and present the data either to a software platform such as the Device Cloud or directly to the user through a variety of methods.

Python programming examples

This Demo Application uses the Motion Detection with XBee.

Replacement parts

Six-terminal block plug

The terminal block is a Phoenix Contact MSTB 2.5/6-ST-5.08, which can be purchased directly from Phoenix Contact or from an online reseller such as DigiKey as part 227-1015-ND.

Locking power connector

Information on buying the Locking Power Connecter.