This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Interpretation of reading Data LDC1614

Other Parts Discussed in Thread: LDC1614

Hi, 

I have  just started working with the LDC1614; I am using the python code(found in FAQs) to read data from the sensor.

I am currenlty getting this readings:

data_msb=058a data_lsb=24d4 Status=c047
data_msb=058b data_lsb=ba7e Status=c047
data_msb=0584 data_lsb=9347 Status=c047
data_msb=0576 data_lsb=cbb5 Status=c047
data_msb=058d data_lsb=8454 Status=c047
data_msb=0583 data_lsb=b022 Status=c047
data_msb=0588 data_lsb=48d6 Status=c047
data_msb=0580 data_lsb=2f14 Status=c047
data_msb=057e data_lsb=fea2 Status=c047
data_msb=0581 data_lsb=56ce Status=c047
data_msb=057e data_lsb=5de9 Status=c047
data_msb=057e data_lsb=9ee6 Status=c047


but I don't know how to interpret them. Is this the same data that can be read in the data streaming section of the OneUI application.

what does this data means?

Thank you a lot for your guidance

  • Hi Jorge,
    This is the same data that you would read in the data streaming tab of the OneUI GUI. For example, you can also choose to output raw data in the GUI and this would match with what you read from your python code. The data you're reading is hex, the first byte is for error code. So "0" means there is no error. To convert from raw code to actual frequency, you can use equation 2 from Section 8.3.2 on the datasheet: www.ti.com/.../ldc1614-q1.pdf.

    Best Regards,
    Bala Ravi

    Please click "This resolved my issue" button if this post answers your question
  • Thank you for your answer.
    The equation 2 from section 8.3.2 is: f(sensor) = (DATAx * f(REFx))/2^28
    I believe that DATAx will be the concatenation of data_msb and data_lsb, but where can I get the value of the frecuency: f(REFx).
  • Hi Jorge,
    LDC1614 comes with an internal oscillator of 43 MHz. You can read more about Fref in Section 7.3.4 of the datasheet: www.ti.com/.../ldc1614.pdf.

    Best Regards,
    Bala Ravi

    Please click "This resolved my issue" button if this post answers your question
  • Thank you again for your answer!

    Could you please confirm if I understand correctly. So, for converting a register value to the actual frecuency, the following steps should be done:

    1. transform the hex value of the concatenation of data_msb with data_lsb to float in python it will be something like this:

    Datax = str(data_msb) + str(data_lsb)                                           # Datax = 0567d64a

    Data_FLOAT = struct.unpack('!f', Datax.decode('hex'))[0]            # Data_FLOAT = 1.09009264863e-35

    2. multiply the result with 43 and then divide everything in 2^28

    fsensor = (Data_FLOAT*43)/(2**28)                                             # fsensor = 1.74619197441e-42 MHz

    Am I correct?

    Thank you for your help!

  • Hi Jorge,
    You're headed in the right direction. I am not familiar with "str" or "unpack" functions in python. Use the following formula to get Datax, Datax = = DATAx_MSB×65536 + DATAx_LSB, then use fsensor = fsensor = (Data_FLOAT*43)/(2**28) MHz. You can always cross check if your calculations are correct from the L and C values used for the sensor. When there is no target, your sensor output should be close to: fsensor = 1/(2*pi*sqrt(L*C)). There is something wrong with your calculation, as your sensor frequency does not make sense.

    Best Regards,
    Bala Ravi

    Please click "This resolved my issue" button if this post answers your question