The EVAL-ADXRS290-PMDZ is a simple Pmod form-factor evaluation board for the ADXRS290, a high-performance MEMS pitch-and-roll (dual-axis in-plane) angular rate sensor (gyroscope) designed for use in stabilization applications.
The solution senses and digitizes the X-axis and Y-axis (also called roll and pitch) angular rates, producing a positive reading for clockwise rotation about the x-axis and y-axis.
The ADXRS290 provides an output full-scale range of ±100°/s with a sensitivity of 200 LSB/°/s. Its resonating disk sensor structure enables angular rate measurement about the axes normal to the sides of the package around an in-plane axis. Angular rate data is formatted as a 16-bit two's complement and is accessible through an SPI digital interface. The ADXRS290 exhibits a low noise floor of 0.004°/s/√Hz and features programmable high-pass and lowpass filters.
The ADXRS290 communicates via 4-wire SPI and operates as a peripheral (slave) device, with a maximum clock frequency of 12MHz.
The Digital communication on the EVAL-ADXRS290-PMDZ is accomplished using a standard expanded SPI PMOD port.
Connector P1 | |
---|---|
Description | Pin(s) |
SS | 1 |
MOSI | 2 |
MISO | 3 |
SCLK | 4 |
GND | 5, 11 |
IOVDD | 6, 12 |
SYNC | 7 |
Two example device driver solutions are provided for controling the EVAL-ADXRS290-PMDZ PMOD using the no-OS device driver on the EVAL-ADICUP3029 platform and Linux device driver on the Raspberry Pi platform.
The Linux driver uses the Industrial Input/Output (IIO) framework, greatly simplifying the development of applicaiton code via the cross-platform Libiio library, which is written in C and includes bindings for Python, MATLAB, C#, and other languages. Application code can run directly on the platform board, communicating with the device over the local bakend, or from a remote host over the network or USB backends.
The ADICUP3029 example application uses the ADXRS290 no-OS driver, and emulates the Linux IIO framework through the tinyiiod daemon library. The application communicates with the host computer via the serial backend, over a USB-UART physical connection. This facilitates rapid application development on a host computer, independent from embedded code development.
Similarly, utility software (iio_info, IIO Oscilloscope, PyADI-IIO, etc.) can be used for both the EVAL-ADXRS290-PMDZ on Raspberry PI and on ADICUP3029
The EVAL-ADXRS290-PMDZ can be used with ADICUP3029.
The following is a list of items needed in order to replicate this demo. Hardware:
Software:
To build the project from source, follow the instructions in the no-os wiki.
The EVAL-ADXRS290-PMDZ can be used with a Raspberry Pi.
The following is a list of items needed in order to replicate this demo.
In order to control the EVAL-ADXRS290-PMDZ from the Raspberry Pi, you will need to install ADI Kuiper Linux on an SD card. Complete instructions, including where to download the SD card image, how to write it to the SD card, and how to configure the system are provided at Analog Devices Kuiper Linux.
Write the image and follow the system configuration procedure.
Follow the Hardware Configuration procedure under Preparing the Image: Raspberry Pi in the Analog Devices Kuiper Linux page, substituting the following lines in config.txt:
dtoverlay=rpi-adxrs290
To set up the circuit for evaluation, consider the following steps:
To be able to connect your device, the software must be able to create a context. The context creation in the software depends on the backend used to connect to the device as well as the platform where the EVAL-ADXRS290-PMDZ is attached. Two platforms are currently supported for the ADXRS290: Raspberry Pi using the ADI Kuiper Linux and the ADICUP3029 running the ADXRS290 IIO demo project. The user needs to supply a URI which will be used in the context creation.
The iio_info command is a part of the libIIO package that reports all IIO attributes. Make sure that you have the libIIO package installed on your machine. Upon installation, simply enter the command on the terminal line to access it.
iio_info
iio_info -u ip:
Example:
iio_info -u serial:
Examples:
There are different commands that can be used to manage the device being used. The iio_attr command reads and writes IIO attributes.
analog@analog:~$ iio_attr [OPTION]...
Example:
analog@analog:~$ iio_attr -a -C
The iio_reg command reads or writes SPI or I2C registers in an IIO device. This is generally not needed for end applications, but can be useful in debugging drivers. Note that you need to specify a context using the -u qualifier when you are not directly accessing the device via RPI or when you are using the ADICUP3029 platform.
analog@analog:~$ iio_reg -u[ ]
Example:
iio_reg -u ip:adxrs290 0x02
The Waveform panel, also known as the Capture window, displays the real-time waveform of ADXRS290's response.
PyADI-IIO is a python abstraction module for ADI hardware with IIO drivers to make them easier to use. This module provides device-specific APIs built on top of the current libIIO python bindings. These interfaces try to match the driver naming as much as possible without the need to understand the complexities of libIIO and IIO.
Install PyADI-IIO using one of the methods in PyADI-IIO.
The ADXRS290 example requires a number of packages to be installed before it can be used. To ensure that all required packages are present, we will be installing them in a virtual environment so that other python projects will not be affected by this added configuration. Make sure that virtualenv has been installed before proceeding.
D:/pyadi-iio>python -m venv adxrs290
Note that the last argument adxrs290 is just the name of the virtual environment to be created. It can be replaced by any other name or identifier that you prefer. In case the code above does not work, try:
D:/pyadi-iio>virtualenv adxrs290
D:/pyadi-iio>adxrs290/Scripts/activate
Upon activation of the virtual environment, enter the following commands:
(adxrs290) D:/pyadi-iio>pip install -r requirements.txt (adxrs290) D:/pyadi-iio>pip install -r examples/requirements_adiplot.txt (adxrs290) D:/pyadi-iio>python setup.py install
D:/pyadi-iio/examples>python adxrs290.py
Below is a copy of the python script:
adxrs290.py
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉
全部0条评论
快来发表一下你的评论吧 !