Stack Exchange Network

Stack Exchange network consists of 175 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
0answers
26 views

MPU9250 Arduino code for tilt angle code

I want code for MPU9250 to check if it is tilted. If so, it should blink led. Please help me with code. I'm using following code to check the xyz-axis. #include "MPU9250.h" MPU9250 mpu; void setup() ...
0
votes
1answer
23 views

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

I want to connect 3 MPU9250 sensors, but since there is just one I2C bus, so there are another 2 sensors I want to connect through SPI. Library used - https://github.com/bolderflight/MPU9250/blob/...
0
votes
1answer
22 views

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

I did managed to upload mpu9250 sensor data on PubNub and nodeMcu but not able to use the received data to control servo Look at the Port reading and see that servo angle is still showing '0' Code:-...
0
votes
0answers
23 views

MPU9250 and ESP8266 are not working together with Arduino Uno

I am trying to send IMU sensor data via WiFi using ESP8266. Both MPU9250 and ESP8266 worked individually with 3.3 V when tested, but are not working when interfaced together. I am not sure what the ...
1
vote
0answers
31 views

Help with code for changing motor speed depending on MPU6050 angles read

I have been trying to create code where my MPU6050 is constantly reading the angle it is at and based on that angle, increase or decrease the motor speed. For example the motor will be off when the ...
1
vote
0answers
29 views

MPU6050 Acc and Gyro readings swapped

I have been trying to figure out this MPU6050 for a bit but the RAW readings are confusing me. It seems to me that the accelerometer readings and the gyro readings are getting swapped... and I don't ...
0
votes
0answers
29 views

Not able to find right library for MPU9250

I am using an Arduino Uno and learning to use the motion sensor. Currently I was not able to find the library which looks simple and would like to get your suggestion. I found this https://github.com/...
-1
votes
1answer
38 views

Interfacing MPU6050 with Arduino uno [closed]

What is the meaning of "volatile bool mpuInterrupt = false; " in Arduino Program interfacing MPU6050?
0
votes
1answer
66 views

MPU6050 Calibration [closed]

Why does the MPU6050 IMU sensor not require calibration? I've used other gyro sensors on RC helicopters that required calibration at boot. Also, how does it know what its neutral position is ...
0
votes
2answers
65 views

What could cause data to be printed correctly, then incorrectly and then repeated? CAN bus / general transmission

I am attempting to send data from an MPU6050 connected to an arduino uno to another uno via CAN bus, however i don't think this is a CAN bus specific issue. In short, i am sending two packets of 8 ...
0
votes
1answer
47 views

Regarding turning exact 180 degrees using an MPU6050

I want to turn robot exact 180 degrees by using an MPU6050. This is the code I tried. Can anyone help me? #include <MPU6050_tockn.h> #include <Wire.h> #define enA 9 #define in1 4 #...
0
votes
1answer
56 views

Is there something wrong in my sketch?

I've been working on a project that need two sensors(mq2 and mpu6050), I got each sketches from the internet and I managed to work the mq2 but for the mpu6050, I'm still not sure if its working. The ...
0
votes
1answer
30 views

How to retain the on state of the LED and buzzer if the sensor is triggered?

I'm working on a project which is likely an earthquake alarm. The sketch that I got from the internet does not retain the "on" state of the indicators(LED and buzzer)when it is triggered. I want to ...
1
vote
1answer
42 views

How to remove the sketch for the LCD and retaining the sketch for the MPU6050?

I just got this from the internet and I only want to use the sketch for the MPU6050. Can someone help me to remove the code for the LCD? I'm sorry, I'm just noob when it comes to programming. Here ...
0
votes
2answers
48 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
2answers
79 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 ...
1
vote
2answers
299 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, ...
2
votes
1answer
164 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
122 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
1answer
582 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
62 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
918 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
140 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
66 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
178 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 ...
3
votes
1answer
4k 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
250 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
347 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
152 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....
1
vote
1answer
7k 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
1answer
350 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 ...
1
vote
1answer
154 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
193 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
439 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
465 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
827 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
529 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
3k 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
2answers
575 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
444 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
83 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
873 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
182 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
4k 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
459 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
851 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
68 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
2k 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
436 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-...