Thumbnail

MPU6050 Tilt Angle Sensor

The MPU-6050 sensor contains a MEMS accelerometer and a MEMS gyro in a single chip. It is very accurate, as it contains a 16-bits analog to digital conversion hardware for each channel. Therefor it captures the x, y, and z channel at the same time. The sensor uses the I2C-bus to interface with the Arduino. This plugin uses the MPU6050 sensor to measure the angular position of X, Y Z-axis.

Requires ARC v2 (Updated 8/19/2021)

How to add the MPU6050 Tilt Angle Sensor robot skill

  1. Load the most recent release of ARC (Get ARC).
  2. Press the Project tab from the top menu bar in ARC.
  3. Press Add Robot Skill from the button ribbon bar in ARC.
  4. Choose the I2c category tab.
  5. Press the MPU6050 Tilt Angle Sensor icon to add the robot skill to your project.

Don't have a robot yet?

Follow the Getting Started Guide to build a robot and use the MPU6050 Tilt Angle Sensor robot skill.


How to use the MPU6050 Tilt Angle Sensor robot skill

You need to flash the firmware to the Arduino. With this firmware you can use both the DHT11 and the MPU6050 sensors at the same time. EZ-Genuino_DTH11_MPU6050_Uno.zip For the DTH11 wiring help go Here. For the MPU connect like pic. The variables $AngleX, $AngleY and $AngleZ are created. Have Fun!

User-inserted image


ARC Pro

Upgrade to ARC Pro

Take control of your robot's destiny by subscribing to Synthiam ARC Pro, and watch it evolve into a versatile and responsive machine.

#9  

Hi Again,

I did load the ACE firmware on my Uno and tried to install your fireware, I'm now getting this error....

"Arduino: 1.8.15 (Windows 10), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)" EZ-Genuino_DTH11_MPU6050:6:10: fatal error: SendOnlySoftwareSerial.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. exit status 1 SendOnlySoftwareSerial.h: No such file or directory "

Thank you a lot for your help! merne

PRO
Portugal
#10  

What is ACE firmware?

Quote:

"Arduino: 1.8.15 (Windows 10), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"
It seems that you selected arduino mega, use uno.

#11  

Sorry about saying ACE, it should have said ARC.

I uninstalled all firmware on my Uno and uploaded your firmware and it worked, after changing it to Arduino Uno first.

How are you using your Arduino Uno on you SBC, are you connecting it using the USB on your sbc?  Also are using the ARC Arduino firmware?

Thanks again for you help!

Cheers

PRO
Portugal
#12  

Merne, the firmware for the mpu is ARC Arduino firmware. I just added the mpu code.  I use USB to connect my SBC to Arduino.

#13  

Hi proteusy,

Everything is working now.  The only thing I need now are wheel encoders for the MPU to work.  Thanks for all your help!!!

sincerely merne

#14   — Edited

I have been trying to get skill to work and have had no luck.  I am using an UNO but the firmware just does not seem to work I am getting no activity in ARC after connecting to the board in the skill window.  It should be noted I am not using the DTH11 sensor.   I don't know if anyone can help with this.

User-inserted image

User-inserted image

PRO
Canada
#15  

Hello @smiller29,

I believe that you might run into trouble with connecting an MPU-6050 sensor directly to an Arduino as it is a 3.3V I2C sensor and the Arduino UNO operates at 5V I2C levels.

I would recommend using it with an EZ-Bv4. Of course, I would, right?xD

I could recommend trying using a logic-level translator, making your cables shorter, and changing the pullup resistors but really we created the EZ-Bv4 so you wouldn't have to mess around so much, and makes things easier for the end user to connect sensors to their robots.

I2C is a finicky beast sometimes.

#16  

Hi Jeremie,   Just FYI I have hooked it up with 3.3V provided and the 5V on the UNO.  I have validated the hardware works with just Arduino code without using the skill firmware and ARC.