Hot answers tagged

4 votes
Accepted

A proper way to get the roll, pitch and yaw values

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 ...
  • 1,290
4 votes
Accepted

Does the position in which you mount an IMU matter?

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. ...
  • 14.6k
3 votes
Accepted

Not able to find right library for MPU9250

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 ...
3 votes

SPI synchronization with Arduino DUE and ADIS16364 IMU

First of all, this may not related to your question, but you are using old SPI methods setClockDivider(), setDataMode(), and setBitOrder() that has been deprecated since 2014. It is recommend to use ...
  • 1,012
3 votes

''Wire1' was not declared in this scope' in I2C_MPU6886 library

"M5Stack" is an ecosystem of ESP32 based boards and peripherals. All code for M5Stack peripherals is written for the M5Stack system. Not for the Uno. You have to find code for the Uno, not ...
  • 103k
2 votes
Accepted

Circuit works on breadboard but has power problems on protoboard

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 ...
  • 35.5k
2 votes

'import' does not name type ERROR

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 ...
  • 3,854
2 votes

Getting stable measurements with the BNO055 IMU

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 ...
2 votes

How to connect MPU9250 with NodeMCU using SPI or I2C Slave?

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....
2 votes
Accepted

How can I declare custom pins when using with ESP8266 in MPU9250 library

You can use Wire.pins(sda, scl); before IMU.begin();. IMU.begin() then calls Wire.begin() without parameters.
  • 16.7k
2 votes
Accepted

Getting Accurate Velocity Readings From IMU

The process of integrating acceleration to derive velocity and integrating velocity to derive position are commonly known as dead reckoning. In this link it is stated: Dead reckoning is subject to ...
  • 6,731
2 votes

Arduino Nano 33 IoT LSM6DS3: get gyro angle in degrees

You are supposed to use a filter library on top of the output of the gyro as well as the accelerometer data (both is used!) to get angles ... https://www.arduinolibraries.info/libraries/madgwick Here ...
  • 21
2 votes
Accepted

Gyro reading of MPU6050 drifts too much on fast changes only

In his answer, st2000 recommends you use quaternions, rather than Euler angles, for tracking the orientation of your vehicle. I will give the exact same recommendation, but for a different reason: the ...
  • 38.4k
1 vote

What pins to use on a Teensy to get data from multiple peripherals?

The first thing to look at when determining which pins to connect a peripheral to is what protocol that peripheral uses - e.g. I2C, SPI, analog voltage via ADC, etc. The Teensy pinout for the version ...
  • 11
1 vote

Changing address of MPU 9250 connected to ESP32

You have only two choices with this device on an I2C bus. As stated in the datasheet: So it's either: 0b1101000 0b1101001 The AD0 pin selects which of these two addresses are used. The complete ...
  • 1,016
1 vote

Most precise way to measure linear distance travelled by a wheel

If you use an accelerometer, you have to integrate twice to arrive at distance travelled. These two integrations will also compound errors and noise, so the result won't be very accurate without many ...
  • 1,640
1 vote

Most precise way to measure linear distance travelled by a wheel

If you measure one of the free running wheels (with no motor connect to it), it depends on the traction of the wheel, but that could be fairly accurate. If you move horizontally a simple ...
1 vote

Finding Relatively Accurate Velocity Using an IMU

For more context I did ask BOSCH directly about this issue and explained my setup in more detail. https://community.bosch-sensortec.com/t5/MEMS-sensors-forum/BNO055-Outputting-Bad-Linear-Accel-Data/m-...
1 vote

Finding Relatively Accurate Velocity Using an IMU

Integration of acceleration to derive velocity is a difficult task. This is the first step in dead reckoning. Consider some of the following options to improve accuracy: Some IMUs can be adjusted ...
  • 6,731
1 vote
Accepted

Arduino Nano 33 IoT LSM6DS3: get gyro angle in degrees

You wil have to calculate the angles. Some trigonometry is required, and for the gyroscopes, also some integration. You can read about it here, and in many other places. You will get the best results ...
  • 1,640
1 vote
Accepted

Setup/Debug affordable 9DOF IMU

I re-soldered all connections and used new wires. Now the board is recognized by the i2cdetect library. Upon multimetering all connections using the continuous mode (the one that looks like a ...
1 vote
Accepted

Relative position using Accelerometer

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 ...
  • 14.6k
1 vote
Accepted

MPU-9250 compass always returns to zero

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 ...
  • 123
1 vote

Is there a library for non-SAMD Arduinos to use the DMP on MPU9250

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, ...
  • 291
1 vote

Trouble in sensor data reading sequence

Both printing codes are inside of different if statements, which involve testing mpuIntStatus1 and mpuIntStatus2. This works good, as long as in one void loop() iteration both of these if statements ...
  • 14.7k
1 vote
Accepted

Remote Controlled Self-Balancing Robot - how to mix control input with IMU input?

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 ...
  • 14.7k
1 vote
Accepted

GY91 IMU module, Interrupt?

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 ...
  • 103k
1 vote

How to connect MPU9250 with NodeMCU using SPI or I2C Slave?

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: ...
1 vote

How to connect MPU9250 with NodeMCU using SPI or I2C Slave?

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)...
1 vote

Not able to convert String to Integer when receiving data from pubnub?

This is the code which worked for me:- msg.remove(0,1); msg.remove(msg.length()); pos = msg.toInt(); Serial.print("value of servo angle: "); Serial.println(pos); ...

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