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
3
votes
2answers
172 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 ...
2
votes
0answers
38 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
0answers
38 views

Bug in code of Self-Balancing Bot

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 ...
3
votes
2answers
78 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 ...
2
votes
1answer
68 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
2answers
125 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
1answer
43 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 ...
1
vote
1answer
44 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://...
0
votes
1answer
91 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
2answers
90 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 ...
2
votes
0answers
38 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
0answers
28 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. ...
0
votes
2answers
51 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 &...
1
vote
0answers
51 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 ...
1
vote
0answers
87 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 ...
1
vote
0answers
60 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
1answer
39 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
1answer
74 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
0answers
56 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
0answers
25 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
1answer
101 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 ...
2
votes
1answer
82 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
0answers
70 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 ...
0
votes
0answers
533 views

Why do I keep getting "class MPU6050 has no member named 'CalibrateAccel'" error in the MPU6050 example IMU_Zero when trying to upload?

// MPU6050 offset-finder, based on Jeff Rowberg's MPU6050_RAW // 2016-10-19 by Robert R. Fenichel (bob@fenichel.net) // I2C device class (I2Cdev) demonstration Arduino sketch for MPU6050 class // 10/...
2
votes
1answer
239 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
1answer
61 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 ...
2
votes
1answer
196 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
0answers
61 views

How to light up digits at the same time?

I'm measuring inclination with MPU6050, then transmitting data from the accelerometer to second Arduino, where I want to display the number on a 4 digit 7 segment display. I'm using one shift register ...
1
vote
1answer
304 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 ...
2
votes
0answers
48 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 ...
1
vote
0answers
54 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
2answers
33 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.
1
vote
1answer
185 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
1answer
113 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 ...
2
votes
0answers
49 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/...
1
vote
1answer
269 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 ...
2
votes
1answer
455 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 ...
1
vote
1answer
77 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
0answers
25 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
1answer
110 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
1answer
266 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
1answer
690 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
0answers
427 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 ...
1
vote
1answer
245 views

NodeMCU V3 and MPU6050 strange values

I am new to this platform, so please if I do something against the regular rules please let me know so I can learn. Now my problem: I have a nodeMCU V3 connected to a MPU6050. Using my Arduino Uno I ...
1
vote
1answer
130 views

MPU6050 Accelerometer freezes/glitches after acceleration

I am trying to do rotational vector calculation using a MPU6050 chip which actually work really well with not too much drift when I rotate the MPU slowly. However, when I accelerate too much, e.g. ...
1
vote
0answers
89 views

MPU6050 stuck on same values while getting the angle as output

I am trying get the rotation value from MPU6050. I am using an Arduino Uno board. My connections are: MPU6050 Arduino VCC -> 5V GND -> GND SCL -> A5 SDA -> A4 INT -&...
0
votes
1answer
1k views

How can I fix this error "invalid operands of types 'const char [17]' and 'float' to binary 'operator+'"?

#include <Wire.h> long aX,aY,aZ,gX,gY,gZ; float rtX,rtY,rtZ,gfX,gfY,gfZ; void setup() { Serial.begin(9600); Wire.begin(); setupMPU (); } void loop() { recordAccelregisters(); ...
0
votes
1answer
51 views

How to connect MPU6050 with Arduino Uno without using A0-A5 pins?

Connecting MPU6050 with Arduino without using A0-A5 pins.
1
vote
0answers
205 views

ESP8266 NodeMCU CP2102 ESP-12E I2C with MPU 6050 Error

So the previous two questions could be found here: ESP8266 computtion error and ESP8266 not working with MPU 6050 over wire library and I2C However, it was not resolved, and with updates and debugs,...
1
vote
0answers
68 views

How to send sms message on specific area using Longitude and Latitude

Good day everyone! what code should i used for sending sms message depends on the area. the things that i used in my protoype i have MPU6050 accelometer, SIM800C GSM MODULE, NEO6MV2 GPS MODULE. So the ...