07-23-2019 11:42 AM - edited 07-23-2019 11:42 AM
Hi everyone,
I am facing some issues regarding BMI088. X-axis of the accelerometer is giving wrong RAW data. The sensor doesn't properly increments the accelerometer values while increasing the angle. When in positive axis, the sensor also gives negative values at some point due to which I get error in calculating the angles. At 3g configuration, this error is small but in 12g configuration error is very much noticeable. Attached is the file with some of the readings. Any solution for my problem?
Regards
Solved! Go to Solution.
07-24-2019 09:11 AM
07-24-2019 10:29 AM
I am using matlab just for getting the data and plotting that data. I am doing all the calculations on STM32 Discovery board. I am also using complementary filter and the formula that I am using for calculation roll and pitch is "atan2(ACC_z, ACC_x)" and "atan2(sqrt(ACC_z*ACC_z + ACC_x*ACC_x),-ACC_y)" respectively. Now I have also attached the excel file. Major error can be seen on 3, 4 and 5 degree in 12g configuration as instead of 3, 4 or 5 degree I am getting 356, 357, 358 or 359 degrees.
What I am suspecting is that the accelerometer values given by sensor are not correct. If this is the problem then can my sensor be damaged or faulty?
07-24-2019 01:49 PM
07-25-2019 09:09 AM
Thanks a lot. Found problem in the conversion of the data from the sensor. Was using signed short int, which was causing the problem. I changed it to signed int and it solved my problem. Thanks for the help. ^_^