YUN + 9DOF IMU

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
andreadanzi
 
Posts: 6
Joined: Mon Jul 14, 2014 1:58 am

YUN + 9DOF IMU

Post by andreadanzi »

I'm loggin 3D acceleration with the 9-DOF IMU Breakout on the YUN's SD card with the support of your LSM303 library (Adafruit_LSM303_U).
I modified the Adafruit_LSM303_Accel_Unified::begin method to increase the data rate: CTRL_REG1_A value changed from 0x57 (Normal mode 100Hz) to 0x9f (Low-power mode 5376 Hz), and I increased the full scale from defaut +-2g to +-16g: CTRL_REG4_A set to 0x30 ( FS = 11, HR = 0).
Reading the logged data I see less than 100 samples per seconds, so my question is: can I reach a sampling rate of 400 Hz (400 samples per seconds stored in the file)?
What are the parameters that drive the number of samples per second I can store in a file?
How can I improve the sampling rate?

Thank's in advance ...you're great!

User avatar
Franklin97355
 
Posts: 23940
Joined: Mon Apr 21, 2008 2:33 pm

Re: YUN + 9DOF IMU

Post by Franklin97355 »

If you check you will probably find the bottleneck is writing to the SD card not the sensor readings.

User avatar
bhatadb
 
Posts: 17
Joined: Thu May 01, 2014 3:46 pm

Re: YUN + 9DOF IMU

Post by bhatadb »

For the LSM303, is there a factory setting for the scale of the sensor? If yes, what is it, and how can I see it, or change it?

Is that something I can see in the header file?

Thanks,
Abhi

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: YUN + 9DOF IMU

Post by adafruit_support_mike »

There are several parameters you can set.

The datasheet describes what's available and what the different register settings do: http://www.adafruit.com/datasheets/LSM303DLHC.PDF

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”