SNOA951 June   2016 LDC1312 , LDC1312-Q1 , LDC1314 , LDC1314-Q1 , LDC1612 , LDC1612-Q1 , LDC1614 , LDC1614-Q1

 

  1.   Inductive Sensing Touch-On-Metal Buttons Design Guide
    1.     Trademarks
    2. 1 ToM Basics
    3. 2 How Are Inductive Touch-On-Metal Buttons Implemented?
    4. 3 System Design Procedure
      1. 3.1 Mechanical System Design
        1. 3.1.1 Designing for Natural Button Force
          1. 3.1.1.1 Metal Composition
          2. 3.1.1.2 Metal Thickness
          3. 3.1.1.3 Mechanical Structure of the Button
        2. 3.1.2 Target Distance
        3. 3.1.3 Mechanical Isolation
        4. 3.1.4 Mounting Techniques
      2. 3.2 Sensor Design
        1. 3.2.1 PCB Design
        2. 3.2.2 Sensor Frequency Selection
        3. 3.2.3 Sensor Amplitude Selection
      3. 3.3 Other Considerations
        1. 3.3.1 Button Quantity and Multiplexing
        2. 3.3.2 Power Consumption
        3. 3.3.3 Software Algorithm
        4. 3.3.4 EMI Emissions Testing
      4. 3.4 Design Implementation
    5. 4 Results
    6. 5 Summary
    7. 6 Additional resources

Software Algorithm

The LDC measures the oscillation frequency of the sensor and converts it to a raw output code from which the sensor inductance can be calculated. An I2C interface is used to stream the 28-bit digitized data to the processor or microcontroller for post-processing. An interrupt driven method is efficient for button applications because the microcontroller does not have to poll the LDC for information.

An algorithm is required to interpret the raw output code received by the microcontroller. A straight-forward implementation uses a simple moving average function (SMA) with a dynamically adjusted threshold to determine when a button has been pressed. This algorithm is sufficient to neglect changes due to environmental factors such as temperature, while checking for fast changes that signal button press events.

For applications that do not need to detect simultaneous button presses, a simple comparison function can be implemented where the button with the strongest force applied that exceeds the detection threshold is selected. More advanced algorithms can allow for simultaneous button presses or multiple thresholds to distinguish between different levels of force. Even compensation for mechanical twisting or permanent damage from a dented panel can be handled algorithmically which allows the inductive sensing ToM solution to excel in reliability and user experience.

After the MCU has identified the button press, an acknowledgement needs to be provided to the user to indicate that the button press was recognized. In the absence of moving parts, the MCU can send a trigger to an audible, haptic, and/or visual feedback device. TI offers several haptic drivers such as the DRV2605 which can be used to drive a small motor or buzzer for button recognition.