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

One master controls and collects data from slaves at the same time

Hello,

I would like to ask you guys whether it is possible that one Bluetooth master device (smartphone) can control and collect data from two Bluetooth slave device (some kinds of sensors) simultaneously. Here, Bluetooth chip is NRF51822. This is for my project that needs to compare two sensor data in different location, which has to be time synchronized. I found that it is possible in theory, but don't know how to start from. It will be great also, if there is some firmware example to start from. I will be waiting for some helps. Thanks!

Parents
  • Hey.

    Connecting and communicating with two slave (peripheral in BLE) devices is no problem. The communication can never be simultaneously though. You must expect at least about 10 ms between receiving data from the two sensors. Synchronizing the devices with regards to time will also be challenging. I would expect a about 10ms uncertainty here as well. See this thread about this.

    Before i can advice you further on firmware, please provide a bit more information about your project:

    • Will you use nRF51822 for all three devices?
    • Can you tell me a bit more about what kind of sensors you will use?
    • How often will you need to send sensor data?

    Update 1.

    If you are to accurately measure the time between two points wirelessly, i see two options.

    1. Have accurately synchronized clocks on both measuring devices, and send the time to the master device.
    2. Have both devices send a packet immediately after detecting the pulse, and let the master calculate the time difference.

    For option 1, you must have mechanism for synchronizing the clock of the two devices. It is not enough to sync once, since the clocks will drift away from each other. (With a 30 ppm uncertainty on a clock, it can drift as much as 100 ms in one hour.) You must therefore develop some wireless synchronizing mechanism which is one regularly. If you wish to start developing this using BLE, you can start by reading the "getting started" page and looking at some tutorials.

    For option 2, BLE is not feasible. This is because packets are not sent immidiately, but on the next connection interval. You can use a proprietary 2.4 GHz protocol like Enhanced ShockBurst to send things immidately between the two sensors. You can then have one sensor send the result to a phone over BLE. Read about ESB here, and see the example code here.

Reply Children
No Data
Related