01-07-2021 08:45 AM
hello,
I am using BMF055 to get the data of acc, mag, gyro and using BSXLite to get the infomation about the heading of my devices.
Now, I can get the calibration state of 3 for acc and mag, but the state of gyro calibration is always 0, it's so strange!
So, I read the raw data of gyro when the device is at a standstill, then I get the result as below:
0,gyr_x = 30( 0.459dps) ,gyr_y = -110(-1.683dps) ,gyr_z = -10(-0.153dps)
1,gyr_x = -414(-6.334dps) ,gyr_y = -12(-0.184dps) ,gyr_z = 202( 3.091dps)
2,gyr_x = 162( 2.479dps) ,gyr_y = -112(-1.714dps) ,gyr_z = -250(-3.825dps)
3,gyr_x = -276(-4.223dps) ,gyr_y = 50( 0.765dps) ,gyr_z = -110(-1.683dps)
4,gyr_x = 330( 5.049dps) ,gyr_y = 80( 1.224dps) ,gyr_z = 124( 1.897dps)
5,gyr_x = -66(-1.010dps) ,gyr_y = 252( 3.856dps) ,gyr_z = 302( 4.621dps)
6,gyr_x = 82( 1.255dps) ,gyr_y = -56(-0.857dps) ,gyr_z = -352(-5.386dps)
7,gyr_x = 88( 1.346dps) ,gyr_y = 80( 1.224dps) ,gyr_z = -14(-0.214dps)
8,gyr_x = -120(-1.836dps) ,gyr_y = -362(-5.539dps) ,gyr_z = -36(-0.551dps)
9,gyr_x = 204( 3.121dps) ,gyr_y = -106(-1.622dps) ,gyr_z = 98( 1.499dps)
10,gyr_x = 200( 3.060dps) ,gyr_y = 112( 1.714dps) ,gyr_z = -296(-4.529dps)
11,gyr_x = -166(-2.540dps) ,gyr_y = -346(-5.294dps) ,gyr_z = 82( 1.255dps)
12,gyr_x = 472( 7.222dps) ,gyr_y = 42( 0.643dps) ,gyr_z = -204(-3.121dps)
13,gyr_x = 126( 1.928dps) ,gyr_y = -158(-2.417dps) ,gyr_z = -410(-6.273dps)
14,gyr_x = -58(-0.887dps) ,gyr_y = -384(-5.875dps) ,gyr_z = 182( 2.785dps)
15,gyr_x = -96(-1.469dps) ,gyr_y = 186( 2.846dps) ,gyr_z = 266( 4.070dps)
16,gyr_x = 234( 3.580dps) ,gyr_y = -52(-0.796dps) ,gyr_z = -6(-0.092dps)
17,gyr_x = -70(-1.071dps) ,gyr_y = 226( 3.458dps) ,gyr_z = 90( 1.377dps)
18,gyr_x = -118(-1.805dps) ,gyr_y = 102( 1.561dps) ,gyr_z = 450( 6.885dps)
19,gyr_x = 384( 5.875dps) ,gyr_y = -58(-0.887dps) ,gyr_z = -92(-1.408dps)
20,gyr_x = 150( 2.295dps) ,gyr_y = 184( 2.815dps) ,gyr_z = -268(-4.100dps)
the init of gyroscope is as follow:
bmg160_init(&bmg160);
bmg160_set_power_mode(BMG160_MODE_NORMAL);
bmg160_set_range_reg(BMG160_RANGE_500);
bmg160_set_bw(BMG160_BW_64_HZ);
so the resolution is 0.0153dps, then the data is get by this code:
for(i = 0;i<100; i++)
{
bmg160_get_data_xyz(&gyr_data[i]);
printf("%d,gyr_x = %4d(%6.3fdps)\t,gyr_y = %4d(%6.3fdps)\t,gyr_z = %4d(%6.3fdps)\t\r\n",i,gyr_data[i].datax,0.0153*gyr_data[i].datax,gyr_data[i].datay,0.0153*gyr_data[i].datay,gyr_data[i].dataz,0.0153*gyr_data[i].dataz);
}
I konw it is abnormal, because the value is too large, does the sensor have a fault? or have I made some mistakes with the settings?
Solved! Go to Solution.
01-08-2021 04:05 AM
Hi,
I checked BMG160 initial workflow from bmg160_support.c , no difference with your code. After write config, you can read back this conig is success.
After check BMG160 RMS noise, typical value is 0.1 dps@bw=47hz, so I think gyro value from your log is bigger. So please try put your board on the ground, confirm no vibration and other influence to you board.
Best regards.
01-10-2021 08:47 AM
Thanks, I think I will solve it soon.