Carte à clic Gyro 5
Carte à clic Gyro 5
Overview
Le Gyro 5 Click Board™ est un gyroscope Click Board™ à trois axes capable de détecter le mouvement sur trois axes perpendiculaires. Il est équipé de l'ITG-3701, un gyroscope numérique à trois axes. Ce circuit intégré intègre des éléments de détection microélectromécaniques (MEMS), produits à l'aide d'une technologie de micro-usinage CMOS exclusive. Cette technologie permet une excellente stabilité et linéarité en température. Les données angulaires sont disponibles dans un format 16 bits, ainsi que les données de température de la matrice de l'appareil. Le Gyro 5 Click peut être utilisé pour une vitesse angulaire allant jusqu'à 4000 degrés par seconde (DPS), il dispose d'un tampon FIFO, de deux lignes d'interruption dédiées et d'un traitement de données sur puce pour un développement optimisé du micrologiciel.
Le Gyro 5 Click Board™ est pris en charge par une bibliothèque compatible mikroSDK, qui comprend des fonctions qui simplifient le développement logiciel. Ce Click Board™ est un produit entièrement testé, prêt à être utilisé sur un système équipé du socket mikroBUS™.
The Gyro 5 Click Board™ is based on the ITG-3701 IC which supports both I2C and SPI interfaces, which allows Click Board™ to be interfaced with a wide range of different MCUs. Although it is very sensitive (down to 65.5 LSB/dps) it is very resistant to shock and has a non-linearity of only 0.3% of the full-scale value (FS). These features make the Gyro 5 Click Board™ a perfect solution for the development and testing of a wide range of applications which rely on an accurate angular rate sensing. This includes gyro-stabilization for various types of robots, drones, UAVs and RC vehicles, game controllers, orientation sensing, gesture-based HMI applications, VR glasses, and similar types of applications.
How Does The Gyro 5 Click Board™Work?
The Gyro 5 Click Board™ is based on the ITG-3701, a three-axis digital gyroscope sensor IC, by InvenSense Inc TDK Group Company. This device features factory calibrated scale factor, High cross-axis isolation via proprietary MEMS design and a precision clock with 1% drift from -40°C to 85°C, which results in a high level of integration, allowing very good linearity over temperature, and increased output stability when no motion. It also makes it resistant to shocks up to 10,000g, allowing it to be used for speeds up to 4000 dps. It supports signal conditioning including low-pass filtering, as well as the programmable interrupt.
Typically, higher dps range results in lower sensitivity. Therefore, the ITG-3701 allows to dynamically select the full-scale range (FSR) value in several discrete steps: ±500, ±1000, ±2000 and ±2000 dps. This allows optimized performance for a given usage scenario. For example, if used in applications with faster angle rates such as sports equipment monitoring (golf club or tennis racket), a higher FSR might be required, at a cost of lower sensitivity.
The MEMS output voltage is sampled by a high-accuracy 16-bit A/D converter, allowing the output in 2's complement format. As mentioned above, different FS ranges have different sensitivity per LSB. Therefore, raw output values of the sensor will have to be multiplied with the sensitivity to obtain the values in degrees per second (dps). These values can be obtained from the ITG-3701 datasheet, for every FS range, respectively.
The ITG-3701 sensor feature an internal programmable low-pass filter, with user-selectable cutoff frequency. The output signal can be digitally selected and applied to an angular speed measurement, allowing the developer to reduce the noise or fine-tune the sensitivity within a desired bandwidth.
The ITG-3701 device features a FIFO buffer, which in combination with a dedicated interrupt line, allows firmware optimizations while reducing the power consumption of the application as a result. The FIFO buffer has 32 slots, each 16-bit wide, used to store output values. The FIFO can lower the traffic on the serial bus interface, and reduce power consumption by allowing the system processor to burst read sensor data and then go into a low-power mode. A FIFO counter keeps track of how many bytes of valid data are contained in the FIFO. The FIFO register supports burst reads, while the interrupt function may be used to determine when new data is available.
The interrupt pin is routed to the mikroBUS™ INT pin (labelled as INT). This line is used to report one of the programmable FIFO events: watermark level is reached, FIFO buffer is empty, and there is an overrun event on the FIFO buffer (FIFO is full). The pin can also be used to report when there is a new data available at the output after the conversion period (data ready). To find out which event exactly has occurred, the host MCU should read the status of the respective flag bits from the INT_STATUS register.
The Gyro 5 Click Board™ offers two communication interfaces. It can be used with either I2C or SPI. The onboard SMD jumpers labelled as COMM SEL allow switching between the two interfaces. Note that all the jumpers have to be positioned either I2C or to SPI position. When I2C interface is selected, an additional SMD jumper labelled as ADDR SEL becomes available, determining the least significant bit of the ITG-3701 slave I2C address.
The Gyro 5 Click Board™ can operate with 3.3V MCUs only, it is set to work over the I2C by default, and it is already equipped with the pull-up resistors. It is ready to be used as soon as it is inserted into a mikroBUS™ socket of the development system.
SPECIFICATIONS
Type | Gyroscope,Motion |
Applications | The Gyro 5 Click Board™ can be used to develop applications for gyro-stabilization of different types of robots, drones, UAVs and RC vehicles, game controllers, orientation sensing, gesture-based HMI applications, VR glasses, and similar types of applications. |
On-board modules | ITG-3701, a three-axis digital gyroscope sensor IC, by InvenSense Inc. |
Key Features | Advanced interrupt engine allows simplified firmware development and better system-wide power consumption, very good reliability, precision, and zero-level stability, signal conditioning in a form of low and high-pass filtering, both SPI and I2C interface… |
Interface | I2C,SPI |
Compatibility | mikroBUS |
Click board size | M (42.9 x 25.4 mm) |
Input Voltage | 3.3V |
PINOUT DIAGRAM
This table shows how the pinout of the Gyro 5 Click Board™ corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Notes | Pin | Pin | Notes | ||||
---|---|---|---|---|---|---|---|
NC | 1 | AN | PWM | 16 | NC | ||
NC | 2 | RST | INT | 15 | INT | Interrupt | |
SPI Chip Select | CS | 3 | CS | RX | 14 | NC | |
SPI Clock | SCK | 4 | SCK | TX | 13 | NC | |
SPI Data OUT | SDO | 5 | MISO | SCL | 12 | SCL | I2C Clock |
SPI Data IN | SDI | 6 | MOSI | SDA | 11 | SDA | I2C Data |
Power Supply | 3.3V | 7 | 3.3V | 5V | 10 | NC | |
Ground | GND | 8 | GND | GND | 9 | GND | Ground |
ONBOARD SETTINGS AND INDICATORS
Label | Name | Default | Description |
---|---|---|---|
PWR | PWR | - | Power LED Indicator |
JP1-JP3 | SEL COMM | Right | Communication interface selection: left position SPI, right position I2C |
JP4 | I2C ADD | Left | I2C address LSB selection: left position 0, right position 1 |
Software Support
We provide a library for the Gyro 5 Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
Library contains function for getting INT pin state Library contains function for setting CS pin state Library contains function for getting register values Library contains function for setting register values Library contains function for device initialization Library contains function for getting temperature value Library contains function for getting axes values Library contains function for software reset Library contains functions for setting power mode and full scale range
Key Functions
uint8_t gyro5_initialize( void )
- initializes the device.uint8_t gyro5_get_temperature( float * temperature )
- reads temperature measurement registers and converts raw temperature data to get die temperature in [deg C].uint8_t gyro5_get_axes( float * x_axis, float * y_axis, float * z_axis )
- reads axes measurement registers and converts raw axes measurement data to get gyroscope data in [deg/s].
Example Description
The application is composed of three sections :
- System Initialization - Initializes GPIO pins, I2C and LOG modules.
- Application Initialization - Initializes I2C driver and the device.
- Application Task - Checks data ready INT, gets temperature and axes data and LOGs those values.
void applicationTask( ) { data_ready_flag = gyro5_interrupt_status( _GYRO5_INT_DATA_RDY ); if (data_ready_flag == 1) { gyro5_get_temperature( &temperature_value ); gyro5_get_axes( &x_axis_value, &y_axis_value, &z_axis_value ); mikrobus_logWrite( " ", _LOG_LINE ); FloatToStr( x_axis_value, text ); gyro5_floatCut( ); mikrobus_logWrite( "> X axis = ", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_TEXT ); mikrobus_logWrite( degrees_per_second, _LOG_LINE ); FloatToStr( y_axis_value, text ); gyro5_floatCut( ); mikrobus_logWrite( "> Y axis = ", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_TEXT ); mikrobus_logWrite( degrees_per_second, _LOG_LINE ); FloatToStr( z_axis_value, text ); gyro5_floatCut( ); mikrobus_logWrite( "> Z axis = ", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_TEXT ); mikrobus_logWrite( degrees_per_second, _LOG_LINE ); FloatToStr( temperature_value, text ); gyro5_floatCut( ); mikrobus_logWrite( "> Temperature = ", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_TEXT ); mikrobus_logWrite( degrees_celsius, _LOG_LINE ); } Delay_ms(300); }
void applicationTask( ) { data_ready_flag = gyro5_interrupt_status( _GYRO5_INT_DATA_RDY ); if (data_ready_flag == 1) { gyro5_get_temperature( &temperature_value ); gyro5_get_axes( &x_axis_value, &y_axis_value, &z_axis_value ); mikrobus_logWrite( " ", _LOG_LINE ); FloatToStr( x_axis_value, text ); gyro5_floatCut( ); mikrobus_logWrite( "> X axis = ", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_TEXT ); mikrobus_logWrite( degrees_per_second, _LOG_LINE ); FloatToStr( y_axis_value, text ); gyro5_floatCut( ); mikrobus_logWrite( "> Y axis = ", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_TEXT ); mikrobus_logWrite( degrees_per_second, _LOG_LINE ); FloatToStr( z_axis_value, text ); gyro5_floatCut( ); mikrobus_logWrite( "> Z axis = ", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_TEXT ); mikrobus_logWrite( degrees_per_second, _LOG_LINE ); FloatToStr( temperature_value, text ); gyro5_floatCut( ); mikrobus_logWrite( "> Temperature = ", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_TEXT ); mikrobus_logWrite( degrees_celsius, _LOG_LINE ); } Delay_ms(300); }
Additional Functions :
- gyro5_floatCut() - Rounds float number converted to string to 2 decimals.
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- SPI
- I2C
- UART
- Conversions
Additional Notes and Information
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
MIKROSDK
The Gyro 5 Click Board™ is supported with mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
Software Support
We provide a library for the Gyro 5 Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
Library contains function for getting INT pin state Library contains function for setting CS pin state Library contains function for getting register values Library contains function for setting register values Library contains function for device initialization Library contains function for getting temperature value Library contains function for getting axes values Library contains function for software reset Library contains functions for setting power mode and full scale range
Key Functions
uint8_t gyro5_initialize( void )
- initializes the device.uint8_t gyro5_get_temperature( float * temperature )
- reads temperature measurement registers and converts raw temperature data to get die temperature in [deg C].uint8_t gyro5_get_axes( float * x_axis, float * y_axis, float * z_axis )
- reads axes measurement registers and converts raw axes measurement data to get gyroscope data in [deg/s].
Example Description
The application is composed of three sections :
- System Initialization - Initializes GPIO pins, I2C and LOG modules.
- Application Initialization - Initializes I2C driver and the device.
- Application Task - Checks data ready INT, gets temperature and axes data and LOGs those values.
void applicationTask( ) { data_ready_flag = gyro5_interrupt_status( _GYRO5_INT_DATA_RDY ); if (data_ready_flag == 1) { gyro5_get_temperature( &temperature_value ); gyro5_get_axes( &x_axis_value, &y_axis_value, &z_axis_value ); mikrobus_logWrite( " ", _LOG_LINE ); FloatToStr( x_axis_value, text ); gyro5_floatCut( ); mikrobus_logWrite( "> X axis = ", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_TEXT ); mikrobus_logWrite( degrees_per_second, _LOG_LINE ); FloatToStr( y_axis_value, text ); gyro5_floatCut( ); mikrobus_logWrite( "> Y axis = ", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_TEXT ); mikrobus_logWrite( degrees_per_second, _LOG_LINE ); FloatToStr( z_axis_value, text ); gyro5_floatCut( ); mikrobus_logWrite( "> Z axis = ", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_TEXT ); mikrobus_logWrite( degrees_per_second, _LOG_LINE ); FloatToStr( temperature_value, text ); gyro5_floatCut( ); mikrobus_logWrite( "> Temperature = ", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_TEXT ); mikrobus_logWrite( degrees_celsius, _LOG_LINE ); } Delay_ms(300); }
void applicationTask( ) { data_ready_flag = gyro5_interrupt_status( _GYRO5_INT_DATA_RDY ); if (data_ready_flag == 1) { gyro5_get_temperature( &temperature_value ); gyro5_get_axes( &x_axis_value, &y_axis_value, &z_axis_value ); mikrobus_logWrite( " ", _LOG_LINE ); FloatToStr( x_axis_value, text ); gyro5_floatCut( ); mikrobus_logWrite( "> X axis = ", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_TEXT ); mikrobus_logWrite( degrees_per_second, _LOG_LINE ); FloatToStr( y_axis_value, text ); gyro5_floatCut( ); mikrobus_logWrite( "> Y axis = ", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_TEXT ); mikrobus_logWrite( degrees_per_second, _LOG_LINE ); FloatToStr( z_axis_value, text ); gyro5_floatCut( ); mikrobus_logWrite( "> Z axis = ", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_TEXT ); mikrobus_logWrite( degrees_per_second, _LOG_LINE ); FloatToStr( temperature_value, text ); gyro5_floatCut( ); mikrobus_logWrite( "> Temperature = ", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_TEXT ); mikrobus_logWrite( degrees_celsius, _LOG_LINE ); } Delay_ms(300); }
Additional Functions :
- gyro5_floatCut() - Rounds float number converted to string to 2 decimals.
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- SPI
- I2C
- UART
- Conversions
Additional Notes and Information
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
MIKROSDK
The Gyro 5 Click Board™ is supported with mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.