Design Resources

Device Drivers

Software such as C code and/or FPGA code, used to communicate with component's digital interface.

AD7746 - Microcontroller No-OS Driver

AD7746 IIO Capacitance to Digital Converter Linux Driver

Features & Benefits

  • Extends capacitive sensing range
  • Internal excitation creates complete solution

Circuit Function & Benefits

This circuit provides a method to extend the capacitive input range of the AD7745/AD7746. How to use the on-chip CapDAC sufficiently in order to minimize the range extension factor and, therefore, optimize the circuit to achieve the best possible performance is also explained. The AD7745 has one capacitance input channel, while the AD7746 has two channels. Each channel can be configured as single-ended or differential. 

Figure 1. AD7745 Capacitive Input Range Extension Circuit (Simplified Schematic: Decoupling and All Connections Not Shown)

Circuit Description

The AD7745/AD7746 capacitance-to-digital converters measure capacitance by using switching capacitor technology to build up a charge balancing circuit. As charge is proportional to the product of voltage and capacitance, Q = V × C, the conversion result represents the ratio between the input capacitance, CSENS, and the internal reference capacitance, CREF, as the excitation voltages EXCx and the internal reference voltage VREF have fixed known values.

The range extension circuit has to ensure that the charge transfer within the sensing capacitance CSENS remains within the input range of the AD7745/AD7746. To achieve this, the excitation voltage needs to be decreased by a factor of F, so that the sensing capacitance connected to the input can be increased by a factor F.

The AD7745/AD7746 have two independent excitation sources EXCA and EXCB. For the range extension, the excitation sources have to be set up in a way that EXCB is the inverse of EXCA. With resistor R1 and R2 connected as shown in Figure 1, the resulting range extension factor F is the ratio of the AD7746 excitation voltage between EXCA and EXCB (VEXC(A−B)) and the attenuated excitation signal (VEXCS) at the positive input of the AD8515 op amp. The range extension factor F can be calculated as follows:.


By using both excitation sources, the mean voltage of the attenuated excitation voltage EXCS remains around VDD/2.

The AD8515 operational amplifier in the circuit functions as a low impedance source to ensure the sensing capacitance CSENS is fully charged when the AD7745/AD7746 starts sampling.

Characteristics of Capacitive Humidity Sensor

The example of a common capacitive polymer humidity sensor element is used to explain the required calculation and considerations for the input range extension of the AD7745/AD7746. Typical technical data of such a capacitive sensor element are shown in Table 1.

Table 1. Typical Technical Data for Capacitive Sensor Element

 Humidity Range 0% to 100% Relative Humidity 
 Capacitance 150 pF ± 50 pF (at 23°C and 30% RH)
 Rate of Rise 0.25 pF/%RH

Calculating the Required Range Extension Factor, F

The first task is to find out which of the sensor’s parameters is the main contributor for the required range extension.

The sensor’s bulk capacitance can be as high as 200 pF, resulting in a required range extension factor of


The sensor’s dynamic range is calculated


The range extension factor required for the dynamic range is calculated as follows:


The calculations show that the sensors bulk capacitance is the parameter that determines the range extension factor; therefore, F = 11.76 is used for further calculations.

Choosing the Resistor Values R1 and R2

A value of 100 kΩ was chosen for R1. The resistor value for R2 is calculated and rounded down to the next value in the standard E96 series.:


Using the CapDAC

The AD7745/AD7746 have CapDACs that can be used to compensate for the bulk capacitance of a sensor element. For the AD7745/AD7746, the CapDACs have a full-scale value of 17 pF minimum and 21 pF typical. Therefore, for a given CapDAC setting, the capacitances can vary significantly from part to part.

The reason for this is that the AD7745/AD7746 on-chip capacitances can vary with the production process from batch to batch. However, the ratio variation between the on-chip capacitances is very small.

The AD7745/AD7746 capacitive input is factory calibrated. This calibration factor is stored in the Cap Gain Register. The calibration factor stored in the Cap Gain Register is calculated as follows:


Hence, the internal reference capacitance CREF can be defined as the product of the AD7745/AD7746’s allowed full range input capacitance and the gain calibration factor.


The AD7745/AD7746 are designed so that the ratio between full-range CapDAC capacitance and internal reference capacitance CREF is 3.2. Therefore, the CapDAC full range can be calculated as follows:


If the gain calibration factor is 1.4, the resulting CREF and CCAPDAC values are as follows:


The range extension circuit ensures that the charge transfer within the sensing capacitance CSENS remains within the input range of the AD7745/AD7746. Taking charge from the sensing capacitance at the CIN input, by the CapDAC, results in a decrease in measured capacitance. This is used to compensate for a sensor’s bulk capacitance. One LSB of the CapDAC capacitance represents compensation on the sensing capacitance of


Calculating the Required CapDAC Setting

The CapDAC has some dynamic nonlinearity (DNL). It is recommended to setup the CapDAC to have the intended calibration point of the application at zero-scale of the capacitive input range. The remaining offset can then be easily calibrated by using the available system offset calibration function.

The required CapDAC setting for our humidity sensing element example is calculated as follows:


A system offset calibration will compensate for the small remaining offset.

Measurement Using the Range Extension Circuit

An AD7746 demo board with a range extension circuit was used to perform the measurements. A variable capacitance was used during the measurement. The board was connected to a standard AD7746 evaluation board; the standard evaluation board software was used to configure the device and to read the conversion results. Circuits such as these must be constructed on a multilayer PC board with a large area ground plane. Proper layout, grounding, and decoupling techniques must be used to achieve optimum performance (see Tutorial MT-031, Grounding Data Converters and Solving the Mystery of "AGND" and "DGND" and Tutorial MT-101, Decoupling Techniques).

The variable capacitance was set to a defined value using a precision LCR meter. This capacitance was then connected to the range extension board, where the CapDAC was set to the calculated value of this defined bulk capacitance CBULK. A system offset calibration was performed to have the zero point at CBULK.

For each measurement taken, the capacitance was set to the desired value using the LCR meter, then connected to the range extension board measuring the capacitance seen by the AD7746. Finally, the extended capacitance value was calculated using the factor resulting from the measured resistor values. The following bulk capacitance values were used: CBULK = 100 pF, 150 pF, and 200 pF.

Calculations for the Range Extension Circuit

From the previous calculations, we know the required resistor values are 100 kΩ and 118 kΩ. The resistors used were measured and had the following values: R1 = 100.004 kΩ; R2 = 118.060 kΩ.

The resulting range extension factor F is calculated


Calculating the dynamic capacitive input range,


The resulting range for the measurement is ±45 pF in steps of 15 pF.

Calculating the gain calibration factor value read out: 0x5FBD = 24509


Resulting CapDAC values and settings are


Measurement Errors

From Figure 2, the measurement shows that the error caused by the range extension circuit is not dependent on the bulk capacitance value measured but on the range extension circuit itself. All three measurements show similar behavior and are linear; therefore, the error caused by the range extension circuit can be easily compensated for in software. 

Sample Products




Available Product
Models to Sample

AD8515 1.8 V Low Power CMOS Rail-to-Rail Input/Output Operational Amplifier



AD7745 24-bit, 1 Channel Capacitance to Digital Converter


AD7746 24-bit, 2 Channel Capacitance to Digital Converter


Buy functionality exists in desktop site