8.2.4 Detailed Design Procedure
The target distance, resolution and diameter are used as inputs to WEBENCH to design the sensor coil, The resulting coil design is a 2 layer coil, with an area of 2.5 cm2, diameter of 17.7 mm, and 39 turns. The values for RP, L and C are: RP = 6.6 kΩ, L = 43.9 µH, C = 100 pF.
Using the L and C to determine ƒSENSOR = 1/2π√(LC) = 1/2π√(43.9*10-6 * 100*10-12) = 2.4 MHz
With a system reference clock of 40 MHz applied to the CLKIN pin allows flexibility for setting the internal clock frequencies. The sensor coil is connected to channel 0 (IN0A and IN0B pins).
After powering on the LDC, it will be in Sleep Mode. Program the registers as follows (this example sets registers for channel 0 only; channel 1 registers can use equivalent configuration):
- Set the dividers for Channel 0.
- Because the sensor frequency is less than 8.75 MHz, the sensor divider can be set to 1, which means setting field FIN_DIVIDER0 to 0x1. By default, ƒIN0 = ƒSENSOR = 2.4 MHz.
- The design constraint for ƒREF0 is > 4 × ƒSENSOR. The 40 MHz reference frequency satisfies this constraint, so the reference divider can be set to 1. This is done by setting the FREF_DIVIDER0 field to 0x01.
- The combined value for Chan. 0 divider register (0x14) is 0x1002.
- Program the settling time for Channel 0. The calculated Q of the coil is 10 (see Multi-Channel and Single Channel Operation).
- SETTLECOUNT0 ≥ Q × fREF0 / (16 × fSENSOR0) → 5.2, rounded up to 6. To provide margin to account for system tolerances, a higher value of 10 is chosen.
- Register 0x10 should be programmed to a minimum of 10.
- The settle time is: (10 x 16)/20,000,000 = 8 µs
- The value for SETTLECOUNT0 register (0x10) is 0x000A.
- The channel switching delay is ~1 μs for fREF = 20 MHz (see Multi-Channel and Single Channel Operation)
- Set the conversion time by the programming the reference count for Channel 0. The budget for the conversion time is : TSAMPLE – settling time – channel switching delay = 1000 – 8 – 1 = 991 µs
- To determine the conversion time register value, use the following equation and solve for RCOUNT0: Conversion Time (tC0)= (RCOUNT0ˣ16)/fREF0.
- This results in RCOUNT0 having a value of 1238 decimal (rounded down)
- Set the RCOUNT0 register (0x08) to 0x04D6.
- Use the default values for the ERROR_CONFIG register (address 0x19). By default, no interrupts are enabled
- Sensor drive current: to set the IDRIVE0 field value, read the value from Figure 52 using RP = 6.6 kΩ. In this case IDRIVE0 value should be set to 18 (decimal). The INIT_DRIVE0 current field should be set to 0x00. The combined value for the DRIVE_CURRENT0 register (addr 0x1E) is 0x9000.
- Program the MUX_CONFIG register
- Set the AUTOSCAN_EN to b1 bit to enable sequential mode
- Set RR_SEQUENCE to b00 to enable data conversion on two channels (channel 0, channel 1)
- Set DEGLITCH to b100 to set the input deglitch filter bandwidth to 3.3MHz, the lowest setting that exceeds the oscillation tank frequency.
- The combined value for the MUX_CONFIG register (address 0x1B) is 0x820C
- Finally, program the CONFIG register as follows:
- Set the ACTIVE_CHAN field to b00 to select channel 0.
- Set SLEEP_MODE_EN field to b0 to enable conversion.
- Set RP_OVERRIDE_EN to b1 to disable auto-calibration.
- Set SENSOR_ACTIVATE_SEL = b0, for full current drive during sensor activation
- Set the AUTO_AMP_DIS field to b1 to disable auto-amplitude correction
- Set the REF_CLK_SRC field to b1 to use the external clock source.
- Set the other fields to their default values.
- The combined value for the CONFIG register (address 0x1A) is 0x1601.
We then read the conversion results for channel 0 and channel 1 every 1.00 ms from register addresses 0x00 and 0x02.