Fork me on GitHub

Project Notes

#218 MPU6050/AccelGyroTest

First test of an Invensense MPU-6050 3-Axes Accelerometer Gyroscope Module.

AccelGyroTest_module

Notes

Module Specs

I have this mpu-6050 module from an aliexpress seller. It is similar to this module from sparkfun.

It is based on the Invensense MPU-6050, but packaged in a module that operates on 3-5V. These are the specs according to the seller:

  • 3-Axes Accelerometer Gyroscope Module For Arduino MPU 6050
  • Use chip: MPU-6050
  • The power supply: 3-5 v (internal low voltage difference voltage stabilizing)
  • Communication: standard IIC communication agreement
  • Chip built-in 16 bit AD converter, 16 bits of data output
  • The gyroscope range: + 250 500 1000 2000 ° /s
  • Acceleration range: ± 2 ± 4 ± 8 ± 16 g
  • Pin Pitch 2.54 mm
  • Size: approx. 20151.2 mm(max)

Pin Connections

Pin Function Arduino Pin Connection
Vcc 3-5V 5V
Gnd Ground GND
SCL I²C clock A5
SDA I²C data A4
XDA I²C data for external compass n/a
XCL I²C clock for external compass n/a
AD0 selects I²C address 0x68 (low) and 0x69 (high) n/a
INT Interrupt out optional

Basic Example

The AccelGyroTest.ino sketch is a basic demonstration of reading raw values from the MPU-6050 using the Arduino Wire library. It is based on a sample from the Arduino playground MPU-6050 page.

It sends the readings out the serial connection:

AccelGyroTest_demo

Construction

Breadboard

The Schematic

The Build

Credits and References

About LEAP#218 SensorsMPU-6050Arduino

This page is a web-friendly rendering of my project notes shared in the LEAP GitHub repository.

Project Source on GitHub Return to the LEAP Catalog
About LEAP

LEAP is my personal collection of electronics projects - usually involving an Arduino or other microprocessor in one way or another. Some are full-blown projects, while many are trivial breadboard experiments, intended to learn and explore something interesting.

Projects are often inspired by things found wild on the net, or ideas from the many great electronics podcasts and YouTube channels. Feel free to borrow liberally, and if you spot any issues do let me know or send a pull-request.

NOTE: For a while I included various scale modelling projects here too, but I've now split them off into a new repository: check out LittleModelArt if you are looking for these projects.

Project Gallery view the projects as an image gallery Notebook reference materials and other notes Follow the Blog follow projects and notes as they are published in your favourite feed reader