Hi everyone,
I had time to work on my 6 axis IMU project and I'm having a couple of problems...
I have watched Phils Lab videos a couple of time
https://www.youtube.com/watch?v=BUW2OdAtzBw&ab_channel=Phil%E2%80%99sLab I also have the BMI088 accelerometer & gyroscope.
I have a project that goes and read accelerometer data every 100ms. I verified on my scope that I have the correct frequency by toggling a pin.
Capture.JPG (119.6 kB. 1299x988 - viewed 27 times.)
tek00001.png (109.81 kB. 1920x1080 - viewed 20 times.)
So I have a 10Hz signal. I think ?
while (1)
{
BSP_PICs_Watchdog_Management(); /* Watchdog */
if(Process_elapsed_ulong_time(u32_time, ul_internal_timer_never_reset_that) > 1000) // every 100ms
{
u32_time = ul_internal_timer_never_reset_that; // 0.1ms interrupt
TP4_LAT = ~TP4_LAT;
Accelerometer_X_Axis_BMI = Read_X_Axis_Accelero_BMI088();
Accelerometer_Y_Axis_BMI = Read_Y_Axis_Accelero_BMI088();
Accelerometer_Z_Axis_BMI = Read_Z_Axis_Accelero_BMI088();
Gyroscope_X_Axis_BMI = Read_X_Axis_Gyro_BMI088();
Gyroscope_Y_Axis_BMI = Read_Y_Axis_Gyro_BMI088();
Gyroscope_Z_Axis_BMI = Read_Z_Axis_Gyro_BMI088();
}
}
That code gives me a fixed sample rate of 100ms.
I record values in an excel file.
Then I go to Matlab (actually Octave) to compute my results using
https://github.com/jshoga/IMU-Processing from
He doesn't give the units of the file but from my guesses accelerometer datas are in m/s² and gyroscopic datas are in rad/s.
I have a 0° → 45°→ 0°→-45°→0° record.
All I get are strange results am I missing something here ? Could someone try that I'm very confused by these results ?
Attached are the exemple files I am working on with my record of datas.
accel3d_matlab.zip (1135.25 kB - downloaded 19 times.)