Forcing sleep mode when out of range

Hi, this is my first post. Thanks in advance for the help.

Explain the situationa: I have a weather station, of which I download the memory of the datalogger via RS232 cable using the PC. Usually I download the memory of data logger once per week (total duration: 10 minutes)

Because the station is in a place not easily accessible, I used the following:

  1. meteorological station + Xbee (end device) + socket 232 + battery
  2. PC + Xbee (coordinator) + USB shield

It works perfectly, as if the weather station was physically connected to the PC. That way I can download the data logger easily.

Once I download the data, I go away, taking with me the computer (included Xbee coordinator).

Using the tester, I see that when I turn off the PC module, the end device begins to consume a lot of current (much more than when working), while I would like to bring it into sleep mode.

In this way the battery runs out very soon!

In short, how to force the end device to enter sleep mode when the coordinator is out of range (or off), and reactivated when re-power the coordinator?

All this to make the battery last as long as possible.

Thank you and sorry for the bad English!

Hi, one way is to provide the remote AT commands for sleep to your end device, before shutting down your laptop.

Hi, one way is to provide the remote AT commands for sleep to your end device, before shutting down your laptop.

Ok, perfect, but… How can it wake up, if it is sleeping?

Hi, you can give the following AT commands

SM : 5 — Cyclic Sleep PIN- WAKE
ST : F
SP : AF0
SN : Any HEX Value (in the rage of 1 - 0xFFFF)
SO : 04 (Note: Sleep time = SP * SN)

With this setting, You can increase the sleep time and remote XBee can wake up as PIN wake up applied at the pin 9 on the XBee.

Sorry, but it’s been a long time, I almost forgot the question!

Can I force it into sleep mode, ok, no problem. But as soon as I walk away (or turn off the coordinator), he wakes up and begins to search for the coordinator, consuming a lot of energy!

Ok, Then why dont you try establishing router in between Coordinator and End Device? This problem will be solved.

Ok, Then why dont you try establishing router in between Coordinator and End Device? This problem will be solved.

It’s cheaper build a little circuit with (and, first of all, more powersave), for example, a microcontroller ATmega, in order to force hybernate mode, and wake up it, for example, every minute to check the coordinator avaibility. If coordinator is avaible, it can starts the comunication, otherwise it returns into hybernate mode.

What do you think about?

It will be better to interface controller with your end device XBee, as you can not use Coordinator to send the remote XBee command every time as you explained in your previous posts. But always use the controller which is working on 3.3V.

I’ll use an ATmega328P, that functions at 5V, but using an adatpter I’ll be able
to use 3.3V, too.

I know that I have to adapt the serial DIN from 5V to 3.3v. It’s correct?

Yes, you need to use both way. For that you can use Bidirectional Buffers/ Transceivers, Precision Operational Amplifiers, or Voltage Divider Circuits.

And as a microcontroller, Youcan use the low power Controller as PIC24F16KA102.

Ok folks. Lets clarify some things.

First, the ZigBee Mesh and Znet 2.5 Mesh based products are not designed for the Coordinator to be roaming. The Coordinator is intended to be stationary.

The best product to use for a Point to point connection for which you have is an XBee 802.15.4 module. This module can sleep on your remote side giving you the longer battery life you need while the always on sleep Coordinator can be connected to your PC and be removed.

Hi folks, I have more or less the same situation, I have 3 end devices modules (sensing and recording temperature) and 1 coordinator (connected to PC) what I want to do is power the end devices modules with batteries (to remote data logger and battery low consumption), the issue is in the communication form, I always keep the module listening for the detection of a coordinator (this one performance the ATND command and discover the nodes in the XBee network) to download the data recordered by the end device module. On this way the battery life is about two days (I use energizer batteries, and this is the best model that I found Energizer® Ultimate Lithium this one can handle up to 3000mAh) I want to increase the battery life but I could not do.

I have this:

XBee modules (End Devices)
XB24-Z7CIT-004
Firmaware
Modem = XB24-B
Function Set = ZNet 2.5 Router/End Device AT
Version = 1247

XStick
XU-Z11
Firmware
Modem = XB24-B
Function Set = ZNet 2.5 coordinator AT
Version = 1047

Any suggestion is welcome.

Thanks in advance.

I think that the best way is use a microcontroller that goes in sleep mode,
forcing Xbee to sleep when unused

Hi GianfrancoPa thank you for your answer. That is actually what I’m doing, I have my end devices connected to a microchip microcontroller 12F683 and in my microcontroller program I force the end device to sleep using the pin hibernate. What I can’t control is wake up the end device when is close enough from the coordinator. My idea of an ideal operation would be, the end device module with a microcontroller record temperature data and stored in an EEPROM memory then goes to sleep, when it is close enough from the coordinator automatically wake up the end device and send all data collected to a PC. I want to safe energy because when the end device finished to collect the data take long to get where is the PC to download that data. Spends to much time in idle mode and I prefer that the end devices stay in sleep mode.

I hope I expressed myself well.

Thanks in advance.

Regards.

It is what I want to do:

You can poll if coordinator is in range, waking up the end device for the minum time that it needs to find the coordinator:

  1. if it finds the coordinator you can start to send data and when it finishes it can hibernate and restarts the polling for the next data trasmission session;

  2. if it don’t find the coordinator, it returns in hibernate mode and restarts the polling.

In my opinion if you choose a 15/30 sec time polling (or less, depending your needs) you can save a lot of battery…

Thank you for your answer, but I believe if I do that my communication would not be 100% reliable, let me explain myself better, if I program the end device microcontroller with a poll rate about 15/30 sec I should make it sleep about 3min (it’s my guess for energy saving) ok this is the end device side now for the PC side I should do the same poll rate or something like that because I should do a poll every 15/30 sec and I think there’s a possibility that the end device will not be detected by the coordinator, the end device spend much time sleeping than waking up.

I don’t know if I miss some considerations or if I drowning in a glass of water but that possibility drives me crazy.

I hope you can open my mind or tell me any idea to do my goal.

Thank you.

The product you are using is designed as such that the Coordinator is not intended to be roaming. It is intended for it to remain in place. What I would recommend is to switch to the XBee 802.15.4 product instead. This way, your end device can still sleep but it does not require a Coordinator. Nor does it require a Coordinator to sleep. It is also designed for t he simple point to point connection you are referring to.

Hi mvut thank you for your opinion, my coordinator is fixed to PC (always remain in the same place) the end devices always are moving and the download operation takes place when the coordinator detects any end device.

I can’t replace the XBee series 2 that I have with XBee 802.15.4 because it’s so hard to me buy pieces from my country to another I did it once and I bought a few XBee series 2.

Thank you.

Where you need power saving? End device or coordinator?

Hi GianfrancoPa, I need power saving in the End Devices, the coordinator always is plugged to a PC.