Electronics > Electronics

Connecting an Xbee to the Axon

(1/8) > >>

adasta:
Hello Folks,

I have used the Axon board quite successfully on several projects, but each time I that I need to connect it to an Xbee I have quite a bit of trouble. 

The different voltage levels for each chip (3.3V on the Xbee) and 5 volts on the Axon Atmega640 means that you can't connect them directly.  I have tried using a sparkfun level converter :
http://www.sparkfun.com/commerce/product_info.php?products_id=8745

along with a sparkfun Xbee explorer regulated board :

http://www.sparkfun.com/commerce/product_info.php?products_id=9132

to connect the chips.  This produces a clean looking transmission on my oscilloscope, but the Axon cannot receive or transmit any data. 

The only solution that I have found is to use a inverter (7404) to buffer the signal between the axon and the Xbee explorer board.  This works well with Series 1 Xbees, but fails with Series 2.5 Xbees.   

Can anyone think of  an  electrical reason for the atmega640 finicky UART port?   How do you all connect your Xbee to your Axon?  Is there a good board that I can purchase?

Thanks for the help.

Admin:
The Axon UART Rx will work fine getting 3.3V logic, no problem. Built-in resistors protect it from damage.

The Xbee however is a different story, as a 5V signal might damage the 3.3V tolerant Rx pin. If you look at the schematic of your converter:
http://www.sparkfun.com/datasheets/BreakoutBoards/Level-Converter-v10.pdf
you'll see its just a simple two resistor voltage divider for Rx - the *simplest* circuit in the world. But its quickly obvious why it isn't working - SparkFun chose the wrong resistors! Shocking!

That voltage divider they chose results in a 1/2 voltage output (two 10k resistors). So if you feed it 5V signal, it outputs a 2.5V signal - thats too low (what voltage does your oscope say?). You need ~3.3V. Sooooo doing the math:

(5V-3.3V)/10k = (3.3V-0V)/X
X = 3.3V*10k/1.7V
X = 19.4kohm resistor

Unsolder and replace the resistor connected to ground to be around 19.4k-ish ohms or less (doesn't need to be exact).

It also drains current according to a quickie Google search at about ~180mA during xmit, meaning you can't use the Axon 3.3V regulator (as you probably already know). An external 3.3V regulator is all you need.

Now looking at that XBee Explorer datasheet:
http://www.sparkfun.com/datasheets/Wireless/Zigbee/XBee-Regulated-v10.pdf

It appears they are using a diode to drop the signal by ~1.2V on the DIN pin, and a 1k resistor to absorb some current. Except there are two problems:
5V-1.2V is 3.8V - still too high!
and they have the diode backwards, at least in the schematic (so it won't work)

There you have it, SparkFun can't even get a voltage divider or a diode correct :P

waltr:

--- Quote from: Admin on December 11, 2009, 03:33:54 AM ---
Now looking at that XBee Explorer datasheet:
http://www.sparkfun.com/datasheets/Wireless/Zigbee/XBee-Regulated-v10.pdf

It appears they are using a diode to drop the signal by ~1.2V on the DIN pin, and a 1k resistor to absorb some current. Except there are two problems:
5V-1.2V is 3.8V - still too high!
and they have the diode backwards, at least in the schematic (so it won't work)

There you have it, SparkFun can't even get a voltage divider or a diode correct :P

--- End quote ---

You have misinterpreted the SparkFun schematic. Take another look at that schematic.
The diode functions by blocking a positive voltage to the XBee. The DIN line is pulled up with a internal resistor (see AT command PR) for a logic high but allows an external signal to pull it to logic low. Kind of like an Open Collector circuit. This works perfectly on the Series 2 XBee modules I have with a 5V PIC but have heard problems with the 900MHz XBee Pro modules.
This may be due to the voltage drop across the diode with a logic low signal. The DIN pin would be a diode drop above ground. If this is not low enough then the XBee's DIN doesn't see a logic low.

Admin:
Ah yes, I didn't realize that other LED is also connected with the 3.3V pull-up. I take back my diode comment ;D

What voltages does your oscope read on that DIN pin? I'm curious what the diode voltage drops are.

waltr:
Good question. I'll have to measure the voltage and report back.

Navigation

[0] Message Index

[#] Next page

Go to full version