I made a setup which consists of 3 Zigbee’s, 2 routers(Zigbee S2C’s) and 1 coordinator(Zigbee S2).
The routers are each connected to Arduino nano which collects data from 2 FSR’s and an IMU(frame type: ZigBee transmit request and packet size 46 bytes) and sends it to the Coordinator attached to an Arduino UNO. All the Xbees are in API mode 2 and working at a baud rate of 115200. I am using a library called “Simple Zigbee Library” to send all the collected data to the Coordinator.
The collection and sending of data works fine except that there are packets lost in the way. The nano’s sample data at a frequency of around 25Hz independently. The coordinator tries to read the data send from the ZigBee’s(using the library of course) in every loop, but unfortunately, it seems to receive only around 40-45 samples.(Should have been 25*2=50 samples total from the 2 XBee’s).
Can anybody suggest why this is happening? I need as less data loss as possible for my setup to achieve its motive. Any kind of help is appreciated.
P.S: It may be important to mention that the coordinator is reading the data only from one xbee in each loop.
The attached screenshot shows the data collected by the coordinator. The heading “Source” is the address of the sender xbee. “19” is the right side router and “106” is the left side router. It can be seen from the data that the data received is intermittent.