Question about XBee

Bluetooth, XBee, RF......

Re: Question about XBee

Postby davidtsj » Sun Mar 06, 2011 9:15 pm

Dear yong hui,
Thx for ur help...
davidtsj
Novice
 
Posts: 20
Joined: Sat Feb 05, 2011 9:11 pm

Re: Question about XBee

Postby ck88 » Sun Mar 13, 2011 5:50 pm

Hi guys,

I have a question about XBee and I'm sorry if it hijacks this thread, so hopefully it's related.

Looking at page 8 of SKXBEE user manual, I realized that there's a transistor connected between PIC and the SKXBEE. May I kindly know what is the purpose of the transistor placed there?

If I want the PIC to reset the SKXBEE, can I just use a jumper wire to connect both the pins, or do I need to watch out for the voltage levels by inserting a voltage divider circuit in between?

Thank you.
ck88
Novice
 
Posts: 16
Joined: Thu Nov 11, 2010 11:46 pm

Re: Question about XBee

Postby yonghui » Sun Mar 13, 2011 7:35 pm

hi, refer to the user manual of Xbee,
the command table,
u can actually opt for soft reset if its available.
if there is a open drain output pin on microcontroller u can
pull up xbee to 3.3V using a pull up resistor. and use the microcontroller to pull down for reset.
else use a transitor to pull down.
the transistor on SKxbee most probably is to pull down.
xbee is 3.3V but im not sure whether it has really 5V tolerant io pins. i tried b4, not damaging the IO pin when its power up with 3.3V properly. but in long term not sure.

regards,
yh
thanks&regards,
yh
yonghui
Moderator
 
Posts: 732
Joined: Mon Sep 28, 2009 3:27 pm

Re: Question about XBee

Postby ck88 » Sun Mar 13, 2011 9:57 pm

Hi,

I've tried using the software reset for XBee. I am actually trying to get the modem status notification that says my end device has successfully associated with another coordinator XBee. However, looking online for some guidance, it seems like during association, the end device's MY address is set to 0xFFFE and 64-bit addressing is enabled. I don't want 64-bit addressing to take place, so I gotta issue a AT command API packet to re-set the MY address for the end device, and then listens for an AT command response saying OK.

But things does not goes smoothly. The original flow is like this:

Power on PIC (XBee gets power from PIC) -> waits for Modem Status packet saying "Associated" -> Re-set MY address via AT command -> waits for AT command response for OK

But when i power on, the message saying Associated displays (meaning i got the modem status packet), but I can't seem to proceed to get the AT command response for OK...it somehow hangs after Association.

Then I discovered that when I power on, at quickly after that (nearly concurrently) I pressed the reset button on the SKXBEE, I can get everything done correctly from Association to OK for resetting the MY address.

So, I thought of using a software reset for XBee (ATFR) after power on (and after LCD init, Keypad init and UART init) to simulate the situation above. So the flow is like this:

Power on PIC (XBee gets power from PIC) -> Software resets XBee and waits for 'OK' -> waits for Modem Status packet saying "Associated" -> Re-set MY address via AT command -> waits for AT command response for OK

This situation is also buggy, because I can only reach software reset's 'OK' message, and after that, hangs there...the message of Association also can't seem to reach.

I wonder where went wrong, if anyone has experience in this matter, do kindly enlighten me on this issue. Thank you :)
ck88
Novice
 
Posts: 16
Joined: Thu Nov 11, 2010 11:46 pm

Re: Question about XBee

Postby ck88 » Mon Mar 14, 2011 9:12 pm

Hi,

I've tested building a voltage divider network to lower down the voltage to approximately 3.3V going into SKXBEE RESET pin from an I/O pin from PIC. However, I can't seem to reset the XBee module. After I've removed the voltage divider network, and connect it straight-on (XBee RESET pin -> PIC I/O pin), the XBee module seems to be able to reset.

I wonder why does this happen. Maybe SKXBEE on board already has a voltage divider or something? If I follow the schematic on the SKXBEE user manual by inserting a transistor...I'll also follow the usual way of resetting the XBee by outputting a LOW from my PIC I/O pin?
ck88
Novice
 
Posts: 16
Joined: Thu Nov 11, 2010 11:46 pm

Re: Question about XBee

Postby shiyan » Mon Mar 14, 2011 10:46 pm

ck88 WROTE:I wonder why does this happen. Maybe SKXBEE on board already has a voltage divider or something? If I follow the schematic on the SKXBEE user manual by inserting a transistor...I'll also follow the usual way of resetting the XBee by outputting a LOW from my PIC I/O pin?


Checking the User's Manual of SKXBee it show that the connection to RESET pin is optional. It seem to be me if you don want to reset it from PIC, you can wave the transistor and the extra push button function is the same as the reset button on the SKXBee. NPN transistor, a good way to sink current at pull the collector to GND. Yup, I think Cytron designed the SKXBee to be have a pull high resistor on board at XBee's reset pin, so by default the XBee is not reset (Reset require low). So no external pull high is needed to make it work. If you want to reset it, pull this pin low by either push button (mechanically and electrically) or use a NPN transistor to do that which can be control by a microcontroller output pin. A good method :)

Not really sure why you connect directly it can reset. I heard that XBee module's IO pin is actually 5V tolerance, but no confirmation on that.... It might work for sometime and die one.... like yonghui said :mrgreen: .

My advise is to use transistor because it will only pull low and "open" the collector from GND which will allow that pin to become default stage, it doesn't matter it is pull high to 3.3V or 5V. But if you connect to PIC IO pin which operate at 5V, you will actually pushing 5V to 3.3V pin :o . And I am not sure what will happen over time.
User avatar
shiyan
Amateur
 
Posts: 189
Joined: Wed Jun 09, 2010 10:59 am

Re: Question about XBee

Postby ck88 » Mon Mar 14, 2011 11:05 pm

Hi shiyan,

Thanks for your reply.

Over time, I've tested out many configurations. And I just realized from SKXBEE manual that the RESET pin ported out on board is having a max voltage of 5.5V, meaning it's 5V interfaced? I've tested to build a voltage divider which outputs approximately 4V to 4.1V and it can work just like u connect it directly.

Btw, shiyan, you've mentioned about the transistor and I'm confused on that part with

My advise is to use transistor because it will only pull low and "open" the collector from GND which will allow that pin to become default stage, it doesn't matter it is pull high to 3.3V or 5V.


I've tried connecting it like the way in the SKXBEE manual schematic, but it doesn't seem to work. I'm wondering whether am I connecting it correctly or not, with emitter connected to ground? I controlled it with PIC I/O pin by outputting a low and then a high to reset the XBee.

Thank you.
ck88
Novice
 
Posts: 16
Joined: Thu Nov 11, 2010 11:46 pm

Re: Question about XBee

Postby ABSF » Tue Mar 15, 2011 7:45 am

I've tried connecting it like the way in the SKXBEE manual schematic, but it doesn't seem to work. I'm wondering whether am I connecting it correctly or not, with emitter connected to ground? I controlled it with PIC I/O pin by outputting a low and then a high to reset the XBee..


Try a "high" follow by "low" from the PIC. Let the "high" stays high for a short while.

Allen
The next war will determine NOT who is right BUT what is left.
User avatar
ABSF
Professional
 
Posts: 810
Joined: Wed Nov 10, 2010 9:32 am
Location: E Malaysia

Re: Question about XBee

Postby ck88 » Tue Mar 15, 2011 10:24 am

Thanks for the reply.

Is the push button necessary together with the transistor as depicted in the SKXBEE manual? Plus, how long to stay put at HIGH state before going LOW?

Thank you :)
ck88
Novice
 
Posts: 16
Joined: Thu Nov 11, 2010 11:46 pm

Re: Question about XBee

Postby ABSF » Tue Mar 15, 2011 2:14 pm

ck88 WROTE:Is the push button necessary together with the transistor as depicted in the SKXBEE manual? Plus, how long to stay put at HIGH state before going LOW?

Thank you :)


That's totally up to you. If you never need to do a MANUAL Reset, just remove it. You can always put it back when you need it. As for how long to stay HIGH, I would say 10mS should be more than enough. You wont be able to press the button for 10mS, or CAN you? But the PIC is capable of sending a reset pulse of 2 or 3uS which may be too short for the XBee to do a proper reset.

Allen
The next war will determine NOT who is right BUT what is left.
User avatar
ABSF
Professional
 
Posts: 810
Joined: Wed Nov 10, 2010 9:32 am
Location: E Malaysia

PreviousNext

Return to Wireless Device

Who is online

Users browsing this forum: No registered users and 33 guests