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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
28 views

Getting angles from MPU6050 on ESP32

I'm trying to build a 2-wheel balancing robot, but it is way to jerky to balance properly. Hardware: ESP32, MPU6050, L298N, two motors and a 9v battery. I've tried playing around with the PID settings ...
  • 135
0 votes
0 answers
12 views

How does the mpu6050 offset functions work?

I have a problem with understanding the mpu6050 library set offset functions to calibrate accelerometer. I wrote a basic example (obviously final calibration should be done on average of samples) but ...
  • 111
1 vote
2 answers
177 views

Gyro reading of MPU6050 drifts too much on fast changes only

I am trying to write a simple sketch for the MPU6050. The problem is that the sensor is pretty much solid when stationary or changing the angle steadily at slow to mid angular velocities but if I try ...
0 votes
0 answers
28 views

MPU6050 not working properly in Nodemcu

So, I try to obtain angles with the MPU6050 sensor and Nodemcu. I don't have any idea why the output is "nan" like this. But, when I try the same code in Arduino Nano, It works properly ...
-1 votes
1 answer
68 views

How often does a mpu6050 gyro sonsor need calibration?

I want to use it in my real car for daily use to measure yaw angle when needed. Is is ok to only calibrate it once at first then use it every day when driving without any problem? if not, how often ...
1 vote
0 answers
81 views

LILYGO TTGO T-Display cannot detect MPU 6050 Accelerometer, Gyroscope and Temperature Sensor

I've been trying to connect a MPU 6050 Accelerometer, Gyroscope and Temperature Sensor to a LILYGO TTGO T-Display to get readings displayed on the serial monitor (for starters). The wiring is pretty ...
  • 73
1 vote
2 answers
182 views

Stabilize data from four gyros/accelerometer [closed]

I am currently working on a university project. My aim is to get a rough estimate of the posture of a person's back. For this I have built a system that collects the data from 4 MPU6050 at a central ...
  • 121
0 votes
1 answer
191 views

multiple mpu9250 using tca9548a with esp32

I'm using ESP32 and 1 sensor mpu9250(only for test) with tca9548a, connections are: TCA <-> ESP VIN - VCC GND - GND SDA - GPIO21 SCL - GPIO22 TCA <-> MPU SD2 - SDA SC2 - SCL VIN - VIN GND -...
3 votes
2 answers
366 views

Adafruit MPU-6050 and adafruit I2C Multiplexer

I have 3 adafruit MPUs hooked up to adafruit I2c Multiplexer. All of which is hooked up to a Arduino uno. Attached is also my code. /* Assign a unique ID to this sensor at the same time */ /*...
  • 33
3 votes
2 answers
530 views

MPU6050 Arduino Jeff Rowberg library interrupt Issue

I was trying to get the data from MPU6050 using the Arduino library mentioned here. The following code is an edited version of the sample code given in the library folder which seems to be working ...
  • 171
2 votes
0 answers
100 views

Extract Static Acceleration from MPU6050 using Formula

I am trying to implement a research paper for my project and there is a formula which I am failing to interpret: According to the research paper, we extract the static acceleration component for each ...
2 votes
0 answers
59 views

Bug in code of Self-Balancing Bot [closed]

1)The values drifts to the extreme every time I run this , I guess this is due to my mistake in the calculation of angles or in the filter that I have applied which I have been trying to but can't ...
2 votes
2 answers
751 views

MPU 6050 only reads 0 in output

I am new to using MPU 6050. I am stuck at a basic code of getting readings from the sensor. The code I used is attached below. Its the one with GY 521 breakout board. Concluding that my sensor is ...
1 vote
1 answer
114 views

Accelerometer value meaning

I'm currently using the MPU-6050 accelerometer to receive the acceleration and angular velocity data. I'm trying to process the data for my experiment but I can't understand the exact meaning of it. I ...
3 votes
3 answers
818 views

MPU6050 does not give output

I need help getting my MPU 6050 to actually give me data. As of right now, my program is only reading 0s from the gyroscope and when I move it, the values all go to -1 and the program just stops until ...
0 votes
1 answer
149 views

Multiple I2C devices connected to one Arduino Uno?

Is it possible to connect more than one I2C device to an Arduino Uno? I know that the SCL and SDA pins are on analog pins A4 and A5 respectively, but there are also two pins labeled SCL and SDA ...
2 votes
2 answers
293 views

MPU6050 Calibrating Accelerometer

I recently got an MPU6050 and I noticed the accelerometer data was a bit off, especially on the Z axis. I'm running it on a Teensy 4.0 with Adafruit's MPU6050 library and basic example code: https://...
  • 21
0 votes
1 answer
219 views

Seeking to write a ton of information to an SD card as close to live as possible

So I've recently started a project where I am using an accelerometer, along with a SD card breakout board. I've been able to get information to write properly to the SD card with no issues whatsoever. ...
0 votes
2 answers
211 views

Why float and not 16-bit Integer? Mpu6050 with atmega328P

I've been trying to follow this example code for interfacing my atmega328P with Mpu6050: https://www.instructables.com/Accelerometer-MPU-6050-Communication-With-AVR-MCU/ And was wondering a couple of ...
1 vote
0 answers
109 views

Arduino MPU error

This is my code - // Basic demo for accelerometer readings from Adafruit MPU6050 #include <Adafruit_MPU6050.h> #include <Adafruit_Sensor.h> #include <Wire.h> Adafruit_MPU6050 mpu; ...
1 vote
0 answers
29 views

Need to operate 2 different sensors (MPU 6050 and Admp 401) simultaneously [duplicate]

I need to operate 2 different sensors (MPU 6050 and Admp 401) simultaneously. I have managed to run each one of them separately and I don't know how to manipulate the code so they could work together. ...
  • 11
0 votes
2 answers
119 views

Serial and I2C not working together

I have very peculier problem. When I run this code SSD1306 fails to initialize. Output at serial console is: 20:26:33.194 -> MPU6050 OLED demo 20:26:33.532 -> SSD1306 allocation failed #include &...
  • 21
1 vote
0 answers
208 views

Arduino MPU6050 AD0 Tricks with offset setting gives corrupted data

I am currently experimenting with two MPU6050 which the AD0 is connected via PIN 7 and PIN 8 respectively, and if this is working, I plan to add another 2 more MPU6050 to it. I am using i2cdevlib's ...
  • 111
1 vote
0 answers
338 views

Using MPU6050 with ESP32 Cam- MPU Not Detected

Hi I'm trying to build a self balancing robot using my esp32 cam, but so far I haven't been able to setup my mpu6050 with it.I'm using the adafruit libraries with the given example sketches. The only ...
  • 209
1 vote
0 answers
116 views

l298N PWM motor control with Uno is not functioning correctly

I'm working on a self-balancing robot. The self-balancing is not the issue. The issue is that the motors don't respond as they are supposed to. I would understand if it were unable to balance, but the ...
1 vote
1 answer
60 views

Having trouble with MPU6050 and AFE4404 printing together, potential conflict?

I am having trouble getting the two sensors to work together. There are a total of four sensors connected to the Arduino, and while the MPU and AFE individually work fine with the other two sensors, ...
1 vote
1 answer
172 views

Drawing a line at a given angle

Im attempting a device that measures lean angle. I have an ESP8266 + MPU6050 + SSD1306 setup, and I've managed to build a shaky but somewhat functioning device. What Id like to do is use the ...
1 vote
0 answers
93 views

Connecting MPU6050 to Arduino Due but using Jeff Rowbergs Library

I am working on a personal project in which I need to collect accurate data from the MPU6050 using an Arduino Due. I can interface and read data from the MPU using the SLC and SDA pins and the "...
1 vote
0 answers
35 views

When I start running the Brushless motors with MPU6050 in my quadrocopter, there is a sudden spike in the data of Gyro X-axis and Gyro Y-axis

I am using the MPU6050_light library for getting the data for my quad-copter. When I am obtaining the gyro values from the MPU6050 without running the motors, its giving correct values but on running ...
1 vote
1 answer
368 views

MPU6050 FIFO overflow and freezing problems

I'm using the sensor MPU6050 to control movements of my robotic arm. The code works fine when it is a standalone program but I keep encountering 'FIFO overflow' when the code is compiled into the main ...
  • 11
2 votes
1 answer
431 views

Wire.endTransmission(false) hanging the program after running once when using MPU6050

For this project, I was using an Elegoo Car V3 and I was trying to add a gyroscope onto it. When I run the code for the car, my loop code iterates once and it is always able to read the sensor data. ...
1 vote
0 answers
128 views

Why do I get error "Error compiling for board Arduino Uno" with my mpu6050 video stabilization code?

This is the code I'm working with. I'm using it for video stabilization system. It was working fine but for some reason now it gives me this error? Is it because I deleted the library and installed ...
  • 11
2 votes
1 answer
571 views

Reading Multiple MPU 9250 Sensors using TCA9548A Multiplexer

I am trying to read multiple MPU 9250 sensors using TCA9548A multiplexer in ESP 32 and Arduino IDE. Has anyone done that successfully? I am new to the area of Arduino coding. I am trying to edit the ...
1 vote
1 answer
119 views

Why am I only getting -1 values in the Serial Monitor, when interfacing with the MPU 6050?

I am trying to smoke test my Seeeduino XIAO (Arduino-compatible) board with an IMU sensor, the MPU 6050. I mainly care about the accelerometer and gyroscope values. But when I run my Arduino code on ...
  • 111
2 votes
1 answer
355 views

Problemm with the MPU6050 library

I have a curiosity. What is the difference between adding a header file directly on the arduino IDE and the header file inside another h-file. For example: #include "MPU6050_6Axis_MotionApps20.h&...
1 vote
1 answer
605 views

Stepper motor slow when reading from MPU 6050 sensor

I'm trying to get an inverted pendulum project working (following the instructions here), and while my stepper motor moves the cart just fine when that's the only code in the Arduino sketch, as soon ...
  • 33
2 votes
0 answers
83 views

FIFO overflow with DMP on MPU6050 and OLED

I am using the DMP example code to get yaw pitch roll values, mainly I am interested in pitch value for building a self balancing robot. I am trying to display the pitch values on an OLED screen but I ...
  • 21
1 vote
0 answers
89 views

Getting some strange data from an MPU-6050

I'm trying to create an IMU unit using MPU-6050 unit. I've got 100k data records, and this is the result: It seems to me that's a kind of offset in gx. Why? Why I'm getting this kind of drifting in ...
0 votes
2 answers
37 views

Can I use The mpu6050 with this?

I am making a project with 3 arduinos (2 slave, 1 master) and I want to know can I use the mpu6050 since it uses the I2c communication.
  • 23
1 vote
2 answers
364 views

How to fix HC05 burning even after while using voltage regulator?

I'm using two circuits for my wireless head mouse project, one of them is a transmitter circuit with Arduino Pro Micro, HC05 Bluetooth module, Elechouse Voice Recognition Module V3.1, GY-521 module ...
0 votes
1 answer
377 views

Wiring Multiple MPU 6050 to Micro/Lenardo

disclaimer I am new at hardware/circuits I am currently trying to connect two MPU-6050 to a single Micro board. In addition, there are 5 additional buttons to be connected. I am under the impression ...
  • 101
2 votes
0 answers
86 views

Get deceleration (negative acceleration when apply brake force)

I want to build a device to measure deceleration force when a car brakes. I am using a MPU6050 for get data and I read from it acceleration on X,Y,Z axes in m/s2 and also it gives me gyro in degrees/...
  • 53
1 vote
1 answer
435 views

How do I connect an MPU6050 sensor to an Arduino MKR WIFI 1010?

I've been trying to connect an MPU6050 to my MKR WIFI 1010 following these general instructions and using the I2CDev library, but I keep running into problems. For a while the Arduino just didn't show ...
  • 33
3 votes
1 answer
835 views

How to implement a tilt compensated compass?

So i was trying to implement a tilt compensated compass, using HMC5883L and MPU6050. The problem i am facing is, there are 2 equations for tilt compensation Tilt Compensated X: X,Y,Z are compass ...
  • 31
1 vote
1 answer
102 views

Possible noise from the motors

I'm trying to control a self-balancing car, but it seems that the MPU6050 get dirty once my motors operate a full velocity. I'm controlling my motors with the module L298N and with the PWM signal (pin ...
1 vote
0 answers
33 views

connect gy512 is not visible by i2c bus

I am a newbie. Please help to make gy512 visible on i2c interface. i did sda - a4 scl - a5 vcc - 5v gnd - gnd I have used i2c sticker scatch and use PC monitor.
1 vote
1 answer
166 views

MPU6050 Problem with NodeMCU

I am using MPU6050 as a part of IMU of my drone, and I wrote this program for Arduino Nano to fetch the orientation of the MPU6050 module in 3D space. And that works perfectly fine, but when I ...
1 vote
1 answer
508 views

Power MPU 6050 module through pin AD0

TL;DR: is it safe to power a MPU 6050 module through its AD0 pin instead of VCC? We managed to have two MPU 6050 modules on the same I2C buffer by changing the address of one of them by connecting ...
0 votes
1 answer
2k views

How to calibrate Mpu6050 using library?

I am using i2cdev library Code:(i did not know this code is correct or not) #include <Arduino.h> #include <MPU6050.h> #include <kalman.h> #include <stdint.h> #define ...
2 votes
0 answers
1k views

Data transmission rate of accelerometer mpu6050 to arduino uno vs Sampling rate of mpu6050

mpu6050 has sampling frequency of 1kHz (mentioned in datasheet). But when i interface it with arduino uno via I2C communication (400Khz bus speed), i only get 50 raw data (each of x,y,z). There is no ...