Go Down

Topic: Latency in transmitting to multiple synchronised Xbees? (Read 425 times) previous topic - next topic

TransientJay

Hello all, Xbee beginner just making sure this is the right tool for a job… so I have some questions I cant seem to find answers to...

I want to make a surround sound system. One xbee will be hooked up to a switch and numerous other xbees will each have their own mp3 trigger which activate when the switch is pressed.

Is it possible to get ALL files in the numerous mp3 triggers to start playing at the same time? ie will some lag and start a bit later?

If variations in start time between receiving xbees are likely, is it possible to use code to delay triggers so they start when the slowest xbee is ready ie introducing general latency just to make all files start to play simultaneously?

Could this lag be in seconds or is it more likely to be milliseconds?

Many thanks for any help!

Jay

PaulS

Quote
Is it possible to get ALL files in the numerous mp3 triggers to start playing at the same time? ie will some lag and start a bit later?

Not likely.

What kind of XBees are you using? How are they configured? What method are you using to send data? That is, are you using API mode or AT mode? Sending to one other XBee at a time or to all at once using broadcast mode?

Quote
If variations in start time between receiving xbees are likely, is it possible to use code to delay triggers so they start when the slowest xbee is ready ie introducing general latency just to make all files start to play simultaneously?

They are, but how will all the XBees know when the last one got the message?

How much variation is acceptable? The lag depends on how the data is being sent, how far, and what is between the sending and receiving XBees, but is likely to be on the order of microseconds, not seconds.

TransientJay

Quote
What kind of XBees are you using? How are they configured? What method are you using to send data? That is, are you using API mode or AT mode? Sending to one other XBee at a time or to all at once using broadcast mode?


The XBees haven't been bought yet but the ones I use will depend on whether or not a specific type will be best for any latency issues, and the same goes for data sending but the 'play' command needs to be sent all at once using broadcast mode so all mp3 triggers receive at the same time.  I have been looking at the series 2 XBee (wire antenna) as I hear the networking options are more what I need.




Quote
They are, but how will all the XBees know when the last one got the message?


I was assuming there may be a way by them all passing around some kind of 'ready' message - but maybe this just shows my inexperience!

Quote
How much variation is acceptable? The lag depends on how the data is being sent, how far, and what is between the sending and receiving XBees, but is likely to be on the order of microseconds, not seconds.


I will be moving audio around speakers to get sense of movement (among other things) so microseconds should probably be ok.  Time variance in sound created by the room the speakers are in will probably cover that up anyway I expect.

Is there a method of data sending that would reduce any delay?  The biggest room at the moment will probably be 50m x 50m and there will be maybe 40 people moving about the room, some tables and chairs (an active dinner party).  The coordinator XBee will probably be in an adjacent room.

Many thanks for your help.

PaulS

Quote
I have been looking at the series 2 XBee (wire antenna) as I hear the networking options are more what I need.

The point to (multi)point will be sufficient, if you are using broadcast mode, and the sender can see each receiver.

Quote
I was assuming there may be a way by them all passing around some kind of 'ready' message - but maybe this just shows my inexperience!

An XBee that is an end device or router can communicate with an XBee that is a coordinator, possibly through other routers.

So, the coordinator would need to send a message to all the end devices/routers. They would all have to reply "Ready" Then, the coordinator would have to broadcast a "Go" message. That rather defeats the purpose, eh?

Quote
I will be moving audio around speakers to get sense of movement (among other things)

I don't understand. How are you moving this audio data around?

Quote
Is there a method of data sending that would reduce any delay?

Keep the message as small as possible. Make sure that the coordinator can see all the end devices/routers, so that use of routers to retransmit the message is minimized (or, perhaps you shouldn't have any routers).

TransientJay

Quote
The point to (multi)point will be sufficient, if you are using broadcast mode, and the sender can see each receiver.

Great, thanks, this is series 1 right?  I may got with two anyway to give flexibility for future projects.  Unless the way series 2 works hinders the synchronicity of course...

Quote
An XBee that is an end device or router can communicate with an XBee that is a coordinator, possibly through other routers.

So, the coordinator would need to send a message to all the end devices/routers. They would all have to reply "Ready" Then, the coordinator would have to broadcast a "Go" message. That rather defeats the purpose, eh?


...ah, so then that message could have the same delay to certain recipient Xbees... which would mean another ready message would need to be sent and the following "Go" message could still be delayed...  sounds like a vicious circle!


Quote
I don't understand. How are you moving this audio data around?


It'll be through fading in one speaker while fading out the adjacent speaker to give the effect something is moving throughout the space,  If a chain of speakers are treated in this way, the sound can move around a circle of speakers or along a wall for example.  If this is done precisely with attention to detail some cool effects can be gained.

Quote
Keep the message as small as possible. Make sure that the coordinator can see all the end devices/routers, so that use of routers to retransmit the message is minimized (or, perhaps you shouldn't have any routers).


Great, thanks for your advice

Go Up