25Views2Replies

Author Options:

Max number of accelerometers Answered

Fairly new to arduino. Using it for a postgrad research experiment.

Not sure if my googling is just shitty or if it can’t be done. I’m trying to do measurements of flutter for a flutter suppression system in a wing, and because of this I need to make a high fidelity computer model of the wing using accelerometers. I should be able to get away with six accelerometers and three servos, however from what I can see the ADXL345 only has two independent slave addresses (0x53 and 0x1D) so then I would need at least 3 boards (MEGA2560 currently). In this case I’m worried about bottle necking my control system. So first question is, is two the max number of accelerometers I can use? Second is, are there any better alternatives to arduino for this? Three, if I do need to use multiple boards, is there a tutorial for an easy way I can get them to talk to one another without going through a pc? Otherwise what’s a realistic delay between receiving the accelerometers data, analysing it on a PC and the transmitting a command to the three servos on a different board?

Discussions

0
None
Josh_Blackburn

26 days ago

To answer your first question, yes, if there are only two possible addresses, then you can only use two sensors on a single I2C bus. There are a couple of ways to get around this, you could simply buy a board with more than one hardware I2C bus, it would need to have three buses since each bus can handle two sensors. Or you could use the hardware I2C bus on the MEGA and create two additional software I2C buses, I don't recommend this as it can be very complicated and not super reliable. Or you could get an I2C multiplexer, which would essentially turn your one hardware I2C bus into several buses.
To answer your second question, I would recommend using a single board computer like a Raspberry Pi instead of an Arduino. An Arduino is simply not powerful enough to run decent processing algorithms for an accelerometer, much less six simultaneously, meaning you'd have to send the raw data to a PC for processing, then back to the Arduino to control the servos, which obviously induces some significant delays. You would also have to use either multiple boards or an I2C multiplexer, both of which induce further delays. A Raspberry Pi, on the other hand, can run multiple I2C buses simultaneously, so you could read all the accelerometers directly, and it is powerful enough to run pretty much any processing algorithm you want.
To answer your third question, the Arduinos could easily talk to each other directly via Serial or I2C, there are plenty of tutorials out there on both of these techniques. However it would be faster to have them all talk to the computer directly, as any additional communication causes delays. That being said, using three separate boards would be quite inefficient and unnecessary and I would not recommend it.
The cheapest way to do it would be to use a single Arduino and an I2C multiplexer.
The best way, in my opinion, would be to use a Raspberry Pi or similar computer to talk to the sensors directly and perform the processing natively.
Hope this helps

0
None
thedisaster

26 days ago

of accelerometers I can use? Second is, are there any better alternatives to arduino for this? Three, if I do need to use multiple boards, is there a tutorial for an easy way I can get them to talk to one another without goin irs.gov g through a pc? Otherwise what’s a realistic delay between receiving the accelerometers data, analysing it on a PC and the transmitting a command to the three servos on a different board?t fedloan

this para helped me alot!!