Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

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

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

    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

    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};

        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.

    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)


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