Gyroscope

Pages
Contributors: bitsmashed
Favorited Favorite 22

How to Connect to a Gyro

The primary hardware connections to use a gyro are power and a communication interface. As always, refer to the sensor datasheet for all of the information on specifications and example connections.

Communication Interface

Gyros can have either a digital or analog communication interface.

  • Gyros with a digital interface usually use either the SPI or I2C communication protocols. Using these interfaces allow for an easy connection to a host microcontroller. One limitation of a digital interface is max sample rate. I2C has a max sample rate of 400Hz. SPI, on the other hand, can have a much higher sample rate.

  • Gyros with an analog interface represent rotational velocity by a varying voltage, usually between ground and the supply voltage. An ADC on a microcontroller can be used to read the signal. Analog gyros can be less expensive and sometimes more accurate, depending on how you are reading the analog signal.

Power

MEMS gyros are generally low power devices. Operating currents are in the mA and sometimes &microA range. The supply voltage for gyros is usually 5V or less. Digital gyros can have selectable logic voltages or operate at the supply voltage. For any digital interface, remember to connect 5V to 5V lines and 3.3V to 3.3V lines. Also, gyros with digital interfaces can have low power and sleep modes that allow them to be used in battery powered applications. Sometimes this is an advantage over an analog gyro.