MPU6050 Tilt Angle Sensorby Proteusy
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.
How to add the MPU6050 Tilt Angle Sensor robot skill
- Load the most recent release of ARC (Get ARC).
- Press the Project tab from the top menu bar in ARC.
- Press Add Robot Skill from the button ribbon bar in ARC.
- Choose the I2c category tab.
- 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 skillYou 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.
For the DTH11 wiring help go Here.
For the MPU connect like pic.
The variables $AngleX, $AngleY and $AngleZ are created.
Upgrade to ARC Pro
Synthiam ARC Pro is a cool new tool that will help unleash your creativity with programming robots in just seconds!
What port number are you referring to? It assumes it is EZB#0 at 57600 baud.
Sorry but I do not use the EZB. I use an sbc connected to arduinos.
The firmware loads fine. Where did you put the comment slashes to apply the firmware?
Did you get any values in the x, y and z variables?
Thank you merne, it is a skill I use in my robot and I am happy to share with the community. All I have done is modify a created skill (Wheel encoder) by DJ to suit my needs.
I currently have the Arduino USB connected to my PC's USB port to test the 6050.
I opened the firmware "EZ-Genuino_DTH11_MPU6050" Then pressed the button on the Arduino and then pressed the upload button on the Arfuino IDE.
That's when it stopped at the... "rduino: 1.8.3 (Windows 10), Board: "Arduino/Genuino Uno"
C:\Users\Limitedtime\Downloads\lbaltr1a(1)\EZ-Genuino_DTH11_MPU6050\EZ-Genuino_DTH11_MPU6050.ino:6:17: fatal error: DHT.h: No such file or directory
exit status 1
Error compiling for board Arduino/Genuino Uno.
So I put the comment slashes anytime I got the error. Like I said I am very new at this Arduino stuff. Should I have loaded the ARC firmware on the Arduino Uno first?
I did not get any XYZ info in your MPU6050 Tilt Angle box.
If you have the time and would not mind hand walking me through how tp load your firmware that would be great.
I thought this 6050 was for auto correcting X, Y, Z position to help keep the robot upright.
Also, I can not figure out how to use this new text format to add quotes, ect. I like the old ez robot format better, but I'm not the guy in charge.
To make a robot balanced is not an easy task. You must use PID algorithm.
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
exit status 1
SendOnlySoftwareSerial.h: No such file or directory
Thank you a lot for your help!
It seems that you selected arduino mega, use uno.
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!
I use USB to connect my SBC to Arduino.
Everything is working now. The only thing I need now are wheel encoders for the MPU to work. Thanks for all your help!!!
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?
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.
Just as a FYI I have decided to use EZB4's and an IOTiny in this project. I am going to try the other skill that is for the EZB's and see if I can make that one work. I may have more question on it when I can hook everything up and try it.