Inputting and Analyzing LSM9DS0 Accelerometer sensor data into MATLAB

조회 수: 5 (최근 30일)
Ammar Babikir
Ammar Babikir 2016년 9월 17일
편집: Ammar Babikir 2016년 9월 17일
Hi, I'm very new to MATLAB (just downloaded a trial version of it today). I am using it for a personal project.
I am building a robot that travels around a standard-sized table and avoids edges (avoids falling off the table). I'm using a variety of sensors.
One of the sensors I'm using is a 3-axis accelerometer that I ordered from adafruit: https://learn.adafruit.com/adafruit-lsm9ds0-accelerometer-gyro-magnetometer-9-dof-breakouts/overview
What I am specifically trying to do is use the acceleration measurements (X,Y,Z) from the sensor and analyze them into MATLAB to figure out when the robot is turning left or right around the table (Basically find out a way to output a graph of some sort showing how it changes in real time when the robot turns left or right). I attached a picture showing how the accelerometer is wired up (IMG_4362) The way I test it is by grabbing the breadboard and turning it left and right as if the sensor is fixed on top of the robot that I am building.
The directions for the "X" and "Y" coordinates are labelled on the accelerometer so I am able to move the accelerometer in those specific directions to analyze how the car would move.
Here is a sample of the data when I upload the code onto the arduino UNO while moving the sensor around:
Accel X: -1.01 Y: -0.00 Z: 9.34 m/s^2
Magn. X: 0.09 Y: -0.42 Z: 0.86 gauss
Gyro X: -1.92 Y: -0.82 Z: -3.05 dps
Temp: 27.00 *C
**********************
Accel X: -1.04 Y: 0.03 Z: 9.43 m/s^2
Magn. X: 0.09 Y: -0.42 Z: 0.86 gauss
Gyro X: -1.95 Y: -1.05 Z: -2.97 dps
Temp: 26.87 *C
**********************
I am new to MATLAB but I am not new to programming. I have some experience with programming in C and C++.
How do you think I should start? Are there specific applications on MATLAB that help me accomplish this? I have a student trial just for this project that I am doing.
Appreciate your insight.
Thanks.
  댓글 수: 3
Star Strider
Star Strider 2016년 9월 17일
I’m not clear on what you’re data are. I assume you’re going to get streams of all of those data for your various sensors, so you need to be able to acquire your data and deal with it in real time, or near real time. You need to have some background in signal processing (to filter out your sensor noise) and control theory (to figure out where your car is and where it’s going). You probably have to write your own routines, (I’ve not looked on the File Exchange, the Blogs, or the documentation for the Robotics Systems Toolbox.)
These are not trivial, but they’re fun (if your experiences parallel mine)!
Ammar Babikir
Ammar Babikir 2016년 9월 17일
편집: Ammar Babikir 2016년 9월 17일
My data from the accelerometer sensor is the output I get when I upload the code onto the arduino uno that I am using. I posted a few lines of the output in my original post:
Accel X: -1.01 Y: -0.00 Z: 9.34 m/s^2 Magn. X: 0.09 Y: -0.42 Z: 0.86 gauss Gyro X: -1.92 Y: -0.82 Z: -3.05 dps Temp: 27.00 C ********************* Accel X: -1.04 Y: 0.03 Z: 9.43 m/s^2 Magn. X: 0.09 Y: -0.42 Z: 0.86 gauss Gyro X: -1.95 Y: -1.05 Z: -2.97 dps Temp: 26.87 C *********************
I am trying to analyze this data for just this accelerometer on the breadboard by itself (separate from everything else).

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Support Package for Arduino Hardware에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by