Skip to main content

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
-1 votes
1 answer
32 views

Bluetooth communication between 2 Arduinos using HC-05

I am trying to send sensor values from an MPU6050 Accelerometer from one Arduino to another continuously using 2 HC-05 modules, one on each Arduino. I have done the following: Entered AT Mode on both ...
DKV's user avatar
  • 1
3 votes
2 answers
310 views

Difficulties acquiring angle values from MPU6050

I'm attempting to acquire angle values from an MPU6050 IMU sensor using an ESP32-DevKitM-1 microcontroller. My setup contains the ESP32 board, the MPU6050 board, and an SD card reader to save the ...
Runsva's user avatar
  • 173
0 votes
0 answers
479 views

Connecting Multi MPU6050 using I2C on ESP32 Wroom 32D

I want to connect two MPU6050 sensor on Esp32 using the I2C protocol. ESP32 to MPU6050 connection, I'm using - VCC(ESP32) - VCC(MPU6050_1) - VCC(MPU6050_2) GND(ESP32) - GND(MPU6050_1) -...
Sourabh Tiwari's user avatar
-1 votes
1 answer
38 views

The code is showing same angles for all three axis in the mpu gyro. can anyone solve it so that it works

#include<avr/io.h> float x, y, z, baf = 0, j, i = 0, k, angle, a, b, c, d; unsigned long current_time = 0; unsigned long previous_time = 0; unsigned long time_interval = 0; float gyro_offset_x = ...
Divy Shah's user avatar
0 votes
0 answers
177 views

MPU6050 when searching is at address 0x68 but as a result shows only "0"

My circuit uses an Arduino Nano which I communicate via Α4 and A5 via I2C. There are several BMP280, HMC5883 and MPU6050 sensors on the I2C line. While I was dealing with these other two sensors, my ...
Roman 's user avatar
  • 19
2 votes
0 answers
79 views

MPU9250 and MPU6050 not working with SAMD21 board

I am trying to use an MPU6050 with my SAMD21-based board (a LightAPRS W-2), but it doesn't work. The sensor definitely works, as I can get data from another 3.3 Vlogic-level board, and the sensor ...
Charlie Nicholson's user avatar
2 votes
0 answers
403 views

MPU 6050 Pitch and Roll values bouncing back to zero

I wired an MPU 6050 to an Arduino Pro Micro: ...and installed the MPU 6050 library by Electronic Cats in the Arduino IDE. I used the IMU_Zero sketch to capture the acceleration and gyro offsets. I ...
Marcelo F's user avatar
1 vote
2 answers
1k 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 ...
Mahmoud Salah's user avatar
0 votes
1 answer
651 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 ...
sadegh yeganeh zadeh's user avatar
1 vote
1 answer
467 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 ...
C Vith's user avatar
  • 123
1 vote
2 answers
626 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 ...
Trojan's user avatar
  • 123
0 votes
1 answer
763 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 -...
TryHack Channel's user avatar
3 votes
2 answers
1k 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 */ /*...
cch's user avatar
  • 33
3 votes
2 answers
1k 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 ...
Lawliet's user avatar
  • 183
2 votes
0 answers
256 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 ...
Noman Aziz's user avatar
2 votes
0 answers
62 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 ...
Aditya Raj's user avatar
2 votes
2 answers
3k 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 ...
user78465's user avatar
1 vote
1 answer
381 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 ...
John Cho's user avatar
3 votes
3 answers
4k 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 ...
Tobias Guo's user avatar
0 votes
1 answer
1k 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 ...
Tobias Guo's user avatar
2 votes
3 answers
2k 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://...
Koszuta's user avatar
  • 23
0 votes
1 answer
615 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. ...
Colby Johnson's user avatar
0 votes
2 answers
544 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 ...
Robin Svensson's user avatar
1 vote
0 answers
473 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; ...
Manish Pingale's user avatar
1 vote
0 answers
33 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. ...
sathvik's user avatar
  • 11
0 votes
2 answers
808 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 &...
Pankaj's user avatar
  • 21
1 vote
0 answers
356 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 ...
Wing Shum's user avatar
  • 111
1 vote
0 answers
815 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 ...
AfiJaabb's user avatar
  • 219
1 vote
0 answers
283 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 ...
Sergei Glimis's user avatar
1 vote
1 answer
88 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, ...
anonymous's user avatar
1 vote
1 answer
834 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 ...
ar6rider's user avatar
1 vote
0 answers
189 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 "...
Daniel G's user avatar
1 vote
0 answers
91 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 ...
coder-ari's user avatar
1 vote
1 answer
1k 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 ...
Ivan's user avatar
  • 11
2 votes
1 answer
1k 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. ...
Akash Dubey's user avatar
1 vote
0 answers
157 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 ...
Dani's user avatar
  • 11
2 votes
1 answer
994 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 ...
Ajay Raj's user avatar
1 vote
1 answer
302 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 ...
rmutalik's user avatar
  • 111
2 votes
1 answer
866 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&...
PartnerTech's user avatar
1 vote
1 answer
1k 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 ...
Frecka's user avatar
  • 33
2 votes
0 answers
198 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 ...
R0yy's user avatar
  • 21
1 vote
0 answers
143 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 ...
Mauro Assis's user avatar
0 votes
2 answers
44 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.
Lil man's user avatar
  • 23
1 vote
2 answers
884 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 ...
Nahian Rifaat's user avatar
0 votes
1 answer
1k 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 ...
Jae Yang's user avatar
  • 101
2 votes
0 answers
219 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/...
David's user avatar
  • 63
1 vote
1 answer
669 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 ...
Frecka's user avatar
  • 33
3 votes
1 answer
2k 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 ...
Sajil's user avatar
  • 31
1 vote
1 answer
227 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 ...
PartnerTech's user avatar
1 vote
0 answers
46 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.
Alexander Ushakov's user avatar