Difference between revisions of "MPU6050"

From Let's Control It
Jump to navigation Jump to search
Line 17: Line 17:
 
* Connect Gnd to Ground
 
* Connect Gnd to Ground
 
* Connect SCL and SDA to two GPIO pins and configure those pins in the [[ESPEasy#Hardware_page|hardware tab]].
 
* Connect SCL and SDA to two GPIO pins and configure those pins in the [[ESPEasy#Hardware_page|hardware tab]].
 +
 +
 +
The board will default to address 0x68. Ground pin AD0 for the alternate address of 0x69.
 +
  
 
The pins XCL, XDA and INT are not used and can be left unconnected.
 
The pins XCL, XDA and INT are not used and can be left unconnected.
  
The board will default to address 0x68. Ground pin AD0 for the alternate address of 0x69.
 
  
 
You can connect the board to the machine under investigation/detection using two screws. For a non-intrusive connection you can stick/glue two neodymium magnets to the screws and attach the sensor using magnetism.
 
You can connect the board to the machine under investigation/detection using two screws. For a non-intrusive connection you can stick/glue two neodymium magnets to the screws and attach the sensor using magnetism.

Revision as of 18:49, 22 February 2017

WIP.gifYou may hear some construction noise in the background...

Introduction

The plugin for the MPU 6050 can be used as a motion sensor. Apart from singling the home controller when a certain amount of movement is detected, this plugin is also capable of showing the raw values from the dMPU 6050 device.

Hardware

Mpu-6050.jpg

The MPU 6050 is made by InvenSense and contains a accelerometer and gyroscope in one package for all three dimensional axis. Fitted with a build-in 16 bit analog to digital convertor per channel it is capable of capturing all three axis simultaneously. The sense is fitted with multiple I2C interfaces of which one is used for communicating with a master controller. The chip has one I2C address selection pin so two sensors can be attached to the bus simultaneously. The plugin supports using two sensors.

The chip is available on several breakout boards among which the GY-25, GY-521 (shown) and the SEN-11028 by SparkFun.

Connections

The commonly used breakout board GY-521 has 8 pins of which only 4 (or 5 with two devices on one bus) are used.

  • Connect Vcc to a 5V supply (the GY-521 has its own 3V3 regulator)
  • Connect Gnd to Ground
  • Connect SCL and SDA to two GPIO pins and configure those pins in the hardware tab.


The board will default to address 0x68. Ground pin AD0 for the alternate address of 0x69.


The pins XCL, XDA and INT are not used and can be left unconnected.


You can connect the board to the machine under investigation/detection using two screws. For a non-intrusive connection you can stick/glue two neodymium magnets to the screws and attach the sensor using magnetism.

Software

Custom sketch

ESP Easy