[last update: 2020-09-15]
go to: Accelerometers
go to: Electronic Level Project
-----
Triple-axis accelerometer, plus gyro, for a 6 degrees-of-freedom sensor.
Adafruit PID: 3886
- (link to:) Tutorial from Adafruit:
- Power Pins:
Vin: The sensor chip itself uses 3 VDC, but there is regulator on board that will accept 3 - 5 vdc. Power the board with the same power as the logic level of your microcontroller.
3Vo: 3.3V output from the voltage regulator. Will supply up to 100mA.
GND: common ground for power and logic
- I2C Logic Pins:
SCL: I2C clock pin. The pin is level-shifted so you can use 3 - 5V logic, and it has a 10K pullup.
SDA: I2C data pin. Also level-shifted to accept 3 - 5V logic, and also has a 10K pullup.
STEMMA QT: Compatible with dev boards that have STEMMA QT connectors.
- Other Pins:
INT: Interrupt pin. Can be programmed to go low when certain conditions are met. See the datasheet and register map for usage.
AD0: I2C Address pin. Pulling this pin high or bridging the solder jumper on the back will change the I2C address from 0x68 to 0x69
FS, SCE, SDE, CLKIN: Pins for advanced users to connect the MPU-6050 to another sensor. Consult the datasheet and register map for usage.
- To wire it up, connect Vcc, Gnd, SCL, & SDA to the microprocessor.
- Install the Adafruit_libraries:
- From the Arduino IDE, open up the Library Manager
Click Manage Libraries ... menu item, search for Adafruit MPU6050, and select the Adafruit MPU6050 library and click Install:
- Do the same for the Adafruit BusIO library (however this may be installed automatically with the MPU6050 library).
- Do the same for the Adafruit Unified Sensor library (however this may be installed automatically with the MPU6050 library).
- Load & run the program:
- Open File > Examples > Adafruit MPU6050 > basic_readings, and upload to your Arduino.
- Open the Serial Monitor (Tools > Serial Monitor) at 115200 baud. You should see the acceleration, rotation measurements, and temperature being printed to the serial monitor.
- (link to:) circuitPython tutorial
eof