Hello,
I'm working with the LDC1614 to measure the change in distance between a coil and a aluminum target over time. I've adjusted all settings to get it to give me the most accurate measure for the distance (0.3 - 0.4 mm). I'm taking samples of 30 seconds every 15 minutes and I've noticed some strange behaviour that I hope you could help me explain or correct. I've left the setup on for about 14 hours and plotted the relative change for every 30 seconds, see figure below.
- My setup has a datalogger that collects 60 samples before it writes the data to an SD card (that's the faint vertical white stripes every 3-4 second)
- Could someone tell me why the signal is slowly decreasing over time? Is this some sort of drift or warmup period?
- Could someone explain the slightly lower values for every first measurement that is taken after writing the data to the SD card (that's the faint orange vertical stripes every 3-4 seconds)?
- It seems the DATA signal is not completely continues but has steps of 21-22 points (that the white horizontal stripes). That seems like a strange number. If anything I would have expected something like 16 or 32.
I'm using the following code to get the data:
struct mydata { uint32_t t[60]; // time (s) uint32_t L[60]; // DATA } collected; int main( void ){ while( 1 ) { // collect 60 data points for(int i = 0; i < 60; i++) { // wait for a new conversion to be ready while( !ldc.is_ready( ) ) { } collected.t[i] = (uint32_t) clock(); collected.L[i] = ldc.get_Data(); } // write to file for(int i = 0; i < 60; i++) { fprintf( fp, "%.2f %d\r\n", collected.t[i]/100.0, collected.L[i] ); } } }
In which ldc is a class with is_ready() reading bit STATUS.DRDY and get_Data() reading DATA_MSB_CH0.DATA0 and DATA_LSB_CH0.DATA0.
I'm looking forward to your reaction.
Thank you,
Bob Giesberts