How do I connect the ADIS16364 to my Arduino processor system?
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:
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
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
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]
-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.
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.