SparkFun Forums 

Where electronics enthusiasts find answers.

For the discussion of Arduino related topics.
By marcusbarnet
#146870
I have to connect my Xbee module to my Arduino standalone board and I'd like to know if i have to convert Rx and Tx arduino level to 3.3V if it is not necessary.

I've already bought from sparkfun some modules like these: http://www.sparkfun.com/products/8745 but then I've seen on "Building wireless sensor network with ZigBee" that arduino and xbee can be connect even without the logic level conversion since on the book there is xbee module directly connected to 3.3V for the Vcc pin and Rx and Tx pins are connected to the Arduino ones without the presence of any logic converter or voltage divider.

So, I would like to ask you if I can connect the xbee module without using any level conversion and by only connecting xbee Vcc to 3.3V.
By Valen
#146893
If the Arduino is also running on 3.3v then you do not need to levelshift at all. Connect the Xbee Vcc to the Vcc of the 3.3v Arduino. And connect the Arduino TX and RX to the Xbee Din and Dout respectively. And ofcourse GND to GND.

If the Arduino is a 5v board then that needs to be reduced to 3.3v for the Xbee with something like a lowdrop linear voltage regulator or DC-DC converter. (that levelconverter wont do!, but this one does: http://www.sparkfun.com/products/9132 ) The 5v Arduino RX pin should be able to detect 3.3v signals from the XBee Dout. But for the Arduino 5v TX pin to Xbee Din you need a levelshifter. That suggested level converter should work. But the levelshifting method with a reversed biased diode like in one of the tutorials also worked for me. It is also incorporated in the Xbee Explored board. (cathode pointing towards Arduino TX pin blocks current going from 5v to 3.3v. The anode connected to XBee Din must be pulled up to 3.3v with a (10k) resistor. It only passes current if the Arduino TX output went low. )
Last edited by Valen on Mon Jul 02, 2012 4:19 pm, edited 1 time in total.
By Valen
#146897
I couldn't quite get it clear from your first post whether your Arduino was a 5v board or a 3.3v board. This is important for the answer. So I explained both options. Again, if they are of separate voltages then you should use that levelshifter if you have already bought it. If they are of the same voltage then you don't need it.

If you still don't understand or can't tell the difference, then please show exactly which Arduino board you are using.
By marcusbarnet
#146899
I'm using a atmega328 with Arduino UNO bootloader in a standalone configuration on a perfboard.
I power up my circuit with 12VDC and then I use a voltage regulator which outputs 5VDC for the atmega328 and another voltage regulator which outputs 3.3V for the xbee module.

So I think I have to use the levelshifter which I've already bought: is it correct?