Design World

  • Home
  • Technologies
    • ELECTRONICS • ELECTRICAL
    • Fastening • joining
    • FLUID POWER
    • LINEAR MOTION
    • MOTION CONTROL
    • SENSORS
    • TEST & MEASUREMENT
    • Factory automation
    • Warehouse automation
    • DIGITAL TRANSFORMATION
  • Learn
    • Tech Toolboxes
    • Learning center
    • eBooks • Tech Tips
    • Podcasts
    • Videos
    • Webinars • general engineering
    • Webinars • Automated warehousing
    • Voices
  • LEAP Awards
  • 2025 Leadership
    • 2024 Winners
    • 2023 Winners
    • 2022 Winners
    • 2021 Winners
  • Design Guides
  • Resources
    • Subscribe
    • 3D Cad Models
      • PARTsolutions
      • TraceParts
    • Digital Issues
      • Design World
      • EE World
    • Engineering diversity
    • Trends
  • Supplier Listings
  • Advertise
  • Subscribe

A Capacitive Sensing-Based Proximity Sensitivity Analyzer

By Nishant Mittal and Jesudasan Moses, Cypress Semiconductor | March 28, 2018

Capacitive sensing has become an important capability for implementing advanced user interfaces in almost all the areas of electronics, including consumer and automotive applications. Efficient and smooth capacitive performance depends on how the design is tested and analyzed, especially when capacitive sensing is used to perform proximity sensing. For many OEMs, testing proximity sensing is a major challenge, given that performance is bounded by the viable distance recommended for proximity detection. This article discusses the design of a capacitive sensing-based proximity sensitivity analyzer that can be used to not only find out the distance of sensitivity, but also to calculate the raw count of the sensor, calculate the threshold values for detection, and give the estimated axis position of sensing. This application can be used by any test engineer to validate capacitive sensing-based proximity sensing in an efficient manner.

In general, a proximity analyzer is a useful tool for the research, design, and testing of capacitive sensing-based applications. With a proximity analyzer, engineers can tune both proximity range and more generic capacitive sensing features like noise baseline, threshold for sensor detection, IDAC counts etc. While capacitive tuning can be done using software, this approach doesn’t provide an intuitive feel during the process. It also involves multiple iterations. Instead, the device under test (DUT) can be tested automatically using feedback mechanisms that do not require engineers to spend time tuning the design.

Figure 1 shows the block diagram of a capacitive sensing-based system. The system has a main controller, in this case a PSoC 4AM, part of the Cypress PSoC 4000S series.

Figure 1: Block diagram of a capacitive sensing-based system. Credit: Cypress

First, the microcontroller is used to determine the distance between the ground level (i.e., the DUT itself) and the metallic sensor plate used to sense proximity. The generated raw data is then analyzed and the system self-generates feedback to adjust the stepper motor for its relative degree of movement either clockwise or anticlockwise, depending upon the sensitivity of the data received.

 

 

Figure 2 shows the system diagram of this arrangement. Note that the circuitry is located towards the base of the system so that it is easily accessible. The display is connected to the center of the system for ease of viewing. The DUT, in this case a board containing a proximity sensor, should be placed at a fixed height. This will eliminate inaccuracies during testing due to variations in the surface height. To prevent this, the system should have a reference surface of fixed height above which DUT should be placed. This height can then be subtracted from the total height to get the actual proximity distance. The net distance is therefore calculated from the base of the height of the surface added to the system.

The sensor is connected to the motor, which is movable on the vertical axis of the system. A stepper motor is recommended for accurate movement of the motor; however, a servo could be used for fine movement.

Figure 2: System block diagram of proximity analyzer setup. Image: Cypress

Figure 3 shows how the mechanical system is integrated. The log display system moves along with the motor to give a better user experience. A metallic base is used for stability.

Figure 3: The mechanical system design of the proximity analyzer.

Figure 4 shows the initial version of the mechanical system design of the proximity sensor. The design can utilize a readily available development kit, such as the Cypress CY8CKIT-044, to accelerate development and simplify mechanical integration. Using this system, developers can estimate the range of proximity of the device and auto-tune it to determine the tuning parameters to be used with the sensor. 

To begin testing, developers set the expected distance for proximity. The MCU then outputs the relative motor position based on the sensitivity and raw counts it calculates from the sensor. Based on the minimum height, the MCU then calculates the appropriate sensor parameters by feeding the updated sensor tuning data to the DUT. Through continuous regression, the MCU auto-calibrates the system to have the best possible proximity sensitivity.

Algorithm

The auto-tuning algorithm involves continuous feedback monitoring and adjustment to the motor through data sent over the GPIOs. Figure 5 shows the flow of the auto-tuning algorithm.

Figure 5. Steps to the auto-tuning algorithm.

The auto-tuning steps are as follows:

  1. Start the UART, I2C and CapSense Blocks
  2. Assign pins as strong drive as they are going to drive the stepper or servo motor
  3. Enter the required maximum and minimum proximity range for use in the final application to the MCU using the UART interface.
  4. Read the value entered by the user
  5. Move the motor downwards in steps (i.e. such as a step size of 2 mm).
  6. Keep monitoring the raw count value of the DUT using the GPIO which is connected to the capacitive sensing pin on the DUT.
  7. Stop when proximity is detected.
  8. If the DUT yields the same proximity range of maximum and minimum as expected, stop and display the tuning parameters (i.e., sense clock frequency, sensor threshold, noise threshold, base line, and proximity distance).
  9. If the proximity range does not match the proximity range given by the user, input the new sensor tuning parameters. These include finger threshold, noise threshold, negative noise threshold, low baseline reset, hysteresis, and on debounce. Note that these parameters are based on distance (i.e. when the distance is greater than or less than the maximum or minimum).
  10. Retune the system by operating the motor until the raw count is calculated as high or proximity is detected.
  11. If the proximity range is still not detected, go to step 6. Otherwise go to step 5.

As this is an iterative process, it can take some time to complete. With continuous access to the sensor threshold, sense clock frequency, noise threshold, negative noise threshold, baseline, and resolution, developers can choose the required parameters to help speed tuning.

To modify the analyzer to tune capacitive buttons and sliders, the algorithm can be changed to detect touch rather than proximity. To make this adjustment, the tuning parameters, the way the developer enters the maximum and minimum, and the touch mechanical system change to enable an artificial touch mechanism that can be used to tune the system accordingly.

As an enhancement to the system, the display on the system could also measure the parasitic capacitance of the sensor. This would help to identify better routing of the board during initial tests. This information is available through the Built-In Self Test (BIST) capabilities of the MCU and accessed through a development environment such as PSoC Creator. For more details on capabilities of BIST, refer to CapSense Design Guide.

This approach to a proximity analyzer works well in lab environments where designers require the system to auto tune as quickly as possible. It can also be used for manufacturing test to measure the performance of boards in volume before they are shipped to customers.

In this article, we have described how to auto calibrate as well as measure the sensitivity of a proximity sensor. This approach to a proximity analyzer, using the DUT itself, can also be modified to tune various other capacitive components like buttons and sliders. The flexibility of this approach and how it eases calibration can save extensive time compared to manual sensor tuning. In addition, this automated approach not only tunes systems but can also verify the overall capabilities of the system.

You Might Also Like


Filed Under: TEST & MEASUREMENT, Motors • stepper

 

LEARNING CENTER

Design World Learning Center
“dw
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for Design Engineering Professionals.
Motor University

Design World Digital Edition

cover

Browse the most current issue of Design World and back issues in an easy to use high quality format. Clip, share and download with the leading design engineering magazine today.

EDABoard the Forum for Electronics

Top global problem solving EE forum covering Microcontrollers, DSP, Networking, Analog and Digital Design, RF, Power Electronics, PCB Routing and much more

EDABoard: Forum for electronics

Sponsored Content

  • Sustainability, Innovation and Safety, Central to Our Approach
  • Why off-highway is the sweet spot for AC electrification technology
  • Looking to 2025: Past Success Guides Future Achievements
  • North American Companies Seek Stronger Ties with Italian OEMs
  • Adapt and Evolve
  • Sustainable Practices for a Sustainable World
View More >>
Engineering Exchange

The Engineering Exchange is a global educational networking community for engineers.

Connect, share, and learn today »

Design World
  • About us
  • Contact
  • Manage your Design World Subscription
  • Subscribe
  • Design World Digital Network
  • Control Engineering
  • Consulting-Specifying Engineer
  • Plant Engineering
  • Engineering White Papers
  • Leap Awards

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Design World

  • Home
  • Technologies
    • ELECTRONICS • ELECTRICAL
    • Fastening • joining
    • FLUID POWER
    • LINEAR MOTION
    • MOTION CONTROL
    • SENSORS
    • TEST & MEASUREMENT
    • Factory automation
    • Warehouse automation
    • DIGITAL TRANSFORMATION
  • Learn
    • Tech Toolboxes
    • Learning center
    • eBooks • Tech Tips
    • Podcasts
    • Videos
    • Webinars • general engineering
    • Webinars • Automated warehousing
    • Voices
  • LEAP Awards
  • 2025 Leadership
    • 2024 Winners
    • 2023 Winners
    • 2022 Winners
    • 2021 Winners
  • Design Guides
  • Resources
    • Subscribe
    • 3D Cad Models
      • PARTsolutions
      • TraceParts
    • Digital Issues
      • Design World
      • EE World
    • Engineering diversity
    • Trends
  • Supplier Listings
  • Advertise
  • Subscribe
We use cookies to personalize content and ads, to provide social media features, and to analyze our traffic. We share information about your use of our site with our social media, advertising, and analytics partners who may combine it with other information you’ve provided to them or that they’ve collected from your use of their services. You consent to our cookies if you continue to use this website.OkNoRead more