Is there any way to change to frequency of data retrieval?

Inquiry and support for Freematics products
Post Reply
gdpwork
Posts: 15
Joined: Sat Jun 21, 2014 9:48 am

Is there any way to change to frequency of data retrieval?

Post by gdpwork »

Is there any way to change to frequency of data retrieval? I mean, If I want to get as much data as possible, like as frequent as possible for OBD, MEMS and GPS, How I can do it?
Thanks. Guillermo.
Ricardo
Posts: 8
Joined: Wed Apr 13, 2016 1:30 am

Re: Is there any way to change to frequency of data retrieva

Post by Ricardo »

I think if you don't change the code, its the fastest method. If you want to slow it down or set a frequency, it works with delays in the loop.
But setting a frequency would be also very interesting for me, so I ask, if someone has a idea for implementing it.
Biggest problem should be, that CAN is much faster than KWP, so it only works good for one of them. Correct me if Im wrong.
Another difficulty: The highest possible frequency depends on how many PIDs / GPS or ACC-Data you want to log.

So implementing a frequency as a sampling rate for all protocol types and different configurations is not that easy (with a high accuracy).
mikebolt
Posts: 19
Joined: Sat Sep 24, 2016 3:12 am

Re: Is there any way to change to frequency of data retrieva

Post by mikebolt »

I don't know about OBD or GPS, but for the MEMS unit, the datasheet says that you can get up to 8KHz for the gyroscope sample rate, and up to 1KHz for the accelerometer sample rate. Although this is configurable, the default SMPLRT_DIV value of 0 corresponds to the highest possible sample rate, and the v4 datalogger doesn't appear to set the SMPLRT_DIV register.

So, that gives you a theoretical limit for MEMS, at least. With the ATMega328p running at 20MHz, you should be able gather accelerometer and gyroscope samples at 1KHz. I guess it's just a matter of programming the data logger correctly.
Post Reply