Hi Guys. First post here, so let me know if I am missing something basic.
My current setup uses the pieces of hardware following (Please see attached schematic):
- BMA 180
- Arduino Uno
- 12v Solenoid
The idea of what I'm trying to accomplish is have the solenoid be activated by a push button and solenoid tap a surface and the vibrations are sensed by the accelerometer and analyzed by the Arduino Uno. I found that if the Arduino does this, then the data captured by the Arduino is incredibly slow. The data that should come out from the BMA180 should be @1200hz (8*10^-4 secs per sample) sample rate, but the data I captured was coming out 10ms increments(~100hz) when connected to Arduino software on PC. I believe this massive discrepancy is due to the serial interface between UNO and BMA180, and also the usb interface from UNO to Arduino software on my computer.
My questions are:
- Am I correct in thinking the discrepancy is due to the reasons stated above? If not then what is the true reason?
- How can I get the sampling rate to be as close as possible to the 1200hz that is specified by the BMA180? ....
- Since UNO only has 2kb of SRAM on the chip to hold data, I need to add an SD card to the circuit to hold the data dump from the BMA180 of about 32-64 kb so that I can use and manipulate the data obtained w/o a connection to the computer. However, SD card communicates via serial communication (I2C) which may be the reason for slow sampling rate, so I am no better off than I am now. How can I make the Arduino write to the SD card @1200hz+ via any means possible so that I have no loss in data acquisition by BMA180 AND storage capacity of SD card in my circuit?
- Not related to this post: Why does changing batteries that power my solenoid cause different readings from the BMA180 when the solenoid strike a surface being analyzed? What kind of portable power supply can I use to have a consistent strike force and therefore reading from BMA180?
Thanks.
Circuit for first prototype.pdf (35.8 KB)