wrong read out accelerometer BMA280

Hi

For a research project, I am currently trying to read the acceleration data from the BMA280. This chip is used by silabs on there WSTK expansion board. At this moment I'm following a complete procedure to initialize the accelerometer.

  1. Perform self test
    1. Check if difference from read out of +X en -X is bigger than 800mg (answer: check)
    2. Check if difference from read out of +Y en -Y is bigger than 800mg (answer: check)
    3. Check if difference from read out of +Z en -Z is bigger than 400mg (answer: check)
  2. Soft reset the accelerometer
    1. wait 1,5 sec
  3. Initialize the accelerometer to my preferences
  4. Perform Fast compensation
    1. Clear offset register
    2. Set offset compensation to X: 0g, Y: 0g, Z:+1g, BW 1%
    3. X-axis calibration
    4. Y-axis calibration
    5. Z-axis calibration
    6. Read offset X              my answer: x = -31 mg
    7. Read offset Y              my answer:  y = -15 mg
    8. Read offset Z             my answer:  z = 0 mg
  5. init done

The values afterwards are x=+-20mg, y=+-2mg en z=+- -19mg. I expected the values would be x=+-0g, y=+-0g en z=+- -1g when the chip is laying flat on my desk.

I convert the acceleration data in this way.

 

 

volatile float factor = 0.488; // 8000/2^14 mg/LSB
// X-Axis in 0x02-0x03
LSBx = BMA280_read_register(USART1, BMA280_ACCD_X_LSB);
LSBx = LSBx >> 2;
MSBx = BMA280_read_register(USART1, BMA280_ACCD_X_MSB);
tmpx = (uint16_t)((MSBx << 6) | LSBx);
acceleration[0] = (float) tmpx * factor;

 

Can somebody confirm me If this is correct? Or give me the correct init from the accelerometer?

Thank you in advance

Best Regards

Nick

Best reply by FAE_CA1

Hi,

Thanks for your inquiry. Please see the attached "How to perform BMA253 self-test.pdf" and "How to do BMA253 inline calibration.pdf" which can be applied to BMA280 as well.

Due to the noise of intenral ADC, after inline calibration BMA280 x/y/z measurements or outputs will not be exactly at 0g and +1g when it is stationary and flat on your table. Instead, they should be very close to 0g and +1g. For example, if you select BMA280 BW to 125Hz which is 250Hz output data rate, then you should see the x/y/z outputs within +/-5mg with regrad to 0g and +1g.

Thanks.

How to do BMA253 inline calibration.pdf
967.65KB
How to perform BMA253 self-test.pdf
569.67KB
View original
3 replies
Resolved