BNO055 Demo - Magnetic Calibration
HTML-код
- Опубликовано: 10 сен 2024
- This video is a demonstration of magnetic calibration of the BNO055 breakout board from Adafruit. I will show how to calibrate the sensor so it will display accurate magnetic direction after power up. The video will also show the process of calibrating the magnetometer.
The hardware used:
Arduino Mega
Adafruit 9DOF (BNO055)
Adafruit 2.8" TFT LCD w/ Capacitive Touch Shield and SD card
Adafruit Power Boost Shield
Mega Mini Shield (3D printed shield for mounting sensors)
Reference: For Hardware and associated tutorials and libraries
visit www.adafruit.com/
Libraries:
Note, the BNO055 library from Adafruit was modified
to include calibration functions.
** Modified library MUST BE USED for this sketch to work **
Downloads:
Sketch: app.box.com/s/...
Modified Library: app.box.com/s/...
Mini Shield 3D Printer file (.stl): app.box.com/s/...
Clarifications:
The TFT shield needs to be modified to work with the MEGA. The Mega and Leonardo need to use the ICSP header. Directions can be found on the Adafruit tutorial for this shield. See the Adafruit tutorial of the TFT Shield for more information.
An SD card in the TFT shield is used to save calibration values. Calibration values are read from the SD card and sent to the BNO055 at startup.
Very nice work on the whole idea and setup. The work you did on getting calibration into the Adafruit BNO055 library is great. I would only suggest that you be much more specific/clear and insert a set of header comments describing what you're doing and call out the mods in the code, or fork the library and call it a new name. Library management with new releases etc. is tricky without it. And in the description you might have discussed using the SD card to store the parameters. It is a critical element. I may modify that and store the parameters directly in the CPU eeprom. But nice job.
Great stuff!
Hi now I am working on bno055 imu sensor it is working but I am facing one problem it is changing the values according to the locations. how to get ssame values in all locations
Hi, I am a bit confused. Does this calibration procedure will occur everytime you turn on the sensor? Or do you need to enter special mode to do the calibration?
Meaning that everytime I turn on my sensor, say if I want to use the accelerometer data correctly, I need to turn the sensor to 6 different faces everytime?
Hi. Nice video. Thank you.
HI ! Nice vidéo !
I'm working on this IMU (with my own libraries) but it seems that it isn't working like it did for you...
I'm in NDOF fusion mode and I display the heading Euler Angle.
The problem is that the Euler Angle is the relative angle between the current position and the initial power-on position....While in your case it seems to be the difference between the current position and the North direction, isn't it ?
Do you know how can i fix it ? How can i display the North ?
Thank you !
Hi PM A, Hi GunnerCAF,
i am on same situation. How did you manage to get compass on your code?
I am also using NDOF fusion mode. Problem with heading is that when the device is turn on it set this as 0 heading position and not according to north.
Finaly there were no issue. If you really put the BNO is NDOF mode, and calibrated it (monitor the calibration registers to be sure), the heading angle really indicates the differences between the current heading and the North.
When i had your problem, it was because i set the BNO fusion mode and others things with my own i2c functions and with my own registers address and values that i put according to the datasheet. But it seems that i was doing it wrong. Because when i took official bno functions and registers definitions it worked well !
Also remenber to put sufficient delay in your code between power on, bno init functions and between the selection of bno mode and your first readings, as the bno needs time to start and initiate fusion modes (about 600 ms)
Hi PM A,
thanks for your answer. Thats good news.
So i have to calibrate it myself when in entering in NDOF mode or does the BNO calibrate by itsself with an extra register command?
You should look the BNO datasheet ! ;)
It says that in every fusion mode, the calibration is done automatically, you just have to move the BNO according to specific patterns to calibrate it. You can monitor the calibration status by reading a specific register.
Good luck
Hi PM A,
the BNO055 calibrates automaticaly but and gives me the right north direction. But it takes a while and only if i move it around. At beginning it gives me the zero location/deslocation at initiation, once i move it around it jumps to the direction right direction/deslocation towards the north.
Can the BNO055 calibrate without needind me to move it around?
I can't open the links in the description, can you fix them?
I just clicked on all the links and they work for me. What links are not working for you?
Hey! Nice video ! What kind of accuray can you achieve with this? Lets say I turn it on in a position, check the heading, move the device randomly for a minute,than place it in the original postion. How big will be the heading error?
It's a accurate as a compass. Once it is calibrated, it's very accurate. The more it moves around, the accuracy gets better. FYI, Adafruit has updated their standard library to include more calibration functions.
+GunnerCAF Do the new calibration functions that adafruit added perform as well as your demonstration? Thanks!
+Benjamin Freedman - I have not tried the new Adafruit library so I can't say. If I do use the new library, I would need to re-write the code for another project that I am currently using. I'm not sure they understand how adding a few calibration commands to the library turns a toy into a powerful tool.Dave
+GunnerCAF Do you feel like it's necessary to use the 9DOF bosch sensor or could this same sort of thing be done with a simpler magnetometer such as: learn.adafruit.com/adafruit-hmc5883l-breakout-triple-axis-magnetometer-compass-sensor/overview ?
+Benjamin Freedman The simple magnetometer will work fine for a basic compass. This example only shows the magnetic calibration of the BNO055. It's capable of doing much more like 9DOF absolute orientation.
Pablo use BNO055 to keep the north