08-25-2019 05:36 PM
Moderators and engineers:
We found some problems with the debugging program using BMI160 DEM BOARD, and we'd like to ask you to give us guidance.
We want to do gravity acceleration testing in the hardware environment as follows:
Cortex M4F and BMI160 Demo Board.
The BMI160 sets the acceleration sensor range at +/-2g and the gyroscope at 2000, the sampling rate is 100Hz.
The test action is to slowly turn the BMI160 Demo Board 90 degrees, then remain stationary, do such actions for one turn. As light as possible during the flip process, the acceleration sensor output value is mostly gravity value.
Program is as simple as possible:
Sensors setting:
/* Select the Output data rate, range of accelerometer sensor */
bmi160.accel_cfg.odr = BMI160_ACCEL_ODR_100HZ;
bmi160.accel_cfg.range = BMI160_ACCEL_RANGE_2G;
bmi160.accel_cfg.bw = BMI160_ACCEL_BW_NORMAL_AVG4;
Read data:
bmi160_get_sensor_data((BMI160_ACCEL_SEL | BMI160_GYRO_SEL), &accel, &gyro, &bmi160);
ax = (float)accel.x / 16384.0;
ay = (float)accel.y / 16384.0;
az = (float)accel.z / 16384.0;
Data output:
bmi160_get_sensor_data((BMI160_ACCEL_SEL | BMI160_GYRO_SEL), &accel, &gyro, &bmi160);
Now lets see the Issues:
Issue 1: there some regular value jumps in 10Hz
Issue 2: Illogic data appears.
This is unreasonable, it is impossible to produce so high acceleration values when turning slowly, and it is illogical to look at the gyroscope data.
(from left to right: 6bytes Acc, 6bytes Gyro, AccZ, AccY, AccX, GyroZ, Gyro Y, Gyro X)
I know there's noise in BMI160, but it can't be noise, noise are not so high. I found that there was a lot of such data when i connected with board to board cable-connector between my CPU BOARD and SENSOR BOARD, and then I took a soldered connection, which was reduced, but still unavoidable.
Thanks for your help!
Andy
Solved! Go to Solution.
08-30-2019 11:42 AM - edited 09-02-2019 08:33 AM
Please take a look at the data,which was logged as the sensor rotated around its y-axis, with Acc range = 2g, ODR =100 Hz, normal bandwidth; Gyro range = 2000dps, ODR = 100 Hz, normal bandwidth.
After plotting, we did not observe a 10Hz jump. There is a big accelerometer value in the figure below because the sensor hit the desk before it kept stationary on the desk.
Please give further information about:
Could you please describe more details, for example, how you rotated the sensor, around which axis?
Did you rotate the sensor around an axis in the air or on the desk?
Can you try moving the sensor to another position to avoid some occasional disturbances from the external environment and see what result it is?
09-23-2019 05:26 PM
Thank you Shellywang, the problem was solved, it was my program error in the data conversion part, I rewrote the program, the problem has been solved.