Thursday, 17 August 2017

CAPACITIVE SENSING

Capacitive sensing is an amazing technology that finds application in a variety of sensing applications. The most familiar example is the capacitive touch screen on your phone or the touch buttons on your micro-wave. At the heart of all these applications is a capacitance to digital converter that enables the device to track the changes that your finger makes by acting as the ground plate of the capacitor. I had my own adventures with this technology while designing a high resolution level sensing device.

I used FDC1004 (capacitance to digital converter) manufactured by Texas instruments. It has four channels and is resistant to EMI.  Texas instruments also provides a nice Evaluation module with GUI support for quick prototyping. Depending on your application , you can choose from other devices with different capacitance sensing ranges. The sensing range for FDC1004 is -15pF to +15pF. The Chip uses I2C communication for data exchange and configuration with a master Micro-controller. The micro-controller that I used was Atmega1248P.

Here is a link to the datasheet of FDC2214 :Datasheet

Based on the application notes provided by Texas Instruments , I was able to use the FDC2214 to design a sensor for liquid level sensing. For anyone else in the game looking to use this technology, this link can help you to get started with your own firmware for this device.

Basics of Capacitive sensing : Click Here

GitHUB : https://github.com/suveergarg/FDC_1004-capacitive-water-level-sensing

Please Feel free to post any questions regarding my code if you feel it is unclear. I have chosen to have only file and not tried to separate the TWI library. All functions of the TWI library are defined in the main.c file itself.


Capacitive sensing based liquid level sensor : Here is how my sensor looked. It has three capacitors. The top pair are for environment sensing. The middle is the main level sensor while the bottom pair acts as reference sensor and always remains dipped in a typical application.The surrounding layer acts as a shield against EMI interference. The pins outs are connected to the respective pins on the FDC2214 chip.

I was able to get a fairly linear graph for all my tests and the sensor was able to distinguish changes < 1mm in the height of the liquid.