Pages: [1] 2   Go Down
Author Topic: Connect 3 accelerometers to Arduino Uno  (Read 1425 times)
0 Members and 1 Guest are viewing this topic.
HU
Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Norfolk UK
Offline Offline
Edison Member
*
Karma: 52
Posts: 2214
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Handle every stressful situation like a dog. If you can't eat it or hump it. Piss on it and walk away.

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 240
Posts: 24433
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

"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.

HU
Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Logged

Norfolk UK
Offline Offline
Edison Member
*
Karma: 52
Posts: 2214
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: November 09, 2012, 08:51:55 am by Riva » Logged

Handle every stressful situation like a dog. If you can't eat it or hump it. Piss on it and walk away.

HU
Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
« Last Edit: November 09, 2012, 09:51:55 am by Redy029 » Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 240
Posts: 24433
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

"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.

HU
Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

...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.
Logged

UK
Offline Offline
Shannon Member
****
Karma: 184
Posts: 11195
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

HU
Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Logged

Offline Offline
Newbie
*
Karma: 3
Posts: 34
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

That little black caterpillar you just stepped on will set you back a few bucks....

HU
Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.  smiley-wink
Logged

Pages: [1] 2   Go Up
Jump to: