Shop OBEX P1 Docs P2 Docs Learn Events
Xbee Series 1 Problem — Parallax Forums

Xbee Series 1 Problem

Adil AliAdil Ali Posts: 9
edited 2012-11-08 14:26 in Accessories
My project is simple.

Atmega16 (1) sends 0xAA to Atmega16 (2) via UART.
Atmega16 (2) sends increment 1 every second to Atmega 16 (1) via UART. (binary addition on LEDs)
(output is on LEDs)

Note: Im not using my PC or laptop to send any data


Both connected with coaxial cable (Tx (1) with Rx (2) , Rx (1) with Tx (2) ) , the project works fine.

Now i wanted to do this project wirelessly using Xbee series 1 connected with Parallax Xbee USB adaptor board and Parallax Xbee adaptor board.
(I have my Xbee series 1 on Xbee Adaptor Board while the other Xbee is on the USB Adaptor Board)

After spending days and hours trying to get it to work, i reached something weird. And i really need an explanation and a solution for this.


The project works fine but for only ONE condition (other than this condition it doesnt work! (confusing))

This is the conidition:


>Both Microcontrollers are getting their power from a 5V Adaptor.
>Both Xbees MUST be getting their power from USB to send/receive the data.
If the xbee on the Xbee Adaptor board gets its power (VDD pin) from the 5V Adaptor it doesnt work (its powered on (power LED is on) but it doesnt transmit the data).
If the xbee on the USB Adaptor board's VSS pin connected to ground (gnd of 5V Adaptor) its powered on WITHOUT connecting VDD pin to anything and WITHOUT USB power (i do not know how its working like that) . And if i connect the VDD to (5V adaptor) it turns off.

Still there is another problem.
Lets say we went along with this condition. So i Connect the Xbee Adaptor board power from a USB port (5v and gnd only from the PORT) , and the USB Adaptor board connected with the USB (port built in the adaptor) to get its power.

And the microcontrollers are connected to the 5V Adaptor.

Now we applied the condition and it works. However...
Logically if you just swap the Atmega16's with each other , the outputs on the LEDs will swap right?
Unfortunately no, i get on one side another output, and on the other side the same old output as if i did not swap anything. (in other words , it did not work).


*My Adaptor*
5V , 0.7A
>Last time (less than 24 hours ago) i checked the 5V Adaptor , it gave a reading of ~5.03V

>All my work is on 5V so im not getting near 3.3V (VCC)

>I configured the Xbees with X-CTU and tested them with the terminal function and a loop back connection and it worked fine (both from USB power). (so there is nothing wrong with my xbee's i guess).

When i connect the microcontroller (getting its VDD from 5V adaptor) with the xbee and loop back xbee (i did this so that whatever the microcontroller is transmitting should be looped back and outputted on LED), i get nothing on the LEDs.

If there is a problem with my adaptor (i do not know why there would be , its working fine) , please tell me what i should use instead of using USB power.

I know i rote a lot but i need a solution.
I cannot keep using the xbees with the USB as they will be on robots later on.

Comments

  • Adil AliAdil Ali Posts: 9
    edited 2012-11-06 12:10
    No, im not from Pakistan , im from Egypt.

    The tutorial and site are really good and helpful, keep up the good work!

    I read the tutorial, and i already did that part but with the modem configuration Tab (in X-CTU) , when i said
    " I configured the Xbees with X-CTU and tested them with the terminal function and a loop back connection and it worked fine (both from USB power). (so there is nothing wrong with my xbee's i guess)".

    Thank you for your effort.


    Any suggestions? any solutions for this problem..?
    Is there a difference between getting power from USB port and getting power from 5V Adaptor?
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-11-06 12:27
    Could you provide links to the adaptor boards you're using.

    What kind of "5V Adaptor" are you using? Could it be causing the problem?

    A clear picture of your setup might help someone find the trouble.
  • Adil AliAdil Ali Posts: 9
    edited 2012-11-06 12:49
    [FONT=Trebuchet MS, Helvetica, Verdana, Arial, sans-serif]Xbee Series 1 :
    [/FONT]http://www.parallax.com/tabid/161/ProductID/638/List/0/Default.aspx

    Xbee Adapter Board:
    http://www.parallax.com/tabid/161/ProductID/642/List/0/Default.aspx

    Xbee USB Adapter Board:
    http://www.parallax.com/tabid/161/ProductID/643/List/0/Default.aspx


    5V Adaptor :
    Samsung Travel Adapter (Mobile Charger)
    Model: ATADD11EBE
    Input: 100-240V
    50-60Hz 0.15A
    Output: 5.0V ---- 0.7A
    http://www.mytrendyphone.com/images/Samsung%20Travel%20Charger%20ATADD11EBE%20ADABD11EBE%20bulk.jpg

    What do you mean by a clear picture of my setup?

    I can re-connect my project all over again step by step if this would help find the problem and start troubleshooting with anyone.
  • Adil AliAdil Ali Posts: 9
    edited 2012-11-06 19:45
    If we managed to fix one problem from all this that would be great.

    Both Xbees @ baud rate 19200
    Both Microcontrollers' UART @ baud rate 19200

    Maybe i should try baud rate 9600? or it wont make any difference?
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-11-06 20:08
    Adil Ali wrote: »
    If the xbee on the Xbee Adaptor board gets its power (VDD pin) from the 5V Adaptor it doesnt work (its powered on (power LED is on) but it doesnt transmit the data).

    The XBee adaptor board you linked to doesn't use the VDD pin.

    attachment.php?attachmentid=96739&d=1352261203

    It has to be powered with 3.3V (2.8V - 3.4V) on the VCC pin.

    The XBees are not 5V tolerant on their I/O lines. You need to use some sort of level shifter when using it with 5V.

    This board takes care of the 3.3V power and level shifting.
    543 x 590 - 64K
  • Adil AliAdil Ali Posts: 9
    edited 2012-11-08 13:27
    Sorry for the late reply, i went to buy some components to make a 3.3V regulator circuit and it worked! I connected the 3.3V output with the VCC pins of the Xbees and it worked. Now i do not need to use USB power. Thank you Duane Degn .

    However, swapping the microcontroller problem still exists..(This is the last problem)
    I will remind you about it again

    >>Project:
    Atmega16 (1) sends 0xAA to Atmega16 (2) via UART.
    Atmega16 (2) sends increment 1 every second to Atmega 16 (1) via UART. (binary addition on LEDs)
    (output is on LEDs)

    >>After swapping Atmega's:
    If you just swap the Atmega16's with each other (without changing any other connection on the board), the outputs on the LEDs will swap right?
    Unfortunately no, i get on Atmega (1) 0xAA , and on Atmega (2) output changes between 0xAA and 0x55 constantly. Weirdly when i turn off the Xbees but the Atmega's are still on , Atmega (1) still gets an output of 0xAA and Atmega (2) some random data. Any solution?

    Are there any other tests i could make to help figure out the problem?

    and Thank you again for your help.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-11-08 14:26
    I'm glad things are working a little better now.

    Sorry but I doubt I'll be able to help much more. I don't have much experience with AVR chips. If you post the code, someone here might be able to help.

    If/when you post code, use code blocks as described here:

    attachment.php?attachmentid=78421&d=1297987572

    I also think it would be good to post a schematic of how things are connected.

    Are you using some sort of level shifter between the AVR chip and the XBee? I'm concerned the 5V logic from the AVR chip could damage the XBee without a level shifter.
Sign In or Register to comment.