Sleep with adapter Board.
si8
Posts: 20
Hi,
I am using xbee adapter board wired up as showen as in "Getting started with xbee RF modules" i have also place an additional connection from PIN 9 to DTR so that can control when it sleeps.
But for some reason i cant get it to goto sleep.
I have used the exact same code with an SIP adapter which seems to work fine.
Is there something i am missing?
thank you,
Si
I am using xbee adapter board wired up as showen as in "Getting started with xbee RF modules" i have also place an additional connection from PIN 9 to DTR so that can control when it sleeps.
But for some reason i cant get it to goto sleep.
I have used the exact same code with an SIP adapter which seems to work fine.
Is there something i am missing?
thank you,
Si
'DEBUG CLS, "Configuring XBee..." PAUSE 2000 ' Guard time for command sequence SEROUT TX,Baud,["+++"] ' Enter command mode PAUSE 2000 ' Guard time for command sequence SEROUT TX,Baud,["ATNI XBee API TX",CR, ' Set description "ATMY ", HEX 2,CR, ' Set node address "ATDL ", HEX 1,CR, ' Set destination node address "ATD6 1",CR, ' Use RTS for flow control "ATAP 2",CR,' API with escape characters "ATSM 1",CR, "ATCN",CR] ' Exit command mode PAUSE 2000 Main: DO LOW 9 PAUSE 50 GOSUB SHT_Measure_Temp GOSUB SHT_Measure_Humidity: GOSUB XBeeTx16 PAUSE 500 HIGH 9 PAUSE 100 SLEEP 3 LOOP ' GOTO main END
Comments
While writing the XBee text, I had problems getting sleep and RTS to work at the same time. There's a note of caution on page 102. Other than possibly the buffer is not fully empty allowing it to enter sleep mode, I don't have an answer or solution. You say it did work in a different configuration with the same code? Interesting. keep us posted please if you learn anything new.
Martin Hebel
Is it the Parallax #32401 "5V/3.3V adapter board"? If so, the DTR pin 9 on the XBee is not safeguarded to 5V. That is different from the #32402 SIP adapter, which does have voltage translation for DTR.
When your program drives that pin high from the Stamp it may be stressing it. I don't know for sure, but that might explain why it does not go to sleep.
By default the XBee itself has an internal pullup resistor on that pin. Put one LOW 9 in the initialization section of your program, and then use this sequence to alternate between wake and sleep... Worth a try anyway. See the ATPR command to read about the pullup resistors.
I am using #32403
The #32401 provides level shifting for the data input and RTS lines, but not for the DTR sleep line, and the SIP adapter 32402 is the one provides level shifting for 7 signal lines, including DTR/Sleep.
The #32400 is only for USB, to plug into your PC and powered by it, not for use with Stamp or Prop.
I have recently noticed that mine is heating up and when i try it in a SIP adapter nothing happens. (I think i have blowen it :S )
All problems solved
Thank again for the help.
I see the following WARNING (!) on page 18 of the Getting Started with XBee RF Modules tutorial, Version 1.0 (Web Release 2) begins the section describing the XBee 5V/3.3V Adapter Board:
The XBee SIP Adapter description on page 20 includes the following information regarding the buffering which addresses the DTR pin specifically:
I have the Rev B XBee 5V/3.3V Adapter Board so should I assume this board has the buffering similar to the SIP Adapter for the DTR pin?
Question:
How can I verify that the XBee is actually in SLEEP mode?
I used your suggestion above. My XBee should only transmit 3 bytes about every 15 seconds. I have the following LED statuses:
Blue - solid (does not change)
Yellow - solid (does not change)
Green - Blinking
Red - On every ~15 seconds when the 3 bytes are transmitted
These statuses are the same as before I added the SLEEP code.
I currently have the BS2 I/O pin connected directly to the XBee 5V/3.3V Adapter Board DTR pin 10. The XBee transmits as it should and exhibits no problems.
falcon
Pin 13 on the XBee goes low when the XBee is in sleep mode, and it is high in normal mode. Another good way to know it is in sleep mode is to monitior its power supply current, about 50mA awake, about 10µA asleep. That is for the XBee itslelf, apart from voltage regulators and leds and whatnot.