Go Down

Topic: Xbee Series 2 Boot Time (Read 3126 times) previous topic - next topic



As I'm working on Xbee Series 2, I noticed that they seemed to have a long boot time. Below I'll try to explain what I'm trying to do.

I'm working with Arduino to use one of its digital pin as a switch for Xbee. Using a transistor(2N2222a), I can control the Xbee to on/off as and when I need it to. My code is such that it will switch on the Xbee for a duration of time (a.k.a Xbee boot time) before trying to transmit information with the Xbee. Once acknowledgement is received, I'll shut off the Xbee.

I have tested the Xbee with different boot time and realised that using anything below 3.5sec will fail a transmission. Between 3.5sec to 15sec will result in periodic transmission errors. Beyond 15sec it will transmit without error.

As I'm working on a project with battery constraints, I find 15sec too long. Thus, would like to check if it is true that Xbee Series 2 requires such a long boot time. I'm using ZNET2.5 Coordinator/Router setup without sleep mode.



Talking through my hat, but actual "boot time", i.e. time for the firmware to be running in steady state, should be less than a second.

Even if the module isn't associated with a network, it should only take a very few seconds after power up (just a SWAG judging from experience, I haven't actually measured it, but 3-4 sec has to be enough, nowhere near 15.)

My experience is with the ZigBee firmware, not sure if ZNET would be different or by how much.

Not as an answer to the issue here, but the product manual does specify that coordinators and routers should be mains-powered. I'd probably try an end device and pin sleep, rather than pulling the rug out by switching the power.



Thanks for the reply! I understand that ZNET 2.5 is an old firmware version. I just tried to use Zigbee firmware and got a similar result.

I got the idea of switching on-off the setup from this site.

Below I put some of the code i used for further examination.
Basically, the informPin switches my Xbee on.
Code: [Select]

char temp_str[6];
char rh_str[6];
uint8_t payload[12];

        float h = dht.readHumidity();
        float t = dht.readTemperature();
        if (isnan(t) || isnan(h)) {
          Serial.println("Failed to read from DHT");
        } else {
          Serial.print("Humidity: ");
          Serial.print(" %\t");
          Serial.print("Temperature: ");
          Serial.println(" *C");
        dtostrf(t, 6, 2, temp_str);
        dtostrf(h, 6, 2, rh_str);
        int plcount = 0;
        for (int i =0; i < strlen(temp_str); i++){
          payload[i] = temp_str[i] & 0xff;
        for (int i =plcount; i < plcount+strlen(rh_str); i++){
          payload[i] = rh_str[i-plcount] & 0xff;

       digitalWrite(informPin, HIGH);


       if (xbee.readPacket(500)) {
       // got a response!
       Serial.print("Response Received!"); }
       digitalWrite(informPin, LOW);


Feb 25, 2013, 02:16 pm Last Edit: Feb 25, 2013, 02:18 pm by Jack Christensen Reason: 1
While this is clearly an application for an end-device utilizing sleep mode, routers still get powered on and off at times, and I'm a little surprised if it takes a router that was previously joined to the network several seconds to become operational. OTOH, as I said previously, this is contrary to the recommendation in the  XBee product manual. I'm not sure what the justification would be for not using an end device, but that is certainly the tree that I would bark up.

See p84-85 (and elsewhere) in the product manual for a discussion of pin sleep. Note use of flow control to determine when the module is able to accept data. Importantly, note that even in this mode, the power to the XBee is not switched: use of the sleep mode puts it into a low-power standby condition. This is an important distinction and almost certainly contributes to a faster wake-up time for the XBee.

I took a quick look at Alan Mitchell's blog, and I'll read it more closely later, but my initial impression is one of confusion. For many of the same reasons, I would not switch power to an Arduino any more than I would to an XBee. I would instead invest the time and effort that is being put into a custom power controller to develop a custom microcontroller board which (unlike an Arduino) is specifically designed for low-power operation and takes advantage of the ATmega328P's sleep modes. In fact I'm in the middle of such a project right now, developing a stand-alone data logger board which will run on a pair of AA cells for many months at least. A related project which I've just done some thinking on is to use an XBee (end-device) to transmit sensor data rather than storing it locally.

Good luck with your project, there are some fundamental concepts and design assumptions that I would re-evaluate.


Thanks for the suggestion. I agree that Xbee should be main powered. The reason why I want to use switch on-off is because of a rather high current consumption even on sleep modes. Previously I was using cyclic sleep mode and it draws about 1.8mA. I was using Xbee Explorer for easy connections. I think the issue with the current consumption is the small LEDs on the Explorer. I could use a breakout board for Xbee to minimise the current draw but I don't have idea how to properly eliminate the 5V to 3.3V difference between Xbee and Arduino.

For now, I will test to use Arduino to sleep and wake Xbee using pin hibernate. Is there any site that I can refer to for this setup? Thanks.


I'll refer you back to the product manual once again, link above.

Which, BTW, says that the power-down current is < 1µA. If the LEDs on the XBee explorer aren't lit, then they're probably not consuming current. If there is a voltage regulator on the board (if it's powered by 5V then there certainly is), that is probably the culprit. Just as an Arduino is not designed to minimize power consumption, neither is the explorer board.

Another suggestion from the product manual:

For applications that need to ensure the lowest sleep current, inputs should never be left floating. Use internal
or external pull-up or pull-down resistors, or set the unused I/O lines to outputs.



I'm pretty sure it is the LED as they are lit even on sleep modes to indicate that they are still powered. Do you have a way to operate Xbee with an Arduino which is at 5V? I'm thinking of using resistors to make a level converter, will it work?

I'll refer to the product manual on the pin hibernate. Thanks again. Let me know if you think the resistors or other methods will work. I hope to buy as little as possible and resistors are available to me quite readily. =)


Feb 26, 2013, 01:39 pm Last Edit: Feb 26, 2013, 01:42 pm by Jack Christensen Reason: 1

I'm pretty sure it is the LED as they are lit even on sleep modes to indicate that they are still powered.

Must just be a power indicator LED? Guess I was thinking of the RSSI and "associate" LEDs some boards have. For a low power design, obviously the whole lot should be eliminated.


Do you have a way to operate Xbee with an Arduino which is at 5V?

Yes, but it always involves a separate 3.3V supply for the XBee.


I'm thinking of using resistors to make a level converter, will it work?

A resistive voltage divider can be used to adjust logic levels, although this would not be my preferred approach. If you mean to use resistors to change the supply voltage, then no, that will absolutely not work.

Top on my list would be to run everything on 3.3V, and a custom circuit (i.e. not using an actual Arduino board) designed for low power consumption.

Go Up