IMU Sensor Installation

Since a week ago, I ‘ve been looking into my new IMU: Inertial Measurement Unit.

I bought  from e-bay a MPU6050, a sensor including:

  • a gyroscope that can return the angular speed around the 3  axis x,y,z.
  • an accelerometer  that can return the linear acceleration along the 3  axis x,y,z.

This sensor can communicate trou I2C interface.

Below the electrical drawing:

wiring_IMUIMU_conn

 

 

 

 

 

 

 

For the sw installation I fuond a clear tutorial on the Adafruit website ,so I just report here a memo for the necessary steps:

in sudo nano /etc/modules add:

  • i2c-bcm2708
  • i2c-dev

sudo apt-get install python-smbus

sudo apt-get install i2c-tools

in sudo nano /etc/modprobe.d/raspi-blacklist.conf comment:

  • #blacklist spi-bcm2708
  • #blacklist i2c-bcm2708

Now ,running the command sudo i2cdetect -y 1  yuo have to see the address 0x68, corresponding to the default sensor address.

3 thoughts on “IMU Sensor Installation

    1. solenerotech Post author

      Hello Xerses,
      I just added a picture of my IMU board with the conenctions.
      By the way, it is really simple.
      Power :
      Connect the +V with the rpi output power (phisical pin 1 on my IMU)
      Connect the 0V with the rpi ground (IMU pin 2)

      Then I2C Connection:
      SDA (IMU pin 3)
      SCL (IMU pin 4)

      Reply
      1. Xerxes

        Thank you that is very helpful!
        I also was wondering how you run (in what order, etc.) the python scripts.
        I was able to use the motor test.py with one motor like you did but don’t understand how to use your other scripts (the alpha and beta tests).
        Also I know almost nothing about code/programming so please respond in the simplest terms possible.
        -Thank you

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s