Question about XBee

Bluetooth, XBee, RF......

Question about XBee

Postby tst » Sat Sep 18, 2010 10:09 pm

Hi,

I am a newbie in XBee. I got a lot of question about it. So I need your all professional suggestion and answer. Thanks first.
I have 3 circuit board with 1 main board, 2 sensor board. Each board has XBee respectively.
The two sensor board I named it as sensor 1 and sensor 2 and both of it sending the data to mainboard via XBee. Mainboard should be able to differentiate which data of sensor is send and perform certain function according to data receive, example plotting two different graph. Sensor 1 and Sensor 2 are ideally send the data simultaneously to main board( short distance).
My problem:
1. How does sensor 1 and sensor 2 know the address of main board and send the data exactly to mainboard? Is it related to baudrate? I confuse what is baudrate(=.=)"
2. Is it possible sensor 1 and sensor 2 send the data at the same time to mainboard? (Xbee of the mainboard able to receive the 2 data at the same?)
3. As i mention just now, mainboard are able to differentiate which data of sensor is sent. So, is it possible that I add one bit of header in each of the data to check which data is it? example: header of data sensor 1 is "1" ; and header of sensor 2 is "2".
4. What is pear to pear architecture? I saw this is one of the function for Xbee. Is it my project is based on pear to pear architecture? or Master-Slave relationship?

This is still a fresh idea and I do not know yet what is the next problem. I hopes you all can give any suggestion and idea to improve it. Thanks again.
tst
Apprentice
 
Posts: 33
Joined: Sat Sep 18, 2010 9:41 pm

Re: Question about XBee

Postby yonghui » Sat Sep 18, 2010 10:34 pm

hi,

i recommend u to use either API1 pr API2 of the Xbee. its good option.
in API mode. u will know which module is sending, because the address of the sender is included in the data packet.
go through the Xbee user manual for more information. the user manual teaches how the xbee addressing is implemented. and from there u will know the answer to ur question about the addressing. take time to look at the user manual, it has alot information on how to use the module.

however, if u prefer to use the transparent mode.then u might need to do data checksum in ur software.

normally the master board will send request to either of the board then the board will response by sending the required data. after complete and acknowledge the data received successfully, then the master can switch to request for the 2nd xbee for data. or are u trying to make the slave xbee sending out data non stop, then up to master catch it anytime? then i think that will make alot noise and interruption from both slave xbee data making the data corrupt. because both slave xbee can send data to the main. when the data from 1st xbee mixed up with 2nd xbee, data checksum might fail ( im not sure about this. maybe u can try it and tell me whether the xbee will be able to handle this)




regards,
yh
thanks&regards,
yh
yonghui
Moderator
 
Posts: 732
Joined: Mon Sep 28, 2009 3:27 pm

Re: Question about XBee

Postby tst » Sun Sep 19, 2010 11:27 am

Thanks for replying. I will try find out the API mode and transparent mode first. Actually, my first idea was the main board catch the data from both of the sensor boards in anytime and plot the output in two different graph. I think your idea is good. "normally the master board will send request to either of the board then the board will response by sending the required data. after complete and acknowledge the data received successfully, then the master can switch to request for the 2nd xbee for data."
For example, sensor 1 represent the car's right wheel and sensor 2 represent the car's left wheel and the car moves. I want the data from each sensor send to main board very fast speed. Is it possible? If I want to implement your method in my program, does it cause much delay time if i want to get the second reading from sensor 2 after I finish compute data from sensor 1
tst
Apprentice
 
Posts: 33
Joined: Sat Sep 18, 2010 9:41 pm

Re: Question about XBee

Postby yonghui » Sun Sep 19, 2010 3:03 pm

hi,

i think u will need to find out how fast ur need ur data from the source.

anyway, the microcontroller on mainboard will need to process the data one by one also, it probably cant process both data simultaneously.

xbee's baudrate can be high. so u can find out how fast ur need ur data to be. then list the requirements then compare, then we will know whether its fast enough or not.

regards,

yh
thanks&regards,
yh
yonghui
Moderator
 
Posts: 732
Joined: Mon Sep 28, 2009 3:27 pm

Re: Question about XBee

Postby tst » Sun Sep 19, 2010 3:22 pm

In my project, 3 Xbee are used. What happened if I set the baudrate of these 3 XBee to same value? If I want to perform the method that you suggest (signal from sensor send to mainboard 1 by 1), how am I going to put the value for baudrate of mainboard, sensor 1 and sensor 2 ? Just give any example of setting value of baudrate because I do not know how baudrate works.
tst
Apprentice
 
Posts: 33
Joined: Sat Sep 18, 2010 9:41 pm

Re: Question about XBee

Postby robosang » Sun Sep 19, 2010 8:12 pm

I think baud rate is the communication speed between Xbee and the microcontroller. Not sure whether it plays the main role in your system, but it should not affect the whole network. Xbee should have internal buffer to store RF data, high end communication module should have. Simple way to test is to set it to the popular baud rate, 9600 which consider quite slow nowadays.
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: Question about XBee

Postby redips_id » Sun Sep 19, 2010 8:21 pm

Hi tst,
how am I going to put the value for baudrate of mainboard, sensor 1 and sensor 2

Since your application need very fast reading from sensors, I think you need to produce higher baud rate. The value maybe you can try and error until you get the best one.

Just give any example of setting value of baudrate because I do not know how baudrate works.

set value BRGH high or low then set value of SPBRG (8-bit). Better refer to datasheet.
Request for complete solution for FYP? Why don't request for graduation certificate?
redips_id
Discoverer
 
Posts: 82
Joined: Wed Jan 20, 2010 6:23 pm

Re: Question about XBee

Postby yonghui » Sun Sep 19, 2010 10:12 pm

ya,

baudrate is the communication between the xbee with microcontroller, u can set different baudrate for each xbee. but make sure that the baudrate is same between the microcontroller and the connected xbee....else they cant communicate.

u can start with standard baudrate 9600,make sure the communication works 1st. 9600 bits per second, 9600/10= 960 byte/second between xbee and controller. a stop bit and a start bit and 8bits data.

xbee is transmitting at frequency of 2.4GHz, but not sure how fast the transmitting rate of data through the air.will need to check that out.
ur system requires how many bytes per seconds to be transfer between the main and the slaves?



regards,
yh
thanks&regards,
yh
yonghui
Moderator
 
Posts: 732
Joined: Mon Sep 28, 2009 3:27 pm

Re: Question about XBee

Postby tst » Thu Sep 23, 2010 3:59 pm

Hi,

Does anyone know about X-CTU? As I mention before, I might need a microcontroller in the main board in order to differentiate which signal is it (either signal 1 or signal 2). Can I assign the differentiation work to X-CTU (through programming) instead of using microcontroller? Is it possible? I mean we differentiate the signal through X-CTU programming. I heard X-CTU got this kind of function. I just wanna to confirm.
tst
Apprentice
 
Posts: 33
Joined: Sat Sep 18, 2010 9:41 pm

Re: Question about XBee

Postby yonghui » Thu Sep 23, 2010 10:29 pm

hi,

i use xctu before, but just to test and easy learning of xbee, the xctu can perform all the modes, transparent, api1 and api2.
you can view and see transmit and receive of data easily on xctu.

but i dont know xctu can perform any manipulation of data. what i know is that we can view the data being receive and transmit.

see example of SKXBEE, for the XCTU software.
http://cytron.com.my/viewProduct.php?pid=BSEYADkxLSUqORocBxQjGSJgU87bu!!!!!5XbzTApg6wotc=

regards,
yh
thanks&regards,
yh
yonghui
Moderator
 
Posts: 732
Joined: Mon Sep 28, 2009 3:27 pm

Next

Return to Wireless Device

Who is online

Users browsing this forum: No registered users and 37 guests

cron