-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calibration OFFSETS in the serial output produce Garbage #26
Comments
I'm looking to a fix for the dtostrf() function spitting out �, x, Z, �, � but until then this should be the mods to the code for your rocket :)
|
Thanks Homer! as you can see the upper level cuts at 3g, that shouldn't be right... Thank you again for your precious time! Valerio |
let's see if we can focus on the accelerometer only and then add the DMP feature. I'll need a day or two. got a lot going on this weekend. |
Similar problem with OFFSET printout. This is for a PI PICO-W board. Not sure what test could be used as a test. In the end I think I hacked the code and copied the printfloatx() macro from the AVR test. I also found that your example code appears to have a global redefine of printfloatx() with no #ifdef tests, so also get complier warning about re-define of printfloatx(). I also have other issues with PI PICO but will create separate issue for that. |
Sure, thank you, whenever you have time! |
Hello Homer, |
I've had a little time to attempt setting the 16g setting but It doesn't hold when I start the DMP up for gyro only. this shouldn't need to be at +-2g I haven't had much time to attack this further. A possible solution is to have 2 mpu6050s attached. would that be easier? I have an easy solution for multiple MPU's attached to the same i2c bus. currently, I've tested 4 at once. |
If I did understand well, there are two different "sections" of the 6050, one is dedicated to acceleration and the other to gyroscope, correct? If you try to switch to 16g the accel, then the gyro doesn't work anymore or soemthing like that? |
Yes while they are separate they get integrated with the eDMP firmware. there is an option to only use Gyro for the eDMP firmware but I never planned to separate it with my initial programming attempts. I did put some time into tryals on this but I haven't succeeded in getting the ranges that match. instead of getting 1g in the +-16 g range, it gives me 8g which isn't the correct range for 1 g. |
Instead of buying another 6050 I decided to try this high g accelerometer that is ideal for rockets ADXL375 |
Hey Zhomeslice great library! I have been using Jeff Rowbergs libraries for quite a while on various projects but I found yours and decided to give it a try as I really like the idea of not having to use interrupts. I'm using an STM32 Nucleo F446RE board for this project with your library. I went to calibrate the MPU6050 and got the same symbols for the output on the calibration routine that you have above. I was wondering if there has been any progress on the fix for the dtostrf() function? If not is there a work around or another way to get the information for the calibration? I have an older Jeff Rowbergs calibration sketch from 2019 but I'm unsure if the calibrations are the same between your library and Mr. Rowberg's. Would it be an option to use Mr. Rowberg;s calibration library? I know you are busy so please don't hurry on my part as I'm just a hobbiest/maker that enjoys tinkering especially with things that balance and use IMU's. Thanks! |
I have a related clarification question. What is the proper way of using the offsets computed during the calibration in the setup_MPUs function? I have 8 MPU6050s connected via I2C to a OLIMEX ESP32-DevKit_LiPo via Adafruit TCA548A I2C-Multiplexer. The calibration takes about 30 seconds if the 8 MPUs are completely still on a table and about 70 seconds when they are attached to my body and I am trying to hold as still as I can while standing. I want to eliminate repeated calibrations after the first one or two and to use the #define OFFSETS ... Here is a code snippet of my setup_MPUs. void setup_MPUs() { /* Initialise the 1st sensor */ tcaselect(0); #define OFFSETS 4294965492, 4294966718, 1250, 124, 4294967235, 22 //mpu1.CalibrateMPU().load_DMP_Image(); // Does it all for you with Calibration /* Initialise the 2 sensor */ #define OFFSETS 4294967202, 4294965016, 900, 4294967279, 0, 32 //mpu2.CalibrateMPU().load_DMP_Image(); ... and so on for the all 8 MPUs I am using the OFFSETS computed during the first calibration but when I comment out the calibration calls the code fails to work. |
#define OFFSETS 4294967202, 4294965016, 900, 4294967279, 0, 32 first I see that you have maxed out the limit for the offsets with the values of 4294967202 How to get good offsets:
Run this with the MPU on a flat motionless surface with the Z axis pointing downward. a little note:
When the offsets are maxed out it is difficult for the calibration routine to recover and correct the offsets
skip the calibration if the MPU can't be placed on a level surface Z |
Your help is very much appreciated! Thanks! |
Thank you so much!. This is very helpful. A quick followup. In the case of MPU9250 BMP280, when I get magnetometer readings like: 17:28:21.608 -> // X Accel Y Accel Z Accel X Gyro Y Gyro Z Gyro are these magnetometer calibration values and if so how do I use them? Or is this just a printout for information purpose only? Does the fidelity / quality of the computed attitude values PRY and quaternion get affected in any way when the magnetometer data is included in the calculations? How? Thank again for your help! |
Hello Valnevon, did solve this problem? I also want try to sip the calibration, but it also turns out that the code show no response , expected serila.print result do no show up. |
there are 2 ways to use offsets. first is to just insert the calculated offsets and go which would closely calibrate the MPU6050 to the optimal settings Then insert the calibration values into the mpu /* _________________________________________________________/ Or you could add them directly: The second way would be to enhance the values that you have by calibrating it again with the current settings for example, run the calibration routing and get the values. then /* _________________________________________________________/ This further calibrates the mpu starting from the given offsets and will take a shorter time than it would if the MPU was defaulted and calibrated. The calibration requires that the MPU is level with the Z axis up. If you only want to load the offsets without loading the eDMP image you would use this command Z |
it works perfectly also with my Teensy 4.1 (the microcontroller I use for this project) .
The only thing that I cannot see is the calibration OFFSETS in the serial output, because I see:
// X Accel Y Accel Z Accel X Gyro Y Gyro Z Gyro
#define OFFSETS l, �, x, Z, �, �
(just symbols)
And Changing +-2g to +-16g accelerometer sensitivity with 3-degree of freedom mode on the dDMP firmware.
The text was updated successfully, but these errors were encountered: