Hot answers tagged

4

If the axes of measurement don't line up with the axes of motion, then comparing the IMU outputs to vehicle-relative (VR) coordinates will require some vector arithmetic to convert one to the other. It can be done, but requires some engineering time to code it and processor time to run. It wasn't clear to me at a quick read whether your chosen IMU can do ...


4

In some sources there is something going on as the importance of order of the application of roll,pitch and yaw. But I cannot understand why this is related. Take your right hand: point your thumb upwards, your index finger away from you, and your middle finger to the left. You now have a righthanded coordinate system: your thumb is the x axis, your index ...


3

Processing code is intended to be run on a computer. You would use the Processing IDE to run this code. The Arduino IDE is used to write, compile, and upload code to a microcontroller that you might have on an Arduino board. This is the cause of the error.


2

In the Arduino IDE, click on SKETCH > INCLUDE LIBRARY > MANAGE LIBRARIES. Then, search for 9250, select the SparkFun one, and click INSTALL. Finally, from the examples, choose the MPU9250BasicAHRS_I2C.


2

If you want to use SPI- The homepage of the library you mentioned, clearly explains the circuit connections.- The MPU-9250 pins should be connected as: VDD: this should be a 2.4V to 3.6V power source. GND: ground. VDDI: digital I/O supply voltage. This should be between 1.71V and VDD. FSYNC: not used, should be grounded. INT: (optional) used for the ...


2

You can use Wire.pins(sda, scl); before IMU.begin();. IMU.begin() then calls Wire.begin() without parameters.


2

I have a page about power saving. To summarize some of the techniques you can use: Run the processor at a lower frequency Run the processor at a lower voltage Turn off unneeded internal modules in software (eg. SPI, I2C, Serial, ADC) Turn off brownout detection Turn off the Analog-to-Digital converter (ADC) Turn off the watchdog timer Put the processor to ...


1

What you heard (about double integration and accumulating errors) is correct. Mathematically, you can do this, by integrating each device's acceleration to get its current speed, and integrating the speed to get it's current position, then taking the vector difference in the their positions to get the distance between them. If you had highly accurate ...


1

Ok, I have finally found the issue, and I am feeling very, very stupid. I needed to calibrate the magnetometer with the figure-8 movement I put a gigantic solid-metal 18650 Li-ion cell right next to the magnetometer chip... EDIT: after replacing the 18650 with a polymer battery that is far away from the chip, things got a little better but both sensors in ...


1

I did have a look at the MPU9250 DMP library provided by Sparkfun and it seems that it is specifically built for their own board which has an M0 chip on the board. However looking at the library, there seems to be no reasons why it would not work with any other board. The main reason why it might not work with something like the 32u4 board would be because ...


1

The PID get's a set point from you. For a standing still robot this a basically an angle of zero in respect to the gravity direction (which variable you use for the PID depends on your actal implementation, but it always be something derived from the angle to gravity direction). For driving forward, the robot must lean forward. So you set the new angle set ...


1

No. The INT pin of the MPU-9250 is not presented on the IO header of the GY-91. The only way of knowing what is going on inside the MPU-9250 at any time is to go and look. I.e., periodic polling of the sensor. If you want to use the interrupt pin you will have to shop around for a different module that gives you access to that pin.


1

The MPU-9250 pins should be connected as: --Vcc: this should be a 2.4V to 3.6V power source. --GND: ground. --FSYNC: not used, should be grounded. --SDA / SDI: connect to MOSI. --SCL / SCLK: connect to SCK. --AD0 / SDO: connect to MISO. --nCS: connect to chip select pin (Any digital pin but in your example is PIN 10). Also, you can check the ...


1

To connect multiple SPI components, you only need 4 pins on each 'slave' (thus sensors): SLCK, MOSI, MISO and SS (Slave Select). The Slave select pin depends to which the master (NodeMCU in your case) is 'talking too'. So on your NodeMCU you will have 3 SS pins (one for each slave sensor). The NodeMCU should talk exactly to one slave device at the same time ...


1

The fix found - wrong bootloader was flashed in the Arduino Pro Micro chip. Had to reflash it using AVR ISP mk2 and Arduino IDE. So if you got something like and your board is not genuine SparkFun Pro Micro - then reflash the bootloader.


1

Try a permanent calibration. From the Adafruit forums: You'd basically need to read and write data registers 55-6A. In both cases, you have to set the sensor in CONFIG_MODE. There's more information on page 48 of the datasheet. The magnetometer is influenced by surrounding magnetic sources like motors. You might be able to tell the extent of the effect ...


1

You haven't provided enough information for anyone to easily help you. Assuming that you took your code from GitHub myAHRS_plus_i2c.ino you can look further down the file to find the definition of read_rev_id(). It simply reads the revision number from the AHRS chip and displays it on the console. Since this is all that it does you could leave out the call ...


Only top voted, non community-wiki answers of a minimum length are eligible