MPU 6050 time stamp

Hi everybody,

I am new to Arduino and programming.

I would like to save Accel, Gyro and Temp data of mpu-6050 together with two other sensors(proximty and IR sensor to calculate rpm) on sd card. I need to save my data with at least 20 samples per second for 2 weeks and I need to write real time for each sample.

I am using Arduino Uno board with XD-204 data logging shield to save data and use RTC of that.
My problems:

  1. When I am running the code (only for mpu6050) I have something around 100 samples per second. But when I start to save data on sd card, I receive only around 20 samples, and by adding LCD to the code, it reduces to 8 samples per second.

  2. My timing stamps is not with equal distances and after some seconds I have one less sample in a second.

  3. I need to write timestamps on milliseconds but RTC gives me on seconds.

I would be thankful if someone helps me. Maybe I need some other boards or some tricks in code in order to solve that.

Do you think that it might help if you posted your code ...

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom.. :slight_smile: