RoadTest: Texas Instruments FDC2214 Capacitance to Digital
Author: shabaz
Creation date:
Evaluation Type: Evaluation Boards
Did you receive all parts the manufacturer stated would be included in the package?: True
What other parts do you consider comparable to this product?:
What were the biggest problems encountered?: No problems encountered. There is intensive documentation and the demo board and accompanying software were excellent.
Detailed Review:
The FDC2214 (Texas Instruments documentation page is here) is another part in Texas Instrument’s line of sensors that offer great resolution and stability to sense the environment. A while back I explored their inductance sensor, the LDC1000. The LDC1000 is a fully integrated oscillator and measurement circuit that outputs digital values at quite high speed, allowing for static and dynamic sensing of objects. It was sensitive, and the signal-to-noise ratio was so good, that it could easily detect the movement of a nearby clock hand.
For this RoadTest, I wanted to see how useful the FDC2214 could be for the creation of occupancy sensors, touchless switches for home lighting, and dust detection.
The FDC2214 allows for construction of sensors that rely on capacitance for sensing the environment. Through capacitance measurement, it is possible to do interesting things like sense human activity or to measure measure liquid levels.
The near-credit-card sized evaluation board (FDC2214EVM)evaluation board (FDC2214EVM) consists of several snappable parts; the centre portion contains the actual FDC2214FDC2214 integrated circuit. The left side provides the capability to connect the board to a PC, and the right side contains conductive plates for sensing (discussed further below).
Both the LDC1000 and FDC2214 use an inductor and a capacitor in a tank circuit that will oscillate when supplied with an impulse. In the case of the FDC2214 the integrated circuit will measure the oscillation frequency to a very high granularity (up to 28 bits!), and from that the capacitance can be derived if the inductance is known.
It is easy to add to the capacitance in the circuit by moving your hand toward the tank circuit. The hand will appear like two capacitors, one between one end of the tank circuit and the hand, and the other between the hand and the other end of the tank circuit. Depending on where the hand is placed, one capacitance could be more than the other capacitance. In any case, the tank circuit capacitance is affected and the result will be that the oscillation frequency will change. With 28-bit resolution it won’t take much capacitance change for the result to be measurable.
The FDC2214 can handle tank circuits designed for a 10kHz to 10MHz oscillation range which is large. It supports up to 250nF capacitance.
The downloadable demo software, called TI Sensing Solutions EVM GUI, is actually designed to support TI’s capacitance sensing, inductive sensing and humidity sensing evaluation boards. When the FDC2214EVM board is plugged in the EVM GUI software detects it and supports it accordingly.
The EVM GUI software provides a live dynamic graph showing the sensed capacitance values and it is possible to capture the data to a file too. The software is actually extremely useful to designers for three main reasons. Firstly the live streaming data allows one to immediately start prototyping with different capacitor sensors and topologies without waiting for your own PCB to be made. Secondly the captured data allows engineers to start coding algorithms (such as digital filters) to make use of data while the PCB for the end product is still being designed. And, lastly (and importantly) the EVM GUI software has capabilities to configure the FDC2214. It is a reasonably complex device and there are several dozen registers to configure. The EVM GUI software provides a high-level configuration screen and also a screen that shows the low-level register settings derived from the high-level configuration. These register settings are essential for software developers who will need to write the code to configure the FDC2214. The datasheet contains detailed descriptions for each register but it is far easier to capture the settings directly off the EVM GUI register settings screen (the GUI also allows the register settings to be modified so that the user can see the effect); it will speed up software development.
Occupancy sensors can be used for automatically turning on lights in a home or office, and often they rely on a passive infrared (PIR) sensor. I was more interested in workspace occupancy detection (to answer the question, is someone sitting at a desk?) but I was also curious to see if capacitance sensing could detect a person walking through a doorway. A capacitance-based sensor for occupancy detection could be discrete or invisible since the sensing plate can be concealed if desired.
As an experiment, I connected a conductive plate (100x100x1mm sheet of aluminium) using a croc clip and a long length of wire (1m) to the first channel on the FDC2214 board, and then taped the plate to a brick wall at about shoulder height.
I ran the TI software and logged the data to an Excel (csv) file (attached to this blog post if anyone is interested to have a real data-set from the device). Next I walked past the wall at a distance of 30cm (I was simulating having the sensor placed at a door entrance) three times, spaced apart by 30 seconds each time.
I imported the file into MATLAB and generated a graph (Excel could have been used to create the graph, but it tends to slow down with very large datasets) and also took the opportunity to filter the data; the raw and the filtered data graphs are shown below. What is striking from the raw data graph is the extremely low noise when no activity is sensed. It is of the order of femtofarads (the third decimal place for picofarads!).
The output can clearly be used to identify when I walked past the sensor every 30 seconds. It could be interesting to build this sensor inside (or under) tables, to detect when someone is nearby and using the desk. Since the FDC2214 has four channels it could cover a large desk. These sensors could be used to sense not only if an office meeting room is in use, but also how well sized the room is; for example are just a couple of people using a 12-person-sized meeting room?
The microcontroller portion of the FDC2214EVM board is pre-programmed to connect to the PC via USB. Although it can be reprogrammed for any purpose, in a real scenario the user may have a different microcontroller. For a current project I was using a FRDM-K64FFRDM-K64F board so I decided to attach the FDC2214 sensor portion of the board to it and write my own code to communicate to it.
The FDC2214EVM board is designed to allow the user to snap off the existing controller portion. I did that and attached SIL header pins to allow the connections to the FRDM-K64F board.
As mentioned earlier the TI EVM GUI software is actually extremely useful to allow users to develop their own code, because by clicking on the Menu->Registers option it shows the entire set of contents that needs to be configured via I2C. I took a record of the values and implemented them in the code to run on the FRDM-K64F board.
To use the FDC2214, the integrated circuit has a reset signal (high to reset) and then it can be sent the stream of configuration instructions. There is also an interrupt signal (active low signal) from the FDC2214, which is used to indicate when the capacitance-to-digital conversions are available to read.
The prototype code worked well, in particular because the output is so low-noise that I didn’t have to do much except filter out the slower trends caused by changes in the environment. I did that using a fast fourier transform (FFT). The touchless switch code is on github, and it should be possible to adapt it for any microcontroller.
See the two-minute video demonstration of the touchless switch here:
The tests above had so far used capacitors where the human body formed one plate of the capacitor at a variable distance to the sensor plate attached to the FDC2214’s tank circuit. The additional capacitance formed by the human interaction was detectable and measurable by the FDC2214.
Another type of sensor design that is discussed in the device data sheet is where the plates of the sensor are fixed at a specific distance, and material such as liquids are passed between the plates. This type of design allows for liquid level detection for instance. It relies on the fact that the capacitance is dependent on the material between the plates. Having any material other than free space between the plates will increase the capacitance. This is why large value capacitors have materials like electrolytes between the plates.
I wasn’t sure if something like dust could be detectable, but it was worth an experiment. To do this, an air-spaced capacitor was formed using I or H-shaped beams and putting metal tape on two opposite walls (either use I or H-beams and sand off most of the lips, or use a strip of plastic and file or machine a groove, or if you have a 3D printer that could be used too). It’s easier to see in the photos. In terms of size, each plastic piece was approximately 30x13x3mm with groove depth about 0.4mm. For the conductive tape I used copper since this was all I had, but aluminium may be a better choice to prevent oxidization over time. Copper is easier to solder though. The final design had five slots for air flow; electrically this is five air-spaced capacitors in parallel. A multimeter was used to confirm there were no shorts, and then the design was ready to test.
I used a fan/blowerfan/blower and attached the sensor using tape, and then connected it to the FDC2214 evaluation board (by this time I’d snapped off all ancillary bits of the EVM board). Next I powered up the fan and used my mum’s finest Yardley English Rose talc as the substance-under-test.
Sprinkling it over the assembly caused a marked drop in the data output register from the FDC2214 (a drop in this value indicates a drop in tank circuit frequency, which means an increase in capacitance, as expected). Even after I stopped sprinkling the talc, the value remained low because talc material was still being blown through the fan from the sides of the fan where it had fallen.
Incidentally the dust sensor also works to detect humidity; blowing through the slots with a straw is also easily detectable, although the reading shot in the other direction initially. I cannot explain it very well, except that I believe the moisture was conductive against the inner walls of the sensor, so that it damped oscillation by appearing as a parallel resistance. The solution could be to have an insulating layer over the copper tape (e.g. coat the inside with acrylic paint) to eliminate this.
The FDC2214EVM board is easy to use, and is extremely useful for rapidly experimenting with the technology and then going from there to produce your own prototype. Texas Instruments has expended a lot of effort in creating their PC-based application which saves users lots of time getting the technology integrated into a prototype. Demo code is useful, but TI went further in providing a useful tool that calculates configuration register settings and allows you to try the settings out immediately using the EVM board.
Regarding the actual performance of the FDC2214 chip, I was impressed at how low-noise the output was. The capacitance sensing range is huge, which means that the device can be used with very diverse sensors, for different applications. The extremely high resolution means that in many cases any lead capacitance to the sensor can be handled as just an offset. The high resolution also means that very interesting occupancy sensors and liquid, dust and other material sensors can be designed with the FDC2214.
If you're constructing your own sensors then the parallel plate capacitance calculator could be useful.
For an examination of the I2C communication refer to the Touchless Switch code on github; I used the sensor values from the TI sensing solutions GUI software which also contains source code for their firmware which is useful to examine too.
The FDC2214 and FDC2214EVM documentation pages at the TI website are of course essential reading.
Top Comments
Hi guys,
Thanks! : )
Good review.
The measurement of the capacitance is essentially the same as what is going on in a Theramin, except that here the frequency is measured directly rather than going to a mixer where it beats…
Really awesome stuff. How do get these ideas? Got a black book or somethin?