Go Down

Topic: Connect 3 accelerometers to Arduino Uno (Read 2301 times) previous topic - next topic

Redy029

Hi!

I'm new with Arduino, and searched a lot on the internet, but I didn't find the answer.
Is it possible to connect 3 analog or digital accelerometers to Arduino Uno. If not, which Arduino panel can I achieve this. I need data from all 3 accelerometers at the same time. I would like to use 3 piece from this ADXL345 accelerometer (http://www.wide.hk/img/ADXL345_2.JPG). Here is the wiring diagram (http://www.wide.hk/img/ADXL345_4.JPG) which I found. Can I wire the other 2 like this?

This is the description of the accelerometer:
This new version adds 2 standoff holes as well as an extra decoupling capacitor. The ADXL345 is a small, thin, low power, 3-axis accelerometer with high resolution (13-bit) measurement at up to ±16 g. Digital output data is formatted as 16-bit twos complement and is accessible through either a SPI (3- or 4-wire) or I2C digital interface.

The ADXL345 is well suited to measures the static acceleration of gravity in tilt-sensing applications, as well as dynamic acceleration resulting from motion or shock. Its high resolution (4 mg/LSB) enables measurement of inclination changes less than 1.0°.

Features:

•2.0-3.6VDC Supply Voltage
•Ultra Low Power: 40uA in measurement mode, 0.1uA in standby@ 2.5V
•Tap/Double Tap Detection
•Free-Fall Detection
•SPI and I2C interfaces

Thx for the help guys.

Riva

Just to be certain here, you do realize the ADXL345 is a 3 axis device that reads X,Y & Z all on one chip? Do you really need 3 of these?

AWOL

You could connect three three-axis devices to a Mega, but because the Mega has only one ADC, the update rate would be one third the rate for a single three-axis accelerometer.
Digital devices are normally I2C, and if you can specify a different bus address for each device, then you can attach more than one.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Redy029


Just to be certain here, you do realize the ADXL345 is a 3 axis device that reads X,Y & Z all on one chip? Do you really need 3 of these?


Yes, I know that. I need the tree axis acceleometers, because I want to recognize finger guestures in the space, so I need to read the data of all 3 axis.

dhenry

What others are telling you is that adxl345 is a 3 axis accelerometer - it tells you acceleration on 3 axis, from 1 adxl345.


Riva

#5
Nov 09, 2012, 02:35 pm Last Edit: Nov 09, 2012, 02:51 pm by Riva Reason: 1


Just to be certain here, you do realize the ADXL345 is a 3 axis device that reads X,Y & Z all on one chip? Do you really need 3 of these?


Yes, I know that. I need the tree axis acceleometers, because I want to recognize finger guestures in the space, so I need to read the data of all 3 axis.

My apology but I obviously did not word my question very well and am having difficulty understanding your answer to it. You want to wire 3x 3 axis accelerometers (9 axis in total) to one arduino, maybe one per finger?
Datasheet says device can use SPI or I2C comunications but it can only have one of two fixed I2C addresses. Theoretically you could connect 3x devices using SPI or 2x I2C & 1x SPI.

Redy029

#6
Nov 09, 2012, 03:45 pm Last Edit: Nov 09, 2012, 03:51 pm by Redy029 Reason: 1
Quote

My apology but I obviously did not word my question very well and am having difficulty understanding your answer to it. You want to wire 3x 3 axis accelerometers (9 axis in total) to one arduino, maybe one per finger?
Datasheet says device can use SPI or I2C comunications but it can only have one of two fixed I2C addresses. Theoretically you could connect 3x devices using SPI or 2x I2C & 1x SPI.


Yes exactly, I want to wire 3x 3 axis accelerometers, one per finger. So can I connect 3 ADXL345 to Arduino Uno, via SPI? Or I can do it only with the Mega?

dhenry

The chip supports SPI and i2c so you can hang them together with 2+ wires.

AWOL

...however there are only 2 I2C addresses available.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Redy029


...however there are only 2 I2C addresses available.


And why is this problem? Sorry, but I don't know about these things, because I've never worked with accelerometers and microcontrolers yet.

PeterH


And why is this problem?


You need to assign a unique address to each device. If you have more devices than addresses, obviously you can't.
I only provide help via the forum - please do not contact me for private consultancy.

Redy029

I found this wiring diagram (http://tronixstuff.files.wordpress.com/2011/05/sspiss2.jpg). Is is possible to connect 3 accelerometers like this, and choose between them with the 3 separated SS line?

dhenry

It is possible to connect as many as adxl345 sensors together as your money allows, all explained in the datasheet.


JD3

If you are attaching the sensors to a glove, you may want to consider flex sensors.
Maybe use one 3 axis accelerometer for hand position, and 3 or four flex sensors for the fingers.

The accelerometer could be I2C and the flex sensors wired to the analog pins.

Something like this?     http://www.adafruit.com/products/182

They were used in the Nintendo power glove.
That little black caterpillar you just stepped on will set you back a few bucks....

Redy029


If you are attaching the sensors to a glove, you may want to consider flex sensors.
Maybe use one 3 axis accelerometer for hand position, and 3 or four flex sensors for the fingers.

The accelerometer could be I2C and the flex sensors wired to the analog pins.

Something like this?     http://www.adafruit.com/products/182

They were used in the Nintendo power glove.


Thank you for the great idea, I will read and think about these things.  ;)

Go Up