Connecting an accelerometer/gyro to Arduino

The ability to measure speed and tilt is important in many robotic applications. You'll need to add an accelerometer/gyro sensor for this. This device measures the tilt using very small gyros, devices that spin and resist changes in orientation. When these changes occur, the resistance to change can be measured. The device also measures movement using an accelerometer. An accelerometer measures movement in one direction using very small (MEMS) machines that respond to motion by outputting a small signal.

Providing this information can help you know how your device is moving. Fortunately, there are chips that can provide this functionality. One of them is the MPU-6050 chip, which provides a complete set of information on movement, including the acceleration and tilt. There are several different manufacturers who place this chip on a small board accessible from Arduino.

One of these is the SparkFun version, the SparkFun SEN-11028, available at sparkfun.com. It is shown in the following image:

Connecting an accelerometer/gyro to Arduino

The interface to the board is quite simple, with only one issue. One of the ways to connect this particular chip is to solder header pins to the board to connect the jumper wires to Arduino. You can purchase these at sparkfun.com as well; just search for the Arduino stackable header, 8-pin version. Once the header is soldered, the device will look as follows:

Connecting an accelerometer/gyro to Arduino

Now, you can use a male-to-male jumper cable to connect between Arduino and the board. The following table shows the connections:

Arduino pin

Sensor pin

3.3V

VDD

GND

GND

A5

SCL

A4

SDA

3.3V

VIO

You'll notice that you need to make two connections to the 3.3V supply, so you may want to create a male-to-male jumper cable with two connections on one end. This can be done using three male-to-male cables. For this, we need to cut off one end and strip back the insulation, then solder the three cables together, and then wrap the solder connection in electrical tape.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.146.35.72