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.