Go Down

Topic: need to connect 5 adxl335's with leonardo (Read 748 times) previous topic - next topic

antweb

i am new to arduino. i am presently doing a college project. for that i need to connect 5 adxl335's to my leonardo.is that possible? if yes then how?
also i need to compare the values obtained from my sensors to standard values saved in a database. how can i do that?
urgent help required.
thank you.

dc42

#1
Feb 09, 2013, 11:49 am Last Edit: Feb 09, 2013, 12:07 pm by dc42 Reason: 1
That device has 3 analog outputs, so for 5 of them you need to read 15 different analog signals. The Leonardo has only 12 analog inputs, so you need another 3. The easiest approach is to add a CD4051 multiplexer, which lets you expand any one of those 12 inputs to 8 inputs.

Regarding standard values saved in a "database", if you want to do the comparison on the Arduino itself, then I suggest you store those standard values in EEPROM.

EDIT: it might be better to use ADXL345 instead, then you can read them all using the SPI bus. You'll need to use 15 of the 20 digital I/O pins for the CS signals. If this is too much you can use a demultplexer such as 74HC4515 to generate them from 4 pins instead
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

antweb

Thanks a lot for the response. It was really helpful. The problem is that only 335 was readily available in the shops nearby and I needed them urgently. Secondly I don't want to do comparisons on arduino. I want to do them with the database values only. Can I do them by saving values in csv format?

dc42

Sure, just write the value to the serial port with commas between the values, and put a newline after each complete set of values. Then write a program for the PC that reads the data and compares it with the database.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy