How can I connect Matlab to Accelerometers?
Afficher commentaires plus anciens
I would like to use my Matlab to read the outputs of accelerometers. Are there products available that would allow me to use my usb port along with a function command like wavread?
Thanks.
Dave
3 commentaires
Star Strider
le 15 Sep 2012
Unless your accelerometers have already saved the data they collected as .wav files, wavread won't work.
I have only used usb ports with a pulse-oximeter, configuring the usb port as a serial port object in core MATLAB. (I do not have the Instrument Control Toolbox.)
On a Windows 7 system, I plugged the device into the usb port, and had Windows find and install the driver for it. After that (and finding the online documentation for the usb interface the pulse oximeter used so I could configure MATLAB properly to communicate with it), it worked well. (It provided 4 channels of data. It took some experimenting to discover the data format, and then programming to edit and reshape the matrix every time I wanted to use the pulse oximeter. I could not analyse and display its data it in real time.)
After you've done all this with your accelerometers, it should be relatively easy to get data from them.
In any event, I suggest you do both MEX and online searches to see what others have done with MATLAB and your accelerometers. There might already be robust and reliable MATLAB code for them.
David Koenig
le 16 Sep 2012
Star Strider
le 16 Sep 2012
If I'd known that, I'd have suggested Acquire Data From an Accelerometer in the Data Acquisition Toolbox examples. ‘This example uses a ceramic shear accelerometer model 352C22 from PCB Piezotronics is used with 9.22 mV per Gravity.’ (The example and interface boards are listed as being current with respect to 2012b but likely also applies to more recent previous releases.)
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Data Acquisition Toolbox Supported Hardware dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!