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.

FDC2214: fdc2214

Part Number: FDC2214
Other Parts Discussed in Thread: FDC2114, FDC2212, FDC2112, FDC1004

Tool/software:

We have purchased the FDC2214 Chip from mouser. we want to use the IC for the liquid nitrogen level measurement. As per the datasheet we are using the single ended channel, but we are seeing very odd results, whereas we are using the 18uH and 33pF, we are not getting stable readings. Please, let us know if we can have the call or technical discussion. Looking forward to hearing from you.   

  • Hello Arya, 

    Our capacitive experts are out off the office due to the holiday, they will get back to you once they return.

    We appreciate your patience.

    Best,

    Isaac

  • Arya,

    Could you provide some more info about your system?

    1. What material is used for the container holding the fluid to be measured?
    2. How is the sensor and FDC2214 positioned relative to the tank and the fluid?
    3. I am unfamiliar with the electrical properties of liquid nitrogen. What is its permittivity and conductivity?

    Regards,
    John

  • Namaste John, 

    Appreciate the quick response. 

    1. What material is used for the container holding the fluid to be measured?
      1. SS304 container material SS304
    2. How is the sensor and FDC2214 positioned relative to the tank and the fluid?
      1. Sensor is placed at the center of the container. 
    3. I am unfamiliar with the electrical properties of liquid nitrogen. What is its permittivity and conductivity?
      1. Relative Permittivity: 1.45  (For liquid) ,  ~ 1 for gaseous nitrogen

      2. Conductivity: 10^-10 micro-siemens per centimeter

    Note: Sensor is Two Rods with 600 mm length whereas the outer rod will connect to body which will be earth and ground, and inner rod will be as positive which connects to channel 1. 

    Please, also we are using the Arduino Nano for the Quick test here is the library attached for your reference. 

    Let me know what we can do better to get the stable readings 

    We have write a code as per the our requirements as follows 

    // This is example code to demonstrate the functionality of FDC2214 library
    //
    // There is no warranty to the code. There is no support, don't ask for it.
    // Use or skip on your own responsibility.
    // NOT ALL FEATURES ARE TESTED!
    //
    // The code might get revisited at some point or it might not.
    // The code does more than I need at the moment.
    //
    // Feel free to do whatever you want with it. No licensing BS. No limitations.
    //
    // Created by Harijs Zablockis, Intelitech, March 2018
    //
    // Supproted chips: FDC2112, FDC2114, FDC2212, FDC2214
    // Transmitts data via serial - use SerialPlot to draw graphs
    //
    // FDC2x1x hardware configuration:
    // Component value as in default circuit form datasheet. (18uH inductor and 33pF cap)
    //
    // SD and ADDR pins tied to GND
    // INTB pin not used
    //
    // ARDUINO <--> FDC
    // A4 <-------> SDA
    // A5 <-------> SCL
    //
    // !!!!!! Arduinos are mostly 5V. FDC chips are 3.3V, so either use 3.3V version of Arduino, like pro mini, or use level shifter on I2C bus.
    //

    // ### FDC
    #include <Wire.h>
    #include "FDC2214.h"
    FDC2214 capsense(FDC2214_I2C_ADDR_0);  // Use FDC2214_I2C_ADDR_1
    uint16_t CH1 = 0;
    int address = 0;
    uint16_t data;
    uint16_t data1;

    // ###
    void setup() {

      // ### Start I2C
      Wire.begin();
      //  Wire.setClock(400000L);

      // ### Start serial
      Serial.begin(115200);
      Serial.println("\nFDC2x1x test");

      // ### Start FDC
      // Start FDC2212 with 2 channels init
      //  bool capOk = capsense.begin(0x3, 0x4, 0x5, false); //setup first two channels, autoscan with 2 channels, deglitch at 10MHz, external oscillator
      // Start FDC2214 with 4 channels init
      bool capOk = capsense.begin(0xF, 0x6, 0x5, false);  //setup all four channels, autoscan with 4 channels, deglitch at 10MHz, external oscillator
      // Start FDC2214 with 4 channels init
      //  bool capOk = capsense.begin(0xF, 0x6, 0x5, true); //setup all four channels, autoscan with 4 channels, deglitch at 10MHz, internal oscillator
      // if (capOk) Serial.println("Sensor OK");
      // else Serial.println("Sensor Fail");


    //   //******************************** Rcount setting ****************************************************
    //   Wire.beginTransmission(0x2A);
    //   address = 0x08;
    //   data = 0x8329;
    //     Wire.write(address & 0xFF);
    //     Wire.write(data >> 8);
    //     Wire.write(data);
    //     Wire.endTransmission();  
    //   Serial.println("Rcount_CH0 ");
    //   // Serial.println(data);
    //   delay(500);
    // //***************************************************************************************************


    // //******************************** Settle Count setting CH0 ****************************************************
    //   Wire.beginTransmission(0x2A);
    //   address = 0x10;
    //   data = 0x000A;
    //     Wire.write(address & 0xFF);
    //     Wire.write(data >> 8);
    //     Wire.write(data);
    //     Wire.endTransmission();  
    //   Serial.println("sETTLE_COUNT_CH0 ");
    //   // Serial.println(data);
    //   delay(500);
    // //***************************************************************************************************


    // //******************************** Clock Divder  CH0 ****************************************************
    //   Wire.beginTransmission(0x2A);
    //   address = 0x14;
    //   data = 0x2002;
    //     Wire.write(address & 0xFF);
    //     Wire.write(data >> 8);
    //     Wire.write(data);
    //     Wire.endTransmission();  
    //   Serial.println("Clock_Divider_CH0 ");
    //   // Serial.prin
    //   Serial.println(data);
    //   delay(500);
    // //***************************************************************************************************


    // //******************************** MUX CONFIGURATION  CH0 ****************************************************
    //   Wire.beginTransmission(0x2A);
    //   address = 0x1B;
    //   data = 0xC20D;
    //     Wire.write(address & 0xFF);
    //     Wire.write(data >> 8);
    //     Wire.write(data);
    //     Wire.endTransmission();  
    //   Serial.print("MUX CONFIGURATION_CH0 ");
    //   // Serial.println(data);
    //   // delay(5000);
    // //***************************************************************************************************

    // //********************************Drive Current CH0 ****************************************************
    //   Wire.beginTransmission(0x2A);
    //   address = 0x1E;
    //   data = 0x7C00;
    //     Wire.write(address & 0xFF);
    //     Wire.write(data >> 8);
    //     Wire.write(data);
    //     Wire.endTransmission();  
    //   Serial.print("Drive Current_CH0 ");
    //   // Serial.println(data);
    //   delay(500);
    // //***************************************************************************************************

    // //******************************** Configuration CH0 ****************************************************
    //   Wire.beginTransmission(0x2A);
    //   address = 0x1A;
    //   data = 0x1601;
    //     Wire.write(address & 0xFF);
    //     Wire.write(data >> 8);
    //     Wire.write(data);
    //     Wire.endTransmission();  
    //   Serial.print("Configuratin CH0 ");
    //   // Serial.println(data);
    //   delay(500);
    // //***************************************************************************************************



    }

    // ### Tell aplication how many chanels will be smapled in main loop
    #define CHAN_COUNT 4

    // ###
    void loop() {
      unsigned long capa[CHAN_COUNT];  // variable to store data from FDC
      // for (int i = 0; i < CHAN_COUNT; i++){ // for each channel
      //   // ### read 28bit data
      //   capa[i]= capsense.getReading28(0);//


      //   // ### Transmit data to serial in simple format readable by SerialPlot application.
      //   Serial.print(capa[i]);
      //   if (i < CHAN_COUNT-1) Serial.print(", ");
      //   else Serial.println("");
      //   delay(1000);
      // }

      // capa[0] = read16FDC(CH1);
      // Serial.println(capa[0]);
      // delay(1000);
    // //******************************** Rcount setting ****************************************************
    //   Wire.beginTransmission(0x2A);
    //   address = 0x08;
    //   data = 0x8329;
    //     Wire.write(address & 0xFF);
    //     Wire.write(data >> 8);
    //     Wire.write(data);
    //     Wire.endTransmission();  
    //   Serial.print("Rcount_CH0 ");
    //   // Serial.println(data);
    //   delay(500);
    // //***************************************************************************************************


    // //******************************** Settle Count setting CH0 ****************************************************
    //   Wire.beginTransmission(0x2A);
    //   address = 0x10;
    //   data = 0x8329;
    //     Wire.write(address & 0xFF);
    //     Wire.write(data >> 8);
    //     Wire.write(data);
    //     Wire.endTransmission();  
    //   Serial.print("sETTLE_COUNT_CH0 ");
    //   // Serial.println(data);
    //   delay(500);
    // //***************************************************************************************************


    // //******************************** Clock Divder  CH0 ****************************************************
    //   Wire.beginTransmission(0x2A);
    //   address = 0x14;
    //   data = 0x8329;
    //     Wire.write(address & 0xFF);
    //     Wire.write(data >> 8);
    //     Wire.write(data);
    //     Wire.endTransmission();  
    //   Serial.print("Clock_Divider_CH0 ");
    //   // Serial.println(data);
    //   delay(500);
    // //***************************************************************************************************


    // //******************************** MUX CONFIGURATION  CH0 ****************************************************
    //   Wire.beginTransmission(0x2A);
    //   address = 0x1B;
    //   data = 0xC20D;
    //     Wire.write(address & 0xFF);
    //     Wire.write(data >> 8);
    //     Wire.write(data);
    //     Wire.endTransmission();  
    //   Serial.print("MUX CONFIGURATION_CH0 ");
    //   // Serial.println(data);
    //   // delay(5000);
    // //***************************************************************************************************

    // //********************************Drive Current CH0 ****************************************************
    //   Wire.beginTransmission(0x2A);
    //   address = 0x1E;
    //   data = 0x7C00;
    //     Wire.write(address & 0xFF);
    //     Wire.write(data >> 8);
    //     Wire.write(data);
    //     Wire.endTransmission();  
    //   Serial.print("Drive Current_CH0 ");
    //   // Serial.println(data);
    //   delay(500);
    // //***************************************************************************************************

    // //******************************** Configuration CH0 ****************************************************
    //   Wire.beginTransmission(0x2A);
    //   address = 0x1A;
    //   data = 0x1601;
    //     Wire.write(address & 0xFF);
    //     Wire.write(data >> 8);
    //     Wire.write(data);
    //     Wire.endTransmission();  
    //   Serial.print("Configuratin CH0 ");
    //   // Serial.println(data);
    //   delay(500);
    // //***************************************************************************************************
     Serial.println("*************************************************************************");
       Wire.beginTransmission(0x2A);
      //    Wire.write(address >> 8);
      Wire.write(0x19);
      Wire.endTransmission(false);  //restart

      Wire.requestFrom(0x2A, (uint8_t)2);
      while (!Wire.available())
        ;
      data = Wire.read();
      data <<= 8;
      while (!Wire.available())
        ;
      data |= Wire.read();
      Wire.endTransmission(true);  //end
      Serial.print("Error Config ");
      Serial.println(data);

     



      Wire.beginTransmission(0x2A);
      //    Wire.write(address >> 8);
      Wire.write(address);
      Wire.endTransmission(false);  //restart

      Wire.requestFrom(0x2A, (uint8_t)2);
      while (!Wire.available())
        ;
      data = Wire.read();
      data <<= 8;
      while (!Wire.available())
        ;
      data |= Wire.read();
      Wire.endTransmission(true);  //end
      Serial.print("MSB ");
      Serial.println(data);





      Wire.beginTransmission(0x2A);
      //    Wire.write(address >> 8);
      Wire.write(0x01);
      Wire.endTransmission(false);  //restart

      Wire.requestFrom(0x2A, (uint8_t)2);
      while (!Wire.available())
        ;
      data1 = Wire.read();
      data1 <<= 8;
      while (!Wire.available())
        ;
      data1 |= Wire.read();
      Wire.endTransmission(true);  //end
      Serial.print("LSB ");
      Serial.println(data1);

      uint32_t combined = ((uint32_t)data << 16) | data1;
      Serial.print("Data ");
      Serial.println(combined);
      // No point in sleeping
      // Calculation for the F sesne
      // double Fsense = (combined * 40)/268435456;
      double Fsense = (combined * 40)*3.72529E-09;
      Serial.print("Fsense=");
      Serial.println(Fsense);

      double RecSensor = 18E-06*(6.28*Fsense*1E6)*(6.28*Fsense*1E6);
      Serial.print("RecSesnor=");
      double CapCal = (1/RecSensor)*1E12;
      Serial.println(RecSensor);
      Serial.print("Capacitance(pF)=");
      Serial.println((CapCal/2)-77);

      delay(1000);
    }


    // void read16FDC(uint16_t address) {
    //     uint16_t data;

    //     Wire.beginTransmission(0x2A);
    // //    Wire.write(address >> 8);
    //     Wire.write(address);
    //     Wire.endTransmission(false); //restart

    //     Wire.requestFrom(0x2A, (uint8_t) 2);
    //     while (!Wire.available());
    //     data = Wire.read();
    //     data <<= 8;
    //     while (!Wire.available());
    //     data |= Wire.read();
    //     Wire.endTransmission(true); //end
    //     return data;
    // }

     

    FDC2214-master.zip

  • Arya,

    How stable is the system when:

    1. There is no fluid in the container
    2. The liquid nitrogen is replaced by fresh water of varying levels

    Is it possible to probe the sensor signals with an a high impedance probe and an oscilloscope?
    If it is, what do the sensor signals look like when the device is giving stable & unstable outputs?

    Just so you know, we have found it is helpful to place a 1k leaded resistor between the probe tip and the test point.
    This helps reduce the loading on what is usually a high impedance test point and helps minimize waveform distortion during the measurement.

    Regards,
    John

  • Namaste John,

    thank you for the inputs.

    we just have few Questions.

    1. water should be normal water or Distilled water ?

    2. we have connected to co axial cable which has the 96.5 pF/m capacitance. Where we found that the readings are unstable and varies between 3 pF. Please can you check our design. Consideration of 18uH and 33 pf capacitor also please can you confirm about the code that we are using.

    thank you in advance !!!.

    regards,

    Varad 

  • Arya,

    1. Distilled water is best, but regular, drinkable tap water should be okay.
    2. Its best to minimize the capacitance of the connection between the device and the sensors.
      It might be with experimenting with other cable types, like twisted pair, etc.

    One thing I forgot to mention is that the FDC2x1y family of parts can be sensitive to EMI unless they are in a shielded enclosure.
    It can be tough to shield capacitive sensors because grounded shields close to the sensors can create excessive parasitics that can overwhelm the desired  measurements.

    That is one of the reasons we recommend the FDC1004 over the FDC2x1y devices.
    The   has built-in active shield drivers which can help with EMI management. 
    You can see more about the FDC1004 at the E2E FDC1004 Frequently Asked Questions page.

    Regards,
    John

  • Namaste john, 

    Thank you for the inputs. 

    As per the datasheet FDC1004 only can go up to 15 pF, our sensor has the capacitance of 100pF to 400 pF. 

    How we can measure this range?

    Thanks & regards,

    Varad

  • Arya,

    If your measurement range is indeed 100pF to 400pF, then the FDC2x1y family is your best option.

    Regards,
    Joh