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.

LDC1614: CH0 Output is Always Zero

Part Number: LDC1614

I have created a two-layer test PCB for this chip with a single coil (from WEBBENCH). It simply has the chip, the tank capacitor (330pF X7R), and the coil. See Attached photos. When I connect the sensor to a Teensy 3.2 and run the code written by Kylie Chesner, the chip and the MCU successfully communicate, but the outputs are always zero.

 

The code run was as follows: 

#include <Wire.h>
int LDC = 0x2A;
int CH0MSB = 0x00;
int CH0LSB = 0x01;
long initial0 = 0;

unsigned long readChannel0(){
unsigned long val = 0;
word c = 0; //a word stores a 16-bit unsigned number
word d = 0;
c = readValue(LDC, CH0MSB);
d = readValue(LDC, CH0LSB);
val = c;
val <<= 16;
val += d;
return val;
}

void Calibrate(){
initial0 = readChannel0();
}

word readValue (int LDC, int reg){
int a = 0;
int b = 0;
word value = 0;
Wire.beginTransmission(LDC);
Wire.write(reg);
Wire.endTransmission();
Wire.requestFrom(LDC, 2);
while (Wire.available()){
a = Wire.read();
b = Wire.read();
}
value = a;
value <<= 8;
value += b;
return value;
}

void writeConfig(int LDC, int reg, int MSB, int LSB){
Wire.beginTransmission(LDC);
Wire.write(reg);
Wire.write(MSB);
Wire.write(LSB);
Wire.endTransmission();
}

void Configuration(){
writeConfig(LDC, 0x1A, 0x16, 0x01);//CONFIG
writeConfig(LDC, 0x14, 0x10, 0x02);//CLOCK_DIVIDERS_CH0
writeConfig(LDC, 0x1E, 0x90, 0x00);//DRIVE_CURRENT_CH0
writeConfig(LDC, 0x10, 0x00, 0x0A);//SETTLECOUNT_CH0
writeConfig(LDC, 0x08, 0x04, 0xD6);//RCOUNT_CH0
writeConfig(LDC, 0x19, 0x00, 0x00);//ERROR_CONFIG
writeConfig(LDC, 0x1B, 0x02, 0x0C);//MUX_CONFIG
}

void setup(){
Wire.begin();
Serial.begin(9600);
Configuration();
delay(500);
Calibrate();
pinMode(13, OUTPUT);
}

void loop(){
unsigned long data0 = readChannel0();
Serial.println(data0);
digitalWrite(13, HIGH); // Blink the onboard LED for signs of life
delay(200);
digitalWrite(13, LOW);
delay(200);
}

The output is as follows:

No matter where my metallic test object is in relation to the sensor, the oscilloscope always shows the output MSB and LSB to remain at zero. I have the SD, INTB, ADDR, and CLKIN pins tied to GND. 

I have tried changing the clock dividers and the RCount but this didn't show any changes in the output.

What are some other possible steps that I could take to get this chip up and running?

 

  • Hello,
    Have you used an oscilloscope to probe the IN0A and IN0B pins? If there is a short circuit somewhere in the layout then the sensor may not be oscillating and then give you all 0's for the data registers. Additionally, can you read the STATUS register? It will be helpful to determine if there are any errors showing up. Refer to the following application note for more info on the meaning of the values in the STATUS register: www.ti.com/.../SNOA959
    Regards,
    Luke LaPointe
  • Hello,
    Additionally, it looks like you are setting your CONFIG register to 0x1601. This sets REF_CLK_SRC [9] = 1, which means the device is expecting to receive a reference frequency from the CLKIN pin. If you have this shorted to ground in your layout then the device will not work properly. Try setting this bit to 0 which uses the internal oscillator by writing 0x1401 to the CONFIG register and see if this helps.
    Regards,
    Luke LaPointe
  • I tried all of your suggestions. Thanks for pointing out the configuration register. I had gone through and played with those values but I guess I forgot the change it back.

    After changing the CLK SRC to internal, now the logic analyzer is reporting the following data:

    The status register is showing 8 (and occasionally 0) in the serial monitor, so if I understand correctly, that means that it is doing its job of converting the inductance values to digital, however, it seems that bit 6 (DRDY) is never going high, or maybe my serial monitor simply isn't polling it fast enough to see it.  

    My oscilloscope only has a bandwidth of 25 MHz, so when I probe the IN0 pins, it just looks like a bunch of noise. HOWEVER, when I raise every CH0_FREF_DIVIDER bit to high, I can see signs of life, albeit, noisy.  

    The problem persists though. I still can't seem to get the data value to change with proximity to a metallic object.