Pages: [1] 2   Go Down
Author Topic: Xbee and arduino ?  (Read 2478 times)
0 Members and 1 Guest are viewing this topic.
India
Offline Offline
Newbie
*
Karma: 0
Posts: 37
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can i connect xbee directly to the arduino ? I mean can xbee be powered directly from 3.3V regulated voltage from arduino or do i need something else ?
Logged

Hamburg, Germany
Offline Offline
Sr. Member
****
Karma: 6
Posts: 291
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

if your Arduino (like the UNO) has a 3.3 volt power supply, you can power the XBee directly from the Arduino. be careful not to supply the XBee with more than 3.3 volts.

markbee
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 28
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You'll also need some form of level converter between the Arduino and the XBee.  At minimum, level converting needs to be done for the PWR, TX, and Rx lines.  

The Tx line needs level converting because it is a 5V output, and the XBee Din cannot accept more than 3.4V I think.
Logged

India
Offline Offline
Newbie
*
Karma: 0
Posts: 37
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You'll also need some form of level converter between the Arduino and the XBee.  At minimum, level converting needs to be done for the PWR, TX, and Rx lines.  

The Tx line needs level converting because it is a 5V output, and the XBee Din cannot accept more than 3.4V I think.

Thats what i am worried about.
Btw do you have any link that explains how to create a level converting circuit for xbee and arduino ?
Logged

India
Offline Offline
Newbie
*
Karma: 0
Posts: 37
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

if your Arduino (like the UNO) has a 3.3 volt power supply, you can power the XBee directly from the Arduino. be careful not to supply the XBee with more than 3.3 volts.

markbee
Yes i am using arduino uno which has 3.3V power supply but i read somewhere that a level shifting circuit is needed.
and I saw your blog and you have done great xbee projects.I am quite new to xbee infact just ordered it now.
Logged

Hamburg, Germany
Offline Offline
Sr. Member
****
Karma: 6
Posts: 291
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

OF COURSE you should do level shifting to be on the safe side. or if you will do commercial products out of XBees (google for "level translators" like Maxim337X, e.g. MAX3371 for 1 line - i personally never used one of them, but they might/ should work).

but i have to confess: i never used any level shifting until now (as far as XBee and Arduino is concerned). all my XBees until now had no problem with data levels from arduino which in fact go as high as 5 volts. but maybe i only had (much) luck. and i will give no guarantee that you might be as lucky as me  smiley-twist
my attitude might be too relaxed though. maybe i have to change my opinion relating to level shifting in the future.
 
the facts:

the XBee manual is clear - read chapter 2 (RF Module Operation) and you see: CMOS logic HIGH is (limited to) 2.8 to 3.4 volt.

if you want to dig deeper, read here: http://www.maxim-ic.com/app-notes/index.mvp/id/3007

or shorter: http://www.faludi.com/bwsn/xbee-level-shifting/

digi knowledge base: http://www.digi.com/support/kbase/kbaseresultdetl.jsp?kb=160

the only thing i REALLY care about is NEVER to exceed about 3.3 volts supply to the XBees (pin 1 Vcc and pin 10 GND).

markbee
« Last Edit: June 11, 2011, 05:17:51 am by markbee » Logged


New River, Arizona
Offline Offline
God Member
*****
Karma: 19
Posts: 936
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have had the same experience as markbee.  I hook the XBee power to the 3.3 volt on the arduino and the tx and rx directly to the arduino digital pins.  It works just fine.  However, if you want to run one of the pro modules, this will not work.  The increased power drain causes problems with the regulator's output (at least for me).  In those cases I get one of the buffer boards and use it with a 5V supply.

But, you can hook it directly to the arduino, power, ground and digital all work just fine.  I have one device that has ran this way for several months without a hiccup.  So, my recommendation is to experiment with it this way (just connect it), and as you get more experience, move to something more sophisticated. 

I hate waiting for stuff to arrive in the mail when I'm trying something new.
Logged

Trying to keep my house under control http://www.desert-home.com/

Boston, MA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1024
wiblocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a level-translator application hint at --

http://wiblocks.luciani.org/docs/app-notes/zb1-ftdi-adapter.html

I would not drive the digital pins above Vcc or below GND. Unfortunately I could
not find the absolute maximums in a table in the electrical characteristics.
Typically the specification is 0.3V above Vcc and 0.3V below GND and is
specified in the "Absolute Maximum" table.

<shamelessplug>
The simplest thing to use a 3.3V board like my PICOBEE --
http://wiblocks.luciani.org/PICO/PICOBEE-index.html
</shamelessplug>

(* jcl *)

Logged


India
Offline Offline
Newbie
*
Karma: 0
Posts: 37
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well it seems that the xbee can work  if connected directly with arduino but i would go with a logic level converter to be on the safe side as i dont want to fry my xbee radios.
I will buy these explorer boards which have a level shifting circuit already set up.
http://www.rhydolabz.com/index.php?main_page=product_info&cPath=130_133&products_id=481

Logged

New River, Arizona
Offline Offline
God Member
*****
Karma: 19
Posts: 936
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That's a nice looking board, but I couldn't tell if it actually has level conversion for the pins you normally use.  It definitely has a 5 to 3.3 converter, but it doesn't appear to have a level converter for the digital pins.  That would mean that you could still have concerns about signal level on the input being too high and signal level on the output being too low.  Boards like the Adafruit one https://www.adafruit.com/products/126 have a buffer chip that also converts the signal levels for the often used pins. 

When I use a board, I use this one because I can populate it exactly the way I want to use it.  However, the board you linked to has a nice set of leds to help you tell what is going on.

But, remember, even if it doesn't have a buffer for the signal lines it will still work (I have proven that by doing it).  It's just that the objections above related to signal voltages still apply.
Logged

Trying to keep my house under control http://www.desert-home.com/

Hamburg, Germany
Offline Offline
Sr. Member
****
Karma: 6
Posts: 291
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

consider if you plan to use the XBee as an End Device you might avoid "hard-connected" LEDs for several reasons.

first you want to have as low power consumption as possible (avoid RX, TX, RSSI, ON-LEDs).

second there is the possibility to connect a sensor device (e.g. temperature sensor) directly to pin 13 only to wake up when the Xbee wakes up (my next project for the blog btw., current consumption is as low as 190 µA with XBee in sleep mode and WITH voltage regulator MCP1700 and TMP36 - no need for a level shifter because it's XBee only remote).

third in some configurations even when driving from a normal power supply and not as End Device you might avoid any extra current consumption.

fourth you might run into trouble when using XBee as an End Device and have pin 13 (ON/ SLEEP) of the XBee connected. at least thats what i had, when playing around with the XBee as an End Device.

that's why i like simple breakout boards for about $2 only most. if i need any additional parts - 2/ 3 capacitors for Vin, level shifter, LEDS or voltage regulator (MCP1700 is my favourite, ~2 µA quiescent current consumption) i can add them by myself.

markbee  
« Last Edit: June 12, 2011, 03:17:48 am by markbee » Logged


New River, Arizona
Offline Offline
God Member
*****
Karma: 19
Posts: 936
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Good point markbee.  I never considered the power eaten up by the LEDs, I was always fascinated by the way they flash.  I'll keep that in mind when I build a solar powered sensor.  Probably put the LEDs in when I'm testing it and take them out before I deploy it for real use.

There's just something cool about flashing lights.....
Logged

Trying to keep my house under control http://www.desert-home.com/

India
Offline Offline
Newbie
*
Karma: 0
Posts: 37
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It definitely has a 5 to 3.3 converter, but it doesn't appear to have a level converter for the digital pins.  That would mean that you could still have concerns about signal level on the input being too high and signal level on the output being too low. 
I think you missed some specifications of the board.
It says it has a converter even for didigtal pins .
3.3V to 5V and vice versa.
Logged

New River, Arizona
Offline Offline
God Member
*****
Karma: 19
Posts: 936
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I noticed that in the description, but the schematic link didn't work and there just aren't enough smd resistors on the board to provide voltage dividers for the pins, nor is there a buffer chip on the visible part of the board.  They could well have some stuff on the bottom of the board, but they don't show a picture of that.

So, it may well have conditioning of some kind, but I just couldn't find it.  Let us know when you get it.
Logged

Trying to keep my house under control http://www.desert-home.com/

Offline Offline
Newbie
*
Karma: 0
Posts: 28
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It definitely has a 5 to 3.3 converter, but it doesn't appear to have a level converter for the digital pins.  That would mean that you could still have concerns about signal level on the input being too high and signal level on the output being too low. 
I think you missed some specifications of the board.
It says it has a converter even for didigtal pins .
3.3V to 5V and vice versa.

kawal - I think you'll probably be fine with this board.  All it really needs to convert for basic operation is the 5V power if you use it, and the Din line.  The Arduino can read a 3.3V signal as a digital high no problem.  I couldn't view the schematic for some reason, so I can't 100% say this board takes care of those basic pins.  The description seems to indicate that it does though.   smiley-mr-green
Logged

Pages: [1] 2   Go Up
Jump to: