Distance measurement in xbee

I’m using two XB24 modules in my locator project and I want to display the distance between two modules in 7-segment display, may i know the XBee modules can transmit data on distance or not? so that I do not need to add distance sensors in my hardware.

If distance sensors are needed, which type of sensor is suitable? I found that IR sensor only can measure very short distance and cannot detect black object. Although it’s cheap, but I hope that my hardware can display minimum distance = 50m, is it possible?

The XBee has no way to know how far it is from another module, except by measurement of signal strength when it receives a transmission from the other module.

Measurement of signal strength gives you a very rough idea, but it would be highly unreliable. Signal reflections and intervening objects will upset the results.

As for what type of distance sensor would be suitable, I’ll have to leave that to others. However, you could help by googling for “distance sensor” and telling us which types look suitable and which do not.

Also, maybe you could give more detail about what the application is. For instance, is this a student project or a plan for a commercial product, or somewhere in between?

ooh… I’ve already replied this.
Putting this out there for the rest of the community:

Hi Ms. Tee :wink:

Technically speaking, it’s not possible for “ANY” RF modules to display distances between each other. Reason:
[1] It’s affected by EMI
[2] It’s affected by LOS
[3] It’s affected by your medium space

You can however check the link strength in between them. Using the AT command; DB.
Look at:
http://ftp1.digi.com/support/documentation/90000976_G.pdf \ Page 132 \ “DB row”

If you insist to know the distance; you need to have some sort of proximity sensors to each other attached to it.

On an unrelated note;
there are two types of XBee Modules. The one without a microcontroller (uC), and the one with it. Both of course at different pricing. I would suggest that you work with the one you purchased since it’s easily customizable with any uC you are familiar with already. Unless you really insist on learning another uC structure; then get our programmable XBee version.

How it communicates with your uC is via UART communication. Just make sure ur uC has those legs, and you are good to go.

To flash your XBee chip with the latest firmware; read Page 15.
A simple circuit is enough, connect it on a breadboard connect one end to a serial port on the PC that host the firmware (and use X-CTU program); and the other end to its respective legs. Your lab equipments should be sufficient to do the flashing. Unless you want to take an extra step further: try here: http://www.sparkfun.com/products/9819 and do remember to get the USB FTDI driver from here: http://www.digi.com/support/supporttype.jsp?tp=1

Hope these answer all your queries.