SensorFusion accuracy on device after battery dead

We are using the MetaWear sensors in an iOS application.  We've noticed that immediately after a device first is used after the battery was let to completely uncharge, there is a period where the algorithm seems to need to stabilize and we get wide swings in readings (100s of degrees) in data points.  It will eventually settle in (sometimes in minutes, sometimes closer to an hour) and then everything works fine.  This is not great for our product though, because during this time it appears it does not work at all.   

Is there a way to cache some kind of configuration for a sensor so after it is recharged after a dead battery, we can somehow avoid that settling-in period?


  • edited January 2018
    • Can you provide some data that illustrates these wide swings?
    • How are you configuring the sensor fusion algorithm?

    The algorithm will calibrate itself once started so there is no configuration to store.
  • I am trying to get a better log because we had not saved any, but haven't gotten a good one yet (and it takes a while to let the sensors die completely and sit uncharged, then retry and it doesn't happen every time).  I've asked the main tester who has been reporting the most issues to try to get me a better log.

    I do have one example data point that I had emailed when we were debugging as an example.  It's not one of the more extreme examples we've seen (only 20ish degrees here) but the sensor wasn't moving in this case so 20 degrees still makes no sense.

    Sample values: roll -1.138982800943 pitch: -90.56325608465 yaw 2.1347892930527
    Sample values: roll -1.072978062944 pitch: -90.67165969949 yaw 1.061856952141
    Sample values: roll -0.40490927382 pitch: -90.532946617 yaw 339.52740681

    We aren't doing any specific configuration on the sensor fusion.   The code is just as follows

     if ([SettingsData sharedSettings].dataSource == SensorTypeMbientnDoF) {

            _connectedDevice.sensorFusion.mode = MBLSensorFusionModeNDoF;

        } else {

            _connectedDevice.sensorFusion.mode = MBLSensorFusionModeIMUPlus;


        [[[_connectedDevice.sensorFusion.eulerAngle startNotificationsWithHandlerAsync:^(MBLEulerAngleData *obj, NSError *error) {

  • Does this only happen if the battery is discharged?  If you reset the board instead, do you see the same behavior?

    What are the steps to reproduce this issue?
  • We've only experienced it with battery discharge but I can try with a reset.   It's not 100% reproducible but the steps are let a sensor completely discharge, sit for 24 hours before charging and then charge back up and connect.   The problem does eventually go away - it's usually only maybe 5 minutes.  One tester though tells me he's seen it be an hour or more on occasion.  
    • In your use case, are you placing the devices in a case?
    • Does the same issue occur for both NDoF and IMUPlus mode?
    • Does doing random motions with the board, like figure 8s in the air, stabilize the data?
    • Is it only the yaw value that is off?
    • Do you see the same issue when using quaternions?
This discussion has been closed.