This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Synchronization of actions between different nodes in a mesh?

Hi, when reading BLE Mesh specs, this paragraph caught my attention:

Messages may support a delay parameter that indicates a delay between receiving a message and starting the state transition. This helps when synchronizing actions of multiple receivers (such as lights) when senders retransmit messages multiple times. Each retransmitted message may indicate a different delay, compensating for the time elapsed since transmitting the first message.

My project could totally use this feature, I'm wondering how this can be done precisely (<=20 ms if possible), that is, let's say I need 6 motors to start rotating at the same time, or else major mechanical mishaps take place, how do I do that, by embedding a hop count of some sort in the message sent over the mesh? Or is there any other way which I am not aware of?

And above everything, how reliable is this? Since if one node fails to receive the message THE FIRST TIME, the outcome could be very, very undesirable?

  • Hi

    The most common way to synchronize activities across a mesh is to establish a synchronized clock, and use that to schedule actions in the future. Then it doesn't matter how long the packet takes to reach the recipient, as long as it arrives before the scheduled time.

    The mesh model specification includes a mechanism for synchronizing time (see chapter 5 - Times and Scenes), but unfortunately we don't support this in the current mesh implementation.

    As one of the mesh guys pointed out, if you really need to synchronize motors accurately then a mesh is not really a good option. As you can see from the time sync specification they allow for an inaccuracy in the 10ms - 2.5s range, and there is always a chance that a packet to one of the recipients will be delayed or lost, so getting reliable accurate synchronization below 20ms is probably not realistic.

    Best regards
    Torbjørn

  • You want a message with ack if you want reliability, you also want to ensure that all motors have got the message before starting up. You may also want a fallback to cancel and restart if one of the nodes did not ack within your timeout. The mesh already has a hop count that can be used for re-transmits.

    You can use the mesh for this but since the node count is low (only 6 nodes), it is also possible use a simple scanner/advertiser to achieve this level of synchronization.

    All motors can be started within 20ms of each other with sync either on the 16MHz or 32KHz clocks

  • You are right, I'm not there yet, but so far I'm thinking about utilizing the "shockburst" TM feature: find out the "central" (spacially speaking) node, and assign her with the task of sending out synchronizing bursts periodically. The Shockburst has a max range of 200m, which is more than enough for us.

  • Do you mean combining Bluetooth mesh and Shockburst, or using Shockburst only?

    As for range it is more or less the same between Shockburst and BLE. There is a small difference in the modulation, and the packet format is different, but nothing that makes a big impact on the range.

    In a line of sight scenario you can reach 200m, but indoor I would expect significantly lower range.

    Best regards

  • Hi then the whole "Shockburst" is kind of misleading isn't it?

    I was under the impression that typical BLE ad packets goes no further (and rightly so) than 11 or 12 meters outdoor?

Related