Go Down

Topic: Nano 33 BLE IMU Calibration (Read 227 times) previous topic - next topic

octopope

I'm trying to use the built in IMU using the library Arduino_LSM9DS1.  Funny thing is the gyroscope values seem to be all over the map when it's just sitting still.  Does anyone know if callibration will help?  If so, how can I accomplish this on this board?

logwagon

I've had some luck by first stopping the autoscroll in the serial monitor and taking a general estimate of the gyro offset.  Subtract that from the gyro readings then running a smoothing sketch on the results.  Also, there's a bunch of calibration sketches out there for the MPU 6050.  You might be able to substitute the LSM output.  Take a peek at Joop Brokking's YT channel regarding drone gyro calibration.




J
We may not understand what's going on under the hood but that shouldn't keep us from learning to drive.

Birkedahl

Is your board the BLE or BLE Sense?  I can't get my BLE board to put out any IMU data (serial monitor says "IMU Failed to Initialize!"

logwagon

It's the 33 BLE.  Did you #include <Arduino_BLE.h> and #include <Arduino_LSM9DS1.h>?

J
We may not understand what's going on under the hood but that shouldn't keep us from learning to drive.

Birkedahl

Yes on Arduino_LSM9DS1.h...  That was in the example sketch.

No on Arduino_BLE.h..  I didn't know about that one!

Is there some kind of User Guide for the nano 33 BLE somewhere?

Thanks! 

Birkedahl

I added #include <ArduinoBLE>.  Deosn't make any difference - IMU won't initialize..

logwagon

#6
Aug 21, 2019, 04:31 pm Last Edit: Aug 21, 2019, 06:50 pm by logwagon
I'm afraid I don't have any real answers.  I'm not much of an Arduinoite.  My "success" has come from trial & error and divine intervention.  I ran the LSM9DS1 SimpleGyroscope without any modifications and it runs fine.  I think perhaps check to make sure the Arduino Nano 33 BLE is selected under Boards, the correct serial port is selected, and the correct programmer is selected.  I'm using AVR ISP but I don't know if that's correct or not.

J
We may not understand what's going on under the hood but that shouldn't keep us from learning to drive.

Birkedahl

Thanks..  I'm in the same boat as you - trial and error.  I've done everything recommended and nothing has worked, so it may be a bad board.  Thinking now I'll probably buy another one, since I know at least some others have gotten the IMU on the nano 33 BLE to work...   

Birkedahl

FYI - In my case the conclusion from Arduino is I have a bad board.  Getting a replacement.

Go Up