Step 3: Configure the XBee modules

XBee B and XBee C, the sleeping routers, will sleep for 7.5 seconds. After this sleep period, they will wake for 2.5 seconds and send the analog value read from the potentiometer to XBee A, the sleep coordinator. They will then enter low-power mode for another 7.5 seconds.

Set the destination address (DH + DL) of the senders (XBee B and XBee C) to the MAC address (SH + SL) of the receiver (XBee A). Additionally, configure the pin where the potentiometer is connected (DIO3/AD3) as an analog input, and set the sample rate parameter (IR) to 7.5 seconds.

  1. Restore the default settings of all XBee modules with the Load default firmware settings button at the top of the Radio Configuration section.
  1. Use XCTU to configure the following parameters:

    Param

    XBee A

    XBee BXBee CEffect
    ID2015 20152015Defines the network that a radio will attach to. This must be the same for all radios on your network.
    DH—0013A2000013A200Defines the destination address (high part) to transmit the data to. The value of this setting should be the Serial Number High (SH) of the RECEIVER module.
    DL—SL of XBee ASL of XBee ADefines the destination address (low part) to transmit the data to. The value of this setting should be the Serial Number Low (SL) of the RECEIVER module.
    NIRECEIVERSENDER_1SENDER_2

    Defines the node identifier, a human-friendly name for the module.

    The default NI value is a blank space. Make sure to delete the space when you change the value.

    APAPI Mode Without Escapes [1]API Mode Without Escapes [1]API Mode Without Escapes [1]

    Enables API operating mode.

    D3—ADC [2]ADC [2]

    Sets the DIO3/AD3 pin as ADC in XBee B and XBee C. This pin is connected to a potentiometer.

    IR—1D4C1D4CConfigures XBee B and XBee C to send IO samples every 7.5 seconds (7500 ms = 1D4C in hexadecimal).
    SMSleep Support [7]Synchronized Cyclic Sleep [8]Synchronized Cyclic Sleep [8]

    Enables synchronous sleep support for the sleep coordinator.

    Enables the synchronous cyclic sleep mode for sleeping routers to sleep for the programmed time and wake in unison.

    SO001——Establishes XBee A to be the preferred sleep coordinator.
    SP2EE——

    Defines the duration of time spent sleeping.

    2EE (hexadecimal) = 750 (decimal) x 10 ms = 7.5 seconds.

    ST9C4——

    Defines the period of inactivity (no serial or RF data received) before going to sleep.

    9C4 (hexadecimal) = 2500 (decimal) x 1 ms = 2.5 seconds.

  2. Note The dash (—) in the table means to keep the default value. Do not change the default value.

Note If you are using a Grove sensor and have connected it to the Grove AD2 connector, you must configure the D2 parameter as ADC [2] instead of the D3.

  1. Write the settings of all XBee modules with the Write radio settings button at the top of the Radio Configuration section.

The following video demonstrates how to configure the modules with XCTU: