SEN-11977

SEN-11977

  • 厂商:

    SPARKFUNELECTRONICS

  • 封装:

    -

  • 描述:

    TRIPLE-AXIS DIGITAL-OUTPUT GYRO

  • 数据手册
  • 价格&库存
SEN-11977 数据手册
Page 1 of 9   ITG-3200 Hookup Guide Introduction This is a breakout board for InvenSense’s ITG-3200, a groundbreaking triple-axis, digital output gyroscope. The ITG-3200 features three 16-bit analog-to-digital converters (ADCs) for digitizing the gyro outputs, a userselectable internal low-pass filter bandwidth, and a Fast-Mode I2C (400kHz) interface. Additional features include an embedded temperature sensor and a 2% accurate internal oscillator. This tutorial will help you get started using the ITG-3200 in your next project. We will cover the hardware, discuss the code briefly, then show you how to hook it up to a microcontroller. Suggested Reading This tutorial builds on some basic concepts. If you are unfamiliar with any of the topics below, go ahead and check them out. We’ll be right here waiting. • • • • • • What is Arduino? Gyroscope Basics I2C Communication Serial Terminal Basics How to Solder Breadboard Basics Hardware Overview Power The ITG-3200 can be powered at anywhere between 2.1 and 3.6V. For power supply flexibility, the ITG-3200 has a separate VLOGIC reference pin (labeled VIO), in addition to its analog supply pin (VDD), which sets the Page 2 of 9 logic levels of its serial interface. The VLOGIC voltage may be anywhere from 1.71V min to VDD max. For general use, VLOGIC can be tied to VCC. The normal operating current of the sensor is just 6.5mA. Communication Communication with the ITG-3200 is achieved over a two-wire (I2C) interface. The sensor also features a interrupt output and an optional clock input. Clock Source Jumper In the next picture, you can see a small jumper next to the pin labeled ‘CLK.’ The ITG-3200 has a feature that allows you to connect an external clock. Unless you plan to use an external clock, you need to ‘close’ this jumper by connecting the two pads with solder. If you’re following this tutorial and using the provided example code, go ahead and close the jumper. Make sure you close this jumper with solder if you’re NOT using an external clock source. I2C Address Jumper A jumper on the top of the board allows you to easily select the I2C address, by pulling the AD0 pin to either VCC or GND; the board is shipped with this jumper tied to VCC. I2C Pull-up Resistors Note that there are two unpopulated pull-up resistors on the I2C lines. These can be added later by the user if desired. Here the I2C address jumper (top) and the unpopulated I2C pull-up resistors (bottom) are highlighted. Hooking it Up Page 3 of 9 There are only two considerations for assembling the ITG-3200 breakout: what to do for the headers, and whether or not you’re going to use an external clock source for the ITG-3200. For the headers you have a couple options, you can solder in male or female 0.1" headers, or you can just solder wires directly to the holes in the breakout board. In this example, male headers are soldered to the breakout board to make it easy to attach to a breadboard. Then, we’ll be hooking the ITG-3200 up to an Arduino Leonardo using some male-to-male jumper wires. Second, since we will not be using an external clock source in this setup, make sure the CLKIN jumper on the bottom of the ITG-3200 is closed with a blob of solder. Here’s everything all hooked up. Make sure you add the small jumper from VDD to VIO to ensure they are both connected to 3.3V. The SDA and SCL pins should be present on most Arduinos. Older, prerev3 Arduinos might not have SCL and SDA pins. In that case, connect SDA to A4 and SCL to A5. The ITG3200 sensor is a 3.3V device. This means that the sensor should be powered by 3.3V and the communication signals should be between 0V and 3.3V. The Arduino Leonardo (and other similar boards) are 5V devices. Even though we power the board with the 3.3V output from the Arduino, the communication signals are still going to be 5V. Technically this should be avoided as it can cause damage to the sensor in the long run. When implementing this gyro in a final project, it’s in your best interest to use something like a Logic Level Converter to change the voltages of the communication signals. You could also use an Arduino Pro (3.3V/8 MHz). However, for the purposes of testing out your gyro, using a 5V device should work fine. That’s all there is to it! Now, let’s look at some code to get this gyro up and running. Firmware We’re finally ready to start looking at the firmware. We’ve written an example Arduino sketch to help you get started. You can download firmware from the ITG-3200 GitHub page. The sample sketch reads the gyroscope data for the X, Y, and Z axes and prints it to the serial port. This is raw gyroscope data, and it has not been converted to degrees per second yet. Bigger numbers mean the device is rotating faster. Positive numbers indicate one direction of rotation while negative numbers indicate the opposite rotation direction. Since this is a triple-axis gyroscope, we can measure the rotational rate of the board no matter which way the board is rotating. Rotation is usually measured in degrees per second. If the board spins around an axis exactly one time in a second, the gyroscope would measure 360 degrees per second. Now, let’s break up the code in to sections to go over what’s happening a little more in depth. Page 4 of 9 //The Wire library is used for I2C communication #include //This is a list of registers in the ITG­3200. Registers are p arameters that determine how the sensor will behave, or they c an hold data that represent the //sensors current status. //To learn more about the registers on the ITG­3200, download and read the datasheet. char WHO_AM_I = 0x00; char SMPLRT_DIV= 0x15; char DLPF_FS = 0x16; char GYRO_XOUT_H = 0x1D; char GYRO_XOUT_L = 0x1E; char GYRO_YOUT_H = 0x1F; char GYRO_YOUT_L = 0x20; char GYRO_ZOUT_H = 0x21; char GYRO_ZOUT_L = 0x22; //This is a list of settings that can be loaded into the regis ters. //DLPF, Full Scale Register Bits //FS_SEL must be set to 3 for proper operation //Set DLPF_CFG to 3 for 1kHz Fint and 42 Hz Low Pass Filter char DLPF_CFG_0 = 1
SEN-11977 价格&库存

很抱歉,暂时无法提供与“SEN-11977”相匹配的价格&库存,您可以联系我们找货

免费人工找货