I have experimented the interference between two pair of Xbee P2P connection.
If I use the same channel sometimes the delivery of packets is significantly delayed.
What I am trying to do now is to merge the data from two Xbees and send them to the host computer as accurate and fast as possible. After the 14 hours of research I found out the following two facts:
1. avoid to use one Xbee receiver to receive data from more than two Xbees. This slows down the speed radically
2. It is hard to receive and merge two channels of UART data without any packet loss using normal Arduino, because it has only one hardware uart. Software uart is not reliable as far as I tested today.
My conclusion is to use ATMega 164P with two Hardware USART with big ring buffer (256 byte each!) and enabled interruption now it works very fast
However… the PureData Interface freezes when I send data to it … I have to figure out the problem… but I guess it is pure data problem not the hardware.
In order to solve the problem, I made “Xbee receiver station” and hocked it up with Arduino Due with two Serial port. In this way, the speed of transfer was radically stabilized. The baud rate is 38400 between Xbee and Arduino and 115200 between Arduino and Host computer… The sampling interval on Xbee is 0x0A (10 msec).
I was trying to send data from two Xbee-RF modules(S1) to one Xbee-RF. However, it makes the timing of data reception extremely unstable. The following figures shows the comparison. The Sampling Rate is 20 ms and baud is 9600.
One solution might be using two Xbee modules as receivers, employing different two channels to data but it occupies two USB port and require two modules. may be i could use an arduino as a hub… but anyways, this is disappointing.
There is a way to randomize the timing of transfer in order to avoid collisions (below), using AT command RN but this does not solve the problem dramatically.
bought DS203, a compact oscilloscope for debugging mostly digital circuits. it’s neat but the max freq is 0.1 usec. also the interface is not sophisticated…. documents are not good enough…. many bugs. but this product is very inexpensive.
Today I have tried to stabilize the output from the Sharp Infrared sensor. The following links are useful. I just put 0.1 uF and 100 uF to the Vdd. The result is significant.
http://letsmakerobots.com/node/22781
http://letsmakerobots.com/node/23297
http://www.robotroom.com/DistanceSensor3.html
I checked the interval of Serial-USB messages, coming from Arduino with timer object. it is surprisingly VERY unstable.
timer outputs sometimes 0. It means no interval between previous and current values. the numbers are sometime buffered but sometimes not arrived properly on time? I set the baudrate pretty high but 38400 is adequate for arduino. I guess.
And finally the LCD worked… but I was not able to locate the problem.