Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    BMM150+BMI160 rawdata is not matching with BMM150+BMI270

    BMM150+BMI160 rawdata is not matching with BMM150+BMI270

    Santhosh_N
    New Poster

    Hi 
    I am trying to compare the raw x,y,z values of BMI160+BMM150 with BMI270+BMM150
    By keeping both the PCB's in same position I took the values and they are as below


    BMI160+BMM150
    Accel x y z -1996 76 451
    Gyro x y z 8 -1 3
    Mag 8 bytes (values from register in manual mode)113 0 233 0 71 0 41 106
    MAG x y z 14 29 35

    BMI270+BMM150
    Accel x y z -1999 -75 552
    GYRO x y z -2319 33 -2267
    Mag 8 bytes (values from data register in manual mode) 57 13 65 12 173 0 188 100
    MAG x y z 423 392 86

    I am not understanding why there is a drastic change in both the values when i maintained the same configuration and same positon. 
    Can someone help me on this.?

    If you are able to get the same values in both the setups, can you share your coonfiguration.

    Thanks in advance

    10 REPLIES 10

    BSTRobin
    Community Moderator
    Community Moderator

    Hello Santhosh_N,

    Could we know some information from you.
    1. What is your product application?
    2. What was the software you used?
    3. Did you only tested on PCB, not assembled to structure as a whole machine?
    4. On your PCB, what other general circuits are there?

    Hi

    1. We use rawdata of accel, gyro and mag to calculate body motion.
    2. I took the example code from https://github.com/BoschSensortec/BMM150-Sensor-API and integrated into my application.
    3,4. Tested this on our PCB, we are having a working BMI160+BMM150 board on which we replaced BMI160 to BMI270 as both have the same functionality to read rawdata. Yes there are other components on the PCB but they shouldn't effect the sensors because they are woking well on BMI160.
    But now we are not getting the similar values for mag which is aux in BMI270+BMM150.

    Do we get similar rawdata of x,y,z when we compare BMI160+BMM150 with BMI270+BMM150.?
    This is the config of aux I am using
    /* Configurations for aux. */
    config[AUX].cfg.aux.odr = BMI2_AUX_ODR_100HZ;
    config[AUX].cfg.aux.aux_en = BMI2_ENABLE;
    config[AUX].cfg.aux.i2c_device_addr = BMM150_DEFAULT_I2C_ADDRESS;
    config[AUX].cfg.aux.manual_en = BMI2_ENABLE;
    config[AUX].cfg.aux.fcu_write_en = BMI2_ENABLE;
    config[AUX].cfg.aux.man_rd_burst = BMI2_AUX_READ_LEN_3;

    /* Set the power mode to normal mode. */
    settings.pwr_mode = BMM150_POWERMODE_NORMAL;
    rslt = bmm150_set_op_mode(&settings, &bmm150_dev);

     

    @BSTRobin
    Any update on this 

    BSTRobin
    Community Moderator
    Community Moderator

    Hello Santhosh_N,

    I built HW & SW with BMI160+BMM150, BMI270+BMM150 these days. By keeping both the PCB's in same position I took the values and they are as below. From test result, it didn't have big difference for MAG  data value.

    BMI270+BMM150

    BMI270+BMM150.png

     

    BMI160+BMM150

    BMI160+BMM150.png

    int8_t Open_BMI270_AUX(struct bmi2_dev *dev)
    {
    int8_t rslt = BMI2_OK;
    uint8_t regdata;

    uint8_t sensor_list = BMI2_AUX;
    /* Sensor configuration structure */
    struct bmi2_sens_config config = { 0 };

    config.type = sensor_list;

    bmm150dev.dev_id = BMM150_DEFAULT_I2C_ADDRESS;
    bmm150dev.intf = BMM150_I2C_INTF;
    bmm150dev.read = (bmm150_com_fptr_t)user_aux_read;
    bmm150dev.write = (bmm150_com_fptr_t)user_aux_write;
    bmm150dev.delay_ms = (bmm150_delay_fptr_t)HAL_Delay;


    /* Pull up resistor 2k is set to the trim regiter */
    regdata = 0x03;//PUP_RES_2K
    rslt = bmi2_set_regs(BMI2_I2C_PRIM_ADDR, &regdata, 1, dev);
    print_bmi270_rslt(rslt);


    /* Enable the selected sensors */
    rslt = bmi2_sensor_enable(&sensor_list, 1, dev);
    PDEBUG("bmi2_sensor_enable BMI2_AUX\r\n");
    print_bmi270_rslt(rslt);

    /* Get default configurations for the type of feature selected. */
    rslt = bmi2_get_sensor_config(&config, 1, dev);
    print_bmi270_rslt(rslt);

    /* Configurations for aux. */
    config.cfg.aux.odr = BMI2_AUX_ODR_25HZ;
    config.cfg.aux.aux_en = BMI2_ENABLE;
    config.cfg.aux.i2c_device_addr = BMM150_DEFAULT_I2C_ADDRESS;
    config.cfg.aux.manual_en = BMI2_ENABLE;
    config.cfg.aux.fcu_write_en = BMI2_ENABLE;
    config.cfg.aux.man_rd_burst = BMI2_AUX_READ_LEN_3;
    config.cfg.aux.read_addr = BMM150_DATA_X_LSB;

    /* Set new configurations for accel, gyro and aux. */
    rslt = bmi2_set_sensor_config(&config, 1, dev);
    print_bmi270_rslt(rslt);

    /* Initialize bmm150. */
    rslt = bmm150_init(&bmm150dev);
    print_bmi270_rslt(rslt);

    /* Set the power mode to normal mode. */
    bmm150dev.settings.pwr_mode = BMM150_NORMAL_MODE;
    rslt = bmm150_set_op_mode(&bmm150dev);
    if(rslt != BMM150_OK)
    {
    PDEBUG("Set BMM150_FORCED_MODE failed, rslt=%d\r\n", rslt);
    }

    /*bmm150dev.settings.preset_mode = BMM150_PRESETMODE_LOWPOWER;
    rslt = bmm150_set_presetmode(&bmm150dev);
    if(rslt != BMM150_OK)
    {
    PDEBUG("Set BMM150_FORCED_MODE failed, rslt=%d\r\n", rslt);
    }*/

    rslt = bmi2_get_sensor_config(&config, 1, dev);
    print_bmi270_rslt(rslt);

    /* Disable manual mode so that the data mode is enabled. */
    config.cfg.aux.manual_en = BMI2_DISABLE;

    /* Set the aux configurations. */
    rslt = bmi2_set_sensor_config(&config, 1, dev);
    print_bmi270_rslt(rslt);

    return rslt;
    }

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist