Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [mpu6050]

The MPU-6050 is a 6DOF. In other words it has 6 Degrees Of Freedom, 3 axes of acceleration (x, y, z) and 3 axes of rotational movement (yaw, pitch, roll). It uses the I2C protocol.

0
votes
2answers
39 views

Out of two logically similar sketches, one works while the other does not

I am currently making a project involving a self balancing bot & found this code online: #include "PID_v1.h" #include "LMotorController.h" #include "I2Cdev.h" #include "...
0
votes
0answers
34 views

MPU-6050 data over I2C freezing/stopping

Thanks in advance for everyone on this forum always being so helpful. This is the first time that I've had to post a question, because I've always found my answers easily after a quick search - either ...
0
votes
2answers
43 views

How to connect a MPU-6050 to an Arduino that already has a CNC Shield V3 on top of it?

I have a CNC Shield on top of an Arduino Uno (GRBL pinout) that controls 2 stepper motors through a4988 drivers and it is working like a charm. Now I want to add an accelerometer to it. From my ...
0
votes
0answers
22 views

Sending a continuous real time data stream from arduino to the android smartphone [duplicate]

Is it possible to send live data stream continuously from Arduino to any android smart phone. Basically i just wanted to send gyroscope readings to my cell phone continuously. the the most important ...
0
votes
0answers
16 views

L293d driver problem

I'm trying to build a gesture controlled robot. Using: Arduino nano Encoder and decoder (HT12E and HT12D ) RF Transmitter and receiver L293D motor driver While I running the code in the serial ...
1
vote
2answers
162 views

How to prevent interference between dc motor and arduino?

It may be already asked question in somewhere but I am struggling! I have a four wheel robot which I want to drive it to perform 90-degree left/right turn, I am using the MPU6050 3dof to get angles, ...
0
votes
0answers
28 views

Moving two servos from one accelerometer

I'm trying to make two servos move independently based on the angle of an accelorometer (One servo for X axis and one for Y axis) I'm fairly new to arduino and I'm not completely sure of the purpose ...
2
votes
1answer
70 views

Arduino Mega and gyroscope erroneous values

I have Arduino mega2560 and MPU6050. I connected to Vcc pin of the gyro to +5V on the mega, the SDA to SDA pin, SDL to SDL pin, AD0 and GND to 2 GND pins. I used this code: #include<Wire.h> ...
2
votes
1answer
37 views

Why the MPU6050 gyroscope read write register value is 0x08 for a full scale of 500 degrees per second?

I am trying to connect a gyroscope MPU6050 to arduino ATmega2560 and read its raw values from its 6DOF (gyro and acc). I found the following code: //Activate the MPU-6050 Wire.beginTransmission(...
0
votes
0answers
49 views

How to read and change value of registers of MPU6050 to change the default scale range of gyroscope and accelerometer?

I want to read the value of I2C register of MPU6050, and other registers like the scale range selected of a gyro. The I2C address according to MPU6050 datasheet is 0x68. I wrote this code: #include ...
0
votes
0answers
16 views

Arduino Mega and MPU6050: Reducing the code [duplicate]

I am trying to work Arduino Mega AT2560mega and gyroscope MPU6050. There is a premade code on Arduino forums, where all registers of MPU605 are defined and the code is about 800 lines. I can't find ...
0
votes
0answers
38 views

Reading raw values from MPU6050 using Arduino Mega

I am trying to connect Arduino Mega with a gyroscope/accelerometer with 6DOF, using MPU6050 micro ship. While searhing online, I found lots of codes with more than 200 lines, to just read raw values ...
0
votes
0answers
99 views

How to correct MPU6050 gyro GY-521 module 90 degree deviation

When I use the GY-521 MPU-6050 module, I get (0) ok values on the pitch axis and it goes to positive or negative values when I move it up or down. However, on the roll axis, I get (18000) max. value ...
0
votes
0answers
214 views

understanding the data reading of the MPU6050

In the MPU6050 example code: // MPU-6050 Short Example Sketch // By Arduino User JohnChi // August 17, 2014 // Public Domain #include<Wire.h> const int MPU_addr=0x68; // I2C address of the MPU-...
0
votes
0answers
31 views

Getting Yaw, Pitch, and Roll from 2 MPU6050 sensors, based off of Jeff's code?

I was able to find an edited version of Jeff's mpu6050 DMP code that basically just duplicates all variables to get ypr from 2 sensors (where their addresses are manually set at 0x68 and 0x69): //...
0
votes
1answer
191 views

Wiring for Arduino Mega and multiple MPU 6050/Gy 521?

I have an Arduino Mega 2560 that I need to connect 4 MPU 6050/Gy 521's to. I found some resources on the Mega and Uno, however I'm having trouble piecing them together. This resource gives great ...
0
votes
1answer
57 views

Decreasing a functions programming size

I have Arduino Code that utilizes the I2CDev library to control an MPU-6050. I am pretty new to coding and copied and pasted most of the code from examples I have found around. I am starting to run ...
1
vote
0answers
368 views

Interfacing MPU6050 with Arduino through Simulink S-function

I am interfacing MPU6050 with Arduino using Simulink S-function builder. I'm implementing MPU6050_DMP6 code in Simulink s-function builder by following this video. By following this tutorial I ...
0
votes
0answers
64 views

MPU6050 stops work after restart again

I am using an Arduino Pro Micro with MPU6050 accelerometer sensor. Connections are: MPU6050 >> Pro Micro VCC >> 5V GND >> GND SCL >> 3 SDA >> 2 INT >> 7 I wrote code to read X, Y, and Z axes. My ...
0
votes
0answers
49 views

Baud rate dependency

I am currently trying to write (obtain) a code for getting raw acceleration values and yaw, pitch and roll angles using these Jeff Rowberg's examples. I have used MPU6050_DMP example to get this code: ...
0
votes
1answer
97 views

Code compatibility with Arduino Due

I am currently working on a quadcopter project that involves an MPU6050 accelerometer+gyroscope module, an ultrasonic sensor and control of electronic speed controllers. I have used existing examples ...
1
vote
1answer
2k views

How to generate hardware interrupt in mpu6050 to wakeup arduino from SLEEP_MODE_PWR_DOWN mode?

I am using Arduino UNO and has kept in SLEEP_MODE_PWR_DOWN mode & want it to wakeup using MPU6050 hardware INT pin (which should send a signal when MPU is in motion). I have used the article https:...
0
votes
1answer
188 views

MPU6050 accelerometer giving output as -1 -1. Can anyone tell the issue in the code?

// MPU-6050 Short Example Sketch // By Arduino User JohnChi // August 17, 2014 // Public Domain #include<Wire.h> const int MPU_addr=0x68; // I2C address of the MPU-6050 int16_t AcX,AcY,AcZ,Tmp,...
1
vote
0answers
266 views

ATtiny85 and MPU-6050 Gyroscope

I'm doing a project that involves sending MPU-6050 gyroscope data via serial communication to the laptop. Is ATtiny85 micro-controller suitable for this job? Is it powerful enough to do it? I was ...
1
vote
2answers
131 views

Arduino Micro Interrupt

I have built a custom Arduino Micro PCB, but I have made a mistake, I accidentally attached an interrupt pin for a Gyro sensor to pin 12 of the Micro, not realizing it wasn't an external interrupt pin....
0
votes
1answer
4k views

How important is the INT pin of the MPU6050 (GY-521)?

I want to wire multiple MPU6050 (at least 16 of them) to an arduino UNO for development (then nano for production). So I first started wiring one MPU6050 to an arduino like shown on the diyhacking ...
0
votes
0answers
117 views

transfer mpu6050 readings through nrf24l01

I want to transfer mpu6050 yaw pitch roll readings via nrf24l01. but every time values transmitted are equal zero. here is my code that I am using. please help me out. transmitter code #include <...
0
votes
1answer
155 views

Using 2 GY521(mpu6050)s with Arduino Uno R3

I am working on creating a motion sensor based on an Arduino and MPU6050 interface. I'd like to retorfit my code to be able to read 2 mpu6050 devices. Besides defining a 0x69 address and setting AD0 ...
0
votes
0answers
400 views

Arduino reading wrong values from MPU6050 when motors are running

I am making a quadcopter. I'm using: Arduino Uno 1000kv brushless motor HC05 Bluetooth module MPU6050 gyro sensor In my code, I started reading values from the gyro sensor and connected a battery ...
1
vote
1answer
118 views

Sidestep one second log rate with NeoGPS when another sensor on the board need to log faster

The sample rate of an accelerometer, like an MPU6050, is much faster than the GPS log rate, different technology, different issues. A common GPS Reciver has, approximatly, one second log rate. In my ...
0
votes
1answer
150 views

What is importance of the reflow profile? [closed]

I was reading the MPU6050 datasheet to understand all the type of errors that affect the accelerometer, after finding information on the Reflow Profile i look up on wikipedia the Reflow Soldering ...
3
votes
2answers
373 views

Problem with measuring vibrations (Arduino UNO + step motor + accelerometer)

I'm trying to measure vibrations of the motor's shaft that is oscillating due to an eccentric load. For that, I am using the MPU 6050 6 axis accelerometer. The motor is a NEMA 17 stepper, connected to ...
0
votes
0answers
399 views

How to change MPU 6050 Interrupt Pin number?

I'm working with MPU6050 and I want to use a different Interrupt pin(Pin18) in Arduino mega2560. How to use attachInterrupt() here? #include<Wire.h> const int MPU_addr=0x68; int16_t AcX,AcY,...
1
vote
1answer
735 views

Accessing two MPU-9250 DMP

I want to use both IMU at the same time using the Sparkfun Library on a SAMD21 mini breakout board. Can anyone help? The begin function is : inv_error_t MPU9250_DMP::begin(void) { inv_error_t ...
0
votes
1answer
440 views

Arduino MPU6050 not working due to LED PWM

I'm having some problem with the MPU6050 example sketch. I added a few bits of code of my own, so that my LEDs change color based on the yaw-pitch-roll. However when I try to run it, the values of the ...
0
votes
1answer
2k views

MPU6050 doesn't work

I am trying to do a self-balancing bot as a school project, but I got stuck with the MPU6050. I tried using the code by Jeff Rowberg (MPU_6050_raw) but it's reading only zeros. I tried the ...
4
votes
1answer
445 views

Crash when datalogging MPU-6050 to SD card

On an Arduino Pro Mini, I'm using Jeff Rowberg's stuff in i2cdevlib to read from the MPU6050, and using SdFat to write data to an SD card. Each part in isolation is fine, but when both DAQ and logging ...
1
vote
0answers
375 views

MPU6050: Setting Gyro Output Range Throws of Positional Reading

I am using the MPU6050 in conjunction with an Arduino and Jeff Rowberg's i2cdev library, and my project requires that the gyro rate outputs be more precise than the default setting, which is 1/16.4 of ...
0
votes
0answers
49 views

Mount an MPU with the y-axis parallel to the gravity vector instead of the z-axis?

normally one would calibrate an MPU6050 lying on a flat surface, this way the z-axis is parallel to the gravity vector. But for various reasons I can't mount it in a flat position to my final device, ...
1
vote
2answers
647 views

Why does this sketch give MPU FIFO overflows?

I'm transmitting this program over an NRF24l01, data from mpu, and I'm getting a FIFO overflow. Im not sure what the problem is but it gives me a lag when I put it on processing so I know the problem ...
0
votes
0answers
137 views

arduino + mpu6050 + nrf24l01 >>>>>>>>>>>>nrf24l01 + arduino ( Not running fluently)

this is my setup: I have an arduino uno + mpu-6050 + nrf24l01 all attached together and am transmitting data from that mpu-6050 to another arduino with an nrf24l01 attached to it. I got the arduinos ...
4
votes
5answers
3k views

Understanding why should avoid “String” and alternative solutions

Why “Strings” are bad for Arduino? Which is the most efficient and fastest solution to read and store the data from Accelerometer and GPS? Stings are evil for Arduino An Uno or other ATmega328-...
0
votes
1answer
418 views

Serial not displaying sketch for MPU6050

I followed this tutorial on youtube: https://www.youtube.com/watch?v=M9lZ5Qy5S2s Where he provided the code below. The problem I'm having is the serial monitor shows nothing. I tried changing the ...
0
votes
1answer
2k views

MPU-9250 IMU on SPI, external sensor or magnetometer using I2C master

I'm trying (for sport...) to use an MPU-9250 in SPI mode as it should be faster, and wasn't able to talk to the embedded magnetometer in my code. I've gone through the documentation (RM-MPU-9250A-00 ...
1
vote
1answer
677 views

MPU6050 Sending Bad values for Angular Velocity

The mpu gives me perfectly fine values for the yaw, pitch, and roll position of the chip, but when I use mpu.getRotation(&gx, &gy, &gz) to obtain the current angular velocity of the chip, ...
0
votes
1answer
61 views

Arduino randomly does incorrect addition

I've been trying to make an accelerometer calibration tool for my Arduino Nano and MPU6050, but the arduino seems to randomly do incorrect addition. If you look at the output of the console, it works ...
1
vote
2answers
1k views

How can an Arduino-Quadcopter be stabilized?

I have built an arduino quad-copter and I am using an MPU6050 to read the rotational position and velocity of the aircraft. The problem is that I cannot get the thing to stabilize. Watch this video ...
0
votes
2answers
358 views

MPU6050 safe to use with glue?

My current project involves embedding an MPU6050 accelerometer into straps, one of which goes below the knee, the other above the knee. I need to fit the sensor into the strap and currently i have 6-...
0
votes
0answers
229 views

I'm unable to enable 16g range on my MPU-6050

I'm trying to retrieve 16g data from my gyroscope. I'm using code that originally output 8g, I changed the code to return but it only returns 8g or less. Wire.beginTransmission(0x68); //Start ...
1
vote
1answer
508 views

Best way to detect tilt using MPU 6050 [closed]

I want to make a gesture controlled car using this IMU.. What is the simplest way to detect tilts? I've seen many programs on the Internet that calculate the angles but is this really necessary? Why ...