CMOS flip-flop used "off label" implements precision capacitance sensor

Texas Instruments CD4013B

When applied to pharmaceuticals, the term “off-label” suggests the (frequently discovered) practical and beneficial uses for a drug that are different from the one it was originally developed for. This happens for electronic components too, such as the venerable CD4013B dual-D CMOS flip-flop. Despite the 4013’s labeling as a traditional bi-stable logic element, it nevertheless has terrific off-label potential as an analog part.

China PCB Prototype and Fabrication Manufacturer

For example, here’s how it works as a capacitance comparator as shown in Figure 1.

Circuit diagram with the CD4013B used as a capacitive humidity sensor.
Figure 1. Circuit diagram with the CD4013B used as a capacitive humidity sensor.

The #2 flip-flop has its Q outputs (pins 12 and 13) and S/R inputs (8 and 10) cross-connected through the associated R, C, and diode networks, turning it into a ~100 kHz RC oscillator. The duration (T+) of the positive oscillation half-cycle (pin 13 high) is controlled by R2C2, while R1T (the trimmer’s top half) and CX (humidity-sensor capacitance) control the duration (T–) of the negative (pin 13 low) half-cycle.

Increasing humidity increases CX, thereby increasing R1TCX and T– and vice-versa. Meanwhile, as R1T is coupling the T– pulse to the timing ramp on CX and S#2 pin 8, the bottom half of the trimmer (R1B) is coupling it to a very similar ramp on CREF and S#1 pin 6.

The relative difference between time constants R1TCX versus R1BCREF forms the basis of the capacitance measurement. If R1TCX < R1BCREF, indicating that humidity is below the setpoint on R1, then the ramp on pin 8 will cross the 0/1 threshold and end T– before the ramp on pin 6 does. This will allow FF#1 to be reset when clocked by the rising edge on pin 13 at the end of T–, asserting CREF > CX.

Contrariwise, if R1TCX > R1BCREF, then pin 6 will cross threshold first, holding FF#1 set and asserting CX > CREF.

Because both flip-flops inhabit the same chip, their respective S input thresholds will track each other closely despite variations in temperature and supply voltage, enhancing switch-point precision and stability.

The same circuit works equally well in many other capacitance-sensing applications, such as a non-contact position sensor/motion limit switch (Figure 2).

Motion limit/position sensing proximity switch using the CD4013B.
Figure 2. Motion limit/position sensing proximity switch using the CD4013B.

Detection and control of the level of liquid in a reservoir is another suitable application, as CX increases because rising liquid level increases capacitance between the liquid and an insulated probe (Figure  3).

Liquid level sensor using the CD4013B.
Figure 3. Liquid level sensor using the CD4013B.

Materials on the topic

  1. Datasheet Texas Instruments CD4013B
  2. Datasheet Vishay 2381 691 90001


You may have to register before you can post comments and get full access to forum.
User Name