Q:
How do I connect the ADIS16364 to my Arduino processor system?
---------------------------------------------------------------------------------------------
A:
This software package is an example of how to interface an ADIS16364 iSensor with an Arduino, and plot the data with a simple python program. This project can be used as a whole package, or you can use it to pick and choose code for things such as SPI communication, two's complement conversion, memory map for ADIS16364, python plotting, python serial communication, and much more.
The code project can be found on git hub:
https://github.com/agleason6/ADIS16364_example.git
From there you can download a .zip file, or clone the repository, or you can download the stable version from this FAQ page. Note that if you download the .zip file from github, you will have to change the name of the directory to just "ADIS16364_example"; github adds extra text to the directory name.
What you'll need
Connections
Using jumper wires, make connections from the ADIS16364 breakout board to the Arduino
as shown below:
Arduino Uno Connections:
CS (J1-3) - to digital pin 10 (SS)
SCLK (J1-2) - to digital pin 13 (SCK)
DOUT (J1-4) - to digital pin 12 (MISO)
DIN (J1-6) - to digital pin 11 (MOSI)
VCC (J1-12) - to 5V
GND (J1-9) - to GND
Arduino Mega 2560 Connections:
CS (J1-3) - to digital pin 53 (SS)
SCLK (J1-2) - to digital pin 52 (SCK)
DOUT (J1-4) - to digital pin 50 (MISO)
DIN (J1-6) - to digital pin 51 (MOSI)
See ADIS16364 datasheet Rev D, Figure 18, pg 17 for illustration of J1 and J2 connectors
http://www.analog.com/static/imported-files/data_sheets/ADIS16364.pdf
How to use
Once you've installed everything above, and made all the proper connections, it's time to
program the Arduino. First open up the ADIS164364.ino file with the Arduino IDE.
Press verify, and upload (after which you have properly setup the IDE with serial port, and device).
Now close the IDE, because you may have issues with the python plotting if you have both
programs trying to access the same serial port.
Plotting data with Python
usage: plot_data.py [-h] -p PORT -r RATE [-b] [-n NUM] [-s]
optional arguments:
-h, --help show this help message and exit
-p PORT, --port PORT Serial port, ie /dev/ttyACMX on Linux, or COMX on Windows
-r RATE, --rate RATE Baud rate
-b, --bar Show Bargraphs Instead of line plots
-n NUM, --num NUM Window width, default is 100 points
-s, --smooth Make lines look smoother
To run on Windows (COMX being the COM port that your Arduino is connected to):
python plot_data.py -p COMX -r 9600
To run on Linux:
python plot_data.py -p /dev/ttyACMX -r 9600
if you don't have udev setup for your Arduino, and you get permission issues, try running it as root:
sudo python plot_data.py -p /dev/ttyACMX -r 9600
Note: plot_data.py samples data as fast as python can plot, so it will run significantly slower than what the part is capable of. Please do not use this script to gauge the performance of the part. If you want to analyze performance, please checkout ADISUSB.
http://www.analog.com/en/mems-sensors/mems-inertial-sensors/adis16364/products/ADISUSB/eb.html
Enjoy,
agleason
Hi mark,
Thank you for your kind note.
I am actually trying to come out of this problem. So, trying hard to solve it.
I am presently using TMS320F28335-TI starer kit for signal processing as MCU.
Do you have any experience in this field?
I have got one example file from a website which is written for the same MCU but for a different isensor ADIS16350.
I am presently facing problem to configure SPI.
Please help me in this regard in the form of any suggestions.
Thank you.
Regards,
Irfan.
Hello Irfan,
We do not provide code development services for these sensors. agleason was kind enough to share this with the community when he was working on this but he is not longer supporting these products. I suspect that the issue is related to the development tools but I am not well versed in these matters. Perhaps it would make sense to start with a project that is working and then copy the ADIS16364 code into the working project, to see if you can make it work this way. I will be glad to help with any questions you have on how the interface works while you try this.
Best,
NevadaMark
Hi agleason,
Nice to see your code.
Can you please help me in getting the similar code run for ADIS16407? (ADIS16405/PCBZ).
I have an arduino Mega 2560.
@Mark: Can you also guide me if it is possible to re-frame this code and re-work it for ADIS16407?
Please help me.
Thanks for your enduring support.
This is great! We really appreciate this contribution! For those who want to duplicate this setup, ADIS16364/PCBZ is the correct part number for the "ADIS16364 with breakout board" reference. The following web site has pictures and documentation for this device:
http://www.analog.com/en/mems-sensors/mems-inertial-sensors/adis16364/products/EVAL-ADIS16364/eb.html