Bosch Sensortec Community

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

    I'm Having a problem with vibration with BMA-456

    I'm Having a problem with vibration with BMA-456

    Velth
    Member
    Hi before I was with really bad vibration issues, but I was managed to improve using 4G, odr 6.25 hz and 128 samples, but I'm still having little issues, how could I improve it?
    Should I increase or decrease odr?
    I was thinking that a should increase but if I increase odr I need to decrease samples,otherwise didn't read any value.
    5 REPLIES 5

    BSTRobin
    Community Moderator
    Community Moderator

    Hello Velth,

    Could you tell us what configuration(ODR, Range, etc...) you need? What is the specific phenomenon of the problem?

    Hi I'm using this configuration  below, I 'm using 

    bma_456_t bma = {
          .power_save = APS_ON,
          .fifo_wkp = FSW_ON,
          .acc_enable = ACC_ON,
          .aux_enable = MAG_OFF,
          .acc_perf_mode = CIC_AVG,
          .acc_odr = ODR_6P25,
          .acc_bwp = RES_AVG128,
          .acc_range = RANGE_4G};
    
      config_remote_init(bma);

        for (int i = 0; i < 8 i++)
        {
            status = read_sensor_data(REG_ACCS_DATA, &sensor_data);  // REGS 0X12
            acc_x = (sensor_data[0] + (sensor_data[1] << 8));       // X (MSB|LSB)
            acc_y = (sensor_data[2] + (sensor_data[3] << 8));       // Y (MSB|LSB)
            acc_z = (sensor_data[4] + (sensor_data[5] << 8));       // Z (MSB|LSB)
        }
    
        aux_x = (float)acc_x / 100;
        aux_y = (float)acc_y / 100;
        aux_z = (float)acc_z / 100;
    
        roll = atan2(aux_y, aux_z) * 57.3;                                   // angulo x
        pitch = atan2((-aux_x), sqrt(aux_y * aux_y + aux_z * aux_z)) * 57.3; // angulo y
    
    

     I'm getting the acc (x,y,z)  in register 0X12 to then calculate my angles, I 'm using it to see the inclination of trucks, but because of the motor vibration the values  is being crazy vary up to a degree, so to exemplificate :

    The inclination is 4.2º, but  because the  of the vibration the read values goes to  4.9 º,  5.2º,  5.1º,   4.8º, I need clean the vibration noise. 

    if you could give me a support, I'm mean I could give you my code , we can make a meeting zoom, discord, skype anything, this is being a huge problem at my job, we need to solve this with urgency.

    BSTRobin
    Community Moderator
    Community Moderator

    Hello Velth,

    1.According you sensor configuration, you set sensor to work under low power mode. As you set acc_bwp to AVG128, you couldn't set ODR higher than 6.25 Hz, otherwise, the sensor configuration will be in error. In your configuration, increase ODR, which makes you unable to read data.

    BMA456 setting.png

    Accelerometer data processing for low power mode.png

    From BMA456 data sheet, we could caculate: skipped smaples=(1600/ODR)-averaged samples>=0
    ODR<=(1600/averaged samples)

    ODR<=1600/128=12.5

    2.By the way, are you very concerned about power consumption? Why not use high performance mode?

     

    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