ADIS16209 Interface on Arduino Uno

Hi,

i got a problem on getting data of the accelerometer sensor ADIS16209 with my Arduino uno.

I just need the data to send it via uart seriell to my raspberry pi.

I searched for some examples but found just other sensors but didn't find the right one, which could help und transform the code for my project.

The sensor is more expensive and so the examples are very rare...:frowning:

I have to connect the sensor to arduino via SPI. Tried some different codes. No one works correctly.

So i would really appreciate your help for connecting the accelero to the arduino and facing the data at the seriell display.

Here i got the pins ..

the important ones are the DOUT, DIN, SCLK, Chip Select i don't need cause of just one sensor, Reset, GND and VDD..But how i have to connect it and how i have to write the code to get what i need. I'm helpless..:frowning:

Help is really needed and apprecciated

I searched for some examples but found just other sensors but didn't find the right one, which could help und transform the code for my project.

Have you tried this code?

the important ones are the DOUT, DIN, SCLK, Chip Select i don't need cause of just one sensor, Reset, GND and VDD..But how i have to connect it and how i have to write the code to get what i need

Wrong, you need Chip Select even if you have just one chip. DOUT goes to MISO, DIN to MOSI, SCLK to SCLK and CS to any pin you like. RST to any pin, same for DR, GND to GND and VDD to 3V3.

Attention: if you have a 5V Arduino (you didn't mention the model, so we expect an UNO) you must use a level converter for all SPI signals, otherwise you might fry your chip (the datasheet doesn't explicitly specify this but in my experience this is a must).

The above example code use RST=4, DR=2, CS=7.

Thank you for your fast answer.

I got an UNO and a NANO. Both coming with 3,3v.

I tried that Code and got problems in reading data and facing it.
But i will try it again.

What is meant by DR? Searched for it when i tried the Code. But didnt find something expect "Dr. Arduino".. :roll_eyes:

I got an UNO and a NANO. Both coming with 3,3v.

Wrong, both are running on 5V. The fact that they have a pin providing 3V3 doesn't mean that the processor is using that voltage.

What is meant by DR?

The author of the library quotes this as a pin description. I guess it means data ready, it's connected to the DIO0 pin of the chip.

Control Registers
MSC_CTRL: 0
SENS_AVG: 0
SMPL_PRD: 0
PROD_ID: 0
STATUS: 0

Data Registers
XACCL: 0.00
YACCL: 0.00

XINCL: 0.00
YINCL: 0.00
ROT: 0.00

TEMP: 625.66
Supply: 0.00

now i get this output...what could be wrong? checked pins several times..

now i get this output...what could be wrong? checked pins several times..

Looks like a wiring problem. Did you use the exact example code (absolutely no modifications) of the linked library? Do you also use the development board from Analog Devices? If not, post schematics of your board and a wiring diagram.

I got that ADIS16209:

Its an evaluation board.
I took the same wiring like he got on his pictures. and it fits with the datasheet pins i found in the internet.

Now i get this output:
Control Registers
MSC_CTRL: FF
SENS_AVG: FF
SMPL_PRD: FF
PROD_ID: -1
STATUS: FFFFFFFF

Data Registers
XACCL: 0.00
YACCL: 0.00

XINCL: 0.00
YINCL: 0.00
ROT: 0.00

TEMP: -1298.99
Supply: 5.00

edit. I use exactly the same code .. just changed the colours for better overview

I swear i use 3,3v ... dont know why it says 5v and i hope i doesnt destroyed it ..

edit2. tested it while using 3,3v pin of my nano with all other pins used by uno and it shows still 5v supply...

I swear i use 3,3v ... dont know why it says 5v and i hope i doesnt destroyed it ..

Because if the MCU reads only 1 bits, the result will be 5.0V. So your device is still not connected correctly or already damaged because you don't use a level converter. The UNO uses 5V for all it's pins (including the SPI interface).

Now i get this output:

What did you change that the output changed?

I ordered a Level converter. Shipped today so i will get it tomorrow ..

But the 3,3v pin .. if i use this i still got 5v???
Thats strange…

I tested the volts with my multimeter and got 3,24v ..

where gets the sensor the 5v? So if i have to use the level converter where i have to put it on?

I forget one pin on the second pinline on the sensor (J2) .. he took the 6th pin .. but i dont know why its needed .. in the datasheet its not declared what it can be used for..

But the 3,3v pin .. if i use this i still got 5v???
Thats strange…

No, read the datasheet and the code. If the chip is not responding correctly (signal MISO pulled high) the library will tell you the source voltage is 5V.

where gets the sensor the 5v? So if i have to use the level converter where i have to put it on?

No, that's not the reason, the reason is that the sensor runs on 3V3 and the processor runs on 5V.

I forget one pin on the second pinline on the sensor (J2) .. he took the 6th pin .. but i dont know why its needed .. in the datasheet its not declared what it can be used for..

No, he did not connect anything to pin 6, the only signal from J2 is DR and that connects to pin 2.

pylon:
No, read the datasheet and the code. If the chip is not responding correctly (signal MISO pulled high) the library will tell you the source voltage is 5V.

Still got:
Control Registers
MSC_CTRL: FF
SENS_AVG: FF
SMPL_PRD: FF
PROD_ID: -1
STATUS: FFFFFFFF

Data Registers
XACCL: 0.00
YACCL: 0.00

XINCL: 0.00
YINCL: 0.00
ROT: 0.00

TEMP: -1298.99
Supply: 5.00

pylon:
No, that's not the reason, the reason is that the sensor runs on 3V3 and the processor runs on 5V.

SO just for my Knowledge an extra levelshifter is integrated between processor and sensor?

pylon:
No, he did not connect anything to pin 6, the only signal from J2 is DR and that connects to pin 2.

At the following picture of the original project you can see another cable at pin 6 of J2 DIO1. The orange cable is connected to pin 10 of the uno.

And know i dont know what i can still Change to get it work correctly..
I will draw my pin Connections with fritzing know and will check it again

That's what i got so far.
If i put J2 Pin 6 off nothing is changing.

Any ideas? :frowning:

Think i found the Problem now. youre Right. The Prozessor is running on 5v. few of the used Pins also usin 5v.

Thats a link of the guy who has written the example Code.
He is changing some parts to get 3,3v Overall.

I will Change my Project and will bring all Connections from sensor with a breadboard to the Arduino with a Level shifter. will see if it works.

At the following picture of the original project you can see another cable at pin 6 of J2 DIO1. The orange cable is connected to pin 10 of the uno.

Neither the documentation of the evaluation board nor the example source code mention this connection. I don't think it is necessary.

That's what i got so far.
If i put J2 Pin 6 off nothing is changing.

J2 the white wire is connected to signal 1 and not 12 as it should.

Hi
Did you have result?
I have some problem with adis16209