Sensor sampling rate is set at 100Hz but the receive rate is only about 20 or 30Hz

I use the streaming model to collect data. The sampling rate is set at 100Hz, but the receive rate is only about 20 or 30Hz
First, I thought it might be my program problem, then I used the demo in the tutorial and just simply change the sampling rate (25, 40, 50 100). And I found out it at most can receive data at around 40Hz, and when I add another sensor (e.g., gyro), the receive rate got lower.
Then I thought it might be my cellphone hardware problem, then I used the MetaBase APP that you provided, and it works pretty well.
So, I got confused. What could the problem be? Are there have other parameter settings that need to be done to get the receive rate as high as MetaBase does?

Comments

  • It's likely the call the change the frequency is not working. Make sure you put in a valid frequency.

  • https://mbientlab.com/androiddocs/3/advanced_features.html#high-frequency-streaming
    I use the High-Frequency Streaming and change the Time Stamp producer from your API to my cellphone time. By doing that I raise my receive rate to around 70Hz.
    BTW, I thought maybe I use too many sensors, now I am running an ACC in 100Hz, a Gyro in 100Hz, a Mag in 10hz and a Barometer in standby time(0.5f).

    Also, I have two more questions:
    1.standby time(0.5f) equal to how many Hertz?200?
    2.How can I reduce the max connection interval to 7.5ms (11.25ms for Android M+)?
    settings.editBleConnParams()
    .maxConnectionInterval(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M ? 11.25f : 7.5f)
    .commit();
    Where should I put those code in?

    Thank you for your time.

  • @Laura said:
    It's likely the call the change the frequency is not working. Make sure you put in a valid frequency.

    Also, sometimes the Time Stamp producer from your API did not work, and it will encumber the receive rate.

  • So is it working ok @pekky? Can you send some data for us to look at?

  • @Laura said:
    So is it working ok @pekky? Can you send some data for us to look at?

    here is my data, I set the sampling rate at 50HZ, sometimes it can reach to 50hz but most of the time it is only 40

  • Can you explain your setup more?

  • @Laura said:
    Can you explain your setup more?

    I have solved the problem by just higher the txpower of BLE.

    Thank you so much for your time and Patience,

  • @pekky, thanks for updating us, much appreciated!

Sign In or Register to comment.