XBee Direct I/O

Hello there,

I'm building a wireless sensor network and I succesfully build it using Arduino and an XBee module attached to it. Now, however, I've decided to give XBee Direct I/O a try.

For that purpose, and because I don't have any batteries and such, I wanted to use Arduino as my stable power supply. In order to test I built a simple circuit to test with, with a temperature sensor. More precisely, I'm using the popular LM35. Hence my circuit looks like the following:


The XBee is plugged over the Explorer and that DIO0 (DIO-zero) is set as an ADC pin. Also, function set is ROUTER AT.

The reason I'm using 5V directly is because the LM35 sensor needs an input from 4 to 20V, and since the XBee Explorer has a 5V pin input, I felt I could use it.

My coordinator is set with the same PAN ID as my router and it has AP=2. However, my router TX led doesn't turn on anytime while the coordinator, being monitored by the xbee-python API doesn't receive a thing.

Can you see anything I'm missing? I'm really really interested in using XBee Direct I/O mode :slight_smile:

Greetings from Spain,
Alejandro

I have a network of series 2 XBees some of which are used for direct i/o to transmit temperature, voltages, and such. The circuit you show looks fine, the XBee explorer has a 3V regulator and the temperature sensor should stay within the range supported by the XBee analog input. Be careful not to exceed 1.2 volt input. If you suspect you might go over it (I did) just use a voltage divider to cut the voltage in half before taking it to the XBee pin, a couple of 10K resistors did the job for me.

I used pin 19, AD1, so I would have the commissioning pin available if I needed to recommission it on the fly.

The thing I see different in your description is that I had to use API mode on both the sender and the receiver. There's a tiny little line about devices having to be in API mode to send i/o samples out the uart on page 95 of the manual. I/o is also sampled, not continuous. That means you have to set up a sample time; you'll find that option under i/o sampling in the XCTU configuration.

The manual for all this stuff is at: http://ftp1.digi.com/support/documentation/90000976_G.pdf and they talk about reading and transmitting the i/o pins around page 95.

have fun

Thank you draythomp. I knew that documentation had to exist but I didn't know where. You were right, the router has to be in API mode as well. I'm following the "Building Wireless Networks" from O'Reilly and they got it wrong.

If someone wants to ever reproduce this example, I was using XBee Series 2, and here are the profiles (save it as a *.pro file):

Coordinator: XB24-ZB_218C.mxi800251218C0[A]ID=1[A]SC=FFFF[A]SD=3[A]ZS=0[A - Pastebin.com
Router: XB24-ZB_238C.mxi800251238C0[A]ID=1[A]SC=FFFF[A]SD=3[A]ZS=0[A - Pastebin.com

For your next project, since you're already set up for it. Convert the remote XBee into an end device, put it to sleep for long periods (minutes) and have it wake up and send the reading.

Advantage: eats very little power, so the XBee can run off a battery and a little solar charger and be placed anywhere.
Disadvantage: doesn't do store forward so it cannot support devices further away than it is.

Devices like this can control solar automatic gates that are at the end of a dirt road with no power available.

XBees are cool.