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.
196 questions
-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 ...
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 ...
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) -...
-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 = ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 -...
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 */
/*...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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://...
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. ...
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 ...
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;
...
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. ...
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 &...
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 ...
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 ...
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 ...
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, ...
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 ...
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 "...
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 ...
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 ...
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. ...
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 ...
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 ...
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 ...
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&...
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 ...
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 ...
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 ...
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.
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 ...
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 ...
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/...
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 ...
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 ...
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 ...
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.