HU
Offline
Newbie
Karma: 0
Posts: 9
|
 |
« on: November 09, 2012, 07:18:05 am » |
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
Edison Member
Karma: 23
Posts: 1319
|
 |
« Reply #1 on: November 09, 2012, 07:22:56 am » |
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
|
|
|
|
|
Global Moderator
UK
Offline
Brattain Member
Karma: 138
Posts: 19067
I don't think you connected the grounds, Dave.
|
 |
« Reply #2 on: November 09, 2012, 07:26:06 am » |
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.
|
|
|
|
HU
Offline
Newbie
Karma: 0
Posts: 9
|
 |
« Reply #3 on: November 09, 2012, 07:51:43 am » |
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
Edison Member
Karma: 114
Posts: 2205
|
 |
« Reply #4 on: November 09, 2012, 08:34:26 am » |
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
Edison Member
Karma: 23
Posts: 1319
|
 |
« Reply #5 on: November 09, 2012, 08:35:22 am » |
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
|
|
|
|
|
HU
Offline
Newbie
Karma: 0
Posts: 9
|
 |
« Reply #6 on: November 09, 2012, 09:45:26 am » |
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
Edison Member
Karma: 114
Posts: 2205
|
 |
« Reply #7 on: November 09, 2012, 09:57:17 am » |
The chip supports SPI and i2c so you can hang them together with 2+ wires.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
UK
Offline
Brattain Member
Karma: 138
Posts: 19067
I don't think you connected the grounds, Dave.
|
 |
« Reply #8 on: November 09, 2012, 09:59:02 am » |
...however there are only 2 I2C addresses available.
|
|
|
|
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
HU
Offline
Newbie
Karma: 0
Posts: 9
|
 |
« Reply #9 on: November 09, 2012, 11:40:09 am » |
...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
Tesla Member
Karma: 89
Posts: 6386
-
|
 |
« Reply #10 on: November 09, 2012, 03:54:51 pm » |
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
|
|
|
|
|
|
|
Offline
Edison Member
Karma: 114
Posts: 2205
|
 |
« Reply #12 on: November 12, 2012, 08:00:45 am » |
It is possible to connect as many as adxl345 sensors together as your money allows, all explained in the datasheet.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 3
Posts: 34
|
 |
« Reply #13 on: November 12, 2012, 08:53:44 am » |
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 I 2C and the flex sensors wired to the analog pins. Something like this? http://www.adafruit.com/products/182They 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
Newbie
Karma: 0
Posts: 9
|
 |
« Reply #14 on: November 14, 2012, 01:38:14 am » |
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. 
|
|
|
|
|
Logged
|
|
|
|
|
|