1.. _fdc2x1x: 2 3FDC2X1X: Capacitance-to-Digital Converter 4######################################### 5 6Overview 7******** 8 9This sample application periodically reads frequency and capacitance data from the 10FDC2X1X sensor in polling mode or optionally with data ready trigger. It is able 11to read the 12-Bit and 28-Bit, as well as the 2-Channel and 4-Channel versions 12(FDC2112, FDC2114, FDC2212, FDC2214). The 4-channel versions are chosen through 13devicetree properties. The default in this sample is the 2-channel version. 14 15Capacitive sensing is a low-power, low-cost, high-resolution contactless sensing 16technique that can be applied to a variety of applications ranging from proximity 17detection and gesture recognition to remote liquid level sensing. The sensor in 18a capacitive sensing system is any metal or conductor, allowing for low cost and 19highly flexible system design. 20The main challenge limiting sensitivity in capacitive sensing applications is 21noise susceptibility of the sensors. With the FDC2x1x innovative EMI resistant 22architecture, performance can be maintained even in presence of high-noise environments. 23 24 25Wiring 26******* 27 28This sample uses the FDC2X1X sensor controlled using the I2C interface. 29Connect supply **VDD** and **GND**. The supply voltage can be in 30the 2.7V to 3.6V range. 31 32Connect **SD** to a GPIO to control the Shutdown Mode. 33 34Connect Interface: **SDA**, **SCL** and optionally connect **INTB** to a 35interrupt capable GPIO. 36 37For detailed description refer to the `FDC2X1X datasheet`_ 38at pages 4-5. 39 40 41Building and Running 42******************** 43 44This sample outputs sensor data to the console and can be read by any serial 45console program. It should work with any platform featuring a I2C interface. 46The platform in use requires a custom devicetree overlay. 47In this example the :ref:`nrf9160dk_nrf9160` board is used. The devicetree 48overlay of this board provides example settings for evaluation, which 49you can use as a reference for other platforms. 50 51.. zephyr-app-commands:: 52 :zephyr-app: samples/sensor/fdc2x1x 53 :board: nrf9160dk_nrf9160 54 :goals: build flash 55 :compact: 56 57Sample Output: 2-Channel, 28-Bit (FDC2212) 58========================================== 59 60.. code-block:: console 61 62 ch0: 5.318888 MHz ch1: 5.150293 MHz 63 ch0: 49.742308 pF ch1: 53.052260 pF 64 65 ch0: 5.318819 MHz ch1: 5.150307 MHz 66 ch0: 49.743612 pF ch1: 53.051964 pF 67 68 ch0: 5.318822 MHz ch1: 5.150200 MHz 69 ch0: 49.743548 pF ch1: 53.054176 pF 70 71 ch0: 5.318752 MHz ch1: 5.150265 MHz 72 ch0: 49.744860 pF ch1: 53.052828 pF 73 74 <repeats endlessly> 75 76 77Sample Output: 4-Channel, 12-Bit (FDC2114) 78========================================== 79 80.. code-block:: console 81 82 ch0: 4.966171 MHz ch1: 4.946465 MHz ch2: 4.985879 MHz ch3: 4.907051 MHz 83 ch0: 57.059016 pF ch1: 57.514568 pF ch2: 56.608844 pF ch3: 58.442204 pF 84 85 ch0: 4.966171 MHz ch1: 4.946465 MHz ch2: 4.985879 MHz ch3: 4.907051 MHz 86 ch0: 57.059016 pF ch1: 57.514568 pF ch2: 56.608844 pF ch3: 58.442204 pF 87 88 ch0: 4.966171 MHz ch1: 4.946465 MHz ch2: 4.985879 MHz ch3: 4.907051 MHz 89 ch0: 57.059016 pF ch1: 57.514568 pF ch2: 56.608844 pF ch3: 58.442204 pF 90 91 ch0: 4.966171 MHz ch1: 4.946465 MHz ch2: 4.985879 MHz ch3: 4.907051 MHz 92 ch0: 57.059016 pF ch1: 57.514568 pF ch2: 56.608844 pF ch3: 58.442204 pF 93 94 <repeats endlessly> 95 96 97References 98********** 99 100FDC2X1X Datasheet and Product Info: 101 https://www.ti.com/product/FDC2114 102 103.. _FDC2X1X datasheet: https://www.ti.com/lit/gpn/fdc2114 104